text
stringlengths
2
100k
meta
dict
// // U4DRenderShaderEntity.hpp // UntoldEngine // // Created by Harold Serrano on 7/7/20. // Copyright © 2020 Untold Engine Studios. All rights reserved. // #ifndef U4DRenderShaderEntity_hpp #define U4DRenderShaderEntity_hpp #include <stdio.h> #include "U4DRenderManager.h" #include "U4DMatrix4n.h" #include "U4DVector3n.h" #include "U4DVector4n.h" #include "U4DVector2n.h" #include "U4DIndex.h" #include "U4DShaderEntity.h" namespace U4DEngine { typedef struct{ simd::float4 position; simd::float2 uv; simd::float2 padding; }AttributeAlignedShaderEntityData; } namespace U4DEngine { /** * @ingroup renderingengine * @brief The U4DRenderShaderEntity class manages the rendering of all 2D images * */ class U4DRenderShaderEntity:public U4DRenderManager { private: /** * @brief the shader object the class will manage */ U4DShaderEntity *u4dObject; protected: /** * @brief vector for the aligned attribute data. The attributes need to be aligned before they are processed by the GPU */ std::vector<AttributeAlignedShaderEntityData> attributeAlignedContainer; public: /** * @brief Constructor for class * @details It sets the image entity it will manage * * @param uU4DShaderEntity image entity */ U4DRenderShaderEntity(U4DShaderEntity *uU4DShaderEntity); /** * @brief Destructor for class */ ~U4DRenderShaderEntity(); /** * @brief Initializes the library shaders * @details It initializes the vertex and fragment shaders for the entity */ void initMTLRenderLibrary(); /** * @brief Initializes the Rendering Pipeline * @details It prepares the rendering descriptor with the appropriate color attachment, depth attachment, shaders and attributes */ void initMTLRenderPipeline(); /** * @brief Loads the attributes and Uniform data * @details It prepares the attribute data so that it is aligned. It then loads the attributes into a buffer. It also loads uniform data into a buffer * @return True if loading is successful */ virtual bool loadMTLBuffer(); /** * @brief Loads image texture into GPU * @details It decodes the current texture image, creates a texture object, a texture sampler, and loads the raw data into a buffer */ void loadMTLTexture(); /** * @brief Updates the space matrix of the entity * @details Updates the image space matrix of the entity by computing the world, view and orthogonal space matrix */ void updateSpaceUniforms(); /** * @brief Renders the current entity * @details Updates the space matrix and any rendering flags. It encodes the pipeline, buffers and issues the draw command * * @param uRenderEncoder Metal encoder object for the current entity */ void render(id <MTLRenderCommandEncoder> uRenderEncoder); /** * @brief It aligns all attribute data * @details Aligns vertices and uv. This is necessary when using Metal */ void alignedAttributeData(); /** * @brief Sets the texture image for the image * @details It sets the texture that will be decoded into raw data and loaded into the texture buffer * * @param uTexture texture name */ void setTexture0(const char* uTexture); /** @brief Method which returns the absolute space of the entity @return Returns the entity absolure space-Orientation and Position */ U4DDualQuaternion getEntitySpace(); /** * @brief clears all attributes containers * @details clears attributes containers such as vertices and UVs */ virtual void clearModelAttributeData(); /** * @brief Update the users parameters used in the shader */ void updateShaderEntityParams(); /** * @brief Loads additional information for the particle system * @details Loads additional particle system properties */ void loadMTLAdditionalInformation(); }; } #endif /* U4DRenderShaderEntity_hpp */
{ "pile_set_name": "Github" }
# pfamDat.sql was originally generated by the autoSql program, which also # generated pfamDat.c and pfamDat.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #Data about a pfam global hit. CREATE TABLE pfamHit ( model varchar(255) not null, # Model hit with sequence. descript varchar(255) not null, # Description of Model hit with sequence. score double not null, # Bit score of hit. eval double not null, # E-values of hit. numTimesHit int unsigned not null, # Number of times hit was found in sequence. #Indices PRIMARY KEY(model) ); #Data about a pfam domain hit. CREATE TABLE pfamDHit ( model varchar(255) not null, # Model of domain. domain int not null, # Domain number of hit. numDomain int not null, # Number of domains for a hit. seqStart int unsigned not null, # Start in sequence of hit. seqEnd int unsigned not null, # End in sequence of hit. seqRep varchar(255) not null, # String representation of where hit is located in seq, '[.','..','.]','[]' hmmStart int unsigned not null, # Start in profile hmm of hit. hmmEnd int unsigned not null, # End in profile hmm of hit. hmmRep varchar(255) not null, # String representation of where hit is located in seq, '[.','..','.]','[]' dScore double not null, # Score for domain hit. dEval double not null, # Evalue for domain. alignment varchar(255) not null, # Text based alignment. #Indices PRIMARY KEY(model) ); #Structure to hold results of one hmmpfam run. Distributed by Sean Eddy. See http://www.genetics.wustl.edu/eddy/software/ CREATE TABLE pfamDat ( seqName varchar(255) not null, # Sequence name. sequence varchar(255) not null, # Sequence run against library. pfamHitList longblob not null, # Global hits. pfamDHitList longblob not null, # Domain hits. #Indices PRIMARY KEY(seqName) );
{ "pile_set_name": "Github" }
SubDir HAIKU_TOP src add-ons kernel drivers bus ; SubInclude HAIKU_TOP src add-ons kernel drivers bus firewire ; SubInclude HAIKU_TOP src add-ons kernel drivers bus pcmcia ; SubInclude HAIKU_TOP src add-ons kernel drivers bus scsi ; SubInclude HAIKU_TOP src add-ons kernel drivers bus usb ;
{ "pile_set_name": "Github" }
package com.gpmall.shopping.dto; import lombok.Data; import java.io.Serializable; import java.util.Date; import java.util.List; /** * 腾讯课堂搜索【咕泡学院】 * 官网:www.gupaoedu.com * 风骚的Mic 老师 * create-date: 2019/7/23-18:32 */ @Data public class PanelDto implements Serializable { private static final long serialVersionUID = -9099372701554072936L; private Integer id; private String name; private Integer type; private Integer sortOrder; private Integer position; private Integer limitNum; private Integer status; private String remark; private List<PanelContentItemDto> panelContentItems; }
{ "pile_set_name": "Github" }
// Copyright 2014-2019 Omni Development, Inc. All rights reserved. // // This software may only be used and reproduced according to the // terms in the file OmniSourceLicense.html, which should be // distributed with this project and can also be found at // <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>. #import <Foundation/NSObject.h> #import <Foundation/NSData.h> #import <OmniFileStore/OFSKeySlots.h> @class NSIndexSet; NS_ASSUME_NONNULL_BEGIN @interface OFSDocumentKeyDerivationParameters : NSObject <NSCopying> - initWithAlgorithm:(NSString *)algorithm rounds:(unsigned)rounds salt:(NSData *)salt pseudoRandomAlgorithm:(NSString *)pseudoRandomAlgorithm; @property(nonatomic,readonly) NSString *algorithm; @property(nonatomic,readonly) unsigned rounds; @property(nonatomic,readonly) NSData *salt; @property(nonatomic,readonly) NSString *pseudoRandomAlgorithm; @end /* An OFSDocumentKey represents a set of subkeys protected by a user-relevant mechanism like a passphrase. */ @interface OFSDocumentKey : NSObject <NSCopying,NSMutableCopying> - (instancetype)init NS_UNAVAILABLE; - (instancetype __nullable)initWithData:(NSData * __nullable)finfo error:(NSError **)outError NS_DESIGNATED_INITIALIZER; // For reading a stored keyblob - (NSData *)data; @property (readonly,nonatomic) NSInteger changeCount; // For detecting (semantically significant) changes to -data. Starts at 0 and increases. Not (currently) KVOable. @property (readonly,nonatomic) BOOL valid; // =YES if we have successfully derived our unwrapping key and have access to the key slots /* Password-based encryption */ @property (readonly,nonatomic) BOOL hasPassword; - (nullable OFSDocumentKeyDerivationParameters *)passwordDerivationParameters:(NSError **)outError; - (BOOL)deriveWithPassword:(NSString *)password error:(NSError **)outError; - (BOOL)deriveWithWrappingKey:(NSData *)wrappingKey error:(NSError **)outError; + (nullable NSData *)wrappingKeyFromPassword:(NSString *)password parameters:(OFSDocumentKeyDerivationParameters *)parameters error:(NSError **)outError; - (BOOL)borrowUnwrappingFrom:(OFSDocumentKey *)otherKey; @property (readonly,atomic) OFSKeySlots *keySlots; /* Returns some flags for a filename, based on whether it matches any rules added by -setDisposition:forSuffix:. */ - (unsigned)flagsForFilename:(NSString *)filename; /* Return an encryption worker for the current active key slot. */ - (nullable OFSSegmentEncryptWorker *)encryptionWorker:(NSError **)outError; - (NSDictionary *)descriptionDictionary; // For the UI. See keys below. @end @interface OFSMutableDocumentKey : OFSDocumentKey - (instancetype)init; - (instancetype __nullable)initWithAuthenticator:(OFSDocumentKey *)source error:(NSError **)outError; // For creating a new keyblob sharing another one's password - (BOOL)setPassword:(NSString *)password error:(NSError **)outError; // Users of the document key can modify this key slot object. The owning document key's changeCount will reflect changes made to its key slot object. @property (readonly,atomic) OFSMutableKeySlots *mutableKeySlots; @end // Keys in the dictionary returned by -descriptionDictionary // See also the keys defined in OFSKeySlots.h; our -descriptionDictionary is merged with the one returned by OFSKeySlots. #define OFSDocKeyDescription_AccessMethod @"method" // User-displayable name of unlock method, e.g. "Password (PBKDF2; aes128-wrap)" NS_ASSUME_NONNULL_END
{ "pile_set_name": "Github" }
@ARTICLE{Sa_2016, AUTHOR = {Sa, Inkyu and Ge, Zongyuan and Dayoub, Feras and Upcroft, Ben and Perez, Tristan and McCool, Chris}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fs16081222}, DATE = {2016-08}, DOI = {10.3390/s16081222}, JOURNALTITLE = {Sensors}, NUMBER = {8}, PAGES = {1222}, TITLE = {DeepFruits: A Fruit Detection System Using Deep Neural Networks}, VOLUME = {16}, } @ARTICLE{Maryam_2017, AUTHOR = {Rahnemoonfar, Maryam and Sheppard, Clay}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fs17040905}, DATE = {2017-04}, DOI = {10.3390/s17040905}, JOURNALTITLE = {Sensors}, NUMBER = {4}, PAGES = {905}, TITLE = {Deep Count: Fruit Counting Based on Deep Simulated Learning}, VOLUME = {17}, } @ARTICLE{Grinblat_2016, AUTHOR = {Grinblat, Guillermo L. and Uzal, Lucas C. and Larese, M{\'{o}}nica G. and Granitto, Pablo M.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2016.07.003}, DATE = {2016-09}, DOI = {10.1016/j.compag.2016.07.003}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {418--424}, TITLE = {Deep learning for plant identification using vein morphological patterns}, VOLUME = {127}, } @REPORT{EmploymentEU, AUTHOR = {Fr\"{o}der, Christoph}, INSTITUTION = {Institut der deutschen Wirtschaft K\"{o}ln, Geopa-Copa}, DATE = {2014-11}, TITLE = {Employment in European Agriculture: Labour Costs, Flexibility and Contractual Aspects}, } @ARTICLE{Colbert16, AUTHOR = {Colbert, Amy and Yee, Nick and George, Gerard}, URL = {https://journals.aom.org/doi/abs/10.5465/amj.2016.4003}, DATE = {2016}, DOI = {10.5465/amj.2016.4003}, EPRINT = {https://journals.aom.org/doi/pdf/10.5465/amj.2016.4003}, JOURNALTITLE = {Academy of Management Journal}, NUMBER = {3}, PAGES = {731--739}, TITLE = {The Digital Workforce and the Workplace of the Future}, VOLUME = {59}, } @ARTICLE{Aubert_2012, AUTHOR = {Aubert, Benoit A. and Schroeder, Andreas and Grimaudo, Jonathan}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.dss.2012.07.002}, DATE = {2012-12}, DOI = {10.1016/j.dss.2012.07.002}, JOURNALTITLE = {Decision Support Systems}, NUMBER = {1}, PAGES = {510--520}, TITLE = {IT as enabler of sustainable farming: An empirical analysis of farmers adoption decision of precision agriculture technology}, VOLUME = {54}, } @ARTICLE{Pierpaoli_2013, AUTHOR = {Pierpaoli, Emanuele and Carli, Giacomo and Pignatti, Erika and Canavari, Maurizio}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.protcy.2013.11.010}, DATE = {2013}, DOI = {10.1016/j.protcy.2013.11.010}, JOURNALTITLE = {Procedia Technology}, PAGES = {61--69}, TITLE = {Drivers of Precision Agriculture Technologies Adoption: A Literature Review}, VOLUME = {8}, } @ARTICLE{Zhang2002, AUTHOR = {Zhang, Naiqian and Wang, Maohua and Wang, Ning}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016/s0168-1699(02)00096-0}, DATE = {2002-11}, DOI = {10.1016/s0168-1699(02)00096-0}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {2-3}, PAGES = {113--132}, TITLE = {Precision agriculture{---}a worldwide overview}, VOLUME = {36}, } @ARTICLE{Lamb_2008, AUTHOR = {Lamb, David W. and Frazier, Paul and Adams, Peter}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2007.04.009}, DATE = {2008-04}, DOI = {10.1016/j.compag.2007.04.009}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {1}, PAGES = {4--9}, TITLE = {Improving pathways to adoption: Putting the right Ps in precision agriculture}, VOLUME = {61}, } @ARTICLE{Mulla_2013, AUTHOR = {Mulla, David J.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2012.08.009}, DATE = {2013-04}, DOI = {10.1016/j.biosystemseng.2012.08.009}, JOURNALTITLE = {Biosystems Engineering}, NUMBER = {4}, PAGES = {358--371}, TITLE = {Twenty five years of remote sensing in precision agriculture: Key advances and remaining knowledge gaps}, VOLUME = {114}, } @ARTICLE{Hameed_2013, AUTHOR = {Hameed, I. A.}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs10846-013-9834-6}, DATE = {2013-05}, DOI = {10.1007/s10846-013-9834-6}, JOURNALTITLE = {Journal of Intelligent {\&} Robotic Systems}, NUMBER = {3-4}, PAGES = {965--983}, TITLE = {Intelligent Coverage Path Planning for Agricultural Robots and Autonomous Machines on Three-Dimensional Terrain}, VOLUME = {74}, } @ARTICLE{Yaghoubi13, AUTHOR = {Yaghoubi, S and Akbarzadeh, N.A. and Bazargani, S.S. and Bamizan, M and Asl, M.I.}, BOOKTITLE = {International Journal of Mechanical and Mechatronics Engineering}, DATE = {2013-01}, PAGES = {1--6}, TITLE = {Autonomous robots for agricultural tasks and farm assignment and future trends in agro robots}, VOLUME = {13}, } @BOOK{Precision2007, EDITOR = {Stafford, J.V.}, PUBLISHER = {Wageningen Academic Publishers}, URL = {https://doi.org/10.3920%2F978-90-8686-603-8}, DATE = {2007-05}, DOI = {10.3920/978-90-8686-603-8}, TITLE = {Precision agriculture `07}, } @ARTICLE{Bechar_2003, AUTHOR = {Bechar, Avital and Edan, Yael}, PUBLISHER = {Emerald}, URL = {https://doi.org/10.1108%2F01439910310492194}, DATE = {2003-10}, DOI = {10.1108/01439910310492194}, JOURNALTITLE = {Industrial Robot: An International Journal}, NUMBER = {5}, PAGES = {432--436}, TITLE = {Human-robot collaboration for improved target recognition of agricultural robots}, VOLUME = {30}, } @ARTICLE{Bechar_2016, AUTHOR = {Bechar, Avital and Vigneault, Cl{\'{e}}ment}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2016.06.014}, DATE = {2016-09}, DOI = {10.1016/j.biosystemseng.2016.06.014}, JOURNALTITLE = {Biosystems Engineering}, PAGES = {94--111}, TITLE = {Agricultural robots for field operations: Concepts and components}, VOLUME = {149}, } @ARTICLE{Fuglie_2007, AUTHOR = {Fuglie, Keith and MacDonald, James M. and Ball, V. Eldon}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.2139%2Fssrn.1084980}, DATE = {2007}, DOI = {10.2139/ssrn.1084980}, JOURNALTITLE = {{SSRN} Electronic Journal}, TITLE = {Productivity Growth in U.S. Agriculture}, } @ARTICLE{Tao_2017, AUTHOR = {Tao, Yongting and Zhou, Jun}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2017.09.019}, DATE = {2017-11}, DOI = {10.1016/j.compag.2017.09.019}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {388--396}, TITLE = {Automatic apple recognition based on the fusion of color and 3D feature for robotic fruit picking}, VOLUME = {142}, } @ARTICLE{Barnea_2016, AUTHOR = {Barnea, Ehud and Mairon, Rotem and Ben-Shahar, Ohad}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2016.01.013}, DATE = {2016-06}, DOI = {10.1016/j.biosystemseng.2016.01.013}, JOURNALTITLE = {Biosystems Engineering}, PAGES = {57--70}, TITLE = {Colour-agnostic shape-based 3D fruit detection for crop harvesting robots}, VOLUME = {146}, } @INCOLLECTION{Edan_2009, AUTHOR = {Edan, Yael and Han, Shufeng and Kondo, Naoshi}, PUBLISHER = {Springer Berlin Heidelberg}, URL = {https://doi.org/10.1007%2F978-3-540-78831-7_63}, BOOKTITLE = {Springer Handbook of Automation}, DATE = {2009}, DOI = {10.1007/978-3-540-78831-7_63}, PAGES = {1095--1128}, TITLE = {Automation in Agriculture}, } @ARTICLE{Kapach_2012, AUTHOR = {Kapach, Keren and Barnea, Ehud and Mairon, Rotem and Edan, Yael and Shahar, Ohad Ben}, PUBLISHER = {Inderscience Publishers}, URL = {https://doi.org/10.1504%2Fijcvr.2012.046419}, DATE = {2012}, DOI = {10.1504/ijcvr.2012.046419}, JOURNALTITLE = {International Journal of Computational Vision and Robotics}, NUMBER = {1/2}, PAGES = {4}, TITLE = {Computer vision for fruit harvesting robots - State of the art and challenges ahead}, VOLUME = {3}, } @ARTICLE{Bac_2014, AUTHOR = {Bac, C. Wouter and van Henten, Eldert J. and Hemming, Jochen and Edan, Yael}, PUBLISHER = {Wiley-Blackwell}, URL = {https://doi.org/10.1002%2Frob.21525}, DATE = {2014-07}, DOI = {10.1002/rob.21525}, JOURNALTITLE = {Journal of Field Robotics}, NUMBER = {6}, PAGES = {888--911}, TITLE = {Harvesting Robots for High-value Crops: State-of-the-art Review and Challenges Ahead}, VOLUME = {31}, } @ARTICLE{Jimnez1999, AUTHOR = {Jim{\'{e}}nez, A.R. and Jain, A.K. and Ceres, R. and Pons, J.L.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016/s0031-3203(98)00170-8}, DATE = {1999-10}, DOI = {10.1016/s0031-3203(98)00170-8}, JOURNALTITLE = {Pattern Recognition}, NUMBER = {10}, PAGES = {1719--1736}, TITLE = {Automatic fruit recognition: a survey and new results using Range/Attenuation images}, VOLUME = {32}, } @ARTICLE{Song_2014, AUTHOR = {Song, Y. and Glasbey, C.A. and Horgan, G.W. and Polder, G. and Dieleman, J.A. and van der Heijden, G.W.A.M.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2013.12.008}, DATE = {2014-02}, DOI = {10.1016/j.biosystemseng.2013.12.008}, JOURNALTITLE = {Biosystems Engineering}, PAGES = {203--215}, TITLE = {Automatic fruit recognition and counting from multiple images}, VOLUME = {118}, } @ARTICLE{LeCun2015, AUTHOR = {LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1038/nature14539}, DATE = {2015-05}, DOI = {10.1038/nature14539}, JOURNALTITLE = {Nature}, NUMBER = {7553}, PAGES = {436--444}, TITLE = {Deep learning}, VOLUME = {521}, } @INPROCEEDINGS{Krizhevsky_2012, AUTHOR = {Krizhevsky, Alex and Sutskever, Ilya and Hinton, Geoffrey E.}, LOCATION = {Lake Tahoe, Nevada}, PUBLISHER = {Curran Associates Inc.}, URL = {http://dl.acm.org/citation.cfm?id=2999134.2999257}, BOOKTITLE = {Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1}, DATE = {2012}, PAGES = {1097--1105}, SERIES = {NIPS'12}, TITLE = {ImageNet Classification with Deep Convolutional Neural Networks}, } @ARTICLE{Redmon_15, AUTHOR = {Redmon, Joseph and Divvala, Santosh Kumar and Girshick, Ross B. and Farhadi, Ali}, URL = {http://arxiv.org/abs/1506.02640}, DATE = {2015}, EPRINT = {1506.02640}, EPRINTTYPE = {arXiv}, JOURNALTITLE = {CoRR}, TITLE = {You Only Look Once: Unified, Real-Time Object Detection}, VOLUME = {abs/1506.02640}, } @ARTICLE{LiuAESR15, AUTHOR = {Liu, Wei and Anguelov, Dragomir and Erhan, Dumitru and Szegedy, Christian and Reed, Scott E. and Fu, Cheng{-}Yang and Berg, Alexander C.}, URL = {http://arxiv.org/abs/1512.02325}, DATE = {2015}, EPRINT = {1512.02325}, EPRINTTYPE = {arXiv}, JOURNALTITLE = {CoRR}, TITLE = {{SSD:} Single Shot MultiBox Detector}, VOLUME = {abs/1512.02325}, } @ARTICLE{HeZRS15, AUTHOR = {He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian}, URL = {http://arxiv.org/abs/1512.03385}, DATE = {2015}, EPRINT = {1512.03385}, EPRINTTYPE = {arXiv}, JOURNALTITLE = {CoRR}, TITLE = {Deep Residual Learning for Image Recognition}, VOLUME = {abs/1512.03385}, } @ARTICLE{Linker_015, AUTHOR = {Linker, Raphael and Kelman, Eliyahu}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2015.04.005}, DATE = {2015-06}, DOI = {10.1016/j.compag.2015.04.005}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {154--162}, TITLE = {Apple detection in nighttime tree images using the geometry of light patches around highlights}, VOLUME = {114}, } @ARTICLE{Payne_2014, AUTHOR = {Payne, A. and Walsh, K. and Subedi, P. and Jarvis, D.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2013.11.011}, DATE = {2014-01}, DOI = {10.1016/j.compag.2013.11.011}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {160--167}, TITLE = {Estimating mango crop yield using image analysis using fruit at `stone hardening' stage and night time imaging}, VOLUME = {100}, } @ARTICLE{Kelman_2014, AUTHOR = {Kelman, Eliyahu (Efim) and Linker, Raphael}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2013.11.007}, DATE = {2014-02}, DOI = {10.1016/j.biosystemseng.2013.11.007}, JOURNALTITLE = {Biosystems Engineering}, PAGES = {174--185}, TITLE = {Vision-based localisation of mature apples in tree images using convexity}, VOLUME = {118}, } @ARTICLE{Stajnko2004, AUTHOR = {Stajnko, D. and Lakota, M. and Ho{\v{c}}evar, M.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016/s0168-1699(03)00086-3}, DATE = {2004-01}, DOI = {10.1016/s0168-1699(03)00086-3}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {1}, PAGES = {31--42}, TITLE = {Estimation of number and diameter of apple fruits in an orchard during the growing season by thermal imaging}, VOLUME = {42}, } @ARTICLE{Si_2015, AUTHOR = {Si, Yongsheng and Liu, Gang and Feng, Juan}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2015.01.010}, DATE = {2015-03}, DOI = {10.1016/j.compag.2015.01.010}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {68--74}, TITLE = {Location of apples in trees using stereoscopic vision}, VOLUME = {112}, } @ARTICLE{Huanyu_2008, AUTHOR = {Jiang, Huanyu and Peng, Yongshi and Ying, Yibin}, DATE = {2008-01}, JOURNALTITLE = {American Society of Agricultural and Biological Engineers Annual International Meeting 2008, ASABE 2008}, TITLE = {Measurement of 3-D Locations of Ripe Tomato by Binocular Stereo Vision for Tomato Harvesting}, VOLUME = {11}, } @INPROCEEDINGS{Nguyen2014AppleDA, AUTHOR = {Nguyen, Tien Thanh and Vandevoorde, Koenraad and Kayacan, Erdal and Baerdemaeker, Josse De and Saeys, Wouter and Mechatronics, MeBioS}, DATE = {2014}, TITLE = {Apple detection algorithm for robotic harvesting using a RGB-D camera}, } @ARTICLE{GeirhosJSRBW17, AUTHOR = {Geirhos, Robert and Janssen, David H. J. and Sch{\"{u}}tt, Heiko H. and Rauber, Jonas and Bethge, Matthias and Wichmann, Felix A.}, URL = {http://arxiv.org/abs/1706.06969}, DATE = {2017}, EPRINT = {1706.06969}, EPRINTTYPE = {arXiv}, JOURNALTITLE = {CoRR}, TITLE = {Comparing deep neural networks against humans: object recognition when the signal gets weaker}, VOLUME = {abs/1706.06969}, } @ARTICLE{1602.07261, AUTHOR = {Szegedy, Christian and Ioffe, Sergey and Vanhoucke, Vincent and Alemi, Alex}, DATE = {2016}, EPRINT = {arXiv:1602.07261}, TITLE = {Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning}, } @INPROCEEDINGS{Bargoti_2017, AUTHOR = {Bargoti, Suchet and Underwood, James}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Ficra.2017.7989417}, BOOKTITLE = {2017 {IEEE} International Conference on Robotics and Automation ({ICRA})}, DATE = {2017-05}, DOI = {10.1109/icra.2017.7989417}, TITLE = {Deep fruit detection in orchards}, } @MISC{Aykin_2017, AUTHOR = {Can Aykin, Simon P\"{o}cheim}, HOWPUBLISHED = {\url{https://wiki.tum.de/display/lfdv/Layers+of+a+Convolutional+Neural+Network}}, NOTE = {Accessed: 2017-02-03}, TITLE = {Layers of a Convolutional Neural Network}, } @INPROCEEDINGS{LeCun_2010, AUTHOR = {LeCun, Yann and Kavukcuoglu, Koray and Farabet, Clement}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fiscas.2010.5537907}, BOOKTITLE = {Proceedings of 2010 {IEEE} International Symposium on Circuits and Systems}, DATE = {2010-05}, DOI = {10.1109/iscas.2010.5537907}, TITLE = {Convolutional networks and applications in vision}, } @ARTICLE{Chen_2018, AUTHOR = {Chen, Zhong and Zhang, Ting and Ouyang, Chao}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Frs10010139}, DATE = {2018-01}, DOI = {10.3390/rs10010139}, JOURNALTITLE = {Remote Sensing}, NUMBER = {1}, PAGES = {139}, TITLE = {End-to-End Airplane Detection Using Transfer Learning in Remote Sensing Images}, VOLUME = {10}, } @ARTICLE{Lee_1990, AUTHOR = {Lee, Yim-Kul and Rhodes, William T.}, PUBLISHER = {The Optical Society}, URL = {https://doi.org/10.1364%2Fol.15.001383}, DATE = {1990-12}, DOI = {10.1364/ol.15.001383}, JOURNALTITLE = {Optics Letters}, NUMBER = {23}, PAGES = {1383}, TITLE = {Nonlinear image processing by a rotating kernel transformation}, VOLUME = {15}, } @ARTICLE{Zude_Sasse_2016, AUTHOR = {Zude-Sasse, M. and Fountas, S. and Gemtos, T.A. and Abu-Khalaf, N. and and}, PUBLISHER = {International Society for Horticultural Science ({ISHS})}, URL = {https://doi.org/10.17660%2Fejhs.2016%2F81.2.2}, DATE = {2016-04}, DOI = {10.17660/ejhs.2016/81.2.2}, JOURNALTITLE = {European Journal of Horticultural Science}, NUMBER = {2}, PAGES = {78--90}, TITLE = {Applications of precision agriculture in horticultural crops}, VOLUME = {81}, } @INPROCEEDINGS{de_Lima_2017, AUTHOR = {de Lima, Yuri Oliveira and de Souza, Jano Moreira}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fcscwd.2017.8066668}, BOOKTITLE = {2017 {IEEE} 21st International Conference on Computer Supported Cooperative Work in Design ({CSCWD})}, DATE = {2017-04}, DOI = {10.1109/cscwd.2017.8066668}, TITLE = {The future of work: Insights for {CSCW}}, } @ARTICLE{Harrison_2015, AUTHOR = {Harrison, Peter and Wolyniak, Joseph}, PUBLISHER = {Oxford University Press ({OUP})}, URL = {https://doi.org/10.1093%2Fnotesj%2Fgjv080}, DATE = {2015-07}, DOI = {10.1093/notesj/gjv080}, JOURNALTITLE = {Notes and Queries}, NUMBER = {3}, PAGES = {465--467}, TITLE = {The History of `Transhumanism'}, VOLUME = {62}, } @INPROCEEDINGS{Basava_2018, AUTHOR = {Basava, Sharana and Prasannakumar, K R}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Ficisc.2018.8398985}, BOOKTITLE = {2018 2nd International Conference on Inventive Systems and Control ({ICISC})}, DATE = {2018-01}, DOI = {10.1109/icisc.2018.8398985}, TITLE = {Big data in agribusiness: Climate gauging for savvy farming}, } @ARTICLE{Cola_o_2018, AUTHOR = {Cola{\c{c}}o, Andr{\'{e}} F. and Molin, Jos{\'{e}} P. and Rosell-Polo, Joan R. and Escol{\`{a}}, Alexandre}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1038%2Fs41438-018-0043-0}, DATE = {2018-07}, DOI = {10.1038/s41438-018-0043-0}, JOURNALTITLE = {Horticulture Research}, NUMBER = {1}, TITLE = {Application of light detection and ranging and ultrasonic sensors to high-throughput phenotyping and precision horticulture: current status and challenges}, VOLUME = {5}, } @ARTICLE{Huang_2018, AUTHOR = {Huang, Yanbo and CHEN, Zhong-xin and YU, Tao and HUANG, Xiang-zhi and GU, Xing-fa}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fs2095-3119%2817%2961859-8}, DATE = {2018-09}, DOI = {10.1016/s2095-3119(17)61859-8}, JOURNALTITLE = {Journal of Integrative Agriculture}, NUMBER = {9}, PAGES = {1915--1931}, TITLE = {Agricultural remote sensing big data: Management and applications}, VOLUME = {17}, } @ARTICLE{Manfrini2009, AUTHOR = {Manfrini, Luigi and Taylor, James and Grappadelli, Luca}, BOOKTITLE = {European Journal of Horticultural Science}, DATE = {2009-04}, PAGES = {54--60}, TITLE = {Spatial Analysis of the Effect of Fruit Thinning on Apple Crop Load}, VOLUME = {74}, } @ARTICLE{Beckett_1992, AUTHOR = {Beckett, Philip}, PUBLISHER = {{SAGE} Publications}, URL = {https://doi.org/10.1177%2F030913339201600119}, DATE = {1992-03}, DOI = {10.1177/030913339201600119}, JOURNALTITLE = {Progress in Physical Geography}, NUMBER = {1}, PAGES = {120--122}, TITLE = {Statistical methods in soil and land resource survey}, VOLUME = {16}, } @BOOK{brase2006precision, AUTHOR = {Brase, T.A.}, PUBLISHER = {Thomson/Delmar Learning}, URL = {https://books.google.co.za/books?id=hEBkQgAACAAJ}, DATE = {2006}, ISBN = {9781401881054}, TITLE = {Precision Agriculture}, } @ARTICLE{Slot_2018, AUTHOR = {Slot, M. M. and van de Wiel, C. C. M. and Kleter, G. A. and Visser, R. G. F. and Kok, E. J.}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs11248-018-0076-z}, DATE = {2018-05}, DOI = {10.1007/s11248-018-0076-z}, JOURNALTITLE = {Transgenic Research}, NUMBER = {4}, PAGES = {321--329}, TITLE = {The assessment of field trials in {GMO} research around the world and their possible integration in field trials for variety registration}, VOLUME = {27}, } @ARTICLE{Hedley_2014, AUTHOR = {Hedley, Carolyn}, PUBLISHER = {Wiley}, URL = {https://doi.org/10.1002%2Fjsfa.6734}, DATE = {2014-06}, DOI = {10.1002/jsfa.6734}, JOURNALTITLE = {Journal of the Science of Food and Agriculture}, NUMBER = {1}, PAGES = {12--19}, TITLE = {The role of precision agriculture for improved nutrient management on farms}, VOLUME = {95}, } @ARTICLE{Stafford_2000, AUTHOR = {Stafford, John V.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1006%2Fjaer.2000.0577}, DATE = {2000-07}, DOI = {10.1006/jaer.2000.0577}, JOURNALTITLE = {Journal of Agricultural Engineering Research}, NUMBER = {3}, PAGES = {267--275}, TITLE = {Implementing Precision Agriculture in the 21st Century}, VOLUME = {76}, } @INPROCEEDINGS{Pickett20041, AUTHOR = {Pickett, T.D.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-8344269315\&partnerID=40\&md5=94805c8c1ed72ae6ed9a5c75916a7c20}, DATE = {2004}, JOURNALTITLE = {Proceedings of the Annual Meeting - Institute of Navigation}, NOTE = {cited By 1}, PAGES = {1--10}, TITLE = {Future navigation needs in agriculture}, } @ARTICLE{Chen_2012, AUTHOR = {Chen, Shu Fa and Feng, Cheng Long and Zhang, Shi Ping}, PUBLISHER = {Trans Tech Publications}, URL = {https://doi.org/10.4028%2Fwww.scientific.net%2Famm.249-250.610}, DATE = {2012-12}, DOI = {10.4028/www.scientific.net/amm.249-250.610}, JOURNALTITLE = {Applied Mechanics and Materials}, PAGES = {610--615}, TITLE = {Design and Research on Variable-Rate Fertilization Computer Control System}, VOLUME = {249-250}, } @INPROCEEDINGS{Johnson1984114, AUTHOR = {Johnson, Clarence E. and Shafer, Robert L. and Young, Steven C.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-0021314830&partnerID=40&md5=0e613713dda74029969a14f84564b502}, DATE = {1984}, JOURNALTITLE = {ASAE Publication}, PAGES = {114--119}, TITLE = {CONTROLLING AGRICULTURAL MACHINERY INTELLIGENTLY.}, } @ARTICLE{Stafford_2000_book, AUTHOR = {Stafford, John V.}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1023%2Fa%3A1011894914362}, DATE = {2000}, DOI = {10.1023/a:1011894914362}, JOURNALTITLE = {Precision Agriculture}, NUMBER = {3}, PAGES = {229--229}, VOLUME = {2}, } @INPROCEEDINGS{Pierce_1994, AUTHOR = {Pierce, F. J. and Robert, P. C. and Mangold, G.}, PUBLISHER = {Iowa State University, Digital Press}, URL = {https://doi.org/10.312742Ficm-180809-454}, BOOKTITLE = {Proceedings of the Integrated Crop Management Conference}, DATE = {1994}, DOI = {10.31274/icm-180809-454}, TITLE = {Site Specific Management: The Pros, the Cons, and the Realities}, } @ARTICLE{Bastiaanssen_2000, AUTHOR = {Bastiaanssen, Wim G.M and Molden, David J and Makin, Ian W}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fs0378-3774%2800%2900080-9}, DATE = {2000-12}, DOI = {10.1016/s0378-3774(00)00080-9}, JOURNALTITLE = {Agricultural Water Management}, NUMBER = {2}, PAGES = {137--155}, TITLE = {Remote sensing for irrigated agriculture: examples from research and possible applications}, VOLUME = {46}, } @ARTICLE{Ojha_2015, AUTHOR = {Ojha, Tamoghna and Misra, Sudip and Raghuwanshi, Narendra Singh}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2015.08.011}, DATE = {2015-10}, DOI = {10.1016/j.compag.2015.08.011}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {66--84}, TITLE = {Wireless sensor networks for agriculture: The state-of-the-art in practice and future challenges}, VOLUME = {118}, } @INPROCEEDINGS{Mekala_2017, AUTHOR = {Mekala, Mahammad Shareef and Viswanathan, P.}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Ficmdcs.2017.8211551}, BOOKTITLE = {2017 International conference on Microelectronic Devices, Circuits and Systems ({ICMDCS})}, DATE = {2017-08}, DOI = {10.1109/icmdcs.2017.8211551}, TITLE = {A Survey: Smart agriculture {IoT} with cloud computing}, } @ARTICLE{Elijah_2018, AUTHOR = {Elijah, Olakunle and Rahman, Tharek Abdul and Orikumhi, Igbafe and Leow, Chee Yen and Hindia, MHD Nour}, PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})}, URL = {https://doi.org/10.1109%2Fjiot.2018.2844296}, DATE = {2018}, DOI = {10.1109/jiot.2018.2844296}, JOURNALTITLE = {{IEEE} Internet of Things Journal}, PAGES = {1--1}, TITLE = {An Overview of Internet of Things ({IoT}) and Data Analytics in Agriculture: Benefits and Challenges}, } @ARTICLE{Gill_2017, AUTHOR = {Gill, Sukhpal Singh and Chana, Inderveer and Buyya, Rajkumar}, PUBLISHER = {{IGI} Global}, URL = {https://doi.org/10.4018%2Fjoeuc.2017100101}, DATE = {2017-10}, DOI = {10.4018/joeuc.2017100101}, JOURNALTITLE = {Journal of Organizational and End User Computing}, NUMBER = {4}, PAGES = {1--23}, TITLE = {{IoT} Based Agriculture as a Cloud and Big Data Service}, VOLUME = {29}, } @ARTICLE{Sto_es_2016, AUTHOR = {Sto{\v{c}}es, Michal and Van{\v{e}}k, Ji{\v{r}}{\'{\i{}}} and Masner, Jan and Pavl{\'{\i{}}}k, J.}, PUBLISHER = {Czech University of Life Sciences Prague}, URL = {https://doi.org/10.7160%2Faol.2016.080108}, DATE = {2016-03}, DOI = {10.7160/aol.2016.080108}, JOURNALTITLE = {Agris on-line Papers in Economics and Informatics}, NUMBER = {1}, PAGES = {83--88}, TITLE = {Internet of Things ({IoT}) in Agriculture - Selected Aspects}, VOLUME = {{VIII}}, } @ARTICLE{Wolfert_2017, AUTHOR = {Wolfert, Sjaak and Ge, Lan and Verdouw, Cor and Bogaardt, Marc-Jeroen}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.agsy.2017.01.023}, DATE = {2017-05}, DOI = {10.1016/j.agsy.2017.01.023}, JOURNALTITLE = {Agricultural Systems}, PAGES = {69--80}, TITLE = {Big Data in Smart Farming {--} A review}, VOLUME = {153}, } @ARTICLE{Pivoto_2018, AUTHOR = {Pivoto, Dieisson and Waquil, Paulo Dabdab and Talamini, Edson and Finocchio, Caroline Pauletto Spanhol and Corte, Vitor Francisco Dalla and de Vargas Mores, Giana}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.inpa.2017.12.002}, DATE = {2018-03}, DOI = {10.1016/j.inpa.2017.12.002}, JOURNALTITLE = {Information Processing in Agriculture}, NUMBER = {1}, PAGES = {21--32}, TITLE = {Scientific development of smart farming technologies and their application in Brazil}, VOLUME = {5}, } @ARTICLE{O_Grady_2017, AUTHOR = {OGrady, Michael J. and OHare, Gregory M.P.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.inpa.2017.05.001}, DATE = {2017-09}, DOI = {10.1016/j.inpa.2017.05.001}, JOURNALTITLE = {Information Processing in Agriculture}, NUMBER = {3}, PAGES = {179--187}, TITLE = {Modelling the smart farm}, VOLUME = {4}, } @ARTICLE{Kaloxylos_2012, AUTHOR = {Kaloxylos, Alexandros and Eigenmann, Robert and Teye, Frederick and Politopoulou, Zoi and Wolfert, Sjaak and Shrank, Claudia and Dillinger, Markus and Lampropoulou, Ioanna and Antoniou, Eleni and Pesonen, Liisa and Nicole, Huether and Thomas, Floerchinger and Alonistioti, Nancy and Kormentzas, George}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2012.09.002}, DATE = {2012-11}, DOI = {10.1016/j.compag.2012.09.002}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {130--144}, TITLE = {Farm management systems and the Future Internet era}, VOLUME = {89}, } @INPROCEEDINGS{Brown20121427, AUTHOR = {Brown, J.H.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84878042468&partnerID=40&md5=53d51432d1e740d68e9143bb3fb6b4ad}, DATE = {2012}, JOURNALTITLE = {AUVSI Unmanned Systems North America Conference 2012}, NOTE = {cited By 0}, PAGES = {1427--1439}, TITLE = {Robotics in agriculture}, VOLUME = {2}, } @ARTICLE{Slaughter_2008, AUTHOR = {Slaughter, D.C. and Giles, D.K. and Downey, D.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2007.05.008}, DATE = {2008-04}, DOI = {10.1016/j.compag.2007.05.008}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {1}, PAGES = {63--78}, TITLE = {Autonomous robotic weed control systems: A review}, VOLUME = {61}, } @ARTICLE{Patr_cio_2018, AUTHOR = {Patricio, Diego Inacio and Rieder, Rafael}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2018.08.001}, DATE = {2018-10}, DOI = {10.1016/j.compag.2018.08.001}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {69--81}, TITLE = {Computer vision and artificial intelligence in precision agriculture for grain crops: A systematic review}, VOLUME = {153}, } @ARTICLE{Ensmenger_2011, AUTHOR = {Ensmenger, Nathan}, PUBLISHER = {University of Chicago Press}, URL = {https://doi.org/10.1086%2F663065}, DATE = {2011-09}, DOI = {10.1086/663065}, JOURNALTITLE = {Isis}, NUMBER = {3}, PAGES = {588--589}, TITLE = {The Quest for Artificial Intelligence: A History of Ideas and Achievements}, VOLUME = {102}, } @ARTICLE{Alessio_2018, AUTHOR = {Scalisi, Alessio and Bresilla, Kushtrim and Grilo, Filipa Sim\~{o}es}, PUBLISHER = {SOI}, URL = {http://doi.org/10.26353/j.itahort/2017.2.3950}, DATE = {2018}, DOI = {10.26353/j.itahort/2017.2.3950}, ISSN = {1127-3496}, JOURNALTITLE = {Italus Hortus}, NUMBER = {24}, PAGES = {39--50}, TITLE = {The Quest for Artificial Intelligence: A History of Ideas and Achievements}, } @ARTICLE{Vougioukas_2013, AUTHOR = {Vougioukas, S. and Anastassiu, H.T. and Regen, C. and Zude, M.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2012.08.011}, DATE = {2013-04}, DOI = {10.1016/j.biosystemseng.2012.08.011}, JOURNALTITLE = {Biosystems Engineering}, NUMBER = {4}, PAGES = {454--465}, TITLE = {Influence of foliage on radio path losses ({PLs}) for wireless sensor network ({WSN}) planning in orchards}, VOLUME = {114}, } @ARTICLE{Mirhosseini_2017, AUTHOR = {Mirhosseini, Mina and Barani, Fatemeh and Nezamabadi-pour, Hossein}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.suscom.2017.08.006}, DATE = {2017-12}, DOI = {10.1016/j.suscom.2017.08.006}, JOURNALTITLE = {Sustainable Computing: Informatics and Systems}, PAGES = {38--47}, TITLE = {Design optimization of wireless sensor networks in precision agriculture using improved {BQIGSA}}, VOLUME = {16}, } @ARTICLE{Park_2015, AUTHOR = {Park, Junyoung and Lee, Sunggu and Yoo, Sungjoo}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.jpdc.2015.05.004}, DATE = {2015-09}, DOI = {10.1016/j.jpdc.2015.05.004}, JOURNALTITLE = {Journal of Parallel and Distributed Computing}, PAGES = {70--82}, TITLE = {Time slot assignment for convergecast in wireless sensor networks}, VOLUME = {83}, } @ARTICLE{Carrabs_2015, AUTHOR = {Carrabs, Francesco and Cerulli, Raffaele and DAmbrosio, Ciriaco and Gentili, Monica and Raiconi, Andrea}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.cor.2015.02.013}, DATE = {2015-08}, DOI = {10.1016/j.cor.2015.02.013}, JOURNALTITLE = {Computers {\&} Operations Research}, PAGES = {121--137}, TITLE = {Maximizing lifetime in wireless sensor networks with multiple sensor families}, VOLUME = {60}, } @ARTICLE{Ferentinos_2007, AUTHOR = {Ferentinos, Konstantinos P. and Tsiligiridis, Theodore A.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.comnet.2006.06.013}, DATE = {2007-03}, DOI = {10.1016/j.comnet.2006.06.013}, JOURNALTITLE = {Computer Networks}, NUMBER = {4}, PAGES = {1031--1051}, TITLE = {Adaptive design optimization of wireless sensor networks using genetic algorithms}, VOLUME = {51}, } @ARTICLE{Aqeel_ur_Rehman_2014, AUTHOR = {Aqeel-ur-Rehman and Abbasi, Abu Zafar and Islam, Noman and Shaikh, Zubair Ahmed}, PUBLISHER = {Elsevier}, URL = {https://doi.org/10.1016\%2Fj.csi.2011.03.004}, DATE = {2014-02}, DOI = {10.1016/j.csi.2011.03.004}, JOURNALTITLE = {Computer Standards \& Interfaces}, NUMBER = {2}, PAGES = {263--270}, TITLE = {A review of wireless sensors and networks applications in agriculture}, VOLUME = {36}, } @ARTICLE{Ruiz_Garcia_2009, AUTHOR = {Ruiz-Garcia, Luis and Lunadei, Loredana and Barreiro, Pilar and Robla, Ignacio}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390\%2Fs90604728}, DATE = {2009-06}, DOI = {10.3390/s90604728}, JOURNALTITLE = {Sensors}, NUMBER = {6}, PAGES = {4728--4750}, TITLE = {A Review of Wireless Sensor Technologies and Applications in Agriculture and Food Industry: State of the Art and Current Trends}, VOLUME = {9}, } @ARTICLE{akyildiz2002wireless, AUTHOR = {Akyildiz, Ian F and Su, Weilian and Sankarasubramaniam, Yogesh and Cayirci, Erdal}, PUBLISHER = {Elsevier}, DATE = {2002}, JOURNALTITLE = {Computer networks}, NUMBER = {4}, PAGES = {393--422}, TITLE = {Wireless sensor networks: a survey}, VOLUME = {38}, } @ARTICLE{Nikolidakis_2015, AUTHOR = {Nikolidakis, Stefanos A. and Kandris, Dionisis and Vergados, Dimitrios D. and Douligeris, Christos}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2015.02.004}, DATE = {2015-04}, DOI = {10.1016/j.compag.2015.02.004}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {154--163}, TITLE = {Energy efficient automated control of irrigation in agriculture by using wireless sensor networks}, VOLUME = {113}, } @ARTICLE{dobkin2005radio, AUTHOR = {Dobkin, Daniel M and Wandinger, Titus}, DATE = {2005}, JOURNALTITLE = {High Frequency Electronics}, NUMBER = {8}, PAGES = {32--46}, TITLE = {A radio-oriented introduction to RFID-protocols, tags and applications}, VOLUME = {4}, } @ARTICLE{li2006radio, AUTHOR = {Li, Suhong and Visich, John K and Khumawala, Basheer M and Zhang, Chen}, PUBLISHER = {Emerald Group Publishing Limited}, DATE = {2006}, JOURNALTITLE = {Sensor Review}, NUMBER = {3}, PAGES = {193--202}, TITLE = {Radio frequency identification technology: applications, technical challenges and strategies}, VOLUME = {26}, } @ARTICLE{Choudhury_2015, AUTHOR = {Choudhury, Sushabhan and Kuchhal, Piyush and Singh, Rajesh and Anita}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.procs.2015.04.195}, DATE = {2015}, DOI = {10.1016/j.procs.2015.04.195}, JOURNALTITLE = {Procedia Computer Science}, PAGES = {367--372}, TITLE = {{ZigBee} and Bluetooth Network based Sensory Data Acquisition System}, VOLUME = {48}, } @ARTICLE{Vuran_2018, AUTHOR = {Vuran, Mehmet C. and Salam, Abdul and Wong, Rigoberto and Irmak, Suat}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.adhoc.2018.07.017}, DATE = {2018-12}, DOI = {10.1016/j.adhoc.2018.07.017}, JOURNALTITLE = {Ad Hoc Networks}, PAGES = {160--173}, TITLE = {Internet of underground things in precision agriculture: Architecture and technology aspects}, VOLUME = {81}, } @INCOLLECTION{Wang_2013, AUTHOR = {Wang, N. and Li, Z.}, PUBLISHER = {Elsevier}, URL = {https://doi.org/10.1533%2F9780857095763.1.171}, BOOKTITLE = {Robotics and Automation in the Food Industry}, DATE = {2013}, DOI = {10.1533/9780857095763.1.171}, PAGES = {171--199}, TITLE = {Wireless sensor networks ({WSNs}) in the agricultural and food industries}, } @ARTICLE{Tzounis_2017, AUTHOR = {Tzounis, Antonis and Katsoulas, Nikolaos and Bartzanas, Thomas and Kittas, Constantinos}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2017.09.007}, DATE = {2017-12}, DOI = {10.1016/j.biosystemseng.2017.09.007}, JOURNALTITLE = {Biosystems Engineering}, PAGES = {31--48}, TITLE = {Internet of Things in agriculture, recent advances and future challenges}, VOLUME = {164}, } @INPROCEEDINGS{Chougule_2016, AUTHOR = {Chougule, Archana and Jha, Vijay Kumar and Mukhopadhyay, Debajyoti}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fiota.2016.7562688}, BOOKTITLE = {2016 International Conference on Internet of Things and Applications ({IOTA})}, DATE = {2016-01}, DOI = {10.1109/iota.2016.7562688}, TITLE = {Using {IoT} for integrated pest management}, } @ARTICLE{Liqiang_2011, AUTHOR = {Liqiang, Zhao and Shouyi, Yin and Leibo, Liu and Zhen, Zhang and Shaojun., Wei}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.proenv.2011.12.088}, DATE = {2011}, DOI = {10.1016/j.proenv.2011.12.088}, JOURNALTITLE = {Procedia Environmental Sciences}, PAGES = {558--565}, TITLE = {A Crop Monitoring System Based on Wireless Sensor Network}, VOLUME = {11}, } @INPROCEEDINGS{Jzau_Sheng_Lin_2008, AUTHOR = {Lin, Jzau-Sheng and Liu, Chun-Zu}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Ficct.2008.4716133}, BOOKTITLE = {2008 11th {IEEE} International Conference on Communication Technology}, DATE = {2008-11}, DOI = {10.1109/icct.2008.4716133}, TITLE = {A monitoring system based on wireless sensor network and an {SoC} platform in precision agriculture}, } @INPROCEEDINGS{Hu_2010, AUTHOR = {Hu, Jing and Shen, Lianfeng and Yang, Yang and Lv, Ruichao}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fwcins.2010.5544151}, BOOKTITLE = {2010 {IEEE} International Conference on Wireless Communications, Networking and Information Security}, DATE = {2010-06}, DOI = {10.1109/wcins.2010.5544151}, TITLE = {Design and implementation of wireless sensor and actor network for precision agriculture}, } @ARTICLE{Akyildiz_2004, AUTHOR = {Akyildiz, Ian F. and Kasimoglu, Ismail H.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.adhoc.2004.04.003}, DATE = {2004-10}, DOI = {10.1016/j.adhoc.2004.04.003}, JOURNALTITLE = {Ad Hoc Networks}, NUMBER = {4}, PAGES = {351--367}, TITLE = {Wireless sensor and actor networks: research challenges}, VOLUME = {2}, } @INPROCEEDINGS{Mainwaring200288, AUTHOR = {Mainwaring, A. and Polastre, J. and Szewczyk, R. and Culler, D. and Anderson, J.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-0036986465&partnerID=40&md5=88de11e091b77d63b4e012d6047d50cc}, DATE = {2002}, JOURNALTITLE = {Proceedings of the ACM International Workshop on Wireless Sensor Networks and Applications}, PAGES = {88--97}, TITLE = {Wireless sensor networks for habitat monitoring}, } @INPROCEEDINGS{Lv_2009, AUTHOR = {Lv, Ruichao and Shen, Lianfeng and Hu, Jing}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Ficise.2009.460}, BOOKTITLE = {2009 First International Conference on Information Science and Engineering}, DATE = {2009}, DOI = {10.1109/icise.2009.460}, TITLE = {Design and Implementation of a Wireless Sensor Network Gateway Supporting Multi-Mode Wide Area Access and Video Monitoring}, } @INPROCEEDINGS{Chougule201617, AUTHOR = {Chougule, A. and Jha, V.K. and Mukhopadhyay, D.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84988965437&doi=10.1109%2fIOTA.2016.7562688&partnerID=40&md5=67026a72a94dbac834e2c9f98c35d25a}, DATE = {2016}, DOI = {10.1109/IOTA.2016.7562688}, JOURNALTITLE = {2016 International Conference on Internet of Things and Applications, IOTA 2016}, PAGES = {17--22}, TITLE = {Using IoT for integrated pest management}, } @INPROCEEDINGS{Dinh_Le_2015, AUTHOR = {Le, Tuan Dinh and Tan, Dat Ho}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fnics.2015.7302210}, BOOKTITLE = {2015 2nd National Foundation for Science and Technology Development Conference on Information and Computer Science ({NICS})}, DATE = {2015-09}, DOI = {10.1109/nics.2015.7302210}, TITLE = {Design and deploy a wireless sensor network for precision agriculture}, } @ARTICLE{Chen_2018a, AUTHOR = {Chen, Xianyi and Wang, Sun{'}an and Zhang, Binquan and Luo, Liang}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2018.02.009}, DATE = {2018-04}, DOI = {10.1016/j.compag.2018.02.009}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {91--108}, TITLE = {Multi-feature fusion tree trunk detection and orchard mobile robot localization using camera/ultrasonic sensors}, VOLUME = {147}, } @ARTICLE{Sun_2009, AUTHOR = {Sun, Y. and Li, L. and Lammers, P. Schulze and Zeng, Q. and Lin, J. and Schumann, H.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2009.06.009}, DATE = {2009-11}, DOI = {10.1016/j.compag.2009.06.009}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {1}, PAGES = {19--23}, TITLE = {A solar-powered wireless cell for dynamically monitoring soil water content}, VOLUME = {69}, } @ARTICLE{Yunseop_Kim_2008, AUTHOR = {Kim, Yunseop and Evans, R.G. and Iversen, W.M.}, PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})}, URL = {https://doi.org/10.1109%2Ftim.2008.917198}, DATE = {2008-07}, DOI = {10.1109/tim.2008.917198}, JOURNALTITLE = {{IEEE} Transactions on Instrumentation and Measurement}, NUMBER = {7}, PAGES = {1379--1387}, TITLE = {Remote Sensing and Control of an Irrigation System Using a Distributed Wireless Sensor Network}, VOLUME = {57}, } @ARTICLE{Dong_2013, AUTHOR = {Dong, Xin and Vuran, Mehmet C. and Irmak, Suat}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.adhoc.2012.06.012}, DATE = {2013-09}, DOI = {10.1016/j.adhoc.2012.06.012}, JOURNALTITLE = {Ad Hoc Networks}, NUMBER = {7}, PAGES = {1975--1987}, TITLE = {Autonomous precision agriculture through integration of wireless underground sensor networks with center pivot irrigation systems}, VOLUME = {11}, } @ARTICLE{Akyildiz_2006, AUTHOR = {Akyildiz, Ian F. and Stuntebeck, Erich P.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.adhoc.2006.04.003}, DATE = {2006-11}, DOI = {10.1016/j.adhoc.2006.04.003}, JOURNALTITLE = {Ad Hoc Networks}, NUMBER = {6}, PAGES = {669--686}, TITLE = {Wireless underground sensor networks: Research challenges}, VOLUME = {4}, } @ARTICLE{Al_Turjman_2018, AUTHOR = {Al-Turjman, Fadi}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2018.09.018}, DATE = {2018-09}, DOI = {10.1016/j.compag.2018.09.018}, JOURNALTITLE = {Computers and Electronics in Agriculture}, TITLE = {The road towards plant phenotyping via {WSNs}: An overview}, } @ARTICLE{Torres_2017, AUTHOR = {Torres, Roque and Ferrara, Giuseppe and Soto, Fulgencio and Lopez, Juan A. and Sanchez, Francisco and Mazzeo, Andrea and Perez-Pastor, Alejandro and Domingo, Rafael}, PUBLISHER = {{EDP} Sciences}, URL = {https://doi.org/10.1051%2Fctv%2F20173201072}, DATE = {2017}, DOI = {10.1051/ctv/20173201072}, JOURNALTITLE = {Ciencia e Tecnica Vitivinicola}, NUMBER = {1}, PAGES = {72--81}, TITLE = {Effects of soil and climate in a table grape vineyard with cover crops. Irrigation management using sensors networks}, VOLUME = {32}, } @ARTICLE{Gautam_2017, AUTHOR = {Gautam, Rahul and Singh, Agnisha and Karthik, K. and Pandey, S. and Scrimgeour, F. and Tiwari, M.K.}, PUBLISHER = {Elsevier}, URL = {https://doi.org/10.1016%2Fj.cie.2016.09.007}, DATE = {2017-01}, DOI = {10.1016/j.cie.2016.09.007}, JOURNALTITLE = {Computers \& Industrial Engineering}, PAGES = {46--58}, TITLE = {Traceability using RFID and its formulation for a kiwifruit supply chain}, VOLUME = {103}, } @ARTICLE{Ghaani_2016, AUTHOR = {Ghaani, Masoud and Cozzolino, Carlo A. and Castelli, Giulia and Farris, Stefano}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.tifs.2016.02.008}, DATE = {2016-05}, DOI = {10.1016/j.tifs.2016.02.008}, JOURNALTITLE = {Trends in Food Science \& Technology}, PAGES = {1--11}, TITLE = {An overview of the intelligent packaging technologies in the food sector}, VOLUME = {51}, } @ARTICLE{Piramuthu_2013, AUTHOR = {Piramuthu, Selwyn and Farahani, Poorya and Grunow, Martin}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.ejor.2012.09.024}, DATE = {2013-03}, DOI = {10.1016/j.ejor.2012.09.024}, JOURNALTITLE = {European Journal of Operational Research}, NUMBER = {2}, PAGES = {253--262}, TITLE = {{RFID}-generated traceability for contaminated product recall in perishable food supply networks}, VOLUME = {225}, } @ARTICLE{Guo2014146, AUTHOR = {Guo, X. and Zheng, L.H. and Li, M.Z. and Zhang, Y.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84899651938&doi=10.3965%2fj.ijabe.20140702.018&partnerID=40&md5=e745230e785b969b600a39e3c57f8611}, DATE = {2014}, DOI = {10.3965/j.ijabe.20140702.018}, JOURNALTITLE = {International Journal of Agricultural and Biological Engineering}, NUMBER = {2}, PAGES = {146--153}, TITLE = {Intelligent data acquisition and cloud services for apple orchard}, VOLUME = {7}, } @INPROCEEDINGS{Wu_2013, AUTHOR = {Wu, Chenxing and Zhang, Haihui and Zhang, Jiaming and Tian, Weipeng and Cheng, Hao}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Ficdma.2013.42}, BOOKTITLE = {2013 Fourth International Conference on Digital Manufacturing {\&} Automation}, DATE = {2013-06}, DOI = {10.1109/icdma.2013.42}, TITLE = {An Orchard Management Systemwith {RFID}-Based Apple Tree Identify Detection}, } @INPROCEEDINGS{Ampatzidis20123726, AUTHOR = {Ampatzidis, Y. and Adhikari, B. and Scharf, P. and Whiting, M. and Zhang, Q.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84871765509&partnerID=40&md5=3df562f44fe09aa56a93e2705380e32c}, DATE = {2012}, JOURNALTITLE = {American Society of Agricultural and Biological Engineers Annual International Meeting 2012, ASABE 2012}, PAGES = {3726--3737}, TITLE = {Preliminary testing of a system for evaluating picker efficiency in tree fruit}, VOLUME = {5}, } @ARTICLE{Ampatzidis_2009, AUTHOR = {Ampatzidis, Y.G. and Vougioukas, S.G.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2009.01.008}, DATE = {2009-05}, DOI = {10.1016/j.compag.2009.01.008}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {2}, PAGES = {166--172}, TITLE = {Field experiments for evaluating the incorporation of {RFID} and barcode registration and digital weighing technologies in manual fruit harvesting}, VOLUME = {66}, } @ARTICLE{Luvisi_2011, AUTHOR = {Luvisi, Andrea and Panattoni, Alessandra and Bandinelli, Roberto and Rinaldelli, Enrico and Pagano, Mario and Triolo, Enrico}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2011.03.001}, DATE = {2011-06}, DOI = {10.1016/j.biosystemseng.2011.03.001}, JOURNALTITLE = {Biosystems Engineering}, NUMBER = {2}, PAGES = {167--173}, TITLE = {Implanting {RFIDs} into Prunus to facilitate electronic identification in support of sanitary certification}, VOLUME = {109}, } @ARTICLE{Sicari_2015, AUTHOR = {Sicari, S. and Rizzardi, A. and Grieco, L.A. and Coen-Porisini, A.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.comnet.2014.11.008}, DATE = {2015-01}, DOI = {10.1016/j.comnet.2014.11.008}, JOURNALTITLE = {Computer Networks}, PAGES = {146--164}, TITLE = {Security, privacy and trust in Internet of Things: The road ahead}, VOLUME = {76}, } @ARTICLE{McBratney_2005, AUTHOR = {McBratney, Alex and Whelan, Brett and Ancev, Tihomir and Bouma, Johan}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs11119-005-0681-8}, DATE = {2005-02}, DOI = {10.1007/s11119-005-0681-8}, JOURNALTITLE = {Precision Agriculture}, NUMBER = {1}, PAGES = {7--23}, TITLE = {Future Directions of Precision Agriculture}, VOLUME = {6}, } @ARTICLE{Fountas_2006, AUTHOR = {Fountas, S. and Wulfsohn, D. and Blackmore, B.S. and Jacobsen, H.L. and Pedersen, S.M.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.agsy.2004.12.003}, DATE = {2006-02}, DOI = {10.1016/j.agsy.2004.12.003}, JOURNALTITLE = {Agricultural Systems}, NUMBER = {2}, PAGES = {192--210}, TITLE = {A model of decision-making and information flows for information-intensive agriculture}, VOLUME = {87}, } @ARTICLE{_zk_se_2015, AUTHOR = {Ozkose, Hakan and Ari, Emin S. and Gencer, Cevriye}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.sbspro.2015.06.147}, DATE = {2015-07}, DOI = {10.1016/j.sbspro.2015.06.147}, JOURNALTITLE = {Procedia - Social and Behavioral Sciences}, PAGES = {1042--1050}, TITLE = {Yesterday, Today and Tomorrow of Big Data}, VOLUME = {195}, } @ARTICLE{Philip_Chen_2014, AUTHOR = {Chen, C.L. Philip and Zhang, Chun-Yang}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.ins.2014.01.015}, DATE = {2014-08}, DOI = {10.1016/j.ins.2014.01.015}, JOURNALTITLE = {Information Sciences}, PAGES = {314--347}, TITLE = {Data-intensive applications, challenges, techniques and technologies: A survey on Big Data}, VOLUME = {275}, } @ARTICLE{Li_2018, AUTHOR = {Li, Xuewei and Li, Xueyan}, PUBLISHER = {Institute of Electrical and Electronics Engineers (IEEE)}, URL = {https://doi.org/10.1109%2Fmcse.2018.042781329}, DATE = {2018-07}, DOI = {10.1109/mcse.2018.042781329}, JOURNALTITLE = {Computing in Science \& Engineering}, NUMBER = {4}, PAGES = {75--88}, TITLE = {Big Data and Its Key Technology in the Future}, VOLUME = {20}, } @ARTICLE{Kamilaris_2017, AUTHOR = {Kamilaris, Andreas and Kartakoullis, Andreas and Prenafeta-Boldu, Francesc X.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2017.09.037}, DATE = {2017-12}, DOI = {10.1016/j.compag.2017.09.037}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {23--37}, TITLE = {A review on the practice of big data analysis in agriculture}, VOLUME = {143}, } @ARTICLE{Tan_2016, AUTHOR = {Tan, Li}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.ifacol.2016.10.061}, DATE = {2016}, DOI = {10.1016/j.ifacol.2016.10.061}, JOURNALTITLE = {{IFAC}-{PapersOnLine}}, NUMBER = {16}, PAGES = {330--335}, TITLE = {Cloud-based Decision Support and Automation for Precision Agriculture in Orchards}, VOLUME = {49}, } @INCOLLECTION{Sahu_2018, AUTHOR = {Sahu, Shriya and Chawla, Meenu and Khare, Nilay}, PUBLISHER = {Springer Singapore}, URL = {https://doi.org/10.1007%2F978-981-13-1498-8_15}, BOOKTITLE = {Advances in Intelligent Systems and Computing}, DATE = {2018-09}, DOI = {10.1007/978-981-13-1498-8_15}, PAGES = {165--177}, TITLE = {Viable Crop Prediction Scenario in BigData Using a Novel Approach}, } @INPROCEEDINGS{Bendre_2015, AUTHOR = {Bendre, M. R. and Thool, R. C. and Thool, V. R.}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fngct.2015.7375220}, BOOKTITLE = {2015 1st International Conference on Next Generation Computing Technologies NGCT}, DATE = {2015-09}, DOI = {10.1109/ngct.2015.7375220}, TITLE = {Big data in precision agriculture: Weather forecasting for future farming}, } @INPROCEEDINGS{Zhang_2017, AUTHOR = {Zhang, Peng and Zhang, Qian and Liu, Fusheng and Li, Junqing and Cao, Ning and Song, Changqing}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fcse-euc.2017.258}, BOOKTITLE = {22017 {IEEE} International Conference on Computational Science and Engineering ({CSE}) and {IEEE} International Conference on Embedded and Ubiquitous Computing ({EUC})}, DATE = {2017-07}, DOI = {10.1109/cse-euc.2017.258}, TITLE = {The Construction of the Integration of Water and Fertilizer Smart Water Saving Irrigation System Based on Big Data}, } @INPROCEEDINGS{Barbouchi_2016, AUTHOR = {Barbouchi, Meriem and Chokmani, Karem and Abdelfattah, Riadh and Aissa, Nadhira Ben}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fatsip.2016.7523143}, BOOKTITLE = {2016 2nd International Conference on Advanced Technologies for Signal and Image Processing ({ATSIP})}, DATE = {2016-03}, DOI = {10.1109/atsip.2016.7523143}, TITLE = {Yield estimation of the winter wheat using Radarsat 2 polarimetric {SAR} reponse}, } @ARTICLE{Badr_2016, AUTHOR = {Badr, G. and Klein, L. J. and Freitag, M. and Albrecht, C. M. and Marianno, F. J. and Lu, S. and Shao, X. and Hinds, N. and Hoogenboom, G. and Hamann, H. F.}, PUBLISHER = {IBM}, URL = {https://doi.org/10.1147%2Fjrd.2016.2591698}, DATE = {2016-09}, DOI = {10.1147/jrd.2016.2591698}, JOURNALTITLE = {{IBM} Journal of Research and Development}, NUMBER = {5/6}, PAGES = {5:1--5:11}, TITLE = {Toward large-scale crop production forecasts for global food security}, VOLUME = {60}, } @INPROCEEDINGS{Suwantong_2016, AUTHOR = {Suwantong, Rata and Srestasathiern, Panu and Lawawirojwong, Siam and Rakwatin, Preesan}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Facc.2016.7525476}, BOOKTITLE = {2016 American Control Conference ({ACC})}, DATE = {2016-07}, DOI = {10.1109/acc.2016.7525476}, TITLE = {Moving Horizon Estimator with Pre-Estimation for crop start date estimation in tropical area}, } @ARTICLE{Wang_2018, AUTHOR = {Wang, Tao and Chen, Jian and Fan, Yangyang and Qiu, Zhengjun and He, Yong}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2018.07.017}, DATE = {2018-09}, DOI = {10.1016/j.compag.2018.07.017}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {302--313}, TITLE = {{SeeFruits}: Design and evaluation of a cloud-based ultra-portable {NIRS} system for sweet cherry quality detection}, VOLUME = {152}, } @ARTICLE{Xia_2018, AUTHOR = {Xia, JiAn and Yang, YuWang and Cao, HongXin and Han, Chen and Ge, DaoKuo and Zhang, WenYu}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2017.12.012}, DATE = {2018-02}, DOI = {10.1016/j.compag.2017.12.012}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {27--34}, TITLE = {Visible-near infrared spectrum-based classification of apple chilling injury on cloud computing platform}, VOLUME = {145}, } @ARTICLE{Jayaraman_2016, AUTHOR = {Jayaraman, Prem and Yavari, Ali and Georgakopoulos, Dimitrios and Morshed, Ahsan and Zaslavsky, Arkady}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fs16111884}, DATE = {2016-11}, DOI = {10.3390/s16111884}, JOURNALTITLE = {Sensors}, NUMBER = {11}, PAGES = {1884}, TITLE = {Internet of Things Platform for Smart Farming: Experiences and Lessons Learnt}, VOLUME = {16}, } @ARTICLE{Nguyen_2017, AUTHOR = {Nguyen, Van-Quyet and Nguyen, Sinh Ngoc and Kim, Kyungbaek}, PUBLISHER = {Digital Contents Society}, URL = {https://doi.org/10.9728%2Fdcs.2017.18.1.149}, DATE = {2017-02}, DOI = {10.9728/dcs.2017.18.1.149}, JOURNALTITLE = {Journal of Digital Contents Society}, NUMBER = {1}, PAGES = {149--158}, TITLE = {Design of a Platform for Collecting and Analyzing Agricultural Big Data}, VOLUME = {18}, } @ARTICLE{Woodard_2016, AUTHOR = {Woodard, Joshua}, PUBLISHER = {Emerald}, URL = {https://doi.org/10.1108%2Fafr-03-2016-0018}, DATE = {2016-05}, DOI = {10.1108/afr-03-2016-0018}, JOURNALTITLE = {Agricultural Finance Review}, NUMBER = {1}, PAGES = {15--26}, TITLE = {Big data and Ag-Analytics}, VOLUME = {76}, } @ARTICLE{Zhang_2013, AUTHOR = {Zhang, Fang and Fu, Li Si}, PUBLISHER = {Trans Tech Publications}, URL = {https://doi.org/10.4028%2Fwww.scientific.net%2Famm.462-463.72}, DATE = {2013-11}, DOI = {10.4028/www.scientific.net/amm.462-463.72}, JOURNALTITLE = {Applied Mechanics and Materials}, PAGES = {72--76}, TITLE = {Application of Computer Vision Technology in Agricultural Field}, VOLUME = {462-463}, } @ARTICLE{Basu_2018, AUTHOR = {Basu, Subhajit and Omotubora, Adekemi and Beeson, Matt and Fox, Charles}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs00146-018-0846-4}, DATE = {2018-05}, DOI = {10.1007/s00146-018-0846-4}, JOURNALTITLE = {{AI} {\&} {SOCIETY}}, TITLE = {Legal framework for small autonomous agricultural robots}, } @ARTICLE{Emmi_2014, AUTHOR = {Emmi, Luis and Gonzalez-de-Soto, Mariano and Pajares, Gonzalo and Gonzalez-de-Santos, Pablo}, PUBLISHER = {Hindawi Limited}, URL = {https://doi.org/10.1155%2F2014%2F404059}, DATE = {2014}, DOI = {10.1155/2014/404059}, JOURNALTITLE = {The Scientific World Journal}, PAGES = {1--21}, TITLE = {New Trends in Robotics for Agriculture: Integration and Assessment of a Real Fleet of Robots}, VOLUME = {2014}, } @ARTICLE{Reid_2000, AUTHOR = {Reid, John F. and Zhang, Qin and Noguchi, Noboru and Dickson, Monte}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fs0168-1699%2899%2900061-7}, DATE = {2000-01}, DOI = {10.1016/s0168-1699(99)00061-7}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {1-2}, PAGES = {155--167}, TITLE = {Agricultural automatic guidance research in North America}, VOLUME = {25}, } @ARTICLE{Noguchi_2001, AUTHOR = {Noguchi, Noboru and Zhang, Qin and Han, Shufeng and Reid, John F.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fs1474-6670%2817%2933136-1}, DATE = {2001-09}, DOI = {10.1016/s1474-6670(17)33136-1}, JOURNALTITLE = {{IFAC} Proceedings Volumes}, NUMBER = {19}, PAGES = {197--202}, TITLE = {Autonomous Agricultural Tractor with an Intelligent Navigation System}, VOLUME = {34}, } @ARTICLE{Eizicovits_2014, AUTHOR = {Eizicovits, Danny and Berman, Sigal}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.robot.2014.03.011}, DATE = {2014-08}, DOI = {10.1016/j.robot.2014.03.011}, JOURNALTITLE = {Robotics and Autonomous Systems}, NUMBER = {8}, PAGES = {1208--1219}, TITLE = {Efficient sensory-grounded grasp pose quality mapping for gripper design and online grasp planning}, VOLUME = {62}, } @ARTICLE{Bechar_2017, AUTHOR = {Bechar, Avital and Vigneault, Cl{\'{e}}ment}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.biosystemseng.2016.11.004}, DATE = {2017-01}, DOI = {10.1016/j.biosystemseng.2016.11.004}, JOURNALTITLE = {Biosystems Engineering}, PAGES = {110--128}, TITLE = {Agricultural robots for field operations. Part 2: Operations and systems}, VOLUME = {153}, } @ARTICLE{Xia_2015, AUTHOR = {Xia, Chunlei and Wang, Longtan and Chung, Bu-Keun and Lee, Jang-Myung}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fs150820463}, DATE = {2015-08}, DOI = {10.3390/s150820463}, JOURNALTITLE = {Sensors}, NUMBER = {8}, PAGES = {20463--20479}, TITLE = {In Situ 3D Segmentation of Individual Plant Leaves Using a {RGB}-D Camera for Agricultural Automation}, VOLUME = {15}, } @ARTICLE{Bechar_2009, AUTHOR = {Bechar, A. and Meyer, J. and Edan, Y.}, PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})}, URL = {https://doi.org/10.1109%2Ftsmcc.2009.2020174}, DATE = {2009-11}, DOI = {10.1109/tsmcc.2009.2020174}, JOURNALTITLE = {{IEEE} Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews)}, NUMBER = {6}, PAGES = {611--620}, TITLE = {An Objective Function to Evaluate Performance of Human{--}Robot Collaboration in Target Recognition Tasks}, VOLUME = {39}, } @ARTICLE{Oren_2011, AUTHOR = {Oren, Y. and Bechar, A. and Edan, Y.}, PUBLISHER = {Cambridge University Press ({CUP})}, URL = {https://doi.org/10.1017%2Fs0263574711001020}, DATE = {2011-10}, DOI = {10.1017/s0263574711001020}, JOURNALTITLE = {Robotica}, NUMBER = {05}, PAGES = {813--826}, TITLE = {Performance analysis of a human{--}robot collaborative target recognition system}, VOLUME = {30}, } @INPROCEEDINGS{Anil_2015, AUTHOR = {Anil, H. and k.s. Nikhil and Chaitra, V. and Gurusharan, B.S.}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Fisms.2015.2}, BOOKTITLE = {2015 6th International Conference on Intelligent Systems, Modelling and Simulation}, DATE = {2015-02}, DOI = {10.1109/isms.2015.2}, TITLE = {Revolutionizing Farming Using Swarm Robotics}, } @ARTICLE{Emmi_2013, AUTHOR = {Emmi, Luis and Paredes-Madrid, Leonel and Ribeiro, Angela and Pajares, Gonzalo and Gonzalez-de-Santos, Pablo}, PUBLISHER = {Emerald}, URL = {https://doi.org/10.1108%2F01439911311294246}, DATE = {2013-01}, DOI = {10.1108/01439911311294246}, JOURNALTITLE = {Industrial Robot: An International Journal}, NUMBER = {1}, PAGES = {41--58}, TITLE = {Fleets of robots for precision agriculture: a simulation environment}, VOLUME = {40}, } @ARTICLE{Tan_2013, AUTHOR = {Tan, Ying and Zheng, Zhong-yang}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.dt.2013.03.001}, DATE = {2013-03}, DOI = {10.1016/j.dt.2013.03.001}, JOURNALTITLE = {Defence Technology}, NUMBER = {1}, PAGES = {18--39}, TITLE = {Research Advance in Swarm Robotics}, VOLUME = {9}, } @ARTICLE{Malavazi_2018, AUTHOR = {Malavazi, Flavio B.P. and Guyonneau, Remy and Fasquel, Jean-Baptiste and Lagrange, Sebastien and Mercier, Franck}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2018.08.034}, DATE = {2018-11}, DOI = {10.1016/j.compag.2018.08.034}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {71--79}, TITLE = {{LiDAR}-only based navigation algorithm for an autonomous agricultural robot}, VOLUME = {154}, } @ARTICLE{Baluja_2012, AUTHOR = {Baluja, Javier and Diago, Maria P. and Balda, Pedro and Zorer, Roberto and Meggio, Franco and Morales, Fermin and Tardaguila, Javier}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs00271-012-0382-9}, DATE = {2012-08}, DOI = {10.1007/s00271-012-0382-9}, JOURNALTITLE = {Irrigation Science}, NUMBER = {6}, PAGES = {511--522}, TITLE = {Assessment of vineyard water status variability by thermal and multispectral imagery using an unmanned aerial vehicle ({UAV})}, VOLUME = {30}, } @ARTICLE{Gongal_2016, AUTHOR = {Gongal, A. and Silwal, A. and Amatya, S. and Karkee, M. and Zhang, Q. and Lewis, K.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2015.10.022}, DATE = {2016-01}, DOI = {10.1016/j.compag.2015.10.022}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {26--35}, TITLE = {Apple crop-load estimation with over-the-row machine vision system}, VOLUME = {120}, } @ARTICLE{Addicott_1955, AUTHOR = {Addicott, F T and Lynch, R S}, PUBLISHER = {Annual Reviews}, URL = {https://doi.org/10.1146%2Fannurev.pp.06.060155.001235}, DATE = {1955-06}, DOI = {10.1146/annurev.pp.06.060155.001235}, JOURNALTITLE = {Annual Review of Plant Physiology}, NUMBER = {1}, PAGES = {211--238}, TITLE = {Physiology of Abscission}, VOLUME = {6}, } @ARTICLE{Pla_1995, AUTHOR = {Pla, F. and Juste, F.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2F0168-1699%2895%2900029-1}, DATE = {1995-12}, DOI = {10.1016/0168-1699(95)00029-1}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {4}, PAGES = {301--314}, TITLE = {A thinning-based algorithm to characterize fruit stems from profile images}, VOLUME = {13}, } @INPROCEEDINGS{Gebbers_2013, AUTHOR = {Gebbers, Robin and Pflanz, Michael and Betz, Adolf and Hille, Benjamin and Mattner, Jens and Rachow-Autrum, Thomas and Ozyurtlu, Mustafa and Schischmanow, Adrian and Scheele, Martin and Schrenk, Johannes and Schrenk, Ludwig}, LANGUAGE = {English}, LOCATION = {Potsdam, Germany}, DATE = {2013}, ISSN = {16175468}, JOURNALTITLE = {Lecture Notes in Informatics (LNI), Proceedings - Series of the Gesellschaft fur Informatik (GI)}, PAGES = {95--98}, TITLE = {Opti thin - implementation of precision horticulture by tree-specific mechanical thinning}, VOLUME = {P-211}, } @ARTICLE{westwood1970, AUTHOR = {Westwood, MN and Roberts, AN and others}, DATE = {1970}, JOURNALTITLE = {Journal of the American Society of Horticultural Science}, PAGES = {28--30}, TITLE = {The relationship between trunk cross-sectional area and weight of apple trees.}, VOLUME = {95}, } @ARTICLE{forshey1986, AUTHOR = {Forshey, Chester}, PUBLISHER = {New York State Agricultural Experiment Station}, DATE = {1986}, TITLE = {Chemical fruit thinning of apples}, } @ARTICLE{wright2006fruit, AUTHOR = {Wright, AH and Embree, CG and Nichols, DS and Prange, RK and Harrison, PA and Delong, JM}, PUBLISHER = {Taylor \& Francis}, DATE = {2006}, JOURNALTITLE = {The Journal of Horticultural Science and Biotechnology}, NUMBER = {3}, PAGES = {397--401}, TITLE = {Fruit mass, colour and yield of \textquoteleft{}{}{}{}Honeycrisp\textquoteright{}{}{}{}\x{2122} apples are influenced by manually-adjusted fruit population and tree form}, VOLUME = {81}, } @ARTICLE{koike2003influence, AUTHOR = {Koike, Hiroo and Tamai, Hiroshi and Ono, Takashi and Shigehara, Izumi}, PUBLISHER = {American Pomological Society}, DATE = {2003}, JOURNALTITLE = {Journal of the American Pomological Society}, NUMBER = {4}, PAGES = {169}, TITLE = {Influence of time of thinning on yield, fruit quality and return flowering of'Fuji'apple}, VOLUME = {57}, } @ARTICLE{wright2006evaluating, AUTHOR = {Wright, H and Nichols, D and Embree, C}, DATE = {2006}, JOURNALTITLE = {Acta horticulturae}, TITLE = {Evaluating the accountability of trunk size and canopy volume models for determining apple tree production potential across diverse management regimes}, } @INCOLLECTION{Cohen_2011, AUTHOR = {Cohen, Oded and Linker, Raphael and Naor, Amos}, PUBLISHER = {Springer Berlin Heidelberg}, URL = {https://doi.org/10.1007%2F978-3-642-18333-1_77}, BOOKTITLE = {Computer and Computing Technologies in Agriculture {IV}}, DATE = {2011}, DOI = {10.1007/978-3-642-18333-1_77}, PAGES = {630--642}, TITLE = {Estimation of the Number of Apples in Color Images Recorded in Orchards}, } @ARTICLE{volz1988regulation, AUTHOR = {Volz, RK}, PUBLISHER = {Taylor \& Francis}, DATE = {1988}, JOURNALTITLE = {New Zealand Journal of Experimental Agriculture}, NUMBER = {1}, PAGES = {47--53}, TITLE = {Regulation and estimation of crop load on \textquoteleft{}{}{}{}Gala\textquoteright{}{}{}{}apple trees}, VOLUME = {16}, } @ARTICLE{mizushima2011cost, AUTHOR = {Mizushima, Akira and Lu, Renfu}, PUBLISHER = {American Society of Agricultural and Biological Engineers}, DATE = {2011}, JOURNALTITLE = {Applied engineering in agriculture}, NUMBER = {1}, PAGES = {33--40}, TITLE = {Cost benefits analysis of in-field presorting for the apple industry}, VOLUME = {27}, } @ARTICLE{Wulfsohn_2011, AUTHOR = {Wulfsohn, Dvoralai and Zamora, Felipe Aravena and T{\'{e}}llez, Camilla Potin and Lagos, In{\'{e}}s Zamora and Garc{\'{\i{}}}a-Fi{\~{n}}ana, Marta}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs11119-011-9245-2}, DATE = {2011-09}, DOI = {10.1007/s11119-011-9245-2}, JOURNALTITLE = {Precision Agriculture}, NUMBER = {2}, PAGES = {256--275}, TITLE = {Multilevel systematic sampling to estimate total fruit number for yield forecasts}, VOLUME = {13}, } @BOOK{peach2008, EDITOR = {Layne, D. and Bassi, D.}, PUBLISHER = {CABI}, URL = {https://doi.org/10.1079%2F9781845933869.0000}, DATE = {2008}, DOI = {10.1079/9781845933869.0000}, TITLE = {The peach: botany, production and uses}, } @ARTICLE{Aggelopoulou_2010, AUTHOR = {Aggelopoulou, A. D. and Bochtis, D. and Fountas, S. and Swain, K. C. and Gemtos, T. A. and Nanos, G. D.}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs11119-010-9187-0}, DATE = {2010-08}, DOI = {10.1007/s11119-010-9187-0}, JOURNALTITLE = {Precision Agriculture}, NUMBER = {3}, PAGES = {448--456}, TITLE = {Yield prediction in apple orchards based on image processing}, VOLUME = {12}, } @ARTICLE{Linker_2012, AUTHOR = {Linker, Raphael and Cohen, Oded and Naor, Amos}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2011.11.007}, DATE = {2012-02}, DOI = {10.1016/j.compag.2011.11.007}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {45--57}, TITLE = {Determination of the number of green apples in {RGB} images recorded in orchards}, VOLUME = {81}, } @INPROCEEDINGS{Gang_Pan_2007, AUTHOR = {Pan, Gang and Li, Feng-min and Sun, Guo-jun}, PUBLISHER = {IEEE}, URL = {https://doi.org/10.1109%2Figarss.2007.4422917}, BOOKTITLE = {2007 {IEEE} International Geoscience and Remote Sensing Symposium}, DATE = {2007}, DOI = {10.1109/igarss.2007.4422917}, TITLE = {Digital camera based measurement of crop cover for wheat yield prediction}, } @INPROCEEDINGS{Kishore_2008, AUTHOR = {Swain, {Kishore C.} and Zaman, Qamar and Jayasuriya, {Hemantha P W} and Zhang, Fangming}, LANGUAGE = {English}, PUBLISHER = {American Society of Agricultural and Biological Engineers}, BOOKTITLE = {American Society of Agricultural and Biological Engineers Annual International Meeting 2008, ASABE 2008}, DATE = {2008}, ISBN = {9781605605364}, PAGES = {134--144}, TITLE = {Estimation of rice yield and protein content using remote sensing images acquired by radio controlled unmanned helicopter}, VOLUME = {1}, } @ARTICLE{Q_U_Zaman_2008, AUTHOR = {Zaman, Q. U. and Schumann, A. W. and Percival, D. C. and Gordon, R. J.}, PUBLISHER = {American Society of Agricultural and Biological Engineers ({ASABE})}, URL = {https://doi.org/10.13031%2F2013.25302}, DATE = {2008}, DOI = {10.13031/2013.25302}, JOURNALTITLE = {Transactions of the {ASABE}}, NUMBER = {5}, PAGES = {1539--1544}, TITLE = {Estimation of Wild Blueberry Fruit Yield Using Digital Color Photography}, VOLUME = {51}, } @ARTICLE{Cheng_2017, AUTHOR = {Cheng, Hong and Damerow, Lutz and Sun, Yurui and Blanke, Michael}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fjimaging3010006}, DATE = {2017-01}, DOI = {10.3390/jimaging3010006}, JOURNALTITLE = {Journal of Imaging}, NUMBER = {1}, PAGES = {6}, TITLE = {Early Yield Prediction Using Image Analysis of Apple Fruit and Tree Canopy Features with Neural Networks}, VOLUME = {3}, } @ARTICLE{Kim_2008, AUTHOR = {Kim, Yunseop and Reid, John F. and Zhang, Qin}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2007.09.008}, DATE = {2008-03}, DOI = {10.1016/j.compag.2007.09.008}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {2}, PAGES = {279--288}, TITLE = {Fuzzy logic control of a multispectral imaging sensor for in-field plant sensing}, VOLUME = {60}, } @ARTICLE{Mehl_2004, AUTHOR = {Mehl, Patrick M and Chen, Yud-Ren and Kim, Moon S and Chan, Diane E}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fs0260-8774%2803%2900188-2}, DATE = {2004-01}, DOI = {10.1016/s0260-8774(03)00188-2}, JOURNALTITLE = {Journal of Food Engineering}, NUMBER = {1}, PAGES = {67--81}, TITLE = {Development of hyperspectral imaging technique for the detection of apple surface defects and contaminations}, VOLUME = {61}, } @ARTICLE{Okamoto_2009, AUTHOR = {Okamoto, Hiroshi and Lee, Won Suk}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2009.02.004}, DATE = {2009-05}, DOI = {10.1016/j.compag.2009.02.004}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {2}, PAGES = {201--208}, TITLE = {Green citrus detection using hyperspectral imaging}, VOLUME = {66}, } @ARTICLE{Rodriguez_2004, AUTHOR = {Rodriguez, J. C. and Duchemin, B. and Hadria, R. and Watts, C. and Garatuza, J. and Chehbouni, A. and Khabba, S. and Boulet, G. and Palacios, E. and Lahrouni, A.}, PUBLISHER = {{EDP} Sciences}, URL = {https://doi.org/10.1051%2Fagro%3A2004037}, DATE = {2004-09}, DOI = {10.1051/agro:2004037}, JOURNALTITLE = {Agronomie}, NUMBER = {6-7}, PAGES = {295--304}, TITLE = {Wheat yield estimation using remote sensing and the {STICS} model in the semiarid Yaqui valley, Mexico}, VOLUME = {24}, } @ARTICLE{Yang_2004, AUTHOR = {Yang, Chenghai and Everitt, James H. and Bradford, Joe M. and Murden, Dale}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs11119-004-5319-8}, DATE = {2004-10}, DOI = {10.1007/s11119-004-5319-8}, JOURNALTITLE = {Precision Agriculture}, NUMBER = {5}, PAGES = {445--461}, TITLE = {Airborne Hyperspectral Imagery and Yield Monitor Data for Mapping Cotton Yield Variability}, VOLUME = {5}, } @ARTICLE{Ye_2007, AUTHOR = {Ye, Xujun and Sakai, Kenshi and Manago, Masafumi and Asada, Shin-ichi and Sasao, Akira}, PUBLISHER = {Springer Nature}, URL = {https://doi.org/10.1007%2Fs11119-007-9032-2}, DATE = {2007-04}, DOI = {10.1007/s11119-007-9032-2}, JOURNALTITLE = {Precision Agriculture}, NUMBER = {3}, PAGES = {111--125}, TITLE = {Prediction of citrus yield from airborne hyperspectral imagery}, VOLUME = {8}, } @ARTICLE{Dorj_2017, AUTHOR = {Dorj, Ulzii-Orshikh and Lee, Malrey and Yun, Sang-seok}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2017.05.019}, DATE = {2017-08}, DOI = {10.1016/j.compag.2017.05.019}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {103--112}, TITLE = {An yield estimation in citrus orchards via fruit detection and counting using image processing}, VOLUME = {140}, } @ARTICLE{Escol__2011, AUTHOR = {Escol{\`{a}}, Alexandre and Planas, Santiago and Rosell, Joan Ramon and Pomar, Jes{\'{u}}s and Camp, Ferran and Solanelles, Francesc and Gracia, Felip and Llorens, Jordi and Gil, Emilio}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fs110302459}, DATE = {2011-02}, DOI = {10.3390/s110302459}, JOURNALTITLE = {Sensors}, NUMBER = {3}, PAGES = {2459--2477}, TITLE = {Performance of an Ultrasonic Ranging Sensor in Apple Tree Canopies}, VOLUME = {11}, } @ARTICLE{Llorens_2011, AUTHOR = {Llorens, Jordi and Gil, Emilio and Llop, Jordi and Escol{\`{a}}, Alexandre}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fs110202177}, DATE = {2011-02}, DOI = {10.3390/s110202177}, JOURNALTITLE = {Sensors}, NUMBER = {2}, PAGES = {2177--2194}, TITLE = {Ultrasonic and {LIDAR} Sensors for Electronic Canopy Characterization in Vineyards: Advances to Improve Pesticide Application Methods}, VOLUME = {11}, } @ARTICLE{Auat_Cheein_2015, AUTHOR = {Cheein, Fernando A. Auat and Guivant, Jos{\'{e}} and Sanz, Ricardo and Escol{\`{a}}, Alexandre and Yand{\'{u}}n, Francisco and Torres-Torriti, Miguel and Rosell-Polo, Joan R.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2015.09.017}, DATE = {2015-10}, DOI = {10.1016/j.compag.2015.09.017}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {361--371}, TITLE = {Real-time approaches for characterization of fully and partially scanned canopies in groves}, VOLUME = {118}, } @ARTICLE{Pfeiffer_2018, AUTHOR = {Pfeiffer, Sebasti{\'{a}}n Arriagada and Guevara, Javier and Cheein, Fernando Auat and Sanz, Ricardo}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2018.01.022}, DATE = {2018-03}, DOI = {10.1016/j.compag.2018.01.022}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {104--113}, TITLE = {Mechatronic terrestrial {LiDAR} for canopy porosity and crown surface estimation}, VOLUME = {146}, } @ARTICLE{Sanz_2018, AUTHOR = {Sanz, Ricardo and Llorens, Jordi and Escol{\`{a}}, Alexandre and Arn{\'{o}}, Jaume and Planas, Santiago and Rom{\'{a}}n, Carla and Rosell-Polo, Joan R.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.agrformet.2018.06.017}, DATE = {2018-10}, DOI = {10.1016/j.agrformet.2018.06.017}, JOURNALTITLE = {Agricultural and Forest Meteorology}, PAGES = {229--239}, TITLE = {{LIDAR} and non-{LIDAR}-based canopy parameters to estimate the leaf area in fruit trees and vineyard}, VOLUME = {260-261}, } @ARTICLE{J_Wei_2004, AUTHOR = {Wei, J. and Salyani, M.}, PUBLISHER = {American Society of Agricultural and Biological Engineers ({ASABE})}, URL = {https://doi.org/10.13031%2F2013.17795}, DATE = {2004}, DOI = {10.13031/2013.17795}, JOURNALTITLE = {Transactions of the {ASAE}}, NUMBER = {6}, PAGES = {2101--2107}, TITLE = {{DEVELOPMENT} {OF} A {LASER} {SCANNER} {FOR} {MEASURING} {TREE} {CANOPY} {CHARACTERISTICS}: {PHASE} 1. {PROTOTYPE} {DEVELOPMENT}}, VOLUME = {47}, } @ARTICLE{bulanon2010fruit, AUTHOR = {Bulanon, DM and Kataoka, T}, DATE = {2010}, JOURNALTITLE = {Agricultural Engineering International: CIGR Journal}, NUMBER = {1}, TITLE = {Fruit detection system and an end effector for robotic harvesting of Fuji apples}, VOLUME = {12}, } @ARTICLE{Bulanon_2002, AUTHOR = {Bulanon, D.M. and Kataoka, T. and Ota, Y. and Hiroma, T.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1006%2Fbioe.2002.0132}, DATE = {2002-12}, DOI = {10.1006/bioe.2002.0132}, JOURNALTITLE = {Biosystems Engineering}, NUMBER = {4}, PAGES = {405--412}, TITLE = {{AE}{---}Automation and Emerging Technologies}, VOLUME = {83}, } @ARTICLE{Leemans_1999, AUTHOR = {Leemans, V and Magein, H and Destain, M.-F}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fs0168-1699%2899%2900006-x}, DATE = {1999-06}, DOI = {10.1016/s0168-1699(99)00006-x}, JOURNALTITLE = {Computers and Electronics in Agriculture}, NUMBER = {1}, PAGES = {43--53}, TITLE = {Defect segmentation on `Jonagold' apples using colour vision and a Bayesian classification method}, VOLUME = {23}, } @ARTICLE{Ji_2012, AUTHOR = {Ji, Wei and Zhao, Dean and Cheng, Fengyi and Xu, Bo and Zhang, Ying and Wang, Jinjing}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compeleceng.2011.11.005}, DATE = {2012-09}, DOI = {10.1016/j.compeleceng.2011.11.005}, JOURNALTITLE = {Computers {\&} Electrical Engineering}, NUMBER = {5}, PAGES = {1186--1195}, TITLE = {Automatic recognition vision system guided for apple harvesting robot}, VOLUME = {38}, } @ARTICLE{adamsen2000method, AUTHOR = {Adamsen, FJ and Coffelt, TA and Nelson, John M and Barnes, Edward M and Rice, Robert C}, PUBLISHER = {Crop Science Society of America}, DATE = {2000}, JOURNALTITLE = {Crop Science}, NUMBER = {3}, PAGES = {704--709}, TITLE = {Method for using images from a color digital camera to estimate flower number}, VOLUME = {40}, } @ARTICLE{Giusti_2016, AUTHOR = {Giusti, Alessandro and Guzzi, Jerome and Ciresan, Dan C. and He, Fang-Lin and Rodriguez, Juan P. and Fontana, Flavio and Faessler, Matthias and Forster, Christian and Schmidhuber, Jurgen and Caro, Gianni Di and Scaramuzza, Davide and Gambardella, Luca M.}, PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})}, URL = {https://doi.org/10.1109%2Flra.2015.2509024}, DATE = {2016-07}, DOI = {10.1109/lra.2015.2509024}, JOURNALTITLE = {{IEEE} Robotics and Automation Letters}, NUMBER = {2}, PAGES = {661--667}, TITLE = {A Machine Learning Approach to Visual Perception of Forest Trails for Mobile Robots}, VOLUME = {1}, } @ARTICLE{Reid_1987, AUTHOR = {Reid, J. and Searcy, S.}, PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})}, URL = {https://doi.org/10.1109%2Fmcs.1987.1105271}, DATE = {1987-04}, DOI = {10.1109/mcs.1987.1105271}, JOURNALTITLE = {{IEEE} Control Systems Magazine}, NUMBER = {2}, PAGES = {39--43}, TITLE = {Vision-based guidance of an agriculture tractor}, VOLUME = {7}, } @ARTICLE{Hiremath_2014, AUTHOR = {Hiremath, Santosh A. and van der Heijden, Gerie W.A.M. and van Evert, Frits K. and Stein, Alfred and ter Braak, Cajo J.F.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2013.10.005}, DATE = {2014-01}, DOI = {10.1016/j.compag.2013.10.005}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {41--50}, TITLE = {Laser range finder model for autonomous navigation of a robot in a maize field using a particle filter}, VOLUME = {100}, } @ARTICLE{P_rez_Ruiz_2012, AUTHOR = {P{\'{e}}rez-Ruiz, M. and Slaughter, D.C. and Gliever, C.J. and Upadhyaya, S.K.}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2011.10.006}, DATE = {2012-01}, DOI = {10.1016/j.compag.2011.10.006}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {41--49}, TITLE = {Automatic {GPS}-based intra-row weed knife control system for transplanted row crops}, VOLUME = {80}, } @ARTICLE{Aquino_2018, AUTHOR = {Aquino, Arturo and Millan, Borja and Diago, Maria-Paz and Tardaguila, Javier}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.compag.2017.11.026}, DATE = {2018-01}, DOI = {10.1016/j.compag.2017.11.026}, JOURNALTITLE = {Computers and Electronics in Agriculture}, PAGES = {26--36}, TITLE = {Automated early yield prediction in vineyards from on-the-go image acquisition}, VOLUME = {144}, } @ARTICLE{Brunella_2007, AUTHOR = {Morandi, Brunella and Manfrini, Luigi and Zibordi, Marco and Noferini, Massimo and Fiori, Giovanni and Grappadelli, Luca Corelli}, DATE = {2007}, ISSN = {00185345}, JOURNALTITLE = {HortScience}, NUMBER = {6}, PAGES = {1380--1382}, TITLE = {A low-cost device for accurate and continuous measurements of fruit diameter}, VOLUME = {42}, } @ARTICLE{Manfrini_2009, AUTHOR = {Manfrini, L. and Taylor, J.A. and Grappadelli, L.C.}, URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-67649510901&partnerID=40&md5=97cfa3c2408b54db6924c817659a2aae}, DATE = {2009}, JOURNALTITLE = {European Journal of Horticultural Science}, NOTE = {cited By 5}, NUMBER = {2}, PAGES = {54--60}, TITLE = {Spatial analysis of the effect of fruit thinning on apple crop load}, VOLUME = {74}, } @ARTICLE{Duhan_2017, AUTHOR = {Duhan, Joginder Singh and Kumar, Ravinder and Kumar, Naresh and Kaur, Pawan and Nehra, Kiran and Duhan, Surekha}, PUBLISHER = {Elsevier {BV}}, URL = {https://doi.org/10.1016%2Fj.btre.2017.03.002}, DATE = {2017-09}, DOI = {10.1016/j.btre.2017.03.002}, JOURNALTITLE = {Biotechnology Reports}, PAGES = {11--23}, TITLE = {Nanotechnology: The new perspective in precision agriculture}, VOLUME = {15}, } @ARTICLE{He_2018, AUTHOR = {He, Long and Schupp, James}, PUBLISHER = {{MDPI} {AG}}, URL = {https://doi.org/10.3390%2Fagronomy8100211}, DATE = {2018-09}, DOI = {10.3390/agronomy8100211}, JOURNALTITLE = {Agronomy}, NUMBER = {10}, PAGES = {211}, TITLE = {Sensing and Automation in Pruning of Apple Trees: A Review}, VOLUME = {8}, }
{ "pile_set_name": "Github" }
package org.simpleflatmapper.map.fieldmapper; import org.simpleflatmapper.map.FieldMapper; import org.simpleflatmapper.map.MappingContext; import org.simpleflatmapper.map.setter.ShortContextualSetter; import org.simpleflatmapper.reflect.primitive.ShortGetter; public final class ShortConstantTargetFieldMapper<S, T> implements FieldMapper<S, T> { private final ShortGetter<? super S> getter; private final ShortContextualSetter<? super T> setter; public ShortConstantTargetFieldMapper(final ShortGetter<? super S> getter, final ShortContextualSetter<? super T> setter) { this.getter = getter; this.setter = setter; } @Override public void mapTo(final S source, final T target, final MappingContext<? super S> mappingContext) throws Exception { setter.setShort(target, getter.getShort(source), mappingContext); } @Override public String toString() { return "ShortFieldMapper{" + "getter=" + getter + ", setter=" + setter + '}'; } }
{ "pile_set_name": "Github" }
<shader>{ "name":"LowPolyColor", "ubo":[ "UBOTransform" ], "options": { "modelMatrix":true }, "uniforms":[ { "name":"u_color", "type":"vec4" } ] }<\shader> <materials>[ { "name":"LowPolyRed", "uniforms":[{ "name":"u_color", "type":"rgba", "value":"ff0000ff" }] }, { "name":"LowPolyGreen", "uniforms":[{ "name":"u_color", "type":"rgba", "value":"00ff00ff" }] }, { "name":"LowPolyGray", "uniforms":[{ "name":"u_color", "type":"rgba", "value":"a0a0a0ff" }] } ]<\materials> <vertex> #version 300 es layout(location=0) in vec3 a_position; uniform UBOTransform{ mat4 projViewMatrix; vec3 cameraPos; float globalTime; vec2 screenSize; }; uniform mat4 u_modelMatrix; out vec3 v_worldPos; void main(void){ vec4 worldPos = u_modelMatrix * vec4(a_position,1.0); v_worldPos = worldPos.xyz; gl_Position = projViewMatrix * worldPos; } <\vertex> <fragment> #version 300 es precision mediump float; layout(location=0) out vec4 outColor; layout(location=1) out vec4 outPosition; layout(location=2) out vec4 outNormal; layout(location=3) out vec4 outEmission; in vec3 v_worldPos; uniform vec4 u_color; void main(void){ //...................................... //Deferred Output outColor = u_color; outPosition.rgb = v_worldPos; outNormal.rgb = normalize( cross( dFdx(v_worldPos), dFdy(v_worldPos) ) ); //outEmission = u_color; } <\fragment>
{ "pile_set_name": "Github" }
import fdtn from 'date-fns/formatDistanceToNow'; import subSeconds from 'date-fns/subSeconds'; import React from 'react'; import Graph from './Graph'; const historyLimit = 100; const API_URL = `${window.location.protocol}//${window.location.host}/api`; export default class App extends React.Component { constructor() { super(); this.state = { loaded: false, reloadRequired: false, error: false, meta: { cpu: { manufacturer: '', brand: '', cores: 0 }, motherboard: { manufacturer: '', model: '' }, os: { distro: '', hostname: '' }, interval: 2500 }, uptime: 'Loading', processes: 0, iterID: '', memTotal: 0, swapTotal: 0, diskSize: [], history: [], cpuTempData: [], cpuLoadData: [], memActiveData: [], swapUsedData: [], diskUsedData: [], diskIOData: [], networkData: [] }; } async componentDidMount() { let init = {}; try { init = await (await fetch(`${API_URL}/?t=${Math.random()}`, { headers: { init: true } })).json(); } catch (err) { this.setState({ error: true }); console.log('Could not talk to API: ', err); } if (init.iterID) { this.setState( { uptime: fdtn(subSeconds(new Date(), init.uptime)), processes: init.processes, meta: init.meta, iterID: init.iterID, memTotal: init.mem.total, swapTotal: init.mem.swaptotal, diskSize: init.disk .filter(disk => disk.size) .map(disk => disk.size), history: init.history.length > historyLimit ? init.history.slice(-historyLimit) : init.history }, () => { this.putDataToState(true); setInterval(this.poll, init.meta.interval); } ); } else if (!this.state.error) { this.setState({ reloadRequired: true }); } } poll = async () => { let data = {}; try { data = await (await fetch(`${API_URL}/?t=${Math.random()}`)).json(); } catch (err) { console.log('Could not talk to API while polling: ', err); } if (data.iterID && data.iterID !== this.state.iterID) { this.setState({ iterID: data.iterID, uptime: fdtn(subSeconds(new Date(), data.uptime)), processes: data.processes }); const history = this.state.history.slice(); if (this.state.history.length >= historyLimit) { history.shift(); } history.push({ cpuTemp: data.cpuTemp, cpuLoad: data.cpuLoad, memActive: data.mem.active, swapUsed: data.mem.swapused, diskUsed: data.disk.map(disk => disk.used), disksIOrbps: data.disksIO.rbps, disksIOwbps: data.disksIO.wbps, disksIOtbps: data.disksIO.tbps, networkbps: data.network.map(network => network.bps) }); this.setState( { history: history }, () => { this.putDataToState(); } ); } }; putDataToState = setLoadFlag => { const recorded = this.state.history.map(history => history.diskUsed); const diskUsedData = []; for (let i = 0; i < this.state.diskSize.length; i++) { diskUsedData.push([]); for (const record of recorded) { const data = {}; if (record[i]) { data.val = record[i]; } diskUsedData[i].push(data); } } const state = { cpuTempData: this.state.history.map(history => ({ val: history.cpuTemp })), cpuLoadData: this.state.history.map(history => ({ val: history.cpuLoad })), memActiveData: this.state.history.map(history => ({ val: history.memActive })), swapUsedData: this.state.history.map(history => ({ val: history.swapUsed })), diskUsedData: diskUsedData, diskIOData: this.state.history.map(history => ({ read: history.disksIOrbps, write: history.disksIOwbps, val: history.disksIOtbps })), networkData: this.state.history.map(history => ({ val: history.networkbps })) }; if (setLoadFlag) { state.loaded = true; } this.setState(state); }; render() { if (this.state.error) { return ( <div className="container"> <div className="oops"> How did you manage to fuck this up? <br /> <br /> </div> <div className="bigtext"> Somehow Doppler got his face smashed in again. <br /> Make sure there is an active internet connection between you and where Doppler is running. Try restarting the Doppler service before refreshing. If you're a dev, check the console. </div> </div> ); } if (this.state.reloadRequired) { return ( <div className="container"> <div className="oops"> Sucks to be you <br /> <br /> </div> <div className="bigtext"> Looks like you loaded this page so fast that Doppler had no time to collect data. Wait for a second or two, and then refresh this page. </div> </div> ); } if (this.state.loaded) { return ( <div className="container"> <div className="navbar"> <div className="title"> <a href="https://github.com/EnKrypt/Doppler/" rel="nofollow noopener noreferrer" > <img src="/Doppler.png" alt="Doppler logo" /> </a> </div> <div className="hostname"> <a href="/" rel="nofollow noopener noreferrer"> {this.state.meta.os.hostname} </a> </div> <div className="platform"> Running{' '} <span className="os"> {this.state.meta.os.distro} </span> <br /> On{' '} <span className="cores"> {this.state.meta.cpu.cores} </span>{' '} x{' '} <span className="cpu"> {this.state.meta.cpu.manufacturer}{' '} {this.state.meta.cpu.brand} </span> </div> </div> <div className="info"> <div className="moving-stats"> <div className="uptime"> Uptime: <span>{this.state.uptime}</span> </div> <div className="processes"> Processes: <span>{this.state.processes}</span> </div> </div> <div className="graphs"> <div className="card"> <div className="graph-row"> <Graph name="CPU Temperature" data={this.state.cpuTempData} lines={[ { value: 80, text: 'Warn', color: '#ffff00' }, { value: 100, text: 'TJ Max', color: '#ff0000' } ]} unit="°C" left={true} /> <Graph name="CPU Load" data={this.state.cpuLoadData} unit="%" /> </div> <div className="graph-row"> <Graph name="RAM Usage" data={this.state.memActiveData} unit=" MB" available={this.state.memTotal} left={true} /> <Graph name="Swap Usage" data={this.state.swapUsedData} unit=" MB" available={this.state.swapTotal} /> </div> {this.state.diskSize.map( (diskSize, index, arr) => { if (index % 2 === 0) { return ( <div className="graph-row" key={`Disk ${index + 1}`} > <Graph name={`Disk ${index + 1} Usage`} data={ this.state .diskUsedData[ index ] } unit=" GB" available={diskSize} /> {index + 1 < this.state.diskSize .length ? ( <Graph name={`Disk ${index + 2} Usage`} data={ this.state .diskUsedData[ index + 1 ] } unit=" GB" available={ arr[index + 1] } /> ) : ( '' )} </div> ); } else { return ''; } } )} <div className="graph-row"> <Graph name="Disk I/O" data={this.state.diskIOData} multipleLines={true} unit=" KB/s" left={true} /> <Graph name="Network I/O" data={this.state.networkData} unit=" KB/s" /> </div> </div> </div> </div> </div> ); } else { return ( <div className="container"> <div className="oops">Loading</div> </div> ); } } }
{ "pile_set_name": "Github" }
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ (function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(null, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define("@angular/common/locales/fr-PM", ["require", "exports"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js var u = undefined; function plural(n) { var i = Math.floor(Math.abs(n)); if (i === 0 || i === 1) return 1; return 5; } exports.default = [ 'fr-PM', [['AM', 'PM'], u, u], u, [ ['D', 'L', 'M', 'M', 'J', 'V', 'S'], ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'], ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'], ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'] ], u, [ ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], [ 'janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.' ], [ 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre' ] ], u, [['av. J.-C.', 'ap. J.-C.'], u, ['avant Jésus-Christ', 'après Jésus-Christ']], 1, [6, 0], ['dd/MM/y', 'd MMM y', 'd MMMM y', 'EEEE d MMMM y'], ['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'], ['{1} {0}', '{1} \'à\' {0}', u, u], [',', ' ', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'], ['#,##0.###', '#,##0 %', '#,##0.00 ¤', '#E0'], '€', 'euro', { 'ARS': ['$AR', '$'], 'AUD': ['$AU', '$'], 'BEF': ['FB'], 'BMD': ['$BM', '$'], 'BND': ['$BN', '$'], 'BSD': ['$BS', '$'], 'BZD': ['$BZ', '$'], 'CAD': ['$CA', '$'], 'CLP': ['$CL', '$'], 'CNY': [u, '¥'], 'COP': ['$CO', '$'], 'CYP': ['£CY'], 'EGP': [u, '£E'], 'FJD': ['$FJ', '$'], 'FKP': ['£FK', '£'], 'FRF': ['F'], 'GBP': ['£GB', '£'], 'GIP': ['£GI', '£'], 'HKD': [u, '$'], 'IEP': ['£IE'], 'ILP': ['£IL'], 'ITL': ['₤IT'], 'JPY': [u, '¥'], 'KMF': [u, 'FC'], 'LBP': ['£LB', '£L'], 'MTP': ['£MT'], 'MXN': ['$MX', '$'], 'NAD': ['$NA', '$'], 'NIO': [u, '$C'], 'NZD': ['$NZ', '$'], 'RHD': ['$RH'], 'RON': [u, 'L'], 'RWF': [u, 'FR'], 'SBD': ['$SB', '$'], 'SGD': ['$SG', '$'], 'SRD': ['$SR', '$'], 'TTD': ['$TT', '$'], 'TWD': [u, 'NT$'], 'USD': ['$US', '$'], 'UYU': ['$UY', '$'], 'WST': ['WS$'], 'XCD': [u, '$'], 'XPF': ['FCFP'], 'ZMW': [u, 'Kw'] }, plural ]; }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnItUE0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21tb24vbG9jYWxlcy9mci1QTS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7Ozs7Ozs7Ozs7OztJQUVILHlDQUF5QztJQUN6QywrQ0FBK0M7SUFFL0MsSUFBTSxDQUFDLEdBQUcsU0FBUyxDQUFDO0lBRXBCLGdCQUFnQixDQUFTO1FBQ3ZCLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2hDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQztZQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ2pDLE9BQU8sQ0FBQyxDQUFDO0lBQ1gsQ0FBQztJQUVELGtCQUFlO1FBQ2IsT0FBTyxFQUFFLENBQUMsQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFFLENBQUM7UUFDaEM7WUFDRSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsQ0FBQyxFQUFFLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDO1lBQzdGLENBQUMsVUFBVSxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE9BQU8sRUFBRSxVQUFVLEVBQUUsUUFBUSxDQUFDO1lBQ3pFLENBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsSUFBSSxDQUFDO1NBQzNDO1FBQ0QsQ0FBQztRQUNEO1lBQ0UsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsQ0FBQztZQUM1RDtnQkFDRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsTUFBTSxFQUFFLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTTtnQkFDekYsTUFBTTthQUNQO1lBQ0Q7Z0JBQ0UsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxXQUFXO2dCQUNwRixTQUFTLEVBQUUsVUFBVSxFQUFFLFVBQVU7YUFDbEM7U0FDRjtRQUNELENBQUMsRUFBRSxDQUFDLENBQUMsV0FBVyxFQUFFLFdBQVcsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLG9CQUFvQixFQUFFLG9CQUFvQixDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDO1FBQzNGLENBQUMsU0FBUyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsZUFBZSxDQUFDO1FBQ25ELENBQUMsT0FBTyxFQUFFLFVBQVUsRUFBRSxZQUFZLEVBQUUsZUFBZSxDQUFDLEVBQUUsQ0FBQyxTQUFTLEVBQUUsZUFBZSxFQUFFLENBQUMsRUFBRSxDQUFDLENBQUM7UUFDeEYsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsS0FBSyxFQUFFLEdBQUcsQ0FBQztRQUM5RCxDQUFDLFdBQVcsRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssQ0FBQyxFQUFFLEdBQUcsRUFBRSxNQUFNLEVBQUU7WUFDMUQsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQztZQUNuQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLElBQUksQ0FBQztZQUNiLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQztZQUNuQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQztZQUNuQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUM7WUFDZixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEtBQUssQ0FBQztZQUNkLEtBQUssRUFBRSxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUM7WUFDaEIsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQztZQUNuQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEdBQUcsQ0FBQztZQUNaLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQztZQUNuQixLQUFLLEVBQUUsQ0FBQyxDQUFDLEVBQUUsR0FBRyxDQUFDO1lBQ2YsS0FBSyxFQUFFLENBQUMsS0FBSyxDQUFDO1lBQ2QsS0FBSyxFQUFFLENBQUMsS0FBSyxDQUFDO1lBQ2QsS0FBSyxFQUFFLENBQUMsS0FBSyxDQUFDO1lBQ2QsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQztZQUNmLEtBQUssRUFBRSxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUM7WUFDaEIsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLElBQUksQ0FBQztZQUNwQixLQUFLLEVBQUUsQ0FBQyxLQUFLLENBQUM7WUFDZCxLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQztZQUNoQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEtBQUssQ0FBQztZQUNkLEtBQUssRUFBRSxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUM7WUFDZixLQUFLLEVBQUUsQ0FBQyxDQUFDLEVBQUUsSUFBSSxDQUFDO1lBQ2hCLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQztZQUNuQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLEtBQUssQ0FBQztZQUNqQixLQUFLLEVBQUUsQ0FBQyxLQUFLLEVBQUUsR0FBRyxDQUFDO1lBQ25CLEtBQUssRUFBRSxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUM7WUFDbkIsS0FBSyxFQUFFLENBQUMsS0FBSyxDQUFDO1lBQ2QsS0FBSyxFQUFFLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQztZQUNmLEtBQUssRUFBRSxDQUFDLE1BQU0sQ0FBQztZQUNmLEtBQUssRUFBRSxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUM7U0FDakI7UUFDRCxNQUFNO0tBQ1AsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBHb29nbGUgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vYW5ndWxhci5pby9saWNlbnNlXG4gKi9cblxuLy8gVEhJUyBDT0RFIElTIEdFTkVSQVRFRCAtIERPIE5PVCBNT0RJRllcbi8vIFNlZSBhbmd1bGFyL3Rvb2xzL2d1bHAtdGFza3MvY2xkci9leHRyYWN0LmpzXG5cbmNvbnN0IHUgPSB1bmRlZmluZWQ7XG5cbmZ1bmN0aW9uIHBsdXJhbChuOiBudW1iZXIpOiBudW1iZXIge1xuICBsZXQgaSA9IE1hdGguZmxvb3IoTWF0aC5hYnMobikpO1xuICBpZiAoaSA9PT0gMCB8fCBpID09PSAxKSByZXR1cm4gMTtcbiAgcmV0dXJuIDU7XG59XG5cbmV4cG9ydCBkZWZhdWx0IFtcbiAgJ2ZyLVBNJywgW1snQU0nLCAnUE0nXSwgdSwgdV0sIHUsXG4gIFtcbiAgICBbJ0QnLCAnTCcsICdNJywgJ00nLCAnSicsICdWJywgJ1MnXSwgWydkaW0uJywgJ2x1bi4nLCAnbWFyLicsICdtZXIuJywgJ2pldS4nLCAndmVuLicsICdzYW0uJ10sXG4gICAgWydkaW1hbmNoZScsICdsdW5kaScsICdtYXJkaScsICdtZXJjcmVkaScsICdqZXVkaScsICd2ZW5kcmVkaScsICdzYW1lZGknXSxcbiAgICBbJ2RpJywgJ2x1JywgJ21hJywgJ21lJywgJ2plJywgJ3ZlJywgJ3NhJ11cbiAgXSxcbiAgdSxcbiAgW1xuICAgIFsnSicsICdGJywgJ00nLCAnQScsICdNJywgJ0onLCAnSicsICdBJywgJ1MnLCAnTycsICdOJywgJ0QnXSxcbiAgICBbXG4gICAgICAnamFudi4nLCAnZsOpdnIuJywgJ21hcnMnLCAnYXZyLicsICdtYWknLCAnanVpbicsICdqdWlsLicsICdhb8O7dCcsICdzZXB0LicsICdvY3QuJywgJ25vdi4nLFxuICAgICAgJ2TDqWMuJ1xuICAgIF0sXG4gICAgW1xuICAgICAgJ2phbnZpZXInLCAnZsOpdnJpZXInLCAnbWFycycsICdhdnJpbCcsICdtYWknLCAnanVpbicsICdqdWlsbGV0JywgJ2Fvw7t0JywgJ3NlcHRlbWJyZScsXG4gICAgICAnb2N0b2JyZScsICdub3ZlbWJyZScsICdkw6ljZW1icmUnXG4gICAgXVxuICBdLFxuICB1LCBbWydhdi4gSi4tQy4nLCAnYXAuIEouLUMuJ10sIHUsIFsnYXZhbnQgSsOpc3VzLUNocmlzdCcsICdhcHLDqHMgSsOpc3VzLUNocmlzdCddXSwgMSwgWzYsIDBdLFxuICBbJ2RkL01NL3knLCAnZCBNTU0geScsICdkIE1NTU0geScsICdFRUVFIGQgTU1NTSB5J10sXG4gIFsnSEg6bW0nLCAnSEg6bW06c3MnLCAnSEg6bW06c3MgeicsICdISDptbTpzcyB6enp6J10sIFsnezF9IHswfScsICd7MX0gXFwnw6BcXCcgezB9JywgdSwgdV0sXG4gIFsnLCcsICfCoCcsICc7JywgJyUnLCAnKycsICctJywgJ0UnLCAnw5cnLCAn4oCwJywgJ+KInicsICdOYU4nLCAnOiddLFxuICBbJyMsIyMwLiMjIycsICcjLCMjMMKgJScsICcjLCMjMC4wMMKgwqQnLCAnI0UwJ10sICfigqwnLCAnZXVybycsIHtcbiAgICAnQVJTJzogWyckQVInLCAnJCddLFxuICAgICdBVUQnOiBbJyRBVScsICckJ10sXG4gICAgJ0JFRic6IFsnRkInXSxcbiAgICAnQk1EJzogWyckQk0nLCAnJCddLFxuICAgICdCTkQnOiBbJyRCTicsICckJ10sXG4gICAgJ0JTRCc6IFsnJEJTJywgJyQnXSxcbiAgICAnQlpEJzogWyckQlonLCAnJCddLFxuICAgICdDQUQnOiBbJyRDQScsICckJ10sXG4gICAgJ0NMUCc6IFsnJENMJywgJyQnXSxcbiAgICAnQ05ZJzogW3UsICfCpSddLFxuICAgICdDT1AnOiBbJyRDTycsICckJ10sXG4gICAgJ0NZUCc6IFsnwqNDWSddLFxuICAgICdFR1AnOiBbdSwgJ8KjRSddLFxuICAgICdGSkQnOiBbJyRGSicsICckJ10sXG4gICAgJ0ZLUCc6IFsnwqNGSycsICfCoyddLFxuICAgICdGUkYnOiBbJ0YnXSxcbiAgICAnR0JQJzogWyfCo0dCJywgJ8KjJ10sXG4gICAgJ0dJUCc6IFsnwqNHSScsICfCoyddLFxuICAgICdIS0QnOiBbdSwgJyQnXSxcbiAgICAnSUVQJzogWyfCo0lFJ10sXG4gICAgJ0lMUCc6IFsnwqNJTCddLFxuICAgICdJVEwnOiBbJ+KCpElUJ10sXG4gICAgJ0pQWSc6IFt1LCAnwqUnXSxcbiAgICAnS01GJzogW3UsICdGQyddLFxuICAgICdMQlAnOiBbJ8KjTEInLCAnwqNMJ10sXG4gICAgJ01UUCc6IFsnwqNNVCddLFxuICAgICdNWE4nOiBbJyRNWCcsICckJ10sXG4gICAgJ05BRCc6IFsnJE5BJywgJyQnXSxcbiAgICAnTklPJzogW3UsICckQyddLFxuICAgICdOWkQnOiBbJyROWicsICckJ10sXG4gICAgJ1JIRCc6IFsnJFJIJ10sXG4gICAgJ1JPTic6IFt1LCAnTCddLFxuICAgICdSV0YnOiBbdSwgJ0ZSJ10sXG4gICAgJ1NCRCc6IFsnJFNCJywgJyQnXSxcbiAgICAnU0dEJzogWyckU0cnLCAnJCddLFxuICAgICdTUkQnOiBbJyRTUicsICckJ10sXG4gICAgJ1RURCc6IFsnJFRUJywgJyQnXSxcbiAgICAnVFdEJzogW3UsICdOVCQnXSxcbiAgICAnVVNEJzogWyckVVMnLCAnJCddLFxuICAgICdVWVUnOiBbJyRVWScsICckJ10sXG4gICAgJ1dTVCc6IFsnV1MkJ10sXG4gICAgJ1hDRCc6IFt1LCAnJCddLFxuICAgICdYUEYnOiBbJ0ZDRlAnXSxcbiAgICAnWk1XJzogW3UsICdLdyddXG4gIH0sXG4gIHBsdXJhbFxuXTtcbiJdfQ==
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GIO Reference Manual: Writing GIO applications</title> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="pt01.html" title="Part I. GIO Overview"> <link rel="prev" href="ch01.html" title="Introduction"> <link rel="next" href="ch03.html" title="Compiling GIO applications"> <meta name="generator" content="GTK-Doc V1.21.1 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="chapter"> <div class="titlepage"><div><div><h2 class="title"> <a name="id-1.3.3"></a>Writing GIO applications</h2></div></div></div> <p> The information in the GLib <a class="ulink" href="http://developer.gnome.org/glib/stable/glib-programming.html" target="_top">documentation</a> about writing GLib applications is generally applicable when writing GIO applications. </p> <div class="simplesect"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="id-1.3.3.3"></a>Threads</h2></div></div></div> <p> GDBus has its own private worker thread, so applications using GDBus have at least 3 threads. GIO makes heavy use of the concept of a <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main context</GTKDOCLINK> to execute callbacks of asynchronous methods in the same context in which the operation was started. </p> </div> <div class="simplesect"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="id-1.3.3.4"></a>Security</h2></div></div></div> <p> When your program needs to carry out some privileged operation (say, create a new user account), there are various ways in which you can go about this: </p> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p> Implement a daemon that offers the privileged operation. A convenient way to do this is as a D-Bus system-bus service. The daemon will probably need ways to check the identity and authorization of the caller before executing the operation. <a class="ulink" href="http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html" target="_top">polkit</a> is a framework that allows this. </p></li> <li class="listitem"><p> Use a small helper that is executed with elevated privileges via pkexec. <a class="ulink" href="http://www.freedesktop.org/software/polkit/docs/latest/pkexec.1.html" target="_top">pkexec</a> is a small program launcher that is part of polkit. </p></li> <li class="listitem"><p> Use a small helper that is executed with elevated privileges by being suid root. </p></li> </ul></div> <p> None of these approaches is the clear winner, they all have their advantages and disadvantages. </p> <p> When writing code that runs with elevated privileges, it is important to follow some basic rules of secure programming. David Wheeler has an excellent book on this topic, <a class="ulink" href="http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/index.html" target="_top">Secure Programming for Linux and Unix HOWTO</a>. </p> <p> When using GIO in code that runs with elevated privileges, you have to be careful. GIO has extension points whose implementations get loaded from modules (executable code in shared objects), which could allow an attacker to sneak his own code into your application by tricking it into loading the code as a module. However, GIO will never load modules from your home directory except when explictly asked to do so via an environment variable. </p> <p> In most cases, your helper program should be so small that you don't need GIO, whose APIs are largely designed to support full-blown desktop applications. If you can't resist the convenience of these APIs, here are some steps you should take: </p> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p> Clear the environment, e.g. using the <code class="function"><code class="function">clearenv()</code></code> function. David Wheeler has a good <a class="ulink" href="http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/environment-variables.html" target="_top">explanation</a> for why it is important to sanitize the environment. See <a class="xref" href="running-gio-apps.html" title="Running GIO applications"><i>Running GIO applications</i></a> for a list of all environment variables affecting GIO. In particular, <code class="envar">PATH</code> (used to locate binaries), <code class="envar">GIO_EXTRA_MODULES</code> (used to locate loadable modules) and <code class="envar">DBUS_{SYSTEM,SESSION}_BUS_ADDRESS</code> (used to locate the D-Bus system and session bus) are important. </p></li> <li class="listitem"><p> Don't use GVfs, by setting <code class="envar">GIO_USE_VFS=local</code> in the environment. The reason to avoid GVfs in security-sensitive programs is that it uses many libraries which have not necessarily been audited for security problems. Gvfs is also heavily distributed and relies on a session bus to be present. </p></li> </ul></div> <p> </p> </div> </div> <div class="footer"> <hr> Generated by GTK-Doc V1.21.1</div> </body> </html>
{ "pile_set_name": "Github" }
#ifdef _M_ARM #include <kxarm.h> MACRO DEFINE_WRAPPER_FUNC $n, $off, $x LCLS _FuncName _FuncName SETS "_wrapper_func_":CC:"$n" NESTED_ENTRY $_FuncName __assertfail NESTED_END $_FuncName MEND #else #include <asm.inc> .code MACRO(DEFINE_WRAPPER_FUNC, n, off, x) #ifdef _M_IX86 PUBLIC _wrapper_func_&n& _wrapper_func_&n&: mov eax, [esp+4] mov eax, [eax+4] mov [esp+4], eax mov eax, [eax] jmp dword ptr [eax+off] #elif defined(_M_AMD64) PUBLIC wrapper_func_&n& wrapper_func_&n&: mov rcx, [rcx+4] mov rax, [rcx] jmp qword ptr [rax+off] #else #error Unimplemented #endif ENDM #endif DEFINE_WRAPPER_FUNC 3, 12, 24 DEFINE_WRAPPER_FUNC 4, 16, 32 DEFINE_WRAPPER_FUNC 5, 20, 40 DEFINE_WRAPPER_FUNC 6, 24, 48 DEFINE_WRAPPER_FUNC 7, 28, 56 DEFINE_WRAPPER_FUNC 8, 32, 64 DEFINE_WRAPPER_FUNC 9, 36, 72 DEFINE_WRAPPER_FUNC 10, 40, 80 DEFINE_WRAPPER_FUNC 11, 44, 88 DEFINE_WRAPPER_FUNC 12, 48, 96 DEFINE_WRAPPER_FUNC 13, 52, 104 DEFINE_WRAPPER_FUNC 14, 56, 112 DEFINE_WRAPPER_FUNC 15, 60, 120 DEFINE_WRAPPER_FUNC 16, 64, 128 DEFINE_WRAPPER_FUNC 17, 68, 136 DEFINE_WRAPPER_FUNC 18, 72, 144 DEFINE_WRAPPER_FUNC 19, 76, 152 DEFINE_WRAPPER_FUNC 20, 80, 160 DEFINE_WRAPPER_FUNC 21, 84, 168 DEFINE_WRAPPER_FUNC 22, 88, 176 DEFINE_WRAPPER_FUNC 23, 92, 184 DEFINE_WRAPPER_FUNC 24, 96, 192 DEFINE_WRAPPER_FUNC 25, 100, 200 DEFINE_WRAPPER_FUNC 26, 104, 208 DEFINE_WRAPPER_FUNC 27, 108, 216 DEFINE_WRAPPER_FUNC 28, 112, 224 DEFINE_WRAPPER_FUNC 29, 116, 232 DEFINE_WRAPPER_FUNC 30, 120, 240 DEFINE_WRAPPER_FUNC 31, 124, 248 DEFINE_WRAPPER_FUNC 32, 128, 256 DEFINE_WRAPPER_FUNC 33, 132, 264 DEFINE_WRAPPER_FUNC 34, 136, 272 DEFINE_WRAPPER_FUNC 35, 140, 280 DEFINE_WRAPPER_FUNC 36, 144, 288 DEFINE_WRAPPER_FUNC 37, 148, 296 DEFINE_WRAPPER_FUNC 38, 152, 304 DEFINE_WRAPPER_FUNC 39, 156, 312 DEFINE_WRAPPER_FUNC 40, 160, 320 DEFINE_WRAPPER_FUNC 41, 164, 328 DEFINE_WRAPPER_FUNC 42, 168, 336 DEFINE_WRAPPER_FUNC 43, 172, 344 DEFINE_WRAPPER_FUNC 44, 176, 352 DEFINE_WRAPPER_FUNC 45, 180, 360 DEFINE_WRAPPER_FUNC 46, 184, 368 DEFINE_WRAPPER_FUNC 47, 188, 376 DEFINE_WRAPPER_FUNC 48, 192, 384 DEFINE_WRAPPER_FUNC 49, 196, 392 DEFINE_WRAPPER_FUNC 50, 200, 400 DEFINE_WRAPPER_FUNC 51, 204, 408 DEFINE_WRAPPER_FUNC 52, 208, 416 DEFINE_WRAPPER_FUNC 53, 212, 424 DEFINE_WRAPPER_FUNC 54, 216, 432 DEFINE_WRAPPER_FUNC 55, 220, 440 DEFINE_WRAPPER_FUNC 56, 224, 448 DEFINE_WRAPPER_FUNC 57, 228, 456 DEFINE_WRAPPER_FUNC 58, 232, 464 DEFINE_WRAPPER_FUNC 59, 236, 472 DEFINE_WRAPPER_FUNC 60, 240, 480 DEFINE_WRAPPER_FUNC 61, 244, 488 DEFINE_WRAPPER_FUNC 62, 248, 496 DEFINE_WRAPPER_FUNC 63, 252, 504 DEFINE_WRAPPER_FUNC 64, 256, 512 DEFINE_WRAPPER_FUNC 65, 260, 520 DEFINE_WRAPPER_FUNC 66, 264, 528 DEFINE_WRAPPER_FUNC 67, 268, 536 DEFINE_WRAPPER_FUNC 68, 272, 544 DEFINE_WRAPPER_FUNC 69, 276, 552 DEFINE_WRAPPER_FUNC 70, 280, 560 DEFINE_WRAPPER_FUNC 71, 284, 568 DEFINE_WRAPPER_FUNC 72, 288, 576 DEFINE_WRAPPER_FUNC 73, 292, 584 DEFINE_WRAPPER_FUNC 74, 296, 592 DEFINE_WRAPPER_FUNC 75, 300, 600 DEFINE_WRAPPER_FUNC 76, 304, 608 DEFINE_WRAPPER_FUNC 77, 308, 616 DEFINE_WRAPPER_FUNC 78, 312, 624 DEFINE_WRAPPER_FUNC 79, 316, 632 DEFINE_WRAPPER_FUNC 80, 320, 640 DEFINE_WRAPPER_FUNC 81, 324, 648 DEFINE_WRAPPER_FUNC 82, 328, 656 DEFINE_WRAPPER_FUNC 83, 332, 664 DEFINE_WRAPPER_FUNC 84, 336, 672 DEFINE_WRAPPER_FUNC 85, 340, 680 DEFINE_WRAPPER_FUNC 86, 344, 688 DEFINE_WRAPPER_FUNC 87, 348, 696 DEFINE_WRAPPER_FUNC 88, 352, 704 DEFINE_WRAPPER_FUNC 89, 356, 712 DEFINE_WRAPPER_FUNC 90, 360, 720 DEFINE_WRAPPER_FUNC 91, 364, 728 DEFINE_WRAPPER_FUNC 92, 368, 736 DEFINE_WRAPPER_FUNC 93, 372, 744 DEFINE_WRAPPER_FUNC 94, 376, 752 DEFINE_WRAPPER_FUNC 95, 380, 760 DEFINE_WRAPPER_FUNC 96, 384, 768 DEFINE_WRAPPER_FUNC 97, 388, 776 DEFINE_WRAPPER_FUNC 98, 392, 784 DEFINE_WRAPPER_FUNC 99, 396, 792 END
{ "pile_set_name": "Github" }
# Contributing Contributions are **welcome** and will be fully **credited**. Please read and understand the contribution guide before creating an issue or pull request. ## Etiquette This project is open source, and as such, the maintainers give their free time to build and maintain the source code held within. They make the code freely available in the hope that it will be of use to other developers. It would be extremely unfair for them to suffer abuse or anger for their hard work. Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the world that developers are civilized and selfless people. It's the duty of the maintainer to ensure that all submissions to the project are of sufficient quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. ## Viability When requesting or submitting new features, first consider whether it might be useful to others. Open source projects are used by many developers, who may have entirely different needs to your own. Think about whether or not your feature is likely to be used by other users of the project. ## Procedure Before filing an issue: - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. - Check to make sure your feature suggestion isn't already present within the project. - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. - Check the pull requests tab to ensure that the feature isn't already in progress. Before submitting a pull request: - Check the codebase to ensure that your feature doesn't already exist. - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. ## Requirements If the project maintainer has any additional requirements, you will find them listed here. - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). - **Add tests!** - Your patch won't be accepted if it doesn't have tests. - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. **Happy coding**!
{ "pile_set_name": "Github" }
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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. */ package org.elasticsearch.common.time; import org.elasticsearch.common.Strings; import org.elasticsearch.common.SuppressForbidden; import java.time.DayOfWeek; import java.time.Instant; import java.time.LocalDate; import java.time.LocalTime; import java.time.Year; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.format.ResolverStyle; import java.time.format.SignStyle; import java.time.temporal.ChronoField; import java.time.temporal.IsoFields; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalQueries; import java.time.temporal.WeekFields; import java.util.ArrayList; import java.util.List; import java.util.Locale; import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.HOUR_OF_DAY; import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.NANO_OF_SECOND; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; public class DateFormatters { private static final DateTimeFormatter TIME_ZONE_FORMATTER_NO_COLON = new DateTimeFormatterBuilder() .appendOffset("+HHmm", "Z") .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_YEAR_MONTH_DAY_FORMATTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral("-") .appendValue(MONTH_OF_YEAR, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral('-') .appendValue(DAY_OF_MONTH, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_HOUR_MINUTE_SECOND_FORMATTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_DATE_OPTIONAL_TIME_PRINTER = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral('T') .optionalStart() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendFraction(NANO_OF_SECOND, 3, 3, true) .optionalEnd() .optionalEnd() .optionalStart() .appendOffset("+HH:MM", "Z") .optionalEnd() .optionalEnd() .optionalEnd() .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_DATE_OPTIONAL_TIME_FORMATTER = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .optionalStart() .appendLiteral('T') .optionalStart() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendFraction(NANO_OF_SECOND, 3, 9, true) .optionalEnd() .optionalEnd() .optionalStart() .appendZoneOrOffsetId() .optionalEnd() .optionalStart() .append(TIME_ZONE_FORMATTER_NO_COLON) .optionalEnd() .optionalEnd() .optionalEnd() .optionalEnd() .toFormatter(Locale.ROOT); /** * Returns a generic ISO datetime parser where the date is mandatory and the time is optional. */ private static final DateFormatter STRICT_DATE_OPTIONAL_TIME = new JavaDateFormatter("strict_date_optional_time", STRICT_DATE_OPTIONAL_TIME_PRINTER, STRICT_DATE_OPTIONAL_TIME_FORMATTER); private static final DateTimeFormatter STRICT_DATE_OPTIONAL_TIME_FORMATTER_WITH_NANOS = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .optionalStart() .appendLiteral('T') .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .optionalStart() .appendFraction(NANO_OF_SECOND, 3, 9, true) .optionalEnd() .optionalStart() .appendZoneOrOffsetId() .optionalEnd() .optionalStart() .append(TIME_ZONE_FORMATTER_NO_COLON) .optionalEnd() .optionalEnd() .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_DATE_OPTIONAL_TIME_PRINTER_NANOS = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral('T') .optionalStart() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendFraction(NANO_OF_SECOND, 3, 9, true) .optionalEnd() .optionalEnd() .optionalStart() .appendOffset("+HH:MM", "Z") .optionalEnd() .optionalEnd() .optionalEnd() .toFormatter(Locale.ROOT); /** * Returns a generic ISO datetime parser where the date is mandatory and the time is optional with nanosecond resolution. */ private static final DateFormatter STRICT_DATE_OPTIONAL_TIME_NANOS = new JavaDateFormatter("strict_date_optional_time_nanos", STRICT_DATE_OPTIONAL_TIME_PRINTER_NANOS, STRICT_DATE_OPTIONAL_TIME_FORMATTER_WITH_NANOS); /** * Returns a ISO 8601 compatible date time formatter and parser. * This is not fully compatible to the existing spec, which would require far more edge cases, but merely compatible with the * existing joda time ISO data formater */ private static final DateFormatter ISO_8601 = new JavaDateFormatter("iso8601", STRICT_DATE_OPTIONAL_TIME_PRINTER, new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .optionalStart() .appendLiteral('T') .optionalStart() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendFraction(NANO_OF_SECOND, 1, 9, true) .optionalEnd() .optionalStart() .appendLiteral(",") .appendFraction(NANO_OF_SECOND, 1, 9, false) .optionalEnd() .optionalEnd() .optionalStart() .appendZoneOrOffsetId() .optionalEnd() .optionalStart() .append(TIME_ZONE_FORMATTER_NO_COLON) .optionalEnd() .optionalEnd() .optionalEnd() .optionalEnd() .toFormatter(Locale.ROOT)); ///////////////////////////////////////// // // BEGIN basic time formatters // // these formatters to not have any splitting characters between hours, minutes, seconds, milliseconds // this means they have to be strict with the exception of the last element // ///////////////////////////////////////// private static final DateTimeFormatter BASIC_TIME_NO_MILLIS_BASE = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); /* * Returns a basic formatter for a two digit hour of day, two digit minute * of hour, two digit second of minute, and time zone offset (HHmmssZ). */ private static final DateFormatter BASIC_TIME_NO_MILLIS = new JavaDateFormatter("basic_time_no_millis", new DateTimeFormatterBuilder().append(BASIC_TIME_NO_MILLIS_BASE).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_TIME_NO_MILLIS_BASE).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_TIME_NO_MILLIS_BASE).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter BASIC_TIME_FORMATTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT); private static final DateTimeFormatter BASIC_TIME_PRINTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 3, 3, true) .toFormatter(Locale.ROOT); /* * Returns a basic formatter for a two digit hour of day, two digit minute * of hour, two digit second of minute, three digit millis, and time zone * offset (HHmmss.SSSZ). */ private static final DateFormatter BASIC_TIME = new JavaDateFormatter("basic_time", new DateTimeFormatterBuilder().append(BASIC_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_TIME_FORMATTER).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_TIME_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter BASIC_T_TIME_PRINTER = new DateTimeFormatterBuilder().appendLiteral("T").append(BASIC_TIME_PRINTER).toFormatter(Locale.ROOT); private static final DateTimeFormatter BASIC_T_TIME_FORMATTER = new DateTimeFormatterBuilder().appendLiteral("T").append(BASIC_TIME_FORMATTER).toFormatter(Locale.ROOT); /* * Returns a basic formatter for a two digit hour of day, two digit minute * of hour, two digit second of minute, three digit millis, and time zone * offset prefixed by 'T' ('T'HHmmss.SSSZ). */ private static final DateFormatter BASIC_T_TIME = new JavaDateFormatter("basic_t_time", new DateTimeFormatterBuilder().append(BASIC_T_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_T_TIME_FORMATTER).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_T_TIME_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a basic formatter for a two digit hour of day, two digit minute * of hour, two digit second of minute, and time zone offset prefixed by 'T' * ('T'HHmmssZ). */ private static final DateFormatter BASIC_T_TIME_NO_MILLIS = new JavaDateFormatter("basic_t_time_no_millis", new DateTimeFormatterBuilder().appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE).append(TIME_ZONE_FORMATTER_NO_COLON) .toFormatter(Locale.ROOT) ); private static final DateTimeFormatter BASIC_YEAR_MONTH_DAY_FORMATTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 4, SignStyle.NORMAL) .appendValue(MONTH_OF_YEAR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(DAY_OF_MONTH, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); private static final DateTimeFormatter BASIC_DATE_TIME_FORMATTER = new DateTimeFormatterBuilder() .append(BASIC_YEAR_MONTH_DAY_FORMATTER) .append(BASIC_T_TIME_FORMATTER) .toFormatter(Locale.ROOT); private static final DateTimeFormatter BASIC_DATE_TIME_PRINTER = new DateTimeFormatterBuilder() .append(BASIC_YEAR_MONTH_DAY_FORMATTER) .append(BASIC_T_TIME_PRINTER) .toFormatter(Locale.ROOT); /* * Returns a basic formatter that combines a basic date and time, separated * by a 'T' (yyyyMMdd'T'HHmmss.SSSZ). */ private static final DateFormatter BASIC_DATE_TIME = new JavaDateFormatter("basic_date_time", new DateTimeFormatterBuilder().append(BASIC_DATE_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_DATE_TIME_FORMATTER).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_DATE_TIME_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter BASIC_DATE_T = new DateTimeFormatterBuilder().append(BASIC_YEAR_MONTH_DAY_FORMATTER).appendLiteral("T").toFormatter(Locale.ROOT); /* * Returns a basic formatter that combines a basic date and time without millis, * separated by a 'T' (yyyyMMdd'T'HHmmssZ). */ private static final DateFormatter BASIC_DATE_TIME_NO_MILLIS = new JavaDateFormatter("basic_date_time_no_millis", new DateTimeFormatterBuilder().append(BASIC_DATE_T).append(BASIC_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_DATE_T).append(BASIC_TIME_NO_MILLIS_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_DATE_T).append(BASIC_TIME_NO_MILLIS_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a full ordinal date, using a four * digit year and three digit dayOfYear (yyyyDDD). */ private static final DateFormatter BASIC_ORDINAL_DATE = new JavaDateFormatter("basic_ordinal_date", DateTimeFormatter.ofPattern("yyyyDDD", Locale.ROOT)); /* * Returns a formatter for a full ordinal date and time, using a four * digit year and three digit dayOfYear (yyyyDDD'T'HHmmss.SSSZ). */ private static final DateFormatter BASIC_ORDINAL_DATE_TIME = new JavaDateFormatter("basic_ordinal_date_time", new DateTimeFormatterBuilder().appendPattern("yyyyDDD").append(BASIC_T_TIME_PRINTER) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendPattern("yyyyDDD").append(BASIC_T_TIME_FORMATTER) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendPattern("yyyyDDD").append(BASIC_T_TIME_FORMATTER) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a full ordinal date and time without millis, * using a four digit year and three digit dayOfYear (yyyyDDD'T'HHmmssZ). */ private static final DateFormatter BASIC_ORDINAL_DATE_TIME_NO_MILLIS = new JavaDateFormatter("basic_ordinal_date_time_no_millis", new DateTimeFormatterBuilder().appendPattern("yyyyDDD").appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendPattern("yyyyDDD").appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendPattern("yyyyDDD").appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter BASIC_WEEK_DATE_FORMATTER = new DateTimeFormatterBuilder() .appendValue(IsoFields.WEEK_BASED_YEAR) .appendLiteral("W") .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 1, 2, SignStyle.NEVER) .appendValue(ChronoField.DAY_OF_WEEK) .toFormatter(Locale.ROOT); ///////////////////////////////////////// // // END basic time formatters // ///////////////////////////////////////// ///////////////////////////////////////// // // start strict formatters // ///////////////////////////////////////// private static final DateTimeFormatter STRICT_BASIC_WEEK_DATE_FORMATTER = new DateTimeFormatterBuilder() .parseStrict() .appendValue(IsoFields.WEEK_BASED_YEAR, 4) .appendLiteral("W") .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 1, 2, SignStyle.NEVER) .appendValue(ChronoField.DAY_OF_WEEK) .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_BASIC_WEEK_DATE_PRINTER = new DateTimeFormatterBuilder() .parseStrict() .appendValue(IsoFields.WEEK_BASED_YEAR, 4) .appendLiteral("W") .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 2, 2, SignStyle.NEVER) .appendValue(ChronoField.DAY_OF_WEEK) .toFormatter(Locale.ROOT); /* * Returns a basic formatter for a full date as four digit weekyear, two * digit week of weekyear, and one digit day of week (xxxx'W'wwe). */ private static final DateFormatter STRICT_BASIC_WEEK_DATE = new JavaDateFormatter("strict_basic_week_date", STRICT_BASIC_WEEK_DATE_PRINTER, STRICT_BASIC_WEEK_DATE_FORMATTER); /* * Returns a basic formatter that combines a basic weekyear date and time * without millis, separated by a 'T' (xxxx'W'wwe'T'HHmmssX). */ private static final DateFormatter STRICT_BASIC_WEEK_DATE_TIME_NO_MILLIS = new JavaDateFormatter("strict_basic_week_date_time_no_millis", new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_PRINTER) .appendLiteral("T") .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendOffset("+HH:MM", "Z") .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_PRINTER) .appendLiteral("T") .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendZoneOrOffsetId() .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_PRINTER) .appendLiteral("T") .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .append(TIME_ZONE_FORMATTER_NO_COLON) .toFormatter(Locale.ROOT) ); /* * Returns a basic formatter that combines a basic weekyear date and time, * separated by a 'T' (xxxx'W'wwe'T'HHmmss.SSSX). */ private static final DateFormatter STRICT_BASIC_WEEK_DATE_TIME = new JavaDateFormatter("strict_basic_week_date_time", new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_PRINTER) .append(DateTimeFormatter.ofPattern("'T'HHmmss.SSSX", Locale.ROOT)) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_FORMATTER) .appendLiteral("T") .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .appendZoneOrOffsetId() .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_FORMATTER) .appendLiteral("T") .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .append(TIME_ZONE_FORMATTER_NO_COLON) .toFormatter(Locale.ROOT) ); /* * An ISO date formatter that formats or parses a date without an offset, such as '2011-12-03'. */ private static final DateFormatter STRICT_DATE = new JavaDateFormatter("strict_date", DateTimeFormatter.ISO_LOCAL_DATE.withResolverStyle(ResolverStyle.LENIENT).withLocale(Locale.ROOT)); /* * A date formatter that formats or parses a date plus an hour without an offset, such as '2011-12-03T01'. */ private static final DateFormatter STRICT_DATE_HOUR = new JavaDateFormatter("strict_date_hour", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH", Locale.ROOT)); /* * A date formatter that formats or parses a date plus an hour/minute without an offset, such as '2011-12-03T01:10'. */ private static final DateFormatter STRICT_DATE_HOUR_MINUTE = new JavaDateFormatter("strict_date_hour_minute", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm", Locale.ROOT)); /* * A strict date formatter that formats or parses a date without an offset, such as '2011-12-03'. */ private static final DateFormatter STRICT_YEAR_MONTH_DAY = new JavaDateFormatter("strict_year_month_day", STRICT_YEAR_MONTH_DAY_FORMATTER); /* * A strict formatter that formats or parses a year and a month, such as '2011-12'. */ private static final DateFormatter STRICT_YEAR_MONTH = new JavaDateFormatter("strict_year_month", new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral("-") .appendValue(MONTH_OF_YEAR, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT)); /* * A strict formatter that formats or parses a year, such as '2011'. */ private static final DateFormatter STRICT_YEAR = new JavaDateFormatter("strict_year", new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .toFormatter(Locale.ROOT)); /* * A strict formatter that formats or parses a hour, minute and second, such as '09:43:25'. */ private static final DateFormatter STRICT_HOUR_MINUTE_SECOND = new JavaDateFormatter("strict_hour_minute_second", STRICT_HOUR_MINUTE_SECOND_FORMATTER); private static final DateTimeFormatter STRICT_DATE_PRINTER = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral('T') .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .appendFraction(NANO_OF_SECOND, 3, 9, true) .appendOffset("+HH:MM", "Z") .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_DATE_FORMATTER = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral('T') .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .optionalStart() .appendFraction(NANO_OF_SECOND, 1, 9, true) .optionalEnd() .toFormatter(Locale.ROOT); /* * Returns a formatter that combines a full date and time, separated by a 'T' * (yyyy-MM-dd'T'HH:mm:ss.SSSZZ). */ private static final DateFormatter STRICT_DATE_TIME = new JavaDateFormatter("strict_date_time", STRICT_DATE_PRINTER, new DateTimeFormatterBuilder().append(STRICT_DATE_FORMATTER).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_DATE_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter STRICT_ORDINAL_DATE_TIME_NO_MILLIS_BASE = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(DAY_OF_YEAR, 3, 3, SignStyle.NOT_NEGATIVE) .appendLiteral('T') .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .toFormatter(Locale.ROOT); /* * Returns a formatter for a full ordinal date and time without millis, * using a four digit year and three digit dayOfYear (yyyy-DDD'T'HH:mm:ssZZ). */ private static final DateFormatter STRICT_ORDINAL_DATE_TIME_NO_MILLIS = new JavaDateFormatter("strict_ordinal_date_time_no_millis", new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_NO_MILLIS_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_NO_MILLIS_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter STRICT_DATE_TIME_NO_MILLIS_FORMATTER = new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral('T') .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .toFormatter(Locale.ROOT); /* * Returns a formatter that combines a full date and time without millis, * separated by a 'T' (yyyy-MM-dd'T'HH:mm:ssZZ). */ private static final DateFormatter STRICT_DATE_TIME_NO_MILLIS = new JavaDateFormatter("strict_date_time_no_millis", new DateTimeFormatterBuilder().append(STRICT_DATE_TIME_NO_MILLIS_FORMATTER) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_DATE_TIME_NO_MILLIS_FORMATTER) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_DATE_TIME_NO_MILLIS_FORMATTER) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); // NOTE: this is not a strict formatter to retain the joda time based behaviour, even though it's named like this private static final DateTimeFormatter STRICT_HOUR_MINUTE_SECOND_MILLIS_FORMATTER = new DateTimeFormatterBuilder() .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER = new DateTimeFormatterBuilder() .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) .appendFraction(NANO_OF_SECOND, 3, 3, true) .toFormatter(Locale.ROOT); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, and three digit fraction of * second (HH:mm:ss.SSS). * * NOTE: this is not a strict formatter to retain the joda time based behaviour, * even though it's named like this */ private static final DateFormatter STRICT_HOUR_MINUTE_SECOND_MILLIS = new JavaDateFormatter("strict_hour_minute_second_millis", STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER, STRICT_HOUR_MINUTE_SECOND_MILLIS_FORMATTER); private static final DateFormatter STRICT_HOUR_MINUTE_SECOND_FRACTION = new JavaDateFormatter("strict_hour_minute_second_fraction", STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER, STRICT_HOUR_MINUTE_SECOND_MILLIS_FORMATTER); /* * Returns a formatter that combines a full date, two digit hour of day, * two digit minute of hour, two digit second of minute, and three digit * fraction of second (yyyy-MM-dd'T'HH:mm:ss.SSS). */ private static final DateFormatter STRICT_DATE_HOUR_MINUTE_SECOND_FRACTION = new JavaDateFormatter( "strict_date_hour_minute_second_fraction", new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral("T") .append(STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral("T") .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) // this one here is lenient as well to retain joda time based bwc compatibility .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT) ); private static final DateFormatter STRICT_DATE_HOUR_MINUTE_SECOND_MILLIS = new JavaDateFormatter( "strict_date_hour_minute_second_millis", new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral("T") .append(STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral("T") .append(STRICT_HOUR_MINUTE_SECOND_FORMATTER) // this one here is lenient as well to retain joda time based bwc compatibility .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day. (HH) */ private static final DateFormatter STRICT_HOUR = new JavaDateFormatter("strict_hour", DateTimeFormatter.ofPattern("HH", Locale.ROOT)); /* * Returns a formatter for a two digit hour of day and two digit minute of * hour. (HH:mm) */ private static final DateFormatter STRICT_HOUR_MINUTE = new JavaDateFormatter("strict_hour_minute", DateTimeFormatter.ofPattern("HH:mm", Locale.ROOT)); private static final DateTimeFormatter STRICT_ORDINAL_DATE_TIME_PRINTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(DAY_OF_YEAR, 3, 3, SignStyle.NOT_NEGATIVE) .appendLiteral('T') .appendPattern("HH:mm") .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 3, 9, true) .optionalEnd() .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_ORDINAL_DATE_TIME_FORMATTER_BASE = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(DAY_OF_YEAR, 3, 3, SignStyle.NOT_NEGATIVE) .appendLiteral('T') .appendPattern("HH:mm") .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .optionalEnd() .toFormatter(Locale.ROOT); /* * Returns a formatter for a full ordinal date and time, using a four * digit year and three digit dayOfYear (yyyy-DDD'T'HH:mm:ss.SSSZZ). */ private static final DateFormatter STRICT_ORDINAL_DATE_TIME = new JavaDateFormatter("strict_ordinal_date_time", new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_PRINTER) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_FORMATTER_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_FORMATTER_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); // Note: milliseconds parsing is not strict, others are private static final DateTimeFormatter STRICT_TIME_FORMATTER_BASE = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT); private static final DateTimeFormatter STRICT_TIME_PRINTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 3, 3, true) .toFormatter(Locale.ROOT); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, three digit fraction of second, and * time zone offset (HH:mm:ss.SSSZZ). */ private static final DateFormatter STRICT_TIME = new JavaDateFormatter("strict_time", new DateTimeFormatterBuilder().append(STRICT_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_TIME_FORMATTER_BASE).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_TIME_FORMATTER_BASE).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, three digit fraction of second, and * time zone offset prefixed by 'T' ('T'HH:mm:ss.SSSZZ). */ private static final DateFormatter STRICT_T_TIME = new JavaDateFormatter("strict_t_time", new DateTimeFormatterBuilder().appendLiteral('T').append(STRICT_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral('T').append(STRICT_TIME_FORMATTER_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral('T').append(STRICT_TIME_FORMATTER_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter STRICT_TIME_NO_MILLIS_BASE = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 2, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, and time zone offset (HH:mm:ssZZ). */ private static final DateFormatter STRICT_TIME_NO_MILLIS = new JavaDateFormatter("strict_time_no_millis", new DateTimeFormatterBuilder().append(STRICT_TIME_NO_MILLIS_BASE).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_TIME_NO_MILLIS_BASE).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(STRICT_TIME_NO_MILLIS_BASE).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, and time zone offset prefixed * by 'T' ('T'HH:mm:ssZZ). */ private static final DateFormatter STRICT_T_TIME_NO_MILLIS = new JavaDateFormatter("strict_t_time_no_millis", new DateTimeFormatterBuilder().appendLiteral("T").append(STRICT_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral("T").append(STRICT_TIME_NO_MILLIS_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral("T").append(STRICT_TIME_NO_MILLIS_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter ISO_WEEK_DATE = new DateTimeFormatterBuilder() .parseCaseInsensitive() .appendValue(IsoFields.WEEK_BASED_YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral("-W") .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 2) .appendLiteral('-') .appendValue(DAY_OF_WEEK, 1) .toFormatter(Locale.ROOT); private static final DateTimeFormatter ISO_WEEK_DATE_T = new DateTimeFormatterBuilder() .append(ISO_WEEK_DATE) .appendLiteral('T') .toFormatter(Locale.ROOT); /* * Returns a formatter for a full date as four digit weekyear, two digit * week of weekyear, and one digit day of week (xxxx-'W'ww-e). */ private static final DateFormatter STRICT_WEEK_DATE = new JavaDateFormatter("strict_week_date", ISO_WEEK_DATE); /* * Returns a formatter that combines a full weekyear date and time without millis, * separated by a 'T' (xxxx-'W'ww-e'T'HH:mm:ssZZ). */ private static final DateFormatter STRICT_WEEK_DATE_TIME_NO_MILLIS = new JavaDateFormatter("strict_week_date_time_no_millis", new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T) .append(STRICT_TIME_NO_MILLIS_BASE).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T) .append(STRICT_TIME_NO_MILLIS_BASE).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T) .append(STRICT_TIME_NO_MILLIS_BASE).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter that combines a full weekyear date and time, * separated by a 'T' (xxxx-'W'ww-e'T'HH:mm:ss.SSSZZ). */ private static final DateFormatter STRICT_WEEK_DATE_TIME = new JavaDateFormatter("strict_week_date_time", new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T) .append(STRICT_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T).append(STRICT_TIME_FORMATTER_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T).append(STRICT_TIME_FORMATTER_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a four digit weekyear */ private static final DateFormatter STRICT_WEEKYEAR = new JavaDateFormatter("strict_weekyear", new DateTimeFormatterBuilder() .appendValue(WeekFields.ISO.weekBasedYear(), 4, 10, SignStyle.EXCEEDS_PAD) .toFormatter(Locale.ROOT)); private static final DateTimeFormatter STRICT_WEEKYEAR_WEEK_FORMATTER = new DateTimeFormatterBuilder() .appendValue(WeekFields.ISO.weekBasedYear(), 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral("-W") .appendValue(WeekFields.ISO.weekOfWeekBasedYear(), 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); /* * Returns a formatter for a four digit weekyear and two digit week of * weekyear. (xxxx-'W'ww) */ private static final DateFormatter STRICT_WEEKYEAR_WEEK = new JavaDateFormatter("strict_weekyear_week", STRICT_WEEKYEAR_WEEK_FORMATTER); /* * Returns a formatter for a four digit weekyear, two digit week of * weekyear, and one digit day of week. (xxxx-'W'ww-e) */ private static final DateFormatter STRICT_WEEKYEAR_WEEK_DAY = new JavaDateFormatter("strict_weekyear_week_day", new DateTimeFormatterBuilder() .append(STRICT_WEEKYEAR_WEEK_FORMATTER) .appendLiteral("-") .appendValue(WeekFields.ISO.dayOfWeek()) .toFormatter(Locale.ROOT)); /* * Returns a formatter that combines a full date, two digit hour of day, * two digit minute of hour, and two digit second of * minute. (yyyy-MM-dd'T'HH:mm:ss) */ private static final DateFormatter STRICT_DATE_HOUR_MINUTE_SECOND = new JavaDateFormatter("strict_date_hour_minute_second", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss", Locale.ROOT)); /* * A basic formatter for a full date as four digit year, two digit * month of year, and two digit day of month (yyyyMMdd). */ private static final DateFormatter BASIC_DATE = new JavaDateFormatter("basic_date", new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 4, SignStyle.NORMAL) .appendValue(MONTH_OF_YEAR, 2, 2, SignStyle.NOT_NEGATIVE) .appendValue(DAY_OF_MONTH, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT).withZone(ZoneOffset.UTC), new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 1, 4, SignStyle.NORMAL) .appendValue(MONTH_OF_YEAR, 1, 2, SignStyle.NOT_NEGATIVE) .appendValue(DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT).withZone(ZoneOffset.UTC) ); private static final DateTimeFormatter STRICT_ORDINAL_DATE_FORMATTER = new DateTimeFormatterBuilder() .parseCaseInsensitive() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(DAY_OF_YEAR, 3) .optionalStart() .toFormatter(Locale.ROOT); /* * Returns a formatter for a full ordinal date, using a four * digit year and three digit dayOfYear (yyyy-DDD). */ private static final DateFormatter STRICT_ORDINAL_DATE = new JavaDateFormatter("strict_ordinal_date", STRICT_ORDINAL_DATE_FORMATTER); ///////////////////////////////////////// // // end strict formatters // ///////////////////////////////////////// ///////////////////////////////////////// // // start lenient formatters // ///////////////////////////////////////// private static final DateTimeFormatter DATE_FORMATTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 1, 5, SignStyle.NORMAL) .appendLiteral('-') .appendValue(MONTH_OF_YEAR, 1, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral('-') .appendValue(DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE) .optionalEnd() .toFormatter(Locale.ROOT); private static final DateTimeFormatter HOUR_MINUTE_FORMATTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); /* * a date formatter with optional time, being very lenient, format is * yyyy-MM-dd'T'HH:mm:ss.SSSZ */ private static final DateFormatter DATE_OPTIONAL_TIME = new JavaDateFormatter("date_optional_time", STRICT_DATE_OPTIONAL_TIME_PRINTER, new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .optionalStart() .appendLiteral('T') .optionalStart() .appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 1, 2, SignStyle.NOT_NEGATIVE) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .optionalEnd() .optionalStart() .appendFraction(NANO_OF_SECOND, 1, 9, true) .optionalEnd() .optionalStart().appendZoneOrOffsetId().optionalEnd() .optionalStart().appendOffset("+HHmm", "Z").optionalEnd() .optionalEnd() .optionalEnd() .optionalEnd() .toFormatter(Locale.ROOT)); private static final DateTimeFormatter HOUR_MINUTE_SECOND_FORMATTER = new DateTimeFormatterBuilder() .append(HOUR_MINUTE_FORMATTER) .appendLiteral(":") .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); private static final DateTimeFormatter HOUR_MINUTE_SECOND_MILLIS_FORMATTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 3, true) .toFormatter(Locale.ROOT); private static final DateTimeFormatter HOUR_MINUTE_SECOND_FRACTION_FORMATTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT); private static final DateTimeFormatter ORDINAL_DATE_FORMATTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(DAY_OF_YEAR, 1, 3, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); private static final DateTimeFormatter ORDINAL_DATE_PRINTER = new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral('-') .appendValue(DAY_OF_YEAR, 3, 3, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); /* * Returns a formatter for a full ordinal date, using a four * digit year and three digit dayOfYear (yyyy-DDD). */ private static final DateFormatter ORDINAL_DATE = new JavaDateFormatter("ordinal_date", ORDINAL_DATE_PRINTER, ORDINAL_DATE_FORMATTER); private static final DateTimeFormatter TIME_NO_MILLIS_FORMATTER = new DateTimeFormatterBuilder() .appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(MINUTE_OF_HOUR, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT); private static final DateTimeFormatter T_TIME_NO_MILLIS_FORMATTER = new DateTimeFormatterBuilder().appendLiteral("T").append(TIME_NO_MILLIS_FORMATTER).toFormatter(Locale.ROOT); private static final DateTimeFormatter TIME_PREFIX = new DateTimeFormatterBuilder() .append(TIME_NO_MILLIS_FORMATTER) .appendFraction(NANO_OF_SECOND, 1, 9, true) .toFormatter(Locale.ROOT); private static final DateTimeFormatter WEEK_DATE_FORMATTER = new DateTimeFormatterBuilder() .appendValue(IsoFields.WEEK_BASED_YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral("-W") .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 1, 2, SignStyle.NOT_NEGATIVE) .appendLiteral('-') .appendValue(DAY_OF_WEEK, 1) .toFormatter(Locale.ROOT); /* * Returns a formatter for a four digit weekyear. (YYYY) */ private static final DateFormatter WEEK_YEAR = new JavaDateFormatter("week_year", new DateTimeFormatterBuilder().appendValue(WeekFields.ISO.weekBasedYear()).toFormatter(Locale.ROOT)); /* * Returns a formatter for a four digit weekyear. (uuuu) */ private static final DateFormatter YEAR = new JavaDateFormatter("year", new DateTimeFormatterBuilder().appendValue(ChronoField.YEAR).toFormatter(Locale.ROOT)); /* * Returns a formatter that combines a full date and two digit hour of * day. (yyyy-MM-dd'T'HH) */ private static final DateFormatter DATE_HOUR = new JavaDateFormatter("date_hour", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH", Locale.ROOT), new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral("T") .appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT)); /* * Returns a formatter that combines a full date, two digit hour of day, * two digit minute of hour, two digit second of minute, and three digit * fraction of second (yyyy-MM-dd'T'HH:mm:ss.SSS). */ private static final DateFormatter DATE_HOUR_MINUTE_SECOND_MILLIS = new JavaDateFormatter("date_hour_minute_second_millis", new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral("T") .append(STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral("T") .append(HOUR_MINUTE_SECOND_MILLIS_FORMATTER) .toFormatter(Locale.ROOT)); private static final DateFormatter DATE_HOUR_MINUTE_SECOND_FRACTION = new JavaDateFormatter("date_hour_minute_second_fraction", new DateTimeFormatterBuilder() .append(STRICT_YEAR_MONTH_DAY_FORMATTER) .appendLiteral("T") .append(STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral("T") .append(HOUR_MINUTE_SECOND_FRACTION_FORMATTER) .toFormatter(Locale.ROOT)); /* * Returns a formatter that combines a full date, two digit hour of day, * and two digit minute of hour. (yyyy-MM-dd'T'HH:mm) */ private static final DateFormatter DATE_HOUR_MINUTE = new JavaDateFormatter("date_hour_minute", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm", Locale.ROOT), new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral("T") .append(HOUR_MINUTE_FORMATTER) .toFormatter(Locale.ROOT)); /* * Returns a formatter that combines a full date, two digit hour of day, * two digit minute of hour, and two digit second of * minute. (yyyy-MM-dd'T'HH:mm:ss) */ private static final DateFormatter DATE_HOUR_MINUTE_SECOND = new JavaDateFormatter("date_hour_minute_second", DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss", Locale.ROOT), new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral("T") .append(HOUR_MINUTE_SECOND_FORMATTER) .toFormatter(Locale.ROOT)); private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral('T') .append(HOUR_MINUTE_FORMATTER) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .optionalEnd() .toFormatter(Locale.ROOT); /* * Returns a formatter that combines a full date and time, separated by a 'T' * (yyyy-MM-dd'T'HH:mm:ss.SSSZZ). */ private static final DateFormatter DATE_TIME = new JavaDateFormatter("date_time", STRICT_DATE_OPTIONAL_TIME_PRINTER, new DateTimeFormatterBuilder().append(DATE_TIME_FORMATTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(DATE_TIME_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a basic formatter for a full date as four digit weekyear, two * digit week of weekyear, and one digit day of week (YYYY'W'wwe). */ private static final DateFormatter BASIC_WEEK_DATE = new JavaDateFormatter("basic_week_date", STRICT_BASIC_WEEK_DATE_PRINTER, BASIC_WEEK_DATE_FORMATTER); /* * Returns a formatter for a full date as four digit year, two digit month * of year, and two digit day of month (yyyy-MM-dd). */ private static final DateFormatter DATE = new JavaDateFormatter("date", DateTimeFormatter.ISO_LOCAL_DATE.withResolverStyle(ResolverStyle.LENIENT), DATE_FORMATTER); // only the formatter, nothing optional here private static final DateTimeFormatter DATE_TIME_NO_MILLIS_PRINTER = new DateTimeFormatterBuilder() .append(DateTimeFormatter.ISO_LOCAL_DATE.withResolverStyle(ResolverStyle.LENIENT)) .appendLiteral('T') .appendPattern("HH:mm") .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2, 2, SignStyle.NOT_NEGATIVE) .appendZoneId() .toFormatter(Locale.ROOT); private static final DateTimeFormatter DATE_TIME_PREFIX = new DateTimeFormatterBuilder() .append(DATE_FORMATTER) .appendLiteral('T') .append(HOUR_MINUTE_FORMATTER) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .optionalEnd() .toFormatter(Locale.ROOT); /* * Returns a formatter that combines a full date and time without millis, but with a timezone that can be optional * separated by a 'T' (yyyy-MM-dd'T'HH:mm:ssZ). */ private static final DateFormatter DATE_TIME_NO_MILLIS = new JavaDateFormatter("date_time_no_millis", DATE_TIME_NO_MILLIS_PRINTER, new DateTimeFormatterBuilder().append(DATE_TIME_PREFIX).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(DATE_TIME_PREFIX).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(DATE_TIME_PREFIX) .optionalStart().appendZoneOrOffsetId().optionalEnd().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(DATE_TIME_PREFIX) .optionalStart().append(TIME_ZONE_FORMATTER_NO_COLON).optionalEnd().toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, and three digit fraction of * second (HH:mm:ss.SSS). */ private static final DateFormatter HOUR_MINUTE_SECOND_MILLIS = new JavaDateFormatter("hour_minute_second_millis", STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER, HOUR_MINUTE_SECOND_MILLIS_FORMATTER); private static final DateFormatter HOUR_MINUTE_SECOND_FRACTION = new JavaDateFormatter("hour_minute_second_fraction", STRICT_HOUR_MINUTE_SECOND_MILLIS_PRINTER, HOUR_MINUTE_SECOND_FRACTION_FORMATTER); /* * Returns a formatter for a two digit hour of day and two digit minute of * hour. (HH:mm) */ private static final DateFormatter HOUR_MINUTE = new JavaDateFormatter("hour_minute", DateTimeFormatter.ofPattern("HH:mm", Locale.ROOT), HOUR_MINUTE_FORMATTER); /* * A strict formatter that formats or parses a hour, minute and second, such as '09:43:25'. */ private static final DateFormatter HOUR_MINUTE_SECOND = new JavaDateFormatter("hour_minute_second", STRICT_HOUR_MINUTE_SECOND_FORMATTER, new DateTimeFormatterBuilder() .append(HOUR_MINUTE_FORMATTER) .appendLiteral(":") .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day. (HH) */ private static final DateFormatter HOUR = new JavaDateFormatter("hour", DateTimeFormatter.ofPattern("HH", Locale.ROOT), new DateTimeFormatterBuilder().appendValue(HOUR_OF_DAY, 1, 2, SignStyle.NOT_NEGATIVE).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter ORDINAL_DATE_TIME_FORMATTER_BASE = new DateTimeFormatterBuilder() .append(ORDINAL_DATE_FORMATTER) .appendLiteral('T') .append(HOUR_MINUTE_FORMATTER) .optionalStart() .appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 1, 2, SignStyle.NOT_NEGATIVE) .appendFraction(NANO_OF_SECOND, 1, 9, true) .optionalEnd() .toFormatter(Locale.ROOT); /* * Returns a formatter for a full ordinal date and time, using a four * digit year and three digit dayOfYear (yyyy-DDD'T'HH:mm:ss.SSSZZ). */ private static final DateFormatter ORDINAL_DATE_TIME = new JavaDateFormatter("ordinal_date_time", new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_PRINTER) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ORDINAL_DATE_TIME_FORMATTER_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ORDINAL_DATE_TIME_FORMATTER_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); private static final DateTimeFormatter ORDINAL_DATE_TIME_NO_MILLIS_BASE = new DateTimeFormatterBuilder() .append(ORDINAL_DATE_FORMATTER) .appendLiteral('T') .append(HOUR_MINUTE_SECOND_FORMATTER) .toFormatter(Locale.ROOT); /* * Returns a formatter for a full ordinal date and time without millis, * using a four digit year and three digit dayOfYear (yyyy-DDD'T'HH:mm:ssZZ). */ private static final DateFormatter ORDINAL_DATE_TIME_NO_MILLIS = new JavaDateFormatter("ordinal_date_time_no_millis", new DateTimeFormatterBuilder().append(STRICT_ORDINAL_DATE_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ORDINAL_DATE_TIME_NO_MILLIS_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(ORDINAL_DATE_TIME_NO_MILLIS_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter that combines a full weekyear date and time, * separated by a 'T' (xxxx-'W'ww-e'T'HH:mm:ss.SSSZZ). */ private static final DateFormatter WEEK_DATE_TIME = new JavaDateFormatter("week_date_time", new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T) .append(STRICT_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(WEEK_DATE_FORMATTER).appendLiteral("T").append(TIME_PREFIX) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(WEEK_DATE_FORMATTER).appendLiteral("T").append(TIME_PREFIX) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter that combines a full weekyear date and time, * separated by a 'T' (xxxx-'W'ww-e'T'HH:mm:ssZZ). */ private static final DateFormatter WEEK_DATE_TIME_NO_MILLIS = new JavaDateFormatter("week_date_time_no_millis", new DateTimeFormatterBuilder().append(ISO_WEEK_DATE_T) .append(STRICT_TIME_NO_MILLIS_BASE).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(WEEK_DATE_FORMATTER).append(T_TIME_NO_MILLIS_FORMATTER) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(WEEK_DATE_FORMATTER).append(T_TIME_NO_MILLIS_FORMATTER) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a basic formatter that combines a basic weekyear date and time, * separated by a 'T' (xxxx'W'wwe'T'HHmmss.SSSX). */ private static final DateFormatter BASIC_WEEK_DATE_TIME = new JavaDateFormatter("basic_week_date_time", new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_PRINTER) .append(DateTimeFormatter.ofPattern("'T'HHmmss.SSSX", Locale.ROOT)) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_WEEK_DATE_FORMATTER).append(BASIC_T_TIME_FORMATTER) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_WEEK_DATE_FORMATTER).append(BASIC_T_TIME_FORMATTER) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a basic formatter that combines a basic weekyear date and time, * separated by a 'T' (xxxx'W'wwe'T'HHmmssX). */ private static final DateFormatter BASIC_WEEK_DATE_TIME_NO_MILLIS = new JavaDateFormatter("basic_week_date_time_no_millis", new DateTimeFormatterBuilder() .append(STRICT_BASIC_WEEK_DATE_PRINTER).append(DateTimeFormatter.ofPattern("'T'HHmmssX", Locale.ROOT)) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_WEEK_DATE_FORMATTER).appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(BASIC_WEEK_DATE_FORMATTER).appendLiteral("T").append(BASIC_TIME_NO_MILLIS_BASE) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, three digit fraction of second, and * time zone offset (HH:mm:ss.SSSZZ). */ private static final DateFormatter TIME = new JavaDateFormatter("time", new DateTimeFormatterBuilder().append(STRICT_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(TIME_PREFIX).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(TIME_PREFIX).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, andtime zone offset (HH:mm:ssZZ). */ private static final DateFormatter TIME_NO_MILLIS = new JavaDateFormatter("time_no_millis", new DateTimeFormatterBuilder().append(STRICT_TIME_NO_MILLIS_BASE).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(TIME_NO_MILLIS_FORMATTER).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(TIME_NO_MILLIS_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, three digit fraction of second, and * time zone offset prefixed by 'T' ('T'HH:mm:ss.SSSZZ). */ private static final DateFormatter T_TIME = new JavaDateFormatter("t_time", new DateTimeFormatterBuilder().appendLiteral('T').append(STRICT_TIME_PRINTER).appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral("T").append(TIME_PREFIX) .appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendLiteral("T").append(TIME_PREFIX) .append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * Returns a formatter for a two digit hour of day, two digit minute of * hour, two digit second of minute, and time zone offset prefixed * by 'T' ('T'HH:mm:ssZZ). */ private static final DateFormatter T_TIME_NO_MILLIS = new JavaDateFormatter("t_time_no_millis", new DateTimeFormatterBuilder().appendLiteral("T").append(STRICT_TIME_NO_MILLIS_BASE) .appendOffset("+HH:MM", "Z").toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(T_TIME_NO_MILLIS_FORMATTER).appendZoneOrOffsetId().toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().append(T_TIME_NO_MILLIS_FORMATTER).append(TIME_ZONE_FORMATTER_NO_COLON).toFormatter(Locale.ROOT) ); /* * A strict formatter that formats or parses a year and a month, such as '2011-12'. */ private static final DateFormatter YEAR_MONTH = new JavaDateFormatter("year_month", new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR, 4, 10, SignStyle.EXCEEDS_PAD) .appendLiteral("-") .appendValue(MONTH_OF_YEAR, 2, 2, SignStyle.NOT_NEGATIVE) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder().appendValue(ChronoField.YEAR).appendLiteral("-").appendValue(MONTH_OF_YEAR).toFormatter(Locale.ROOT) ); /* * A strict date formatter that formats or parses a date without an offset, such as '2011-12-03'. */ private static final DateFormatter YEAR_MONTH_DAY = new JavaDateFormatter("year_month_day", STRICT_YEAR_MONTH_DAY_FORMATTER, new DateTimeFormatterBuilder() .appendValue(ChronoField.YEAR) .appendLiteral("-") .appendValue(MONTH_OF_YEAR) .appendLiteral("-") .appendValue(DAY_OF_MONTH) .toFormatter(Locale.ROOT) ); /* * Returns a formatter for a full date as four digit weekyear, two digit * week of weekyear, and one digit day of week (xxxx-'W'ww-e). */ private static final DateFormatter WEEK_DATE = new JavaDateFormatter("week_date", ISO_WEEK_DATE, WEEK_DATE_FORMATTER); /* * Returns a formatter for a four digit weekyear and two digit week of * weekyear. (xxxx-'W'ww) */ private static final DateFormatter WEEKYEAR_WEEK = new JavaDateFormatter("weekyear_week", STRICT_WEEKYEAR_WEEK_FORMATTER, new DateTimeFormatterBuilder() .appendValue(WeekFields.ISO.weekBasedYear()) .appendLiteral("-W") .appendValue(WeekFields.ISO.weekOfWeekBasedYear()) .toFormatter(Locale.ROOT) ); /* * Returns a formatter for a four digit weekyear, two digit week of * weekyear, and one digit day of week. (xxxx-'W'ww-e) */ private static final DateFormatter WEEKYEAR_WEEK_DAY = new JavaDateFormatter("weekyear_week_day", new DateTimeFormatterBuilder() .append(STRICT_WEEKYEAR_WEEK_FORMATTER) .appendLiteral("-") .appendValue(WeekFields.ISO.dayOfWeek()) .toFormatter(Locale.ROOT), new DateTimeFormatterBuilder() .appendValue(WeekFields.ISO.weekBasedYear()) .appendLiteral("-W") .appendValue(WeekFields.ISO.weekOfWeekBasedYear()) .appendLiteral("-") .appendValue(WeekFields.ISO.dayOfWeek()) .toFormatter(Locale.ROOT) ); ///////////////////////////////////////// // // end lenient formatters // ///////////////////////////////////////// public static DateFormatter forPattern(String input) { if (Strings.hasLength(input)) { input = input.trim(); } if (input == null || input.length() == 0) { throw new IllegalArgumentException("No date pattern provided"); } if (FormatNames.ISO8601.matches(input)) { return ISO_8601; } else if (FormatNames.BASIC_DATE.matches(input) ) { return BASIC_DATE; } else if (FormatNames.BASIC_DATE_TIME.matches(input) ) { return BASIC_DATE_TIME; } else if (FormatNames.BASIC_DATE_TIME_NO_MILLIS.matches(input) ) { return BASIC_DATE_TIME_NO_MILLIS; } else if (FormatNames.BASIC_ORDINAL_DATE.matches(input) ) { return BASIC_ORDINAL_DATE; } else if (FormatNames.BASIC_ORDINAL_DATE_TIME.matches(input) ) { return BASIC_ORDINAL_DATE_TIME; } else if (FormatNames.BASIC_ORDINAL_DATE_TIME_NO_MILLIS.matches(input) ) { return BASIC_ORDINAL_DATE_TIME_NO_MILLIS; } else if (FormatNames.BASIC_TIME.matches(input) ) { return BASIC_TIME; } else if (FormatNames.BASIC_TIME_NO_MILLIS.matches(input) ) { return BASIC_TIME_NO_MILLIS; } else if (FormatNames.BASIC_T_TIME.matches(input) ) { return BASIC_T_TIME; } else if (FormatNames.BASIC_T_TIME_NO_MILLIS.matches(input) ) { return BASIC_T_TIME_NO_MILLIS; } else if (FormatNames.BASIC_WEEK_DATE.matches(input) ) { return BASIC_WEEK_DATE; } else if (FormatNames.BASIC_WEEK_DATE_TIME.matches(input) ) { return BASIC_WEEK_DATE_TIME; } else if (FormatNames.BASIC_WEEK_DATE_TIME_NO_MILLIS.matches(input) ) { return BASIC_WEEK_DATE_TIME_NO_MILLIS; } else if (FormatNames.DATE.matches(input)) { return DATE; } else if (FormatNames.DATE_HOUR.matches(input) ) { return DATE_HOUR; } else if (FormatNames.DATE_HOUR_MINUTE.matches(input) ) { return DATE_HOUR_MINUTE; } else if (FormatNames.DATE_HOUR_MINUTE_SECOND.matches(input) ) { return DATE_HOUR_MINUTE_SECOND; } else if (FormatNames.DATE_HOUR_MINUTE_SECOND_FRACTION.matches(input) ) { return DATE_HOUR_MINUTE_SECOND_FRACTION; } else if (FormatNames.DATE_HOUR_MINUTE_SECOND_MILLIS.matches(input) ) { return DATE_HOUR_MINUTE_SECOND_MILLIS; } else if (FormatNames.DATE_OPTIONAL_TIME.matches(input) ) { return DATE_OPTIONAL_TIME; } else if (FormatNames.DATE_TIME.matches(input) ) { return DATE_TIME; } else if (FormatNames.DATE_TIME_NO_MILLIS.matches(input) ) { return DATE_TIME_NO_MILLIS; } else if (FormatNames.HOUR.matches(input)) { return HOUR; } else if (FormatNames.HOUR_MINUTE.matches(input) ) { return HOUR_MINUTE; } else if (FormatNames.HOUR_MINUTE_SECOND.matches(input) ) { return HOUR_MINUTE_SECOND; } else if (FormatNames.HOUR_MINUTE_SECOND_FRACTION.matches(input) ) { return HOUR_MINUTE_SECOND_FRACTION; } else if (FormatNames.HOUR_MINUTE_SECOND_MILLIS.matches(input) ) { return HOUR_MINUTE_SECOND_MILLIS; } else if (FormatNames.ORDINAL_DATE.matches(input) ) { return ORDINAL_DATE; } else if (FormatNames.ORDINAL_DATE_TIME.matches(input) ) { return ORDINAL_DATE_TIME; } else if (FormatNames.ORDINAL_DATE_TIME_NO_MILLIS.matches(input) ) { return ORDINAL_DATE_TIME_NO_MILLIS; } else if (FormatNames.TIME.matches(input)) { return TIME; } else if (FormatNames.TIME_NO_MILLIS.matches(input) ) { return TIME_NO_MILLIS; } else if (FormatNames.T_TIME.matches(input) ) { return T_TIME; } else if (FormatNames.T_TIME_NO_MILLIS.matches(input) ) { return T_TIME_NO_MILLIS; } else if (FormatNames.WEEK_DATE.matches(input) ) { return WEEK_DATE; } else if (FormatNames.WEEK_DATE_TIME.matches(input) ) { return WEEK_DATE_TIME; } else if (FormatNames.WEEK_DATE_TIME_NO_MILLIS.matches(input) ) { return WEEK_DATE_TIME_NO_MILLIS; } else if (FormatNames.WEEK_YEAR.matches(input) ) { return WEEK_YEAR; } else if (FormatNames.WEEK_YEAR_WEEK.matches(input) ) { return WEEKYEAR_WEEK; } else if (FormatNames.WEEKYEAR_WEEK_DAY.matches(input) ) { return WEEKYEAR_WEEK_DAY; } else if (FormatNames.YEAR.matches(input)) { return YEAR; } else if (FormatNames.YEAR_MONTH.matches(input) ) { return YEAR_MONTH; } else if (FormatNames.YEAR_MONTH_DAY.matches(input) ) { return YEAR_MONTH_DAY; } else if (FormatNames.EPOCH_SECOND.matches(input)) { return EpochTime.SECONDS_FORMATTER; } else if (FormatNames.EPOCH_MILLIS.matches(input)) { return EpochTime.MILLIS_FORMATTER; // strict date formats here, must be at least 4 digits for year and two for months and two for day } else if (FormatNames.STRICT_BASIC_WEEK_DATE.matches(input) ) { return STRICT_BASIC_WEEK_DATE; } else if (FormatNames.STRICT_BASIC_WEEK_DATE_TIME.matches(input) ) { return STRICT_BASIC_WEEK_DATE_TIME; } else if (FormatNames.STRICT_BASIC_WEEK_DATE_TIME_NO_MILLIS.matches(input) ) { return STRICT_BASIC_WEEK_DATE_TIME_NO_MILLIS; } else if (FormatNames.STRICT_DATE.matches(input) ) { return STRICT_DATE; } else if (FormatNames.STRICT_DATE_HOUR.matches(input) ) { return STRICT_DATE_HOUR; } else if (FormatNames.STRICT_DATE_HOUR_MINUTE.matches(input) ) { return STRICT_DATE_HOUR_MINUTE; } else if (FormatNames.STRICT_DATE_HOUR_MINUTE_SECOND.matches(input) ) { return STRICT_DATE_HOUR_MINUTE_SECOND; } else if (FormatNames.STRICT_DATE_HOUR_MINUTE_SECOND_FRACTION.matches(input) ) { return STRICT_DATE_HOUR_MINUTE_SECOND_FRACTION; } else if (FormatNames.STRICT_DATE_HOUR_MINUTE_SECOND_MILLIS.matches(input) ) { return STRICT_DATE_HOUR_MINUTE_SECOND_MILLIS; } else if (FormatNames.STRICT_DATE_OPTIONAL_TIME.matches(input) ) { return STRICT_DATE_OPTIONAL_TIME; } else if (FormatNames.STRICT_DATE_OPTIONAL_TIME_NANOS.matches(input) ) { return STRICT_DATE_OPTIONAL_TIME_NANOS; } else if (FormatNames.STRICT_DATE_TIME.matches(input) ) { return STRICT_DATE_TIME; } else if (FormatNames.STRICT_DATE_TIME_NO_MILLIS.matches(input) ) { return STRICT_DATE_TIME_NO_MILLIS; } else if (FormatNames.STRICT_HOUR.matches(input) ) { return STRICT_HOUR; } else if (FormatNames.STRICT_HOUR_MINUTE.matches(input) ) { return STRICT_HOUR_MINUTE; } else if (FormatNames.STRICT_HOUR_MINUTE_SECOND.matches(input) ) { return STRICT_HOUR_MINUTE_SECOND; } else if (FormatNames.STRICT_HOUR_MINUTE_SECOND_FRACTION.matches(input) ) { return STRICT_HOUR_MINUTE_SECOND_FRACTION; } else if (FormatNames.STRICT_HOUR_MINUTE_SECOND_MILLIS.matches(input) ) { return STRICT_HOUR_MINUTE_SECOND_MILLIS; } else if (FormatNames.STRICT_ORDINAL_DATE.matches(input) ) { return STRICT_ORDINAL_DATE; } else if (FormatNames.STRICT_ORDINAL_DATE_TIME.matches(input) ) { return STRICT_ORDINAL_DATE_TIME; } else if (FormatNames.STRICT_ORDINAL_DATE_TIME_NO_MILLIS.matches(input) ) { return STRICT_ORDINAL_DATE_TIME_NO_MILLIS; } else if (FormatNames.STRICT_TIME.matches(input) ) { return STRICT_TIME; } else if (FormatNames.STRICT_TIME_NO_MILLIS.matches(input) ) { return STRICT_TIME_NO_MILLIS; } else if (FormatNames.STRICT_T_TIME.matches(input) ) { return STRICT_T_TIME; } else if (FormatNames.STRICT_T_TIME_NO_MILLIS.matches(input) ) { return STRICT_T_TIME_NO_MILLIS; } else if (FormatNames.STRICT_WEEK_DATE.matches(input) ) { return STRICT_WEEK_DATE; } else if (FormatNames.STRICT_WEEK_DATE_TIME.matches(input) ) { return STRICT_WEEK_DATE_TIME; } else if (FormatNames.STRICT_WEEK_DATE_TIME_NO_MILLIS.matches(input) ) { return STRICT_WEEK_DATE_TIME_NO_MILLIS; } else if (FormatNames.STRICT_WEEKYEAR.matches(input) ) { return STRICT_WEEKYEAR; } else if (FormatNames.STRICT_WEEKYEAR_WEEK.matches(input) ) { return STRICT_WEEKYEAR_WEEK; } else if (FormatNames.STRICT_WEEKYEAR_WEEK_DAY.matches(input) ) { return STRICT_WEEKYEAR_WEEK_DAY; } else if (FormatNames.STRICT_YEAR.matches(input) ) { return STRICT_YEAR; } else if (FormatNames.STRICT_YEAR_MONTH.matches(input) ) { return STRICT_YEAR_MONTH; } else if (FormatNames.STRICT_YEAR_MONTH_DAY.matches(input) ) { return STRICT_YEAR_MONTH_DAY; } else { try { return new JavaDateFormatter(input, new DateTimeFormatterBuilder().appendPattern(input).toFormatter(Locale.ROOT)); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Invalid format: [" + input + "]: " + e.getMessage(), e); } } } static JavaDateFormatter merge(String pattern, List<DateFormatter> formatters) { assert formatters.size() > 0; List<DateTimeFormatter> dateTimeFormatters = new ArrayList<>(formatters.size()); DateTimeFormatterBuilder roundupBuilder = new DateTimeFormatterBuilder(); DateTimeFormatter printer = null; for (DateFormatter formatter : formatters) { assert formatter instanceof JavaDateFormatter; JavaDateFormatter javaDateFormatter = (JavaDateFormatter) formatter; if (printer == null) { printer = javaDateFormatter.getPrinter(); } dateTimeFormatters.addAll(javaDateFormatter.getParsers()); roundupBuilder.appendOptional(javaDateFormatter.getRoundupParser()); } DateTimeFormatter roundUpParser = roundupBuilder.toFormatter(Locale.ROOT); return new JavaDateFormatter(pattern, printer, builder -> builder.append(roundUpParser), dateTimeFormatters.toArray(new DateTimeFormatter[0])); } private static final LocalDate LOCALDATE_EPOCH = LocalDate.of(1970, 1, 1); /** * Convert a temporal accessor to a zoned date time object - as performant as possible. * The .from() methods from the JDK are throwing exceptions when for example ZonedDateTime.from(accessor) * or Instant.from(accessor). This results in a huge performance penalty and should be prevented * This method prevents exceptions by querying the accessor for certain capabilities * and then act on it accordingly * * This action assumes that we can reliably fall back to some defaults if not all parts of a * zoned date time are set * * - If a zoned date time is passed, it is returned * - If no timezone is found, ZoneOffset.UTC is used * - If we find a time and a date, converting to a ZonedDateTime is straight forward, * no defaults will be applied * - If an accessor only containing of seconds and nanos is found (like epoch_millis/second) * an Instant is created out of that, that becomes a ZonedDateTime with a time zone * - If no time is given, the start of the day is used * - If no month of the year is found, the first day of the year is used * - If an iso based weekyear is found, but not week is specified, the first monday * of the new year is chosen (reataining BWC to joda time) * - If an iso based weekyear is found and an iso based weekyear week, the start * of the day is used * * @param accessor The accessor returned from a parser * * @return The converted zoned date time */ public static ZonedDateTime from(TemporalAccessor accessor) { if (accessor instanceof ZonedDateTime) { return (ZonedDateTime) accessor; } ZoneId zoneId = accessor.query(TemporalQueries.zone()); if (zoneId == null) { zoneId = ZoneOffset.UTC; } LocalDate localDate = accessor.query(TemporalQueries.localDate()); LocalTime localTime = accessor.query(TemporalQueries.localTime()); boolean isLocalDateSet = localDate != null; boolean isLocalTimeSet = localTime != null; // the first two cases are the most common, so this allows us to exit early when parsing dates if (isLocalDateSet && isLocalTimeSet) { return of(localDate, localTime, zoneId); } else if (accessor.isSupported(ChronoField.INSTANT_SECONDS) && accessor.isSupported(NANO_OF_SECOND)) { return Instant.from(accessor).atZone(zoneId); } else if (isLocalDateSet) { return localDate.atStartOfDay(zoneId); } else if (isLocalTimeSet) { return of(getLocaldate(accessor), localTime, zoneId); } else if (accessor.isSupported(ChronoField.YEAR)) { if (accessor.isSupported(MONTH_OF_YEAR)) { return getFirstOfMonth(accessor).atStartOfDay(zoneId); } else { return Year.of(accessor.get(ChronoField.YEAR)).atDay(1).atStartOfDay(zoneId); } } else if (accessor.isSupported(MONTH_OF_YEAR)) { // missing year, falling back to the epoch and then filling return getLocaldate(accessor).atStartOfDay(zoneId); } else if (accessor.isSupported(WeekFields.ISO.weekBasedYear())) { if (accessor.isSupported(WeekFields.ISO.weekOfWeekBasedYear())) { return Year.of(accessor.get(WeekFields.ISO.weekBasedYear())) .atDay(1) .with(WeekFields.ISO.weekOfWeekBasedYear(), accessor.getLong(WeekFields.ISO.weekOfWeekBasedYear())) .atStartOfDay(zoneId); } else { return Year.of(accessor.get(WeekFields.ISO.weekBasedYear())) .atDay(1) .with(TemporalAdjusters.firstInMonth(DayOfWeek.MONDAY)) .atStartOfDay(zoneId); } } // we should not reach this piece of code, everything being parsed we should be able to // convert to a zoned date time! If not, we have to extend the above methods throw new IllegalArgumentException("temporal accessor [" + accessor + "] cannot be converted to zoned date time"); } private static LocalDate getLocaldate(TemporalAccessor accessor) { if (accessor.isSupported(MONTH_OF_YEAR)) { if (accessor.isSupported(DAY_OF_MONTH)) { return LocalDate.of(1970, accessor.get(MONTH_OF_YEAR), accessor.get(DAY_OF_MONTH)); } else { return LocalDate.of(1970, accessor.get(MONTH_OF_YEAR), 1); } } return LOCALDATE_EPOCH; } @SuppressForbidden(reason = "ZonedDateTime.of is fine here") private static ZonedDateTime of(LocalDate localDate, LocalTime localTime, ZoneId zoneId) { return ZonedDateTime.of(localDate, localTime, zoneId); } @SuppressForbidden(reason = "LocalDate.of is fine here") private static LocalDate getFirstOfMonth(TemporalAccessor accessor) { return LocalDate.of(accessor.get(ChronoField.YEAR), accessor.get(MONTH_OF_YEAR), 1); } }
{ "pile_set_name": "Github" }
#region using directives using System; using System.Collections.Generic; using System.IO; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; #endregion namespace PoGo.PokeMobBot.Logic.Common { using POGOProtos.Enums; public interface ITranslation { string GetTranslation(TranslationString translationString, params object[] data); string GetTranslation(TranslationString translationString); string GetPokemonName(PokemonId pkmnId); string CurrentCode { get; set; } } public enum TranslationString { Pokeball, GreatPokeball, UltraPokeball, MasterPokeball, LogLevelDebug, LogLevelPokestop, WrongAuthType, FarmPokestopsOutsideRadius, FarmPokestopsNoUsableFound, EventFortUsed, EventFortFailed, EventFortTargeted, EventProfileLogin, EventLevelUpRewards, EventUsedLuckyEgg, EventUseLuckyEggMinPokemonCheck, EventPokemonEvolvedSuccess, EventPokemonEvolvedFailed, EventPokemonTransferred, EventItemRecycled, EventPokemonCapture, EventNoPokeballs, CatchStatusAttempt, CatchStatus, Candies, UnhandledGpxData, DisplayHighestsHeader, CommonWordPerfect, CommonWordName, DisplayHighestsCpHeader, DisplayHighestsPerfectHeader, WelcomeWarning, IncubatorPuttingEgg, IncubatorStatusUpdate, DisplayHighestsLevelHeader, LogEntryError, LogEntryAttention, LogEntryInfo, LogEntryPokestop, LogEntryFarming, LogEntryRecycling, LogEntryPkmn, LogEntryTransfered, LogEntryEvolved, LogEntryBerry, LogEntryEgg, LogEntryDebug, LogEntryUpdate, LoggingIn, PtcOffline, AccessTokenExpired, TryingAgainIn, AccountNotVerified, PtcLoginFailed, CommonWordUnknown, OpeningGoogleDevicePage, CouldntCopyToClipboard, CouldntCopyToClipboard2, RealisticTravelDetected, NotRealisticTravel, CoordinatesAreInvalid, GotUpToDateVersion, AutoUpdaterDisabled, DownloadingUpdate, FinishedDownloadingRelease, FinishedUnpackingFiles, FinishedTransferringConfig, UpdateFinished, LookingForIncensePokemon, PokemonSkipped, ZeroPokeballInv, CurrentPokeballInv, CurrentPotionInv, CurrentBerryInv, CurrentReviveInv, CurrentIncenseInv, CurrentMiscInv, CurrentInvUsage, CurrentPokemonUsage, CheckingForBallsToRecycle, CheckingForPotionsToRecycle, CheckingForRevivesToRecycle, PokeballsToKeepIncorrect, InvFullTransferring, InvFullTransferManually, InvFullPokestopLooting, IncubatorEggHatched, EncounterProblem, EncounterProblemLurePokemon, LookingForPokemon, LookingForLurePokemon, DesiredDestTooFar, PokemonRename, PokemonIgnoreFilter, CatchStatusError, CatchStatusEscape, CatchStatusFlee, CatchStatusMissed, CatchStatusSuccess, CatchTypeNormal, CatchTypeLure, CatchTypeIncense, WebSocketFailStart, StatsTemplateString, StatsXpTemplateString, RequireInputText, GoogleTwoFactorAuth, GoogleTwoFactorAuthExplanation, GoogleError, MissingCredentialsGoogle, MissingCredentialsPtc, SnipeScan, SnipeScanEx, NoPokemonToSnipe, NotEnoughPokeballsToSnipe, DisplayHighestMove1Header, DisplayHighestMove2Header, UseBerry, NianticServerUnstable, OperationCanceled, PokemonUpgradeSuccess, PokemonUpgradeFailed, PokemonUpgradeFailedError, PokemonUpgradeUnavailable, WebErrorNotFound, WebErrorGatewayTimeout, WebErrorBadGateway, SkipLaggedTimeout, SkipLaggedMaintenance, CheckingForMaximumInventorySize, //added by Lars LogEntryFavorite, //added by Lars LogEntryUnFavorite, //added by Lars PokemonFavorite, //added by Lars PokemonUnFavorite, //added by Lars WalkingSpeedRandomized, //added by Lars StopBotToAvoidBan, BotNotStoppedRiskOfBan, EncounterProblemPokemonFlee, SetLure, LevelUp, EvolvedInto, GymTouch, EggFound, PokeListEmpty, ProxyAlready, YourIpProxyIp, IpMatch, YourIpIs, ProxyDown, HourRateReached, BotPauseCancel, BotPauseFail, UpdatesAt, DiscordLink, ScheduleAction, ScheduleActionFailed, SchedulePause, ThrowPokeball, FoundHiding, PokeInGym, FailedCoords, ErrorCatchNearby, CandyMiss, NoRoute, CustomRouteData, UnDoneForceMove, RouteSwitched, CustomRouteDisabled, FoundClosest, CustomRouteEnabled, ForceMove, ForceMoveDone, InventorySettingsFailed, ReadTos, GenderSelect, TutorialPokestop, TutorialPoke, TutorialNameNotPicked, TutorialNameTooLong, TutorialNameDone, TutorialNameFailed, TutorialNameErrorUnset, TutorialNameErrorChanged, TutorialNameErrorNotAvail, TutorialNameErrorNotValid, TutorialNameErrorOwner, TutorialNameErrorNoMore, CantGetAPIVersion, OldAPIErr, APIVersionOK, //NEW 15.11.2016 - Lunatiq NianticPlayerWarn, NianticPlayerBanned } public class Translation : ITranslation { [JsonProperty("TranslationStrings", ItemTypeNameHandling = TypeNameHandling.Arrays, ItemConverterType = typeof(KeyValuePairConverter), ObjectCreationHandling = ObjectCreationHandling.Replace, DefaultValueHandling = DefaultValueHandling.Populate)] private readonly List<KeyValuePair<TranslationString, string>> _translationStrings = TranslationStrings; //Default Translations (ENGLISH) private static readonly List<KeyValuePair<TranslationString, string>> TranslationStrings = new List <KeyValuePair<TranslationString, string>> { //NEW 15.11.2016 - Lunatiq new KeyValuePair<TranslationString, string>(TranslationString.NianticPlayerWarn, "Niantic warn message about bot usage! Please, stop using it!"), new KeyValuePair<TranslationString, string>(TranslationString.NianticPlayerBanned, "Niantic ban message! You are done, sorry!"), //NEW TRANSLATION FOR CATCHEM! OLD new KeyValuePair<TranslationString, string>(TranslationString.SetLure, "Set lure at PokeStop: {0}, distance: {1}, lures left: {2}"), new KeyValuePair<TranslationString, string>(TranslationString.LevelUp, "Level up! Rewards: "), new KeyValuePair<TranslationString, string>(TranslationString.EvolvedInto, //$"Evolved into {evt.Id} CP: {evt.Cp} Iv: {evt.Perfection.ToString("0.00")}%" "Evolved into {0} CP: {1} Iv: {2}%"), //$"Touched a gym: {evt.Name}{gymDesc} - {evt.GymState.FortData.OwnedByTeam}, points: {evt.GymState.FortData.GymPoints}, Guards: {guardList}) " new KeyValuePair<TranslationString, string>(TranslationString.GymTouch, "Touched a gym: {0}{1} - {2}, points: {3}, Guards: {4}) "), new KeyValuePair<TranslationString, string>(TranslationString.EggFound, "Found an egg, distance: {0}km from PokeStop: {1}"), new KeyValuePair<TranslationString, string>(TranslationString.PokeListEmpty, "Highests Pokemon List is empty"), new KeyValuePair<TranslationString, string>(TranslationString.ProxyAlready, "{0} is already running with this proxy!"), new KeyValuePair<TranslationString, string>(TranslationString.YourIpProxyIp, "Your IP is: {0} / Proxy IP is: {1}"), new KeyValuePair<TranslationString, string>(TranslationString.IpMatch, "Your ip match! I warned you!"), new KeyValuePair<TranslationString, string>(TranslationString.YourIpIs, "Your IP is: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.ProxyDown, "Proxy Down? Will try to interact with server anyway"), new KeyValuePair<TranslationString, string>(TranslationString.HourRateReached, "Max amount of Pokemon ({0})/Pokestops ({1})/XP ({2})/Star Dust ({3}) per hour reached, bot will be stopped for {4} minutes"), new KeyValuePair<TranslationString, string>(TranslationString.BotPauseCancel, "Bot pause routine canceled"), new KeyValuePair<TranslationString, string>(TranslationString.BotPauseFail, "Bot pause routine failed badly"), new KeyValuePair<TranslationString, string>(TranslationString.UpdatesAt, "During that pause, consider to check fresh updates at"), new KeyValuePair<TranslationString, string>(TranslationString.DiscordLink, "or join our friendly Discord chat:"), new KeyValuePair<TranslationString, string>(TranslationString.ScheduleAction, "Schedule Action [{0}], with args: [{1}] performed successfully"), new KeyValuePair<TranslationString, string>(TranslationString.ScheduleActionFailed, "Schedule Action Failed to perform action {0}, with args: {1}"), new KeyValuePair<TranslationString, string>(TranslationString.SchedulePause, "Bot paused for {0}h, case of Schedule settings, will be started again at {1}, {2}:{3}"), new KeyValuePair<TranslationString, string>(TranslationString.ThrowPokeball, "Throwing {0}{1}{2} - {3}"), new KeyValuePair<TranslationString, string>(TranslationString.FoundHiding, "Found some hiding poke in the area, trying to catch'em now!"), new KeyValuePair<TranslationString, string>(TranslationString.PokeInGym, "Pokemon {0} is signed to defend a GYM!"), new KeyValuePair<TranslationString, string>(TranslationString.FailedCoords, "Coordinate failure, please check them again!"), new KeyValuePair<TranslationString, string>(TranslationString.ErrorCatchNearby, "Error during catch process!"), new KeyValuePair<TranslationString, string>(TranslationString.CandyMiss, "Miss some candies to evolve {0} - {1}, cancelling..."), new KeyValuePair<TranslationString, string>(TranslationString.NoRoute, "No proper route loaded, or route is too short"), new KeyValuePair<TranslationString, string>(TranslationString.CustomRouteData, "You are using a custom route named: '{0}' with {1} routing points"), new KeyValuePair<TranslationString, string>(TranslationString.UnDoneForceMove, "Found not-done ForceMove, resuming movement to Lat: {0} Lon:{1}"), new KeyValuePair<TranslationString, string>(TranslationString.RouteSwitched, "Route switched from {0} to {1}!"), new KeyValuePair<TranslationString, string>(TranslationString.CustomRouteDisabled, "CustomRoute disabled, going back to normal routine!"), new KeyValuePair<TranslationString, string>(TranslationString.FoundClosest, "Found closest point at {0} - {1}, distance to that point: {2} meters, moving there!"), new KeyValuePair<TranslationString, string>(TranslationString.CustomRouteEnabled, "CustomRoute enabled, shutting down normal routine!"), new KeyValuePair<TranslationString, string>(TranslationString.ForceMove, "ForceMove to {0} - {1} Started! Distance: {2}m"), new KeyValuePair<TranslationString, string>(TranslationString.ForceMoveDone, "ForceMove Done!"), new KeyValuePair<TranslationString, string>(TranslationString.InventorySettingsFailed, "You have failed with item settings! You asked to keep it at {0} clean, which is {1} items, and asked to keep {2} items at the same time, while you have {3} extra items like Lucky Eggs/Incubators/etc..."), new KeyValuePair<TranslationString, string>(TranslationString.ReadTos, "Just read the Niantic ToS, looks legit, accepting!"), new KeyValuePair<TranslationString, string>(TranslationString.GenderSelect, "Selected your avatar, now you are {0}!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialPokestop, "First time experience complete, looks like i just spinned an virtual pokestop :P"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialPoke, "Caught Tutorial pokemon! it's {0}!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameNotPicked, "You didn't pick the desired nickname!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameTooLong, "You selected too long Desired name, max length: 15!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameDone, "Your name is now: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameFailed, "Name selection failed! Error: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameErrorUnset, "Unset, somehow"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameErrorChanged, "No errors, nickname changed"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameErrorNotAvail, "That nickname isn't available, pick another one and restart the bot!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameErrorNotValid, "That nickname isn't valid, pick another one!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameErrorOwner, "You already own that nickname!"), new KeyValuePair<TranslationString, string>(TranslationString.TutorialNameErrorNoMore, "You can't change your nickname anymore!"), new KeyValuePair<TranslationString, string>(TranslationString.CantGetAPIVersion, "Unable to get API version Information"), new KeyValuePair<TranslationString, string>(TranslationString.OldAPIErr, "Catchem API version is less than the minimum stop botting to avoid ban!"), new KeyValuePair<TranslationString, string>(TranslationString.APIVersionOK, "Catchem API Version {0}, Minimum API Version {1}"), //END OF NEW new KeyValuePair<TranslationString, string>(TranslationString.Pokeball, "PokeBall"), new KeyValuePair<TranslationString, string>(TranslationString.GreatPokeball, "GreatBall"), new KeyValuePair<TranslationString, string>(TranslationString.UltraPokeball, "UltraBall"), new KeyValuePair<TranslationString, string>(TranslationString.MasterPokeball, "MasterBall"), new KeyValuePair<TranslationString, string>(TranslationString.WrongAuthType, "Unknown AuthType in config.json"), new KeyValuePair<TranslationString, string>(TranslationString.FarmPokestopsOutsideRadius, "You're outside of your defined radius! Walking to start ({0}m away) in 5 seconds. Is your Coords.ini file correct?"), new KeyValuePair<TranslationString, string>(TranslationString.FarmPokestopsNoUsableFound, "No usable PokeStops found in your area. Is your maximum distance too small?"), new KeyValuePair<TranslationString, string>(TranslationString.EventFortUsed, "Name: {0} XP: {1}, Gems: {2}, Items: {3}"), new KeyValuePair<TranslationString, string>(TranslationString.EventFortFailed, "Name: {0} INFO: Looting failed, possible softban. Unban in: {1}/{2}"), new KeyValuePair<TranslationString, string>(TranslationString.EventFortTargeted, "Travelling to Pokestop: {0} ({1}m Away)"), new KeyValuePair<TranslationString, string>(TranslationString.EventProfileLogin, "Playing as {0}"), new KeyValuePair<TranslationString, string>(TranslationString.EventLevelUpRewards, "Leveled Up: {0} | Items: {1}"), new KeyValuePair<TranslationString, string>(TranslationString.EventUsedLuckyEgg, "Used Lucky Egg, remaining: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.EventUseLuckyEggMinPokemonCheck, "Not enough Pokemon to trigger a lucky egg. Waiting for {0} more. ({1}/{2})"), new KeyValuePair<TranslationString, string>(TranslationString.EventPokemonEvolvedSuccess, "{0} successfully for {1}xp"), new KeyValuePair<TranslationString, string>(TranslationString.EventPokemonEvolvedFailed, "Failed {0}. Result was {1}, stopping evolving {2}"), new KeyValuePair<TranslationString, string>(TranslationString.EventPokemonTransferred, "{0,-12} - CP: {1,4} IV: {2,6}% [Best CP: {3,4} IV: {4,6}%] (Candies: {5})"), new KeyValuePair<TranslationString, string>(TranslationString.EventItemRecycled, "{0}x {1}"), new KeyValuePair<TranslationString, string>(TranslationString.EventPokemonCapture, "({0}) | {2}, Lvl: {3} | CP: ({4}/{5}) | IV: {6}% | Type: {1} | Chance: {7}% | Dist: {8}m | Used: {9} ({10} left) | XP: {11} | {12}"), new KeyValuePair<TranslationString, string>(TranslationString.EventNoPokeballs, "No Pokeballs - We missed a {0} with CP {1}"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusAttempt, "{0} Attempt #{1}"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatus, "{0}"), new KeyValuePair<TranslationString, string>(TranslationString.Candies, "Candies: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.UnhandledGpxData, "Unhandled data in GPX file, attempting to skip."), new KeyValuePair<TranslationString, string>(TranslationString.DisplayHighestsHeader, "Pokemons"), new KeyValuePair<TranslationString, string>(TranslationString.CommonWordPerfect, "perfect"), new KeyValuePair<TranslationString, string>(TranslationString.CommonWordName, "name"), new KeyValuePair<TranslationString, string>(TranslationString.CommonWordUnknown, "Unknown"), new KeyValuePair<TranslationString, string>(TranslationString.DisplayHighestsCpHeader, "DisplayHighestsCP"), new KeyValuePair<TranslationString, string>(TranslationString.DisplayHighestsPerfectHeader, "DisplayHighestsPerfect"), new KeyValuePair<TranslationString, string>(TranslationString.DisplayHighestsLevelHeader, "DisplayHighestsLevel"), new KeyValuePair<TranslationString, string>(TranslationString.WelcomeWarning, "Make sure Lat & Lng are right. Exit Program if not! Lat: {0} Lng: {1} Alt: {2}"), new KeyValuePair<TranslationString, string>(TranslationString.IncubatorPuttingEgg, "Putting egg in incubator: {0:0.00}km left"), new KeyValuePair<TranslationString, string>(TranslationString.IncubatorStatusUpdate, "Incubator status update: {0:0.00}km left"), new KeyValuePair<TranslationString, string>(TranslationString.IncubatorEggHatched, "Incubated egg has hatched: {0} | Lvl: {1} CP: ({2}/{3}) IV: {4}%"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryError, "ERROR"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryAttention, "ATTENTION"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryInfo, "INFO"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryPokestop, "POKESTOP"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryFarming, "FARMING"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryRecycling, "RECYCLING"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryPkmn, "CATCH"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryTransfered, "TRANSFER"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryEvolved, "EVOLVED"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryBerry, "BERRY"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryEgg, "EGG"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryDebug, "DEBUG"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryUpdate, "UPDATE"), new KeyValuePair<TranslationString, string>(TranslationString.LoggingIn, "Logging in using account {0}"), new KeyValuePair<TranslationString, string>(TranslationString.PtcOffline, "PTC Servers are probably down OR your credentials are wrong. Try google"), new KeyValuePair<TranslationString, string>(TranslationString.AccessTokenExpired, "Access token expired. Relogin to get a new token."), new KeyValuePair<TranslationString, string>(TranslationString.TryingAgainIn, "Trying again in {0} seconds..."), new KeyValuePair<TranslationString, string>(TranslationString.AccountNotVerified, "Account not verified! Exiting..."), new KeyValuePair<TranslationString, string>(TranslationString.PtcLoginFailed, "PTC login failed. Make sure you have entered the right Email & Password. If you continue to get this, check your phone or Nox for a ban. Exiting..."), new KeyValuePair<TranslationString, string>(TranslationString.OpeningGoogleDevicePage, "Opening Google Device page. Please paste the code using CTRL+V"), new KeyValuePair<TranslationString, string>(TranslationString.CouldntCopyToClipboard, "Couldnt copy to clipboard, do it manually"), new KeyValuePair<TranslationString, string>(TranslationString.CouldntCopyToClipboard2, "Goto: {0} & enter {1}"), new KeyValuePair<TranslationString, string>(TranslationString.RealisticTravelDetected, "Detected realistic Traveling , using UserSettings.settings"), new KeyValuePair<TranslationString, string>(TranslationString.NotRealisticTravel, "Not realistic Traveling at {0}, using last saved Coords.ini"), new KeyValuePair<TranslationString, string>(TranslationString.CoordinatesAreInvalid, "Coordinates in \"Coords.ini\" file are invalid, using the default coordinates"), new KeyValuePair<TranslationString, string>(TranslationString.GotUpToDateVersion, "Perfect! You already have the newest Version {0}"), new KeyValuePair<TranslationString, string>(TranslationString.AutoUpdaterDisabled, "AutoUpdater is disabled. Get the latest release from: {0}\n "), new KeyValuePair<TranslationString, string>(TranslationString.DownloadingUpdate, "Downloading and apply Update..."), new KeyValuePair<TranslationString, string>(TranslationString.FinishedDownloadingRelease, "Finished downloading newest Release..."), new KeyValuePair<TranslationString, string>(TranslationString.FinishedUnpackingFiles, "Finished unpacking files..."), new KeyValuePair<TranslationString, string>(TranslationString.FinishedTransferringConfig, "Finished transferring your config to the new version..."), new KeyValuePair<TranslationString, string>(TranslationString.UpdateFinished, "Update finished, you can close this window now."), new KeyValuePair<TranslationString, string>(TranslationString.LookingForIncensePokemon, "Looking for incense Pokemon..."), new KeyValuePair<TranslationString, string>(TranslationString.LookingForPokemon, "Looking for Pokemon..."), new KeyValuePair<TranslationString, string>(TranslationString.LookingForLurePokemon, "Looking for lure Pokemon..."), new KeyValuePair<TranslationString, string>(TranslationString.PokemonSkipped, "Skipped {0}"), new KeyValuePair<TranslationString, string>(TranslationString.ZeroPokeballInv, "You have no pokeballs in your inventory, no more Pokemon can be caught!"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentPokeballInv, "[Inventory] Pokeballs: {0} | Greatballs: {1} | Ultraballs: {2} | Masterballs: {3} | Total: {4}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentPotionInv, "[Inventory] Potions: {0} | Super Potions: {1} | Hyper Potions: {2} | Max Potions: {3} | Total: {4}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentBerryInv, "[Inventory] Razz Berries: {0} | Bluk Berries: {1} | Nanab Berries: {2} | Pinap Berries: {3} | Wepar Berries: {4} | Total: {5}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentReviveInv, "[Inventory] Revives: {0} | Max Revives: {1} | Total: {2}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentIncenseInv, "[Inventory] Incense: {0} | Cool Incense: {1} | Floral Incense: {2} | Spicy Incense: {3} | Total {4}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentMiscInv, "[Inventory] Lure Modules: {0} | Lucky Eggs: {1} | Incubators: {2} | Total: {3}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentInvUsage, "[Inventory] Inventory Usage: {0}/{1}"), new KeyValuePair<TranslationString, string>(TranslationString.CurrentPokemonUsage, "[Inventory] Pokemon Stored: {0}/{1}"), new KeyValuePair<TranslationString, string>(TranslationString.CheckingForBallsToRecycle, "Checking for balls to recycle, keeping {0}"), new KeyValuePair<TranslationString, string>(TranslationString.CheckingForPotionsToRecycle, "Checking for potions to recycle, keeping {0}"), new KeyValuePair<TranslationString, string>(TranslationString.CheckingForRevivesToRecycle, "Checking for revives to recycle, keeping {0}"), new KeyValuePair<TranslationString, string>(TranslationString.PokeballsToKeepIncorrect, "TotalAmountOfPokeballsToKeep is configured incorrectly. The number is smaller than 1."), new KeyValuePair<TranslationString, string>(TranslationString.InvFullTransferring, "Pokemon Inventory is full, transferring Pokemon..."), new KeyValuePair<TranslationString, string>(TranslationString.InvFullTransferManually, "Pokemon Inventory is full! Please transfer Pokemon manually or set TransferDuplicatePokemon to true in settings..."), new KeyValuePair<TranslationString, string>(TranslationString.InvFullPokestopLooting, "Inventory is full, no items looted!"), new KeyValuePair<TranslationString, string>(TranslationString.EncounterProblem, "Encounter problem: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.EncounterProblemLurePokemon, "Encounter problem: Lure Pokemon {0}"), new KeyValuePair<TranslationString, string>(TranslationString.EncounterProblemPokemonFlee, "Encounter Pokemon Fled {0}!"), new KeyValuePair<TranslationString, string>(TranslationString.DesiredDestTooFar, "Your desired destination of {0}, {1} is too far from your current position of {2}, {3}"), new KeyValuePair<TranslationString, string>(TranslationString.PokemonRename, "Pokemon {0} ({1}) renamed from {2} to {3}."), new KeyValuePair<TranslationString, string>(TranslationString.PokemonIgnoreFilter, "[Pokemon ignore filter] - Ignoring {0} as defined in settings"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusAttempt, "Attempt"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusError, "Error"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusEscape, "Escape"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusFlee, "Flee"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusMissed, "Missed"), new KeyValuePair<TranslationString, string>(TranslationString.CatchStatusSuccess, "Success"), new KeyValuePair<TranslationString, string>(TranslationString.CatchTypeNormal, "Normal"), new KeyValuePair<TranslationString, string>(TranslationString.CatchTypeLure, "Lure"), new KeyValuePair<TranslationString, string>(TranslationString.CatchTypeIncense, "Incense"), new KeyValuePair<TranslationString, string>(TranslationString.WebSocketFailStart, "Failed to start WebSocketServer on port : {0}"), new KeyValuePair<TranslationString, string>(TranslationString.StatsTemplateString, "{0} - Runtime {1} - Lvl: {2} | EXP/H: {3:n0} | P/H: {4:n0} | Stardust: {5:n0} | Transfered: {6:n0} | Recycled: {7:n0}"), new KeyValuePair<TranslationString, string>(TranslationString.StatsXpTemplateString, "{0} (Advance in {1}h {2}m | {3:n0}/{4:n0} XP)"), new KeyValuePair<TranslationString, string>(TranslationString.RequireInputText, "Program will continue after the key press..."), new KeyValuePair<TranslationString, string>(TranslationString.GoogleTwoFactorAuth, "As you have Google Two Factor Auth enabled, you will need to insert an App Specific Password into the auth.json"), new KeyValuePair<TranslationString, string>(TranslationString.GoogleTwoFactorAuthExplanation, "Opening Google App-Passwords. Please make a new App Password (use Other as Device)"), new KeyValuePair<TranslationString, string>(TranslationString.GoogleError, "Make sure you have entered the right Email & Password."), new KeyValuePair<TranslationString, string>(TranslationString.MissingCredentialsGoogle, "You need to fill out GoogleUsername and GooglePassword in auth.json!"), new KeyValuePair<TranslationString, string>(TranslationString.MissingCredentialsPtc, "You need to fill out PtcUsername and PtcPassword in auth.json!"), new KeyValuePair<TranslationString, string>(TranslationString.SnipeScan, "[Sniper] Scanning for Snipeable Pokemon at {0}..."), new KeyValuePair<TranslationString, string>(TranslationString.SnipeScanEx, "[Sniper] Sniping a {0} with {1} IV at {2}..."), new KeyValuePair<TranslationString, string>(TranslationString.NoPokemonToSnipe, "[Sniper] No Pokemon found to snipe!"), new KeyValuePair<TranslationString, string>(TranslationString.NotEnoughPokeballsToSnipe, "Not enough Pokeballs to start sniping! ({0}/{1})"), new KeyValuePair<TranslationString, string>(TranslationString.DisplayHighestMove1Header, "MOVE1"), new KeyValuePair<TranslationString, string>(TranslationString.DisplayHighestMove2Header, "MOVE2"), new KeyValuePair<TranslationString, string>(TranslationString.UseBerry, "Using Razzberry. Berries left: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.NianticServerUnstable, "Niantic Servers unstable, throttling API Calls."), new KeyValuePair<TranslationString, string>(TranslationString.OperationCanceled, "Current Operation was canceled. Bot stopped/paused."), new KeyValuePair<TranslationString, string>(TranslationString.PokemonUpgradeSuccess, "Pokemon upgraded: {0}:{1}"), new KeyValuePair<TranslationString, string>(TranslationString.PokemonUpgradeFailed, "Pokemon upgrade failed, not enough resources, probably not enough stardust"), new KeyValuePair<TranslationString, string>(TranslationString.PokemonUpgradeUnavailable, "Pokemon upgrade unavailable for: {0}:{1}/{2}"), new KeyValuePair<TranslationString, string>(TranslationString.PokemonUpgradeFailedError, "Pokemon upgrade failed duo to an unknown error, pokemon could be max level for your level. The Pokemon that caused issue was: {0}"), new KeyValuePair<TranslationString, string>(TranslationString.WebErrorBadGateway, "502 Bad Gateway: Server is under heavy load!"), new KeyValuePair<TranslationString, string>(TranslationString.WebErrorGatewayTimeout, "504 Gateway Time-out: The server didn't respond in time."), new KeyValuePair<TranslationString, string>(TranslationString.WebErrorNotFound, "404 Not Found: Not able to retrieve file from server!"), new KeyValuePair<TranslationString, string>(TranslationString.SkipLaggedTimeout, "SkipLagged is down or SnipeRequestTimeoutSeconds is too small!"), new KeyValuePair<TranslationString, string>(TranslationString.SkipLaggedMaintenance, "SkipLagged servers are down for maintenance."), new KeyValuePair<TranslationString, string>(TranslationString.CheckingForMaximumInventorySize, // added by Lars "[Inventory] Items to Keep exceeds maximum inventory size! {0}/{1}"), new KeyValuePair<TranslationString, string>(TranslationString.LogEntryFavorite, "FAVORITE"), // added by Lars new KeyValuePair<TranslationString, string>(TranslationString.LogEntryUnFavorite, "UNFAVORITE"), // added by Lars new KeyValuePair<TranslationString, string>(TranslationString.PokemonFavorite, "{0}"), //pre-formatted - added by Lars new KeyValuePair<TranslationString, string>(TranslationString.PokemonUnFavorite, "{0}"), //pre-formatted - added by Lars new KeyValuePair<TranslationString, string>(TranslationString.WalkingSpeedRandomized, "{0}"), //pre-formatted - added by Lars new KeyValuePair<TranslationString, string>(TranslationString.StopBotToAvoidBan, "The bot was stopped to avoid ban!"), // added by Lars new KeyValuePair<TranslationString, string>(TranslationString.BotNotStoppedRiskOfBan, "Somethng happened that shouldn't have and bot hasn't stopped. Higher possibility of ban. (suggested action: stop the bot \"Control+C\").") // added by Lars }; [JsonIgnore] public string CurrentCode { get; set; } [JsonProperty("Pokemon", ItemTypeNameHandling = TypeNameHandling.Arrays, ItemConverterType = typeof(KeyValuePairConverter), ObjectCreationHandling = ObjectCreationHandling.Replace, DefaultValueHandling = DefaultValueHandling.Populate)] //Default Translations (ENGLISH) private readonly List<KeyValuePair<PokemonId, string>> _pokemons = new List<KeyValuePair<PokemonId, string>> { new KeyValuePair<PokemonId, string>(PokemonId.Missingno, "Missingno"), new KeyValuePair<PokemonId, string>(PokemonId.Bulbasaur, "Bulbasaur"), new KeyValuePair<PokemonId, string>(PokemonId.Ivysaur, "Ivysaur"), new KeyValuePair<PokemonId, string>(PokemonId.Venusaur, "Venusaur"), new KeyValuePair<PokemonId, string>(PokemonId.Charmander, "Charmander"), new KeyValuePair<PokemonId, string>(PokemonId.Charmeleon, "Charmeleon"), new KeyValuePair<PokemonId, string>(PokemonId.Charizard, "Charizard"), new KeyValuePair<PokemonId, string>(PokemonId.Squirtle, "Squirtle"), new KeyValuePair<PokemonId, string>(PokemonId.Wartortle, "Wartortle"), new KeyValuePair<PokemonId, string>(PokemonId.Blastoise, "Blastoise"), new KeyValuePair<PokemonId, string>(PokemonId.Caterpie, "Caterpie"), new KeyValuePair<PokemonId, string>(PokemonId.Metapod, "Metapod"), new KeyValuePair<PokemonId, string>(PokemonId.Butterfree, "Butterfree"), new KeyValuePair<PokemonId, string>(PokemonId.Weedle, "Weedle"), new KeyValuePair<PokemonId, string>(PokemonId.Kakuna, "Kakuna"), new KeyValuePair<PokemonId, string>(PokemonId.Beedrill, "Beedrill"), new KeyValuePair<PokemonId, string>(PokemonId.Pidgey, "Pidgey"), new KeyValuePair<PokemonId, string>(PokemonId.Pidgeotto, "Pidgeotto"), new KeyValuePair<PokemonId, string>(PokemonId.Pidgeot, "Pidgeot"), new KeyValuePair<PokemonId, string>(PokemonId.Rattata, "Rattata"), new KeyValuePair<PokemonId, string>(PokemonId.Raticate, "Raticate"), new KeyValuePair<PokemonId, string>(PokemonId.Spearow, "Spearow"), new KeyValuePair<PokemonId, string>(PokemonId.Fearow, "Fearow"), new KeyValuePair<PokemonId, string>(PokemonId.Ekans, "Ekans"), new KeyValuePair<PokemonId, string>(PokemonId.Arbok, "Arbok"), new KeyValuePair<PokemonId, string>(PokemonId.Pikachu, "Pikachu"), new KeyValuePair<PokemonId, string>(PokemonId.Raichu, "Raichu"), new KeyValuePair<PokemonId, string>(PokemonId.Sandshrew, "Sandshrew"), new KeyValuePair<PokemonId, string>(PokemonId.Sandslash, "Sandslash"), new KeyValuePair<PokemonId, string>(PokemonId.NidoranFemale, "NidoranF"), new KeyValuePair<PokemonId, string>(PokemonId.Nidorina, "Nidorina"), new KeyValuePair<PokemonId, string>(PokemonId.Nidoqueen, "Nidoqueen"), new KeyValuePair<PokemonId, string>(PokemonId.NidoranMale, "NidoranM"), new KeyValuePair<PokemonId, string>(PokemonId.Nidorino, "Nidorino"), new KeyValuePair<PokemonId, string>(PokemonId.Nidoking, "Nidoking"), new KeyValuePair<PokemonId, string>(PokemonId.Clefairy, "Clefairy"), new KeyValuePair<PokemonId, string>(PokemonId.Clefable, "Clefable"), new KeyValuePair<PokemonId, string>(PokemonId.Vulpix, "Vulpix"), new KeyValuePair<PokemonId, string>(PokemonId.Ninetales, "Ninetales"), new KeyValuePair<PokemonId, string>(PokemonId.Jigglypuff, "Jigglypuff"), new KeyValuePair<PokemonId, string>(PokemonId.Wigglytuff, "Wigglytuff"), new KeyValuePair<PokemonId, string>(PokemonId.Zubat, "Zubat"), new KeyValuePair<PokemonId, string>(PokemonId.Golbat, "Golbat"), new KeyValuePair<PokemonId, string>(PokemonId.Oddish, "Oddish"), new KeyValuePair<PokemonId, string>(PokemonId.Gloom, "Gloom"), new KeyValuePair<PokemonId, string>(PokemonId.Vileplume, "Vileplume"), new KeyValuePair<PokemonId, string>(PokemonId.Paras, "Paras"), new KeyValuePair<PokemonId, string>(PokemonId.Parasect, "Parasect"), new KeyValuePair<PokemonId, string>(PokemonId.Venonat, "Venonat"), new KeyValuePair<PokemonId, string>(PokemonId.Venomoth, "Venomoth"), new KeyValuePair<PokemonId, string>(PokemonId.Diglett, "Diglett"), new KeyValuePair<PokemonId, string>(PokemonId.Dugtrio, "Dugtrio"), new KeyValuePair<PokemonId, string>(PokemonId.Meowth, "Meowth"), new KeyValuePair<PokemonId, string>(PokemonId.Persian, "Persian"), new KeyValuePair<PokemonId, string>(PokemonId.Psyduck, "Psyduck"), new KeyValuePair<PokemonId, string>(PokemonId.Golduck, "Golduck"), new KeyValuePair<PokemonId, string>(PokemonId.Mankey, "Mankey"), new KeyValuePair<PokemonId, string>(PokemonId.Primeape, "Primeape"), new KeyValuePair<PokemonId, string>(PokemonId.Growlithe, "Growlithe"), new KeyValuePair<PokemonId, string>(PokemonId.Arcanine, "Arcanine"), new KeyValuePair<PokemonId, string>(PokemonId.Poliwag, "Poliwag"), new KeyValuePair<PokemonId, string>(PokemonId.Poliwhirl, "Poliwhirl"), new KeyValuePair<PokemonId, string>(PokemonId.Poliwrath, "Poliwrath"), new KeyValuePair<PokemonId, string>(PokemonId.Abra, "Abra"), new KeyValuePair<PokemonId, string>(PokemonId.Kadabra, "Kadabra"), new KeyValuePair<PokemonId, string>(PokemonId.Alakazam, "Alakazam"), new KeyValuePair<PokemonId, string>(PokemonId.Machop, "Machop"), new KeyValuePair<PokemonId, string>(PokemonId.Machoke, "Machoke"), new KeyValuePair<PokemonId, string>(PokemonId.Machamp, "Machamp"), new KeyValuePair<PokemonId, string>(PokemonId.Bellsprout, "Bellsprout"), new KeyValuePair<PokemonId, string>(PokemonId.Weepinbell, "Weepinbell"), new KeyValuePair<PokemonId, string>(PokemonId.Victreebel, "Victreebel"), new KeyValuePair<PokemonId, string>(PokemonId.Tentacool, "Tentacool"), new KeyValuePair<PokemonId, string>(PokemonId.Tentacruel, "Tentacruel"), new KeyValuePair<PokemonId, string>(PokemonId.Geodude, "Geodude"), new KeyValuePair<PokemonId, string>(PokemonId.Graveler, "Graveler"), new KeyValuePair<PokemonId, string>(PokemonId.Golem, "Golem"), new KeyValuePair<PokemonId, string>(PokemonId.Ponyta, "Ponyta"), new KeyValuePair<PokemonId, string>(PokemonId.Rapidash, "Rapidash"), new KeyValuePair<PokemonId, string>(PokemonId.Slowpoke, "Slowpoke"), new KeyValuePair<PokemonId, string>(PokemonId.Slowbro, "Slowbro"), new KeyValuePair<PokemonId, string>(PokemonId.Magnemite, "Magnemite"), new KeyValuePair<PokemonId, string>(PokemonId.Magneton, "Magneton"), new KeyValuePair<PokemonId, string>(PokemonId.Farfetchd, "Farfetch'd"), new KeyValuePair<PokemonId, string>(PokemonId.Doduo, "Doduo"), new KeyValuePair<PokemonId, string>(PokemonId.Dodrio, "Dodrio"), new KeyValuePair<PokemonId, string>(PokemonId.Seel, "Seel"), new KeyValuePair<PokemonId, string>(PokemonId.Dewgong, "Dewgong"), new KeyValuePair<PokemonId, string>(PokemonId.Grimer, "Grimer"), new KeyValuePair<PokemonId, string>(PokemonId.Muk, "Muk"), new KeyValuePair<PokemonId, string>(PokemonId.Shellder, "Shellder"), new KeyValuePair<PokemonId, string>(PokemonId.Cloyster, "Cloyster"), new KeyValuePair<PokemonId, string>(PokemonId.Gastly, "Gastly"), new KeyValuePair<PokemonId, string>(PokemonId.Haunter, "Haunter"), new KeyValuePair<PokemonId, string>(PokemonId.Gengar, "Gengar"), new KeyValuePair<PokemonId, string>(PokemonId.Onix, "Onix"), new KeyValuePair<PokemonId, string>(PokemonId.Drowzee, "Drowzee"), new KeyValuePair<PokemonId, string>(PokemonId.Hypno, "Hypno"), new KeyValuePair<PokemonId, string>(PokemonId.Krabby, "Krabby"), new KeyValuePair<PokemonId, string>(PokemonId.Kingler, "Kingler"), new KeyValuePair<PokemonId, string>(PokemonId.Voltorb, "Voltorb"), new KeyValuePair<PokemonId, string>(PokemonId.Electrode, "Electrode"), new KeyValuePair<PokemonId, string>(PokemonId.Exeggcute, "Exeggcute"), new KeyValuePair<PokemonId, string>(PokemonId.Exeggutor, "Exeggutor"), new KeyValuePair<PokemonId, string>(PokemonId.Cubone, "Cubone"), new KeyValuePair<PokemonId, string>(PokemonId.Marowak, "Marowak"), new KeyValuePair<PokemonId, string>(PokemonId.Hitmonlee, "Hitmonlee"), new KeyValuePair<PokemonId, string>(PokemonId.Hitmonchan, "Hitmonchan"), new KeyValuePair<PokemonId, string>(PokemonId.Lickitung, "Lickitung"), new KeyValuePair<PokemonId, string>(PokemonId.Koffing, "Koffing"), new KeyValuePair<PokemonId, string>(PokemonId.Weezing, "Weezing"), new KeyValuePair<PokemonId, string>(PokemonId.Rhyhorn, "Rhyhorn"), new KeyValuePair<PokemonId, string>(PokemonId.Rhydon, "Rhydon"), new KeyValuePair<PokemonId, string>(PokemonId.Chansey, "Chansey"), new KeyValuePair<PokemonId, string>(PokemonId.Tangela, "Tangela"), new KeyValuePair<PokemonId, string>(PokemonId.Kangaskhan, "Kangaskhan"), new KeyValuePair<PokemonId, string>(PokemonId.Horsea, "Horsea"), new KeyValuePair<PokemonId, string>(PokemonId.Seadra, "Seadra"), new KeyValuePair<PokemonId, string>(PokemonId.Goldeen, "Goldeen"), new KeyValuePair<PokemonId, string>(PokemonId.Seaking, "Seaking"), new KeyValuePair<PokemonId, string>(PokemonId.Staryu, "Staryu"), new KeyValuePair<PokemonId, string>(PokemonId.Starmie, "Starmie"), new KeyValuePair<PokemonId, string>(PokemonId.MrMime, "Mr. Mime"), new KeyValuePair<PokemonId, string>(PokemonId.Scyther, "Scyther"), new KeyValuePair<PokemonId, string>(PokemonId.Jynx, "Jynx"), new KeyValuePair<PokemonId, string>(PokemonId.Electabuzz, "Electabuzz"), new KeyValuePair<PokemonId, string>(PokemonId.Magmar, "Magmar"), new KeyValuePair<PokemonId, string>(PokemonId.Pinsir, "Pinsir"), new KeyValuePair<PokemonId, string>(PokemonId.Tauros, "Tauros"), new KeyValuePair<PokemonId, string>(PokemonId.Magikarp, "Magikarp"), new KeyValuePair<PokemonId, string>(PokemonId.Gyarados, "Gyarados"), new KeyValuePair<PokemonId, string>(PokemonId.Lapras, "Lapras"), new KeyValuePair<PokemonId, string>(PokemonId.Ditto, "Ditto"), new KeyValuePair<PokemonId, string>(PokemonId.Eevee, "Eevee"), new KeyValuePair<PokemonId, string>(PokemonId.Vaporeon, "Vaporeon"), new KeyValuePair<PokemonId, string>(PokemonId.Jolteon, "Jolteon"), new KeyValuePair<PokemonId, string>(PokemonId.Flareon, "Flareon"), new KeyValuePair<PokemonId, string>(PokemonId.Porygon, "Porygon"), new KeyValuePair<PokemonId, string>(PokemonId.Omanyte, "Omanyte"), new KeyValuePair<PokemonId, string>(PokemonId.Omastar, "Omastar"), new KeyValuePair<PokemonId, string>(PokemonId.Kabuto, "Kabuto"), new KeyValuePair<PokemonId, string>(PokemonId.Kabutops, "Kabutops"), new KeyValuePair<PokemonId, string>(PokemonId.Aerodactyl, "Aerodactyl"), new KeyValuePair<PokemonId, string>(PokemonId.Snorlax, "Snorlax"), new KeyValuePair<PokemonId, string>(PokemonId.Articuno, "Articuno"), new KeyValuePair<PokemonId, string>(PokemonId.Zapdos, "Zapdos"), new KeyValuePair<PokemonId, string>(PokemonId.Moltres, "Moltres"), new KeyValuePair<PokemonId, string>(PokemonId.Dratini, "Dratini"), new KeyValuePair<PokemonId, string>(PokemonId.Dragonair, "Dragonair"), new KeyValuePair<PokemonId, string>(PokemonId.Dragonite, "Dragonite"), new KeyValuePair<PokemonId, string>(PokemonId.Mewtwo, "Mewtwo"), new KeyValuePair<PokemonId, string>(PokemonId.Mew, "Mew") }; public string GetTranslation(TranslationString translationString, params object[] data) { try { var translation = _translationStrings.FirstOrDefault(t => t.Key.Equals(translationString)).Value; if (translation == default(string)) { translation = TranslationStrings.FirstOrDefault(t => t.Key.Equals(translationString)).Value; } return translation != default(string) ? string.Format(translation, data) : $"Translation for {translationString} is missing"; } catch (Exception) { return $"Translation for {translationString} failed"; } } public string GetTranslation(TranslationString translationString) { var translation = _translationStrings.FirstOrDefault(t => t.Key.Equals(translationString)).Value; if (translation == default(string)) { translation = TranslationStrings.FirstOrDefault(t => t.Key.Equals(translationString)).Value; } return translation != default(string) ? translation : $"Translation for {translationString} is missing"; } public string GetPokemonName(PokemonId pkmnId) { var name = _pokemons.FirstOrDefault(p => p.Key == pkmnId).Value; return name != default(string) ? name : $"{pkmnId}"; } public static void InsertMissedLines() { var translationPath = Path.Combine("Config", "Translations"); foreach (var f in Directory.GetFiles(translationPath)) { try { var fi = new FileInfo(f); if (fi.Extension.ToLower() == ".json") { var input = File.ReadAllText(fi.FullName); var jsonSettings = new JsonSerializerSettings(); jsonSettings.Converters.Add(new StringEnumConverter {CamelCaseText = true}); jsonSettings.ObjectCreationHandling = ObjectCreationHandling.Replace; jsonSettings.DefaultValueHandling = DefaultValueHandling.Populate; jsonSettings.Error += delegate(object sender, ErrorEventArgs args) { args.ErrorContext.Handled = true; }; var translations = JsonConvert.DeserializeObject<Translation>(input, jsonSettings); TranslationStrings.Where( item => translations._translationStrings.All(a => a.Key != item.Key)) .ToList() .ForEach(translations._translationStrings.Add); translations.Save(fi.FullName); } } catch (Exception ex) { Logging.Logger.Write("[Translation check failed] " + ex.Message); //ignore throw; } } } public static Translation Load(ILogicSettings logicSettings) { var translationsLanguageCode = logicSettings.TranslationLanguageCode; var translationPath = Path.Combine(logicSettings.GeneralConfigPath, "translations"); var fullPath = Path.Combine(translationPath, "translation." + translationsLanguageCode + ".json"); Translation translations; if (File.Exists(fullPath)) { var input = File.ReadAllText(fullPath); var jsonSettings = new JsonSerializerSettings(); jsonSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true }); jsonSettings.ObjectCreationHandling = ObjectCreationHandling.Replace; jsonSettings.DefaultValueHandling = DefaultValueHandling.Populate; try { translations = JsonConvert.DeserializeObject<Translation>(input, jsonSettings); //TODO make json to fill default values as it won't do it now var defaultTranslation = new Translation(); defaultTranslation._translationStrings.Where( item => translations._translationStrings.All(a => a.Key != item.Key)) .ToList() .ForEach(translations._translationStrings.Add); defaultTranslation._pokemons.Where( item => translations._pokemons.All(a => a.Key != item.Key)) .ToList() .ForEach(translations._pokemons.Add); translations.CurrentCode = translationsLanguageCode; } catch (Exception) { translations = new Translation {CurrentCode = "en"}; translations.Save(Path.Combine(translationPath, "translation.en.json")); } } else { translations = new Translation {CurrentCode = "en"}; translations.Save(Path.Combine(translationPath, "translation.en.json")); } return translations; } public void Save(string fullPath) { var output = JsonConvert.SerializeObject(this, Formatting.Indented, new StringEnumConverter { CamelCaseText = true }); var folder = Path.GetDirectoryName(fullPath); if (folder != null && !Directory.Exists(folder)) { Directory.CreateDirectory(folder); } File.WriteAllText(fullPath, output); } } }
{ "pile_set_name": "Github" }
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-generated-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CrossVersionObjectReference = map[string]string{ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", "apiVersion": "API version of the referent", } func (CrossVersionObjectReference) SwaggerDoc() map[string]string { return map_CrossVersionObjectReference } var map_ExternalMetricSource = map[string]string{ "": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", "metricName": "metricName is the name of the metric in question.", "metricSelector": "metricSelector is used to identify a specific time series within a given metric.", "targetValue": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", "targetAverageValue": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", } func (ExternalMetricSource) SwaggerDoc() map[string]string { return map_ExternalMetricSource } var map_ExternalMetricStatus = map[string]string{ "": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", "metricName": "metricName is the name of a metric used for autoscaling in metric system.", "metricSelector": "metricSelector is used to identify a specific time series within a given metric.", "currentValue": "currentValue is the current value of the metric (as a quantity)", "currentAverageValue": "currentAverageValue is the current value of metric averaged over autoscaled pods.", } func (ExternalMetricStatus) SwaggerDoc() map[string]string { return map_ExternalMetricStatus } var map_HorizontalPodAutoscaler = map[string]string{ "": "configuration of a horizontal pod autoscaler.", "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", "status": "current information about the autoscaler.", } func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscaler } var map_HorizontalPodAutoscalerCondition = map[string]string{ "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", "type": "type describes the current condition", "status": "status is the status of the condition (True, False, Unknown)", "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another", "reason": "reason is the reason for the condition's last transition.", "message": "message is a human-readable explanation containing details about the transition", } func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscalerCondition } var map_HorizontalPodAutoscalerList = map[string]string{ "": "list of horizontal pod autoscaler objects.", "metadata": "Standard list metadata.", "items": "list of horizontal pod autoscaler objects.", } func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscalerList } var map_HorizontalPodAutoscalerSpec = map[string]string{ "": "specification of a horizontal pod autoscaler.", "scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", "targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", } func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscalerSpec } var map_HorizontalPodAutoscalerStatus = map[string]string{ "": "current status of a horizontal pod autoscaler", "observedGeneration": "most recent generation observed by this autoscaler.", "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", "currentReplicas": "current number of replicas of pods managed by this autoscaler.", "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.", "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", } func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { return map_HorizontalPodAutoscalerStatus } var map_MetricSpec = map[string]string{ "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", "type": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } func (MetricSpec) SwaggerDoc() map[string]string { return map_MetricSpec } var map_MetricStatus = map[string]string{ "": "MetricStatus describes the last-read state of a single metric.", "type": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } func (MetricStatus) SwaggerDoc() map[string]string { return map_MetricStatus } var map_ObjectMetricSource = map[string]string{ "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", "target": "target is the described Kubernetes object.", "metricName": "metricName is the name of the metric in question.", "targetValue": "targetValue is the target value of the metric (as a quantity).", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric. When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", "averageValue": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", } func (ObjectMetricSource) SwaggerDoc() map[string]string { return map_ObjectMetricSource } var map_ObjectMetricStatus = map[string]string{ "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", "target": "target is the described Kubernetes object.", "metricName": "metricName is the name of the metric in question.", "currentValue": "currentValue is the current value of the metric (as a quantity).", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", "averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", } func (ObjectMetricStatus) SwaggerDoc() map[string]string { return map_ObjectMetricStatus } var map_PodsMetricSource = map[string]string{ "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "metricName": "metricName is the name of the metric in question", "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", } func (PodsMetricSource) SwaggerDoc() map[string]string { return map_PodsMetricSource } var map_PodsMetricStatus = map[string]string{ "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", "metricName": "metricName is the name of the metric in question", "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", } func (PodsMetricStatus) SwaggerDoc() map[string]string { return map_PodsMetricStatus } var map_ResourceMetricSource = map[string]string{ "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", "name": "name is the name of the resource in question.", "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", } func (ResourceMetricSource) SwaggerDoc() map[string]string { return map_ResourceMetricSource } var map_ResourceMetricStatus = map[string]string{ "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", "name": "name is the name of the resource in question.", "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", } func (ResourceMetricStatus) SwaggerDoc() map[string]string { return map_ResourceMetricStatus } var map_Scale = map[string]string{ "": "Scale represents a scaling request for a resource.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", } func (Scale) SwaggerDoc() map[string]string { return map_Scale } var map_ScaleSpec = map[string]string{ "": "ScaleSpec describes the attributes of a scale subresource.", "replicas": "desired number of instances for the scaled object.", } func (ScaleSpec) SwaggerDoc() map[string]string { return map_ScaleSpec } var map_ScaleStatus = map[string]string{ "": "ScaleStatus represents the current status of a scale subresource.", "replicas": "actual number of observed instances of the scaled object.", "selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", } func (ScaleStatus) SwaggerDoc() map[string]string { return map_ScaleStatus } // AUTO-GENERATED FUNCTIONS END HERE
{ "pile_set_name": "Github" }
<div class="ghb"> <a href="https://github.com/forms-angular/forms-angular"><img src="/images/forkme_right_darkblue_121621.png" style="position: fixed; right: 0; top: 0; z-index: 1032;"></a> </div> <div class="navbar navbar-default navbar-fixed-top"> <div class="navbar-inner"> <div class="container-fluid" ng-cloak> <div class="visible-lg visible-desktop pull-right col-md-2 span2"></div> <!-- Leave some space for github flash --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed btn btn-navbar" data-toggle="collapse" data-target=".navbar-collapse" ng-click="toggleCollapsed()"> <span class="glyphicon glyphicon-bar icon-bar"></span> <span class="glyphicon glyphicon-bar icon-bar"></span> <span class="glyphicon glyphicon-bar icon-bar"></span> </button> <div class="pull-left"> <a class="navbar-brandpluslogo brandpluslogo" ng-href="{{buildUrl('/')}}"><img src="/images/Home_icon_black-45.png" alt="Click on logo to go to home page" class="img-responsive"/></a> </div> <global-search class="global-search"></global-search> </div> <!-- navbar-header --> <div class="navbar-collapse collapse nav-collapse" uib-collapse="isCollapsed"> <ul class="nav navbar-nav"> <li><a ng-href="{{buildUrl('get-started')}}">Get Started</a></li> <li><a ng-href="{{buildUrl('schemas')}}">Schemas</a></li> <li><a ng-href="{{buildUrl('forms')}}">Forms</a></li> <li><a ng-href="{{buildUrl('plugins')}}">Plugins</a></li> <li><a ng-href="{{buildUrl('examples')}}">Examples</a></li> <li uib-dropdown><a uib-dropdown-toggle>More <span class="caret"></span></a> <ul class="uib-dropdown-menu dropdown-menu"> <li><a class="dropdown-option" ng-href="{{buildUrl('api-docs')}}">API Documentation</a></li> <li><a class="dropdown-option" href="https://gitter.im/forms-angular/forms-angular" target="_blank">Chat Room</a></li> <li><a class="dropdown-option" href="https://twitter.com/formsangular" target="_blank">Twitter</a></li> <li><a class="dropdown-option" href="https://github.com/forms-angular/forms-angular/issues?state=open" target="_blank">Issues</a></li> <li><a class="dropdown-option" href="https://github.com/forms-angular/forms-angular/releases" target="_blank">Changelog</a></li> <li><a class="dropdown-option" ng-href="{{buildUrl('in-the-wild')}}">Who Uses It?</a></li> <li><a class="dropdown-option" ng-href="{{buildUrl('supported-by')}}">Supported By...</a></li> </ul> </li> <model-controller-dropdown /> </ul> <!--** OFFLINE **--> <div class="pull-right ghb" style="padding-top: 14px;"> <iframe src="https://ghbtns.com/github-btn.html?user=forms-angular&repo=forms-angular&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe> <iframe src="https://ghbtns.com/github-btn.html?user=forms-angular&repo=forms-angular&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe> </div> </div> <!-- /.navbar-collapse --> </div> <!-- container-fluid --> </div> </div> <div ng-show="showShortcuts" class="span6 offset3 alert alert-info shortcut-panel"> <h2>Keyboard Shortcuts</h2> <table class="table"> <tr ng-repeat="shortcut in shortcuts"> <td ng-bind-html="markupShortcut(shortcut.key)"></td> <td>{{shortcut.act}}</td> </tr> </table> <p>Press <span class="key">Esc</span> to hide</p> </div>
{ "pile_set_name": "Github" }
<!DOCTYPE html> <!-- Test that non-stretchy largeops are bigger in display mode --> <html class="reftest-wait"> <head> <title>Largeop stretching</title> <meta charset="utf-8"/> <script type="text/javascript"> function verifyGreaterThan(aElement, aReference) { /* Verify that the height of the element is greater than that of the reference, and otherwise paint the element in red. */ var element = document.getElementById(aElement); var ref = document.getElementById(aReference); if (element.getBoundingClientRect().height - ref.getBoundingClientRect().height <= 1) { element.setAttribute("mathcolor", "red"); } } function doTest() { /* Ensure that largeops are bigger in displaystyle */ var numTests = 10; // zero indexed var opPrefix = "mo"; var refPrefix = "moRef"; for (var i = 0; i < numTests; i++) { verifyGreaterThan(opPrefix + i, refPrefix + i); } document.documentElement.removeAttribute("class"); } </script> </head> <body onload="doTest();"> <p> <math displaystyle="true"> <mo id="mo0">&bigodot;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo1">&bigoplus;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo2">&#x2a03;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo3">&#x2a05;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo4">&#x2a07;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo5">&#x2a08;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo6">&#x2a09;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo7">&#x2a0a;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo8">&#x2afc;</mo> </math> </p> <p> <math displaystyle="true"> <mo id="mo9">&#x2aff;</mo> </math> </p> <p> <math> <mo id="moRef0">&bigodot;</mo> </math> </p> <p> <math> <mo id="moRef1">&bigoplus;</mo> </math> </p> <p> <math> <mo id="moRef2">&#x2a03;</mo> </math> </p> <p> <math> <mo id="moRef3">&#x2a05;</mo> </math> </p> <p> <math> <mo id="moRef4">&#x2a07;</mo> </math> </p> <p> <math> <mo id="moRef5">&#x2a08;</mo> </math> </p> <p> <math> <mo id="moRef6">&#x2a09;</mo> </math> </p> <p> <math> <mo id="moRef7">&#x2a0a;</mo> </math> </p> <p> <math> <mo id="moRef8">&#x2afc;</mo> </math> </p> <p> <math> <mo id="moRef9">&#x2aff;</mo> </math> </p> </body> </html>
{ "pile_set_name": "Github" }
--- title: Conversation context channel TOCTitle: Conversation context channel ms:assetid: a09a4e37-02f8-4a13-bb29-527dbd5ba086 ms:mtpsurl: https://msdn.microsoft.com/en-us/library/Dn466012(v=office.16) ms:contentKeyID: 65239945 ms.date: 07/27/2015 mtps_version: v=office.16 dev_langs: - csharp --- # Conversation context channel **Applies to**: Skype for Business 2015 The [ConversationContextChannel](https://msdn.microsoft.com/en-us/library/hh161849\(v=office.16\)) class enables a UCMA 5.0 endpoint to launch and interact with a Conversation Extension window in Skype for Business 2015. ## Registering an application extension for a conversation context channel If a Skype for Business 2015 client is being used, the endpoint must register an application extension on the local machine for the client to process contextual data. This is done by adding the application to the registry on the target machine. For more information see "Register Contextual Conversation Packages" in the Skype for Business SDK documentation. This protects against unauthorized applications being popped on the client by a rogue remote endpoint. Further, to prevent spamming attacks, only UCMA-based trusted applications are permitted to supply data to client extensibility applications as part of a conference. ## Conversation context channel data traffic and limitations - The contextual channel is currently exposed through , Skype for Business 2015, and Microsoft Unified Communications Managed API 5.0. The initial channel is established with an INVITE message. After being established, the channel exchanges data using the INFO method. The initial INVITE payload must be well-formed XML, and less than 4 KB in size. The INFO payload is an unrestricted, generic message. - Application data can be refreshed and sent multiple times over the course of the call. It is treated as a ‘raw,’ two-way data pipe between applications, and can be used for everything from contextual data to commands outside the normal communication channels. - Multiple applications can be spawned during the course of a call, with each such application having its own data channel. These data channels can be addressed separately by the application, to enable scenarios in which there are a basic set of controls provided to all users, and an advanced add-on for managers, super-users, and administrators. > [!IMPORTANT] > Multiple requests for a given client application from different server application are sent to a single client application instance. - Contextual channels can be established at any time during the conversation, and can exist for the length of the conversation. - In a UCMA-based communication; only UCMA 5.0 can initiate the contextual channel. UCMA 5.0 does not process new INVITE messages coming from the application. ## Typical conversation context channel scenario 1. The user interacts with a customer-facing web page with a click-to-chat button. 2. Based on the Web interaction, the Web Server captures information about both the customer and the context, including customer contact information, current interests on the page, clicked-on links, and cookies. 3. The Web server interacts by way of an application-to-application back channel to the UCMA 5.0 application (Contact Center), and initiates an Automated Call Dispatch-style interaction, passing along the user’s information. There are two variants: 1. The Web server Front End serves as a UCMA 5.0/Web gateway to allow the user to IM with the Contact Center, or simply cause the Contact Center to start user interaction. 2. The Front End calls the user, and presents an interactive voice response (IVR) interface, to gather information from the user. The Front End then transfers the user to the Contact Center. 4. The UCMA 5.0 Back End reaches out to the Agents (on Skype for Business 2015, using presence-based routing logic and knowledge of agent skills), and asks the agent whether he or she can accept the call. 5. If the agent accepts: 1. (Optional) The agent can be added to a conference on the Back End at this time, using the audio-video MCU and a trusted conference user conversation for media control. 2. The Contact Center provides a special application INVITE to the Skype for Business 2015 Agent at this point, which includes the GUID and Name of an application to be launched, and a raw XML data blob. The two important requirements from UCMA 5.0 are that there must be one field that is Microsoft-enforced and ‘rigid’, for the application and any URI parameters; and a second field that is a generic data blob, for custom application data. 3. At this point, the agent should be notified in the application pane in Skype for Business 2015, similar to any modality addition. The application pane should be passed the data from the application INVITE, and should present the agent with a view of any additional context relevant to the customer, including (potentially) CRM, Web interactions, transaction history, and purchasing preferences. 6. Other agents can be added to or removed from the call as needed by the Backend Contact Center, which will need to be able to go through all the steps outlined in step 5. 7. The customer is served, and the call closed. ## Using the ConversationContextChannel class Before a **ConversationContextChannel** instance can be used, it must first be constructed, and then established. After the **ConversationContextChannel** has been established, it can be used to exchange messages. ### Creating a ConversationContextChannel instance To create a **ConversationContextChannel** instance, call its constructor with the conversation it will be part of and the remote participant endpoint it will communicate with. The conversation is used for two purposes. First, it dictates the lifetime of the channel. As a result, when the last call or conference in the conversation is terminated, the channel is also terminated. Second, by default, the remote endpoint uses the ID of this conversation to choose the conversation window for the application. If the remote application should be launched in a different conversation window, set the value of the [RemoteConversationId](https://msdn.microsoft.com/en-us/library/hh383368\(v=office.16\)) property to the ID of the conversation with which you want it to be associated. Next, register for events on the channel. The following example creates a **ConversationContextChannel** instance. ```csharp conversationContextChannel = new ConversationContextChannel(conversation, remoteParticipantEndpoint); // Register for changes in state. conversationContextChannel.StateChanged += this.conversationContextChannel_StateChanged; // Register for data received from the remote endpoint. conversationContextChannel.DataReceived += this.conversationContextChannel_DataReceived; ``` ### Establishing a ConversationContextChannel instance A **ConversationContextChannel** instance can be established only if the conversation that it is tied to is in the **Established** or **Conferenced** state. The following example shows the steps involved in establishing a **ConversationContextChannel** instance. ```csharp ConversationContextChannelEstablishOptions establishOptions = new ConversationContextChannelEstablishOptions(); // Pass the name for your application. The remote endpoint uses this name to display messages // about your application. For example if the application is not // installed on the remote machine, an error can be shown with the application name. establishOptions.ApplicationName = ″Contoso Corporate Performance Management″; // Pass a brief message to be shown when the request from the channel arrives at the remote endpoint. establishOptions.Toast = ″Good morning! ″; // A link to where the application can be installed (used only when the application is not installed). establishOptions.ApplicationInstallerPath = ″www.Contoso.com/Download″; // Shows a simple URL in the conversation history. establishOptions.SimpleLink = ″http://www.microsoft.com/en/us/default.aspx″; // Override the conversation ID which will be used to launch the application in the correct conversation window. establishOptions.RemoteConversationId = conversation.Id; // Pass any data that the application needs for initialization. establishOptions.ContextualData = ″My data″; conversationContextChannel.BeginEstablish(guid, establishOptions, this.EstablishCompleted, null); ``` [BeginEstablish(Guid, ConversationContextChannelEstablishOptions, AsyncCallback, Object)](https://msdn.microsoft.com/en-us/library/hh384061\(v=office.16\)) causes a SIP INVITE message to be sent to the remote participant endpoint. The INVITE message contains a body with content type = "application/ms-session-invite+xml" and appears similar to the following. ```xml <session> <application-id>{40499119-4B60-45A6-9A7A-DC7A384D5670} </application-id> <additional-properties> <entry><name>data</name><value>My data</value></entry> <entry><name>simpleLink</name></value>https://www.microsoft.com/en/us/default.aspx </value></entry> <entry><name>customToast</name><value>Good morning!</value></entry> <entry><name>name</name><value>Contoso Corporate Performance Management</value></entry> <entry><name>installLink</name><value>www.Contoso.com/Download</value></entry> </additional-properties> </session> ``` The following limits apply to the data being sent: - The contextual data is base-64 encoded before being sent. After encoding it can be at most 4KB in length. - The application name can be at most 50 characters. - The toast message can have at most 80 characters. After the remote accepts the INVITE, the channel is established and data can flow. Establishment can fail for the following reasons: - The remote endpoint (such as Microsoft Office Communicator 2007 R2 or earlier), does not support the Conversation Extension Window. - The Silverlight application is not installed on the remote machine. - The remote user rejects the invitation. - There are fatal server errors. The Contact Center sample treats the context channel as optional and hence ignores such failures. Your application can choose this or a different behavior to deal with failures in channel establishment. ### Exchanging messages After the channel is established it can be used to send or receive data. To send data, call [BeginSendData(ContentType, \[\], AsyncCallback, Object)](https://msdn.microsoft.com/en-us/library/hh383530\(v=office.16\)) with custom content type and body. To receive data, register for notification of the [DataReceived](https://msdn.microsoft.com/en-us/library/hh383082\(v=office.16\)) event, and write a handler for this event. The following example shows a typical call to **BeginSendData**, and the outline of a handler for the **DataReceived** event. ```csharp conversationContextChannel.BeginSendData( new System.Net.Mime.ContentType(″application/myApplication+xml″), new ASCIIEncoding().GetBytes(myDataString), this.SendDataCompleted, null); conversationContextChannel_DataReceived(object sender, ConversationContextChannelDataReceivedEventArgs e) { // Use e.ContentDescription.ContentType to determine the type of message. // Parse the message body from e.ContentDescription.GetBody(). } ``` ### Termination The **ConversationContextChannel** can be terminated in the following ways after the channel is established: - [BeginTerminate(AsyncCallback, Object)](https://msdn.microsoft.com/en-us/library/hh383868\(v=office.16\)) is called on the channel. - The conversation that the **ConversationContextChannel** is bound to is terminated either explicitly or when all calls or conferences are terminated. - The remote endpoint terminates the channel by sending a BYE. - A fatal failure is received. ## ConversationContextChannel state transitions The **ConversationContextChannel** state transitions are shown in the following illustration. The state values are the members of the [ConversationContextChannelState](https://msdn.microsoft.com/en-us/library/hh349729\(v=office.16\)) enumerated type. ![ContextChannel states](images/Dn466012.StateMach_ContextChannel(Office.16).jpg "ContextChannel states") 1. The transition from **Idle** to **Establishing** occurs when [BeginEstablish(Guid, ConversationContextChannelEstablishOptions, AsyncCallback, Object)](https://msdn.microsoft.com/en-us/library/hh384061\(v=office.16\)) is called. 2. The transition from **Idle** to **Terminating** occurs when **BeginTerminate(AsycnCallback, Object)** is called without the channel being established. 3. The transition from **Establishing** to **Established** occurs when a channel is successfully established. 4. The transition from **Establishing** to **Terminating** occurs when channel establishment fails. 5. The transition from **Established** to **Recovering** occurs when connection to the remote endpoint is temporarily lost. 6. The transition from **Established** to **Terminating** occurs when **BeginTerminate** is called, the remote endpoint terminates the channel, or the server returns a fatal failure. 7. The transition from **Recovering** to **Established** occurs when connection to the remote endpoint is restored. 8. The transition from **Recovering** to **Terminating** occurs when **BeginTerminate** is called or the server returns a fatal error. 9. The transition from **Terminating** to **Terminated** occurs when the terminate operation is complete.
{ "pile_set_name": "Github" }
/***************************************************************************/ /* */ /* cidobjs.c */ /* */ /* CID objects manager (body). */ /* */ /* Copyright 1996-2006, 2008, 2010-2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #include <ft2build.h> #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include "cidgload.h" #include "cidload.h" #include FT_SERVICE_POSTSCRIPT_CMAPS_H #include FT_INTERNAL_POSTSCRIPT_AUX_H #include FT_INTERNAL_POSTSCRIPT_HINTS_H #include "ciderrs.h" /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ /* messages during execution. */ /* */ #undef FT_COMPONENT #define FT_COMPONENT trace_cidobjs /*************************************************************************/ /* */ /* SLOT FUNCTIONS */ /* */ /*************************************************************************/ FT_LOCAL_DEF( void ) cid_slot_done( FT_GlyphSlot slot ) { slot->internal->glyph_hints = 0; } FT_LOCAL_DEF( FT_Error ) cid_slot_init( FT_GlyphSlot slot ) { CID_Face face; PSHinter_Service pshinter; face = (CID_Face)slot->face; pshinter = (PSHinter_Service)face->pshinter; if ( pshinter ) { FT_Module module; module = FT_Get_Module( slot->face->driver->root.library, "pshinter" ); if ( module ) { T1_Hints_Funcs funcs; funcs = pshinter->get_t1_funcs( module ); slot->internal->glyph_hints = (void*)funcs; } } return 0; } /*************************************************************************/ /* */ /* SIZE FUNCTIONS */ /* */ /*************************************************************************/ static PSH_Globals_Funcs cid_size_get_globals_funcs( CID_Size size ) { CID_Face face = (CID_Face)size->root.face; PSHinter_Service pshinter = (PSHinter_Service)face->pshinter; FT_Module module; module = FT_Get_Module( size->root.face->driver->root.library, "pshinter" ); return ( module && pshinter && pshinter->get_globals_funcs ) ? pshinter->get_globals_funcs( module ) : 0; } FT_LOCAL_DEF( void ) cid_size_done( FT_Size cidsize ) /* CID_Size */ { CID_Size size = (CID_Size)cidsize; if ( cidsize->internal ) { PSH_Globals_Funcs funcs; funcs = cid_size_get_globals_funcs( size ); if ( funcs ) funcs->destroy( (PSH_Globals)cidsize->internal ); cidsize->internal = 0; } } FT_LOCAL_DEF( FT_Error ) cid_size_init( FT_Size cidsize ) /* CID_Size */ { CID_Size size = (CID_Size)cidsize; FT_Error error = FT_Err_Ok; PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size ); if ( funcs ) { PSH_Globals globals; CID_Face face = (CID_Face)cidsize->face; CID_FaceDict dict = face->cid.font_dicts + face->root.face_index; PS_Private priv = &dict->private_dict; error = funcs->create( cidsize->face->memory, priv, &globals ); if ( !error ) cidsize->internal = (FT_Size_Internal)(void*)globals; } return error; } FT_LOCAL( FT_Error ) cid_size_request( FT_Size size, FT_Size_Request req ) { PSH_Globals_Funcs funcs; FT_Request_Metrics( size->face, req ); funcs = cid_size_get_globals_funcs( (CID_Size)size ); if ( funcs ) funcs->set_scale( (PSH_Globals)size->internal, size->metrics.x_scale, size->metrics.y_scale, 0, 0 ); return FT_Err_Ok; } /*************************************************************************/ /* */ /* FACE FUNCTIONS */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* cid_face_done */ /* */ /* <Description> */ /* Finalizes a given face object. */ /* */ /* <Input> */ /* face :: A pointer to the face object to destroy. */ /* */ FT_LOCAL_DEF( void ) cid_face_done( FT_Face cidface ) /* CID_Face */ { CID_Face face = (CID_Face)cidface; FT_Memory memory; CID_FaceInfo cid; PS_FontInfo info; if ( !face ) return; cid = &face->cid; info = &cid->font_info; memory = cidface->memory; /* release subrs */ if ( face->subrs ) { FT_Int n; for ( n = 0; n < cid->num_dicts; n++ ) { CID_Subrs subr = face->subrs + n; if ( subr->code ) { FT_FREE( subr->code[0] ); FT_FREE( subr->code ); } } FT_FREE( face->subrs ); } /* release FontInfo strings */ FT_FREE( info->version ); FT_FREE( info->notice ); FT_FREE( info->full_name ); FT_FREE( info->family_name ); FT_FREE( info->weight ); /* release font dictionaries */ FT_FREE( cid->font_dicts ); cid->num_dicts = 0; /* release other strings */ FT_FREE( cid->cid_font_name ); FT_FREE( cid->registry ); FT_FREE( cid->ordering ); cidface->family_name = 0; cidface->style_name = 0; FT_FREE( face->binary_data ); FT_FREE( face->cid_stream ); } /*************************************************************************/ /* */ /* <Function> */ /* cid_face_init */ /* */ /* <Description> */ /* Initializes a given CID face object. */ /* */ /* <Input> */ /* stream :: The source font stream. */ /* */ /* face_index :: The index of the font face in the resource. */ /* */ /* num_params :: Number of additional generic parameters. Ignored. */ /* */ /* params :: Additional generic parameters. Ignored. */ /* */ /* <InOut> */ /* face :: The newly built face object. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ FT_LOCAL_DEF( FT_Error ) cid_face_init( FT_Stream stream, FT_Face cidface, /* CID_Face */ FT_Int face_index, FT_Int num_params, FT_Parameter* params ) { CID_Face face = (CID_Face)cidface; FT_Error error; PSAux_Service psaux; PSHinter_Service pshinter; FT_UNUSED( num_params ); FT_UNUSED( params ); FT_UNUSED( stream ); cidface->num_faces = 1; psaux = (PSAux_Service)face->psaux; if ( !psaux ) { psaux = (PSAux_Service)FT_Get_Module_Interface( FT_FACE_LIBRARY( face ), "psaux" ); if ( !psaux ) { FT_ERROR(( "cid_face_init: cannot access `psaux' module\n" )); error = FT_THROW( Missing_Module ); goto Exit; } face->psaux = psaux; } pshinter = (PSHinter_Service)face->pshinter; if ( !pshinter ) { pshinter = (PSHinter_Service)FT_Get_Module_Interface( FT_FACE_LIBRARY( face ), "pshinter" ); face->pshinter = pshinter; } FT_TRACE2(( "CID driver\n" )); /* open the tokenizer; this will also check the font format */ if ( FT_STREAM_SEEK( 0 ) ) goto Exit; error = cid_face_open( face, face_index ); if ( error ) goto Exit; /* if we just wanted to check the format, leave successfully now */ if ( face_index < 0 ) goto Exit; /* check the face index */ /* XXX: handle CID fonts with more than a single face */ if ( face_index != 0 ) { FT_ERROR(( "cid_face_init: invalid face index\n" )); error = FT_THROW( Invalid_Argument ); goto Exit; } /* now load the font program into the face object */ /* initialize the face object fields */ /* set up root face fields */ { CID_FaceInfo cid = &face->cid; PS_FontInfo info = &cid->font_info; cidface->num_glyphs = cid->cid_count; cidface->num_charmaps = 0; cidface->face_index = face_index; cidface->face_flags |= FT_FACE_FLAG_SCALABLE | /* scalable outlines */ FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ FT_FACE_FLAG_HINTER; /* has native hinter */ if ( info->is_fixed_pitch ) cidface->face_flags |= FT_FACE_FLAG_FIXED_WIDTH; /* XXX: TODO: add kerning with .afm support */ /* get style name -- be careful, some broken fonts only */ /* have a /FontName dictionary entry! */ cidface->family_name = info->family_name; /* assume "Regular" style if we don't know better */ cidface->style_name = (char *)"Regular"; if ( cidface->family_name ) { char* full = info->full_name; char* family = cidface->family_name; if ( full ) { while ( *full ) { if ( *full == *family ) { family++; full++; } else { if ( *full == ' ' || *full == '-' ) full++; else if ( *family == ' ' || *family == '-' ) family++; else { if ( !*family ) cidface->style_name = full; break; } } } } } else { /* do we have a `/FontName'? */ if ( cid->cid_font_name ) cidface->family_name = cid->cid_font_name; } /* compute style flags */ cidface->style_flags = 0; if ( info->italic_angle ) cidface->style_flags |= FT_STYLE_FLAG_ITALIC; if ( info->weight ) { if ( !ft_strcmp( info->weight, "Bold" ) || !ft_strcmp( info->weight, "Black" ) ) cidface->style_flags |= FT_STYLE_FLAG_BOLD; } /* no embedded bitmap support */ cidface->num_fixed_sizes = 0; cidface->available_sizes = 0; cidface->bbox.xMin = cid->font_bbox.xMin >> 16; cidface->bbox.yMin = cid->font_bbox.yMin >> 16; /* no `U' suffix here to 0xFFFF! */ cidface->bbox.xMax = ( cid->font_bbox.xMax + 0xFFFF ) >> 16; cidface->bbox.yMax = ( cid->font_bbox.yMax + 0xFFFF ) >> 16; if ( !cidface->units_per_EM ) cidface->units_per_EM = 1000; cidface->ascender = (FT_Short)( cidface->bbox.yMax ); cidface->descender = (FT_Short)( cidface->bbox.yMin ); cidface->height = (FT_Short)( ( cidface->units_per_EM * 12 ) / 10 ); if ( cidface->height < cidface->ascender - cidface->descender ) cidface->height = (FT_Short)( cidface->ascender - cidface->descender ); cidface->underline_position = (FT_Short)info->underline_position; cidface->underline_thickness = (FT_Short)info->underline_thickness; } Exit: return error; } /*************************************************************************/ /* */ /* <Function> */ /* cid_driver_init */ /* */ /* <Description> */ /* Initializes a given CID driver object. */ /* */ /* <Input> */ /* driver :: A handle to the target driver object. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ FT_LOCAL_DEF( FT_Error ) cid_driver_init( FT_Module driver ) { FT_UNUSED( driver ); return FT_Err_Ok; } /*************************************************************************/ /* */ /* <Function> */ /* cid_driver_done */ /* */ /* <Description> */ /* Finalizes a given CID driver. */ /* */ /* <Input> */ /* driver :: A handle to the target CID driver. */ /* */ FT_LOCAL_DEF( void ) cid_driver_done( FT_Module driver ) { FT_UNUSED( driver ); } /* END */
{ "pile_set_name": "Github" }
touch foo
{ "pile_set_name": "Github" }
require("../wpt-env.js"); /* Delete created databases * * Go through each finished test, see if it has an associated database. Close * that and delete the database. */ add_completion_callback(function(tests) { for (var i in tests) { if(tests[i].db) { tests[i].db.close(); self.indexedDB.deleteDatabase(tests[i].db.name); } } }); function fail(test, desc) { return test.step_func(function(e) { if (e && e.message && e.target.error) assert_unreached(desc + " (" + e.target.error.name + ": " + e.message + ")"); else if (e && e.message) assert_unreached(desc + " (" + e.message + ")"); else if (e && e.target.readyState === 'done' && e.target.error) assert_unreached(desc + " (" + e.target.error.name + ")"); else assert_unreached(desc); }); } function createdb(test, dbname, version) { var rq_open = createdb_for_multiple_tests(dbname, version); return rq_open.setTest(test); } function createdb_for_multiple_tests(dbname, version) { var rq_open, fake_open = {}, test = null, dbname = (dbname ? dbname : "testdb-" + new Date().getTime() + Math.random() ); if (version) rq_open = self.indexedDB.open(dbname, version); else rq_open = self.indexedDB.open(dbname); function auto_fail(evt, current_test) { /* Fail handlers, if we haven't set on/whatever/, don't * expect to get event whatever. */ rq_open.manually_handled = {}; rq_open.addEventListener(evt, function(e) { if (current_test !== test) { return; } test.step(function() { if (!rq_open.manually_handled[evt]) { assert_unreached("unexpected open." + evt + " event"); } if (e.target.result + '' == '[object IDBDatabase]' && !this.db) { this.db = e.target.result; this.db.onerror = fail(test, 'unexpected db.error'); this.db.onabort = fail(test, 'unexpected db.abort'); this.db.onversionchange = fail(test, 'unexpected db.versionchange'); } }); }); rq_open.__defineSetter__("on" + evt, function(h) { rq_open.manually_handled[evt] = true; if (!h) rq_open.addEventListener(evt, function() {}); else rq_open.addEventListener(evt, test.step_func(h)); }); } // add a .setTest method to the IDBOpenDBRequest object Object.defineProperty(rq_open, 'setTest', { enumerable: false, value: function(t) { test = t; auto_fail("upgradeneeded", test); auto_fail("success", test); auto_fail("blocked", test); auto_fail("error", test); return this; } }); return rq_open; } function assert_key_equals(actual, expected, description) { assert_equals(indexedDB.cmp(actual, expected), 0, description); } function indexeddb_test(upgrade_func, open_func, description, options) { async_test(function(t) { options = Object.assign({upgrade_will_abort: false}, options); var dbname = location + '-' + t.name; var del = indexedDB.deleteDatabase(dbname); del.onerror = t.unreached_func('deleteDatabase should succeed'); var open = indexedDB.open(dbname, 1); open.onupgradeneeded = t.step_func(function() { var db = open.result; t.add_cleanup(function() { // If open didn't succeed already, ignore the error. open.onerror = function(e) { e.preventDefault(); }; db.close(); indexedDB.deleteDatabase(db.name); }); var tx = open.transaction; upgrade_func(t, db, tx, open); }); if (options.upgrade_will_abort) { open.onsuccess = t.unreached_func('open should not succeed'); } else { open.onerror = t.unreached_func('open should succeed'); open.onsuccess = t.step_func(function() { var db = open.result; if (open_func) open_func(t, db, open); }); } }, description); } // Call with a Test and an array of expected results in order. Returns // a function; call the function when a result arrives and when the // expected number appear the order will be asserted and test // completed. function expect(t, expected) { var results = []; return result => { results.push(result); if (results.length === expected.length) { assert_array_equals(results, expected); t.done(); } }; } // Checks to see if the passed transaction is active (by making // requests against the named store). function is_transaction_active(tx, store_name) { try { const request = tx.objectStore(store_name).get(0); request.onerror = e => { e.preventDefault(); e.stopPropagation(); }; return true; } catch (ex) { assert_equals(ex.name, 'TransactionInactiveError', 'Active check should either not throw anything, or throw ' + 'TransactionInactiveError'); return false; } } // Keeps the passed transaction alive indefinitely (by making requests // against the named store). Returns a function that asserts that the // transaction has not already completed and then ends the request loop so that // the transaction may autocommit and complete. function keep_alive(tx, store_name) { let completed = false; tx.addEventListener('complete', () => { completed = true; }); let keepSpinning = true; function spin() { if (!keepSpinning) return; tx.objectStore(store_name).get(0).onsuccess = spin; } spin(); return () => { assert_false(completed, 'Transaction completed while kept alive'); keepSpinning = false; }; } var db, t = async_test(); var open_rq = createdb(t); open_rq.onupgradeneeded = function(e) { db = e.target.result; var index = db.createObjectStore("test", { keyPath: "key" }) .createIndex("index", "indexedProperty"); assert_throws("DataError",function(){ index.getKey(NaN); }); t.done(); };
{ "pile_set_name": "Github" }
<?php /** * @package Joomla.Administrator * @subpackage com_fields * * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); $app = JFactory::getApplication(); $context = $app->getUserStateFromRequest( 'com_fields.groups.context', 'context', $app->getUserStateFromRequest('com_fields.fields.context', 'context', 'com_content.article', 'CMD'), 'CMD' ); $parts = FieldsHelper::extract($context); if (!$parts || !JFactory::getUser()->authorise('core.manage', $parts[0])) { throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $controller = JControllerLegacy::getInstance('Fields'); $controller->execute($app->input->get('task')); $controller->redirect();
{ "pile_set_name": "Github" }
# Trimmed lilac.py #!/usr/bin/env python3 from lilaclib import * import os #build_prefix = 'extra-x86_64' #post_build = aur_post_build _pkg_name = 'google-chrome' dotinstall = ''' note() { printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" } all_off="$(tput sgr0)" bold="${all_off}$(tput bold)" blue="${bold}$(tput setaf 4)" yellow="${bold}$(tput setaf 3)" post_install() { note "Custom flags should be put directly in: ~/.config/chrome-flags.conf" note "The launcher is called: 'google-chrome-stable'" } post_upgrade() { post_install } ''' def pre_build(): aur_pre_build() install_file = '%s.install' % _pkg_name try: os.unlink(install_file) except FileNotFoundError: return with open(install_file, 'wb') as f: f.write(dotinstall.encode()) #if __name__ == '__main__': # single_main(build_prefix) # vim: set ts=2 sw=2 et:
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="ButtonDeleteSecret" xml:space="preserve"> <value>Eliminar secreto del cliente</value> </data> <data name="NavigationClients" xml:space="preserve"> <value>Clientes</value> </data> <data name="NavigationClientSecrets" xml:space="preserve"> <value>Secretos del cliente</value> </data> <data name="PageTitle" xml:space="preserve"> <value>Eliminar secreto del cliente</value> </data> <data name="PanelTitle" xml:space="preserve"> <value>Eliminar secreto del cliente</value> </data> </root>
{ "pile_set_name": "Github" }
{\rtf1\adeflang1025\ansi\ansicpg1251\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1049\deflangfe1049\themelang1049\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;} {\f37\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbmajor\f31501\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset204\fprq2{\*\panose 02040503050406030204}Cambria;} {\fbimajor\f31503\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbminor\f31505\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset204\fprq2{\*\panose 020f0502020204030204}Calibri;} {\fbiminor\f31507\fbidi \froman\fcharset204\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f41\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} {\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} {\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f411\fbidi \fswiss\fcharset0\fprq2 Calibri;}{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} {\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);} {\flomajor\f31510\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} {\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} {\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31520\fbidi \froman\fcharset0\fprq2 Times New Roman;} {\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} {\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} {\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31530\fbidi \froman\fcharset0\fprq2 Cambria;}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;} {\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;} {\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31540\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} {\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} {\flominor\f31550\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} {\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} {\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31560\fbidi \froman\fcharset0\fprq2 Times New Roman;} {\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} {\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} {\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31570\fbidi \fswiss\fcharset0\fprq2 Calibri;}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} {\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} {\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31580\fbidi \froman\fcharset0\fprq2 Times New Roman;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} {\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} {\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; \red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22\lang1049\langfe1033\langfenp1033 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1 \widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 \widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}} {\*\rsidtbl \rsid134823\rsid1125132\rsid2174114\rsid5060129\rsid10168488\rsid10895748\rsid11344005\rsid13314855\rsid14566598\rsid14753222\rsid15539421\rsid15682901\rsid16332701}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0 \mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author dzhariy}{\operator dzhariy}{\creatim\yr2013\mo8\dy1\hr1\min46}{\revtim\yr2013\mo8\dy1\hr2\min59}{\version9}{\edmins73}{\nofpages1}{\nofwords348}{\nofchars1984}{\*\company Krokoz\'99} {\nofcharsws2328}{\vern49275}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw11906\paperh16838\margl1701\margr850\margt1134\margb1134\gutter0\ltrsect \deftab708\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1 \noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1134\dghshow1\dgvshow1 \jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct \asianbrkrule\rsidroot16332701\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 {\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 \pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 \pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1049\langfe1033\cgrid\langnp1049\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid15539421 SWD Page Recorder \par We are witnesses of the war on Test Automation fields between open source and proprietary tools. }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid10168488 While p}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid11344005 roprietary tools}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid11344005 may still }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid10168488 provide a comfortable environment with everything out of the box, the open source tools give you all the freedom choosing the IDE, design you own Test Framework architecture and develop own test automation approaches, using your programming language of choice.}{ \rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid10895748 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2174114 On both sides, there are beginners and professionals of Test Automation. While most of the beginners rely on Record&Play }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 tools or}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2174114 create }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 hand-written tests}{ \rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2174114 in }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2174114 Record&Play}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2174114 style \endash the professionals clearly understand the importance of reliable code with good and clean design. Prof essionals taking the most of the given tools and, yes, the can design a reliable framework even using BASIC programming language. }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid10168488 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 \par Page Objects vs Record and Play \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 Record&Play}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 is considered as a bad approach for writing the automated tests on both sides. Many appropriately tools, such as Ranorex or TestComplete uses UI Maps in order to create an abstraction level between Test Code and a real window or web-page. Sot that when a small change occurs on the page \endash then you should make appropriate corrections in the UI Map layer, but not in each test which used that changed button or HTML link. SilkTest and CodedUI generates classes in the source code that declare all the controls and can be extended with user-defined methods. }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid15682901 Such UI maps approach may improve the Recorded test a little bit, but still, the Recorded tests remains brittle and unmaintainable. }{ \rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid134823 On the other hand, PageObjects improve your test code by replacing the sequence of mouse clicks and key presses into smart application domain related actions. So, instead of writing \'93link click, text box type, link click\'94, you are writing: \par MainPage.GotoSearchPage(); \par SearchPage.Search(\'93book\'94); \par SearchPage.OpenFirstSearchResult()}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14566598 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid134823 Such approach makes your code more readable,}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid1125132 maintainable and less b rittle. As result, many professionals from Selenium world and outside build their frameworks using the PageObjects pattern. }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid13314855 \par Modern PageObject}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid1125132 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid13314855 Modern PageObjects separates Page Actions and Page Elements. Actions uses Page Elements in order \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid134823 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid10168488 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 The right tool}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid2174114 \par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222 In the open source world, test automation engineers use the same tools the developers do: web-browser\rquote s embedded }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1033\langfe1033\langnp1033\insrsid14753222\charrsid16332701 \par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a 9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad 5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b 4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b 4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100a55e7d2dc7060000d71b0000160000007468656d652f7468656d652f 7468656d65312e786d6cec59cf6e1b4518bf23f10ea3bdb7b113278da33a55ecd80db469a3d82dea71bc1eef4e33bbb39a1927f5ad4a8f482044411ca8045c38 2020528bb8b4efe03e43a0088ad457e09b99ddf54ebca1491b4105cd21de9dfd7dffffcc37bb172fdd8918da2542521e37bceaf98a8748ecf3018d838677a3d7 39b7ec21a9703cc08cc7a4e18d89f42eadbefbce45bca242121104f4b15cc10d2f542a59999b933e2c63799e27248667432e22ace05604730381f7806fc4e6e6 2b95a5b908d3d843318e80ede49bc94f93c79303747d38a43ef15633fe6d06426225f582cf4457732719d1d74ff72707932793479383a777e1fa09fc7e6c6807 3b554d21c7b2c504dac5ace181e801dfeb913bca430c4b050f1a5ec5fc7973ab17e7f04a4ac4d431b405ba8ef94be95282c1cebc9129827e2eb4daa9d52face7 fc0d80a9595cbbdd6eb5ab393f03c0be0f965b5d8a3c6b9de56a33e35900d9cb59deadca62a5e6e20bfc176674ae379bcdc57aaa8b656a40f6b236835fae2cd5 d6e61dbc0159fce20cbed65c6bb5961cbc0159fcd20cbe73a1be5473f10614321aefcca075403b9d947b0e1972b6510a5f06f87225854f51900d79b66911431e ab93e65e846f73d101024dc8b0a23152e3840cb10f89dec2515f50ac05e215820b4fec922f6796b46c247d4113d5f0de4f3014cd94df8bc7dfbf78fc101dee3f 3adcfff9f0debdc3fd1f2d23876a03c74191eaf9b79ffcf9e02efae3e157cfef7f568e9745fcaf3f7cf8cb934fcb81504e53759e7d7ef0dba383675f7cf4fb77 f74be06b02f78bf01e8d8844d7c81edae6111866bce26a4efae27414bd10d322c55a1c481c632da5847f5b850efada18b3343a8e1e4de27af0a680765206bc3c baed28dc0dc548d112c957c2c8016e72ce9a5c947ae18a965570736f1407e5c2c5a888dbc678b74c760bc74e7cdba304fa6a96968ee1ad90386a6e311c2b1c90 9828a49ff11d424aacbb45a9e3d74dea0b2ef950a15b1435312d75498ff69d6c9a126dd008e2322eb319e2edf866f3266a725666f53ad975915015989528df23 cc71e3653c52382a63d9c3112b3afc2a56619992ddb1f08bb8b65410e980308eda03226519cd7501f616827e0543072b0dfb261b472e5228ba53c6f32ae6bc88 5ce73bad10474919b64be3b0887d4fee408a62b4c555197c93bb15a2ef210e383e36dc372971c2fdf26e7083068e4ad304d14f46a22496970977f2b73b66434c 4cab8126eff4ea88c67fd7b81985ce6d259c5de38656f9eccb07257abfa92d7b0d76afb29ad938d2a88fc31d6dcf2d2e06f4cdefceeb78146f112888d92dea6d 737edb9cbdff7c733eae9ecfbe254fbb3034683d8bd8c1db8ce1d189a7f02165acabc68c5c95661097b0170d3ab0a8f998432ac94f69490897bab241a0830b04 36344870f501556137c4090cf1554f330964ca3a9028e1120e9366b994b7c6c34140d9a3e8a23ea4d84e22b1dae403bbbca097b3b348cec66815980370266841 3338a9b0850b2953b0ed558455b55227965635aa9926e948cb4dd62e36877870796e1a2ce6de842107c168045e5e82d7045a341c7e302303ed771ba32c2c260a 67192219e2014963a4ed9e8d51d50429cb951943b41d3619f4c1f2255e2b48ab6bb6af21ed24412a8aab1d232e8bdeeb4429cbe0699480dbd1726471b138598c f61a5e7d717ed1433e4e1ade10cecd7019251075a9e74acc02783fe52b61d3fea5c56caa7c1acd7a66985b0455783562fd3e63b0d3071221d53a96a14d0df328 4d01166b4956fff94570eb591950d28d4ea6c5c23224c3bfa605f8d10d2d190e89af8ac12eac68dfd9dbb495f29122a21b0ef6509f8dc43686f0eb54057b0654 c2eb0fd311f40dbcbbd3de368fdce69c165df18d99c1d975cc9210a7ed56976856c9166e1a52ae83b92ba807b695ea6e8c3bbd29a6e4cfc894621affcf4cd1fb 09bc8d5818e808f8f0365960a42ba5e171a1420e5d2809a9df11304898de01d902ef7fe1312415bcd336bf82ecea5f5b739687296b3854aa6d1a2041613f52a1 20640bda92c9be9730aba67b9765c9524626a30aeacac4aadd27bb84f5740f5cd27bbb87424875d34dd236607047f3cfbd4f2ba81fe821a7586f4e27cbf75e5b 03fff4e4638b198c72fbb0196832ffe72ae6e3c17457b5f4863cdb7b8b86e807d331ab965505082b6c05f5b4ec5f5185536eb5b663cd583cbf982907519cb518 16f3812881774a48ff83fd8f0a9fd9af237a43edf16de8ad083e6e6866903690d5e7ece0817483b48b7d189ceca24d26cdcaba361d9db4d7b2cdfa8c27dd5cee 11676bcd4e12ef533a3b1fce5c714e2d9ea5b3530f3bbeb66bc7ba1a227bb4446169981d6c4c60cc97b5e2972fdebf0d815e876f0823a6a44926f88e2530ccd0 5d530750fc56a2215dfd0b0000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c73 2f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761 be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f9 80ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca 5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000000000005b436f6e7465 6e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c73 2f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468656d652f7468656d652f 7468656d654d616e616765722e786d6c504b01022d0014000600080000002100a55e7d2dc7060000d71b00001600000000000000000000000000d60200007468 656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b0100002700000000000000000000000000d10900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000cc0a00000000} {\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d 617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} {\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9; \lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7; \lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font; \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; \lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; \lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid; \lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1; \lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2; \lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading; \lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1; \lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1; \lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision; \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; \lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; \lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; \lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2; \lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; \lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; \lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; \lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2; \lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3; \lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; \lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3; \lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3; \lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3; \lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4; \lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; \lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4; \lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; \lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5; \lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5; \lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; \lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5; \lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5; \lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6; \lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6; \lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6; \lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6; \lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6; \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference; \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000 4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000003034 df094a8ece01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000105000000000000}}
{ "pile_set_name": "Github" }
{ "extends": "dtslint/dt.json", "rules": { "no-unnecessary-generics": false, "unified-signatures": false } }
{ "pile_set_name": "Github" }
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> <PropertyGroup> <TargetFramework>net5.0</TargetFramework> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-preview.7.*" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0-preview.7.*" /> <Watch Include="**\*.cshtml" /> <Watch Include="**\*.razor" /> </ItemGroup> </Project>
{ "pile_set_name": "Github" }
// // projection_facor.hpp // VINS_ios // // Created by HKUST Aerial Robotics on 2016/10/22. // Copyright © 2017 HKUST Aerial Robotics. All rights reserved. // #ifndef projection_facor_hpp #define projection_facor_hpp #include <stdio.h> #include <ceres/ceres.h> #include <Eigen/Dense> #include "utility.hpp" class ProjectionFactor : public ceres::SizedCostFunction<2, 7, 7, 7, 1> { public: ProjectionFactor(const Eigen::Vector3d &_pts_i, const Eigen::Vector3d &_pts_j); virtual bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const; Eigen::Vector3d pts_i, pts_j; static Eigen::Matrix2d sqrt_info; static double sum_t; }; #endif /* projection_facor_hpp */
{ "pile_set_name": "Github" }
# What is Solr? Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites. Learn more on [Apache Solr homepage](http://lucene.apache.org/solr/) and in the [Apache Solr Reference Guide](https://www.apache.org/dyn/closer.cgi/lucene/solr/ref-guide/). %%LOGO%% # How to use this Docker image To run a single Solr server: ```console $ docker run -p 8983:8983 -t %%IMAGE%% ``` Then with a web browser go to http://localhost:8983/ to see the Solr Admin Console. For more detailed instructions for using this image, see the [README](https://github.com/docker-solr/docker-solr/blob/master/README.md). # About this repository This repository is available on [github.com/docker-solr/docker-solr](https://github.com/docker-solr/docker-solr), and the official build is on the [Docker Hub](https://hub.docker.com/_/solr/). # History This project was started in 2015 by [Martijn Koster](https://github.com/makuk66). In 2019 maintainership and copyright was transferred to the Apache Lucene/Solr project. Many thanks to Martijn for all your contributions over the years!
{ "pile_set_name": "Github" }
define( "dojox/atom/widget/nls/th/FeedEntryViewer", ({ displayOptions: "[แสดงอ็อพชัน]", title: "หัวเรื่อง", authors: "ผู้เขียน", contributors: "ผู้ร่วมให้ข้อมูล", id: "ID", close: "[ปิด]", updated: "อัพเดต", summary: "ยอดรวม", content: "เนื้อหา" }) );
{ "pile_set_name": "Github" }
html { background: #f0f0f0; } #page { min-height: 100vh; background: #fff; box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1); } #header { display: grid; grid-template-columns: auto auto; align-items: center; padding: 10px; } @media (min-width: 768px) { #header { padding: 20px; } } @media (min-width: 992px) { #header { grid-template-columns: 300px auto 300px; } } #header .logotype img { max-width: 200px; } @media (min-width: 400px) { #header .logotype img { max-width: 100%; max-height: 80px; } } #region { background: #f0f0f0; border-bottom: 1px solid #fff; border-collapse: collapse; border-radius: 4px; border-right: 1px solid #fff; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); color: #333; display: inline-block; font-size: 0.95em; padding: 5px 10px; } #region .currency { cursor: default; padding: 0; } #region .currency span { background: #e3ece0; border-bottom: 1px solid #fff; border-left: 1px solid #d1d1d1; border-right: 1px solid #fff; border-top: 1px solid #d1d1d1; padding: 1px 5px; } #region .country { cursor: default; } #region .change { padding-left: 0; } #region > div { display: inline-block; padding: 5px 5px; vertical-align: middle; } #cart { display: inline-block; } #cart > a { position: relative; display: flex; align-items: center; padding: 4px; border: 1px transparent solid; border-radius: 4px; color: inherit; white-space: nowrap; } #cart > a:hover { border-color: rgba(0, 0, 0, 0.1); text-decoration: none; } #cart img { max-width: 50px; max-height: 50px; } #cart .badge { background: red; border-radius: 1.25rem; padding: 0.25rem; display: inline-block; text-align: center; color: #fff; font-size: 0.75em; position: absolute; right: 0; top: 1em; width: 2em; animation: pulsating 1.5s linear infinite; } #cart .badge:empty { display: none; } @media (max-width: 767px) { #cart .details { display: none; } } #site-menu { margin: 0 10px 20px 10px; } @media (min-width: 768px) { #site-menu { margin: 0 20px 20px 20px; } } @media (max-width: 767px) { #site-menu { position: sticky; top: 0; z-index: 999; font-size: 1.25em; } } #cookies-acceptance { /*position: sticky;*/ top: 0; z-index: 999; margin: 0 10px 0 10px; background: rgba(255, 255, 255, 0.9); border: 1px rgba(0, 0, 0, 0.1) solid; border-top: none; border-radius: 0 0 4px 4px; padding: 10px; text-align: center; } @media (min-width: 768px) { #cookies-acceptance { margin: 0 20px 0 20px; padding: 10px 20px; } } #main { padding: 0 10px 20px 10px; } @media (min-width: 768px) { #main { padding: 0 20px 20px 20px; display: grid; grid-template-columns: max-content; grid-template-areas: 'sidebar content'; grid-template-rows: 1fr; } } #sidebar { position: relative; } @media (min-width: 768px) { #sidebar { width: 300px; margin-right: 20px; } #sidebar > *:first-child { margin-top: 0; } } #content { grid-area: content; grid-gap: 10px; } @media (min-width: 768px) { #content { grid-gap: 20px; } } #footer { padding: 0 10px 20px 10px; } @media (min-width: 768px) { #footer { padding: 0 20px 20px 20px; } } #footer .columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-gap: 15px; } @media (min-width: 768px) { #footer .columns { grid-template-columns: repeat(4, 1fr); } } @media (min-width: 992px) { #footer .columns { grid-template-columns: repeat(5, 1fr); } } #footer * { color: #333; } #footer a:hover { color: #2e9cd4; } #footer .title { font-size: 1.5em; margin: 0 0 0.75em 0; } #footer ul.list-vertical li { padding: 0; } #copyright .notice { color: #333; padding: 20px; text-align: center; } #scroll-up { bottom: 30px; display: none; height: 48px; opacity: 0.3; position: fixed; right: 30px; width: 48px; } /* Boxes */ .box { margin: 20px 0; } .box.white { margin: 20px; padding: 20px; border-radius: 4px; background: #fff; } .box.border { margin: 20px; padding: 20px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 4px; } .box > .title { margin-top: 0; } @media (min-width: 992px) { #box-also-purchased-products { position: sticky; top: 0; } } #box-information li a { color: inherit; line-height: 175%; } #box-information li a.active { color: #2e9cd4; } #box-information li a:hover { color: #2e9cd4; } #box-filter .manufacturers ul { max-height: 200px; overflow-y: auto; } #box-recently-viewed-products .listing { grid-template-columns: repeat(auto-fit, minmax(48px, 0.5fr)); } .listing { display: grid; } .listing.products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-gap: 10px; } @media (min-width: 768px) { .listing.products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-gap: 20px; } } .listing.categories { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-gap: 10px; } @media (min-width: 768px) { .listing.categories { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); grid-gap: 20px; } } .listing h1, .listing h2, .listing h3 { padding-bottom: 0; border: none; } .listing a { color: inherit; text-decoration: none; } .listing .category, .listing .manufacturer, .listing .product-column, .listing .product-row { position: relative; overflow: hidden; background: #fff; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 4px; transform: scale(1); transition: all 100ms linear; color: inherit; text-decoration: none; } @media (min-width: 768px) { .listing .category:hover, .listing .manufacturer:hover, .listing .product-column:hover, .listing .product-row:hover { box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.15); transform: scale(1.01); } } .listing .category .caption { background: #f2f2f2; padding: 10px 20px; color: #333; text-align: center; } .listing .category .caption * { color: inherit; margin: 0; } .listing .manufacturer img { width: 100%; height: auto; padding: 10px; } .listing .manufacturer .caption { margin: 0; padding: 10px; background: #f2f2f2; color: #333; text-align: center; } .listing .product-column, .listing .product-row { position: relative; } .listing .product-column .link, .listing .product-row .link { text-decoration: none; } .listing .product-column .image-wrapper, .listing .product-row .image-wrapper { background: #fff; } .listing .product-column .image-wrapper .sticker, .listing .product-row .image-wrapper .sticker { position: absolute; top: 20px; left: -32px; width: 125px; padding: 5px 10px; color: #fff; font-size: 12px; font-weight: bold; text-align: center; text-transform: uppercase; transform: rotate(-45deg); } .listing .product-column .image-wrapper .sticker.new, .listing .product-row .image-wrapper .sticker.new { background: rgba(251, 184, 41, 0.9); } .listing .product-column .image-wrapper .sticker.sale, .listing .product-row .image-wrapper .sticker.sale { background: rgba(237, 60, 50, 0.9); } .listing .product-column .name, .listing .product-row .name { display: flex; justify-content: center; align-content: center; flex-direction: column; height: 40px; font-size: 1em; font-weight: 400; line-height: 115%; border-bottom: 0; margin: 0; } .listing .product-column .manufacturer-name, .listing .product-row .manufacturer-name { color: #737373; font-size: 0.9em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 200%; } .listing .product-column .price-wrapper, .listing .product-row .price-wrapper { font-size: 1.25em; } .listing .product-column .price-wrapper .price, .listing .product-row .price-wrapper .price { font-weight: bold; color: #333; white-space: nowrap; } .listing .product-column .price-wrapper .regular-price, .listing .product-row .price-wrapper .regular-price { color: #333; font-size: 0.75em; font-weight: normal; white-space: nowrap; } .listing .product-column .price-wrapper .campaign-price, .listing .product-row .price-wrapper .campaign-price { font-weight: bold; color: #cc0000; white-space: nowrap; } .listing .product-column .preview, .listing .product-row .preview { margin: 0 -1px -1px -1px; display: none; position: absolute; top: 7.5px; right: 7.5px; box-shadow: none; } @media (min-width: 768px) { .listing .product-column:hover .preview, .listing .product-row:hover .preview { display: inline-block; } } .listing .product-column .image { width: 100%; height: auto; } .listing .product-column .info { padding: 10px; text-align: center; } .listing .product-column .price-wrapper { position: initial; } .listing .product-row { grid-column: span 4; height: 175px; } .listing .product-row .info { position: absolute; top: 0; left: 120px; padding: 10px; } @media (min-width: 768px) { .listing .product-row .info { left: 180px; } } .listing .product-row .image-wrapper { display: inline-block; } .listing .product-row .image { max-width: 100px; } @media (min-width: 768px) { .listing .product-row .image { max-width: 160px; } } .listing .product-row .price-wrapper { position: absolute; bottom: 0; right: 0; font-size: 1.25em; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 20%, #ffffff 100%); padding: 10px; padding-left: 40px; } @media (min-width: 768px) { .listing .product-row { height: auto; } .listing .product-row .description { margin-top: 20px; } } #view-full-page { float: right; display: inline-block; padding: 10px 20px; } #box-product .images { margin-bottom: 40px; } #box-product .main-image { position: relative; overflow: hidden; } #box-product .main-image .sticker { color: #fff; font-size: 12px; font-weight: bold; top: 15px; left: -35px; padding: 5px 10px; position: absolute; text-align: center; text-transform: uppercase; transform: rotate(-45deg); width: 140px; } #box-product .main-image .sticker.new { background: rgba(251, 184, 41, 0.85); } #box-product .main-image .sticker.sale { background: rgba(237, 60, 50, 0.85); } #box-product .price-wrapper { font-size: 1.75em; } #box-product .regular-price { font-size: 0.75em; } #box-product .campaign-price { color: #cc0000; } #box-product .tax { color: #999999; } #box-product .stock-available .value { color: #009900; } #box-product .stock-partly-available .value { color: #ff9900; } #box-product .stock-unavailable .value { color: #cc0000; } #box-product .social-bookmarks { font-size: 1.75em; margin: 20px 0; } #box-product .description p:first-child { margin-top: 0; } #box-product .description p:last-child { margin-bottom: 0; } #box-product .technical-data table { -webkit-column-break-inside: avoid; -moz-column-break-inside: avoid; break-inside: avoid-column; } #box-product .technical-data table td:first-child { width: 50%; } @media (min-width: 768px) { #box-product .technical-data { columns: auto 2; } }
{ "pile_set_name": "Github" }
<?php /* +--------------------------------------------------------------------+ | Copyright CiviCRM LLC. All rights reserved. | | | | This work is published under the GNU AGPLv3 license with some | | permitted exceptions and without any warranty. For full license | | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ */ /** * * @package CRM * @copyright CiviCRM LLC https://civicrm.org/licensing */ /** * Form helper class for an Phone object. */ class CRM_Contact_Form_Inline_Phone extends CRM_Contact_Form_Inline { /** * Phones of the contact that is been viewed * @var array */ private $_phones = []; /** * No of phone blocks for inline edit * @var int */ private $_blockCount = 6; /** * Call preprocess. */ public function preProcess() { parent::preProcess(); //get all the existing phones $phone = new CRM_Core_BAO_Phone(); $phone->contact_id = $this->_contactId; $this->_phones = CRM_Core_BAO_Block::retrieveBlock($phone, NULL); } /** * Build the form object elements for phone object. */ public function buildQuickForm() { parent::buildQuickForm(); $totalBlocks = $this->_blockCount; $actualBlockCount = 1; if (count($this->_phones) > 1) { $actualBlockCount = $totalBlocks = count($this->_phones); if ($totalBlocks < $this->_blockCount) { $additionalBlocks = $this->_blockCount - $totalBlocks; $totalBlocks += $additionalBlocks; } else { $actualBlockCount++; $totalBlocks++; } } $this->assign('actualBlockCount', $actualBlockCount); $this->assign('totalBlocks', $totalBlocks); $this->applyFilter('__ALL__', 'trim'); for ($blockId = 1; $blockId < $totalBlocks; $blockId++) { CRM_Contact_Form_Edit_Phone::buildQuickForm($this, $blockId, TRUE); } $this->addFormRule(['CRM_Contact_Form_Inline_Phone', 'formRule']); } /** * Global validation rules for the form. * * @param array $fields * Posted values of the form. * @param array $errors * List of errors to be posted back to the form. * * @return array */ public static function formRule($fields, $errors) { $hasData = $hasPrimary = $errors = []; if (!empty($fields['phone']) && is_array($fields['phone'])) { $primaryID = NULL; foreach ($fields['phone'] as $instance => $blockValues) { $dataExists = CRM_Contact_Form_Contact::blockDataExists($blockValues); if ($dataExists) { $hasData[] = $instance; if (!empty($blockValues['is_primary'])) { $hasPrimary[] = $instance; if (!$primaryID && !empty($blockValues['phone'])) { $primaryID = $blockValues['phone']; } } } } if (empty($hasPrimary) && !empty($hasData)) { $errors["phone[1][is_primary]"] = ts('One phone should be marked as primary.'); } if (count($hasPrimary) > 1) { $errors["phone[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one phone can be marked as primary.'); } } return $errors; } /** * Set defaults for the form. * * @return array */ public function setDefaultValues() { $defaults = []; if (!empty($this->_phones)) { foreach ($this->_phones as $id => $value) { $defaults['phone'][$id] = $value; } } else { // get the default location type $locationType = CRM_Core_BAO_LocationType::getDefault(); $defaults['phone'][1]['location_type_id'] = $locationType->id; } return $defaults; } /** * Process the form. */ public function postProcess() { $params = $this->exportValues(); // Process / save phones $params['contact_id'] = $this->_contactId; $params['updateBlankLocInfo'] = TRUE; $params['phone']['isIdSet'] = TRUE; foreach ($this->_phones as $count => $value) { if (!empty($value['id']) && isset($params['phone'][$count])) { $params['phone'][$count]['id'] = $value['id']; } } CRM_Core_BAO_Block::create('phone', $params); $this->log(); $this->response(); } }
{ "pile_set_name": "Github" }
--- layout: base title: 'Statistics of PART in UD_Marathi-UFAL' udver: '2' --- ## Treebank Statistics: UD_Marathi-UFAL: POS Tags: `PART` There are 6 `PART` lemmas (1%), 1 `PART` types (0%) and 47 `PART` tokens (1%). Out of 15 observed tags, the rank of `PART` is: 15 in number of lemmas, 15 in number of types and 12 in number of tokens. The 10 most frequent `PART` lemmas: <em>ही, च, च्या, चा, तरी, सुद्धा</em> The 10 most frequent `PART` types: <em>_</em> The 10 most frequent ambiguous lemmas: <em>च्या</em> (<tt><a href="mr_ufal-pos-PART.html">PART</a></tt> 9, <tt><a href="mr_ufal-pos-ADP.html">ADP</a></tt> 4), <em>चा</em> (<tt><a href="mr_ufal-pos-ADP.html">ADP</a></tt> 161, <tt><a href="mr_ufal-pos-PART.html">PART</a></tt> 1), <em>तरी</em> (<tt><a href="mr_ufal-pos-SCONJ.html">SCONJ</a></tt> 3, <tt><a href="mr_ufal-pos-ADV.html">ADV</a></tt> 2, <tt><a href="mr_ufal-pos-PART.html">PART</a></tt> 1) The 10 most frequent ambiguous types: <em>_</em> (<tt><a href="mr_ufal-pos-ADP.html">ADP</a></tt> 290, <tt><a href="mr_ufal-pos-NOUN.html">NOUN</a></tt> 176, <tt><a href="mr_ufal-pos-PRON.html">PRON</a></tt> 111, <tt><a href="mr_ufal-pos-PART.html">PART</a></tt> 47, <tt><a href="mr_ufal-pos-VERB.html">VERB</a></tt> 20, <tt><a href="mr_ufal-pos-PROPN.html">PROPN</a></tt> 15, <tt><a href="mr_ufal-pos-ADJ.html">ADJ</a></tt> 6, <tt><a href="mr_ufal-pos-DET.html">DET</a></tt> 4, <tt><a href="mr_ufal-pos-NUM.html">NUM</a></tt> 4, <tt><a href="mr_ufal-pos-AUX.html">AUX</a></tt> 1) * <em>_</em> * <tt><a href="mr_ufal-pos-ADP.html">ADP</a></tt> 290: <em>" त्या _ <b>_</b> का कोणी हजार रुपये देईल ? "</em> * <tt><a href="mr_ufal-pos-NOUN.html">NOUN</a></tt> 176: <em>" त्या <b>_</b> _ का कोणी हजार रुपये देईल ? "</em> * <tt><a href="mr_ufal-pos-PRON.html">PRON</a></tt> 111: <em>" न्याय <b>_</b> _ हातात असतो , भीमा . "</em> * <tt><a href="mr_ufal-pos-PART.html">PART</a></tt> 47: <em>_ _ <b>_</b> जमीन आहे , असा त्याने निर्णय दिला .</em> * <tt><a href="mr_ufal-pos-VERB.html">VERB</a></tt> 20: <em>तेथे फक्त गरिबांना <b>_</b> _ बंदी होती .</em> * <tt><a href="mr_ufal-pos-PROPN.html">PROPN</a></tt> 15: <em>न्यायाधीशाने <b>_</b> _ मालकी काढून घेतली .</em> * <tt><a href="mr_ufal-pos-ADJ.html">ADJ</a></tt> 6: <em><b>_</b> <b>_</b> , निष्पाप दिसत होती .</em> * <tt><a href="mr_ufal-pos-DET.html">DET</a></tt> 4: <em>काही अंतर चालून _ _ मागून <b>_</b> _ माणूस येत आहे , असे त्याला वाटले .</em> * <tt><a href="mr_ufal-pos-NUM.html">NUM</a></tt> 4: <em>_ _ _ _ _ _ <b>_</b> <b>_</b> _ _ शेकडो मोठमोठी माणसे येणार होती .</em> * <tt><a href="mr_ufal-pos-AUX.html">AUX</a></tt> 1: <em>कुशल प्रश्न <b>_</b> _ राजा म्हणाला , _ _ पत्नी फार लावण्यवती आहे असे ऐकतो .</em> ## Morphology The form / lemma ratio of `PART` is 0.166667 (the average of all parts of speech is 1.339869). The 1st highest number of forms (1) was observed with the lemma “च”: <em>_</em>. The 2nd highest number of forms (1) was observed with the lemma “चा”: <em>_</em>. The 3rd highest number of forms (1) was observed with the lemma “च्या”: <em>_</em>. `PART` does not occur with any features. ## Relations `PART` nodes are attached to their parents using 2 different relations: <tt><a href="mr_ufal-dep-discourse.html">discourse</a></tt> (36; 77% instances), <tt><a href="mr_ufal-dep-case.html">case</a></tt> (11; 23% instances) Parents of `PART` nodes belong to 7 different parts of speech: <tt><a href="mr_ufal-pos-PRON.html">PRON</a></tt> (19; 40% instances), <tt><a href="mr_ufal-pos-NOUN.html">NOUN</a></tt> (15; 32% instances), <tt><a href="mr_ufal-pos-ADJ.html">ADJ</a></tt> (4; 9% instances), <tt><a href="mr_ufal-pos-DET.html">DET</a></tt> (4; 9% instances), <tt><a href="mr_ufal-pos-VERB.html">VERB</a></tt> (3; 6% instances), <tt><a href="mr_ufal-pos-ADP.html">ADP</a></tt> (1; 2% instances), <tt><a href="mr_ufal-pos-PROPN.html">PROPN</a></tt> (1; 2% instances) 47 (100%) `PART` nodes are leaves. The highest child degree of a `PART` node is 0.
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>The Chaos Engine - Computer virus engines (VX heaven)</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="Author" content=""/> <meta name="KeyWords" lang="en" content="computer virus, virus, virii,vx, компьютерные вирусы, вирус, вири"/> <meta name="Description" content="VX Heaven site is dedicted to providing information about computer viruses (virii) and web space for virus authors and groups"/> <script type="text/javascript"> //<![CDATA[ try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok3v=1613a3a185/"},atok:"047a5bcbf67431883fc9ed25fba33612",petok:"35e39a7ed035f93d6203cb9670b6456acb6b2ae2-1498759768-1800",zone:"vxheaven.org",rocket:"a",apps:{}}];document.write('<script type="text/javascript" src="//ajax.cloudflare.com/cdn-cgi/nexp/dok3v=85b614c0f6/cloudflare.min.js"><'+'\/script>');}}catch(e){}; //]]> </script> <link rel="icon" href="/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/> <link rel="stylesheet" type="text/css" href="/style.css"/> <script type="text/rocketscript" data-rocketsrc="https://apis.google.com/js/plusone.js">{"parsetags": "explicit"}</script> </head> <body bgcolor="#dbc8a0" text="#302000" link="#225599" vlink="#113366"> <div class="s1"> <h1><a href="/" style="text-decoration: none; color: #000000;">VX Heaven</a></h1> <span class="nav"><a href="/lib/">Library</a> <a href="/vl.php">Collection</a> <a href="/src.php">Sources</a> <a href="/vx.php?id=eidx">Engines</a> <a href="/vx.php?id=tidx">Constructors</a> <a href="/vx.php?id=sidx">Simulators</a> <a href="/vx.php?id=uidx">Utilities</a> <a href="/links.php">Links</a> <a href="/donate.php" style="color: #706020" id="donate">Donate</a> <a href="/forum" style="text-decoration: underline;">Forum</a> </span><br clear="all"/> </div> <div><div style="float:right;"><a href="/vx.php?tbs=0"><img src="/img/min.gif" alt="Minimize"/></a></div> <form id="lf" style="margin: 0; float: right;" method="get" action="/index.php"><input type="hidden" name="action" value="set"/><select name="lang" onchange="javascript:document.getElementById('lf').submit();"><option value="ru">Русский</option><option selected="selected" value="en">English</option><option value="ua">Українська</option><option value="de">Deutsch</option><option value="es">Español</option><option value="fr">Fran&ccedil;ais</option><option value="it">Italiano</option><option value="pl">Polski</option></select></form> <div style="float: right;"><div id="plusone"></div></div> <script type="text/rocketscript">gapi.plusone.render("plusone", {"size":"small","count":"true"});</script> <div style="float: right;" class="addthis_toolbox addthis_default_style"> <script type="text/rocketscript">var addthis_config = { ui_click: true }</script> <a style="text-decoration: none; font-size: 10pt;" href="/?action=addthis" class="addthis_button_compact">Bookmark</a> <script type="text/rocketscript" data-rocketsrc="http://s7.addthis.com/js/250/addthis_widget.js#username=herm1t"></script> </div> <div style="float: left;"> <script type="text/rocketscript" data-rocketsrc="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script> <form action="/search.php" id="cse-search-box"> <input type="hidden" name="cx" value="002577580816726040001:z9_irkorydo"/> <input type="hidden" name="cof" value="FORID:10"/> <input type="hidden" name="ie" value="UTF-8"/> <input type="text" name="q" size="32" value=" "/> <input type="submit" name="sa" value="Search"/> </form> </div><br clear="both"/></div> <div class="s2"> [<a href="/vx.php?id=ec12">Previous</a>] [<a href="/vx.php?id=eidx">Index</a>] [<a href="/vx.php?id=ec06">Next</a>] <h1>The Chaos Engine</h1><p><strong>Author: Sepultura</strong></p><br clear="all"/><script type="text/rocketscript">var disqus_url = 'http://vxheaven.org/vx.php?id=ec01';</script><a href="/vx.php?id=ec01#disqus_thread">Comments</a><br/><div style="float:left;"><div style="float: left;"><strong>Download</strong></div><br clear="all"/><table cellspacing="0" cellpadding="0" border="1"><tr bgcolor="#aaa999"><th>&nbsp;</th><th>Filename</th><th>Size</th><th>Description</th><th>Date</th><th>&nbsp;</th></tr><tr bgcolor="#cccbbb"><td><form class="fr" method="post" action="/file.php"><input type="image" src="/img/dl.gif" alt="Download"/><input type="hidden" name="file" value="cGxlL3RjZS56aXA@"/></form></td><td><a name="f547"></a><small><a href="/dl/ple/tce.zip">tce.zip</a></small></td><td><small>4959</small></td><td><small>[TCE 0.4]</small></td><td><small>Dec 1995</small></td><td><small style="float: right; font-family: fixed;">MD5 sum a7bf9db1c4eadf25359ed2fc2b5170c9</small></td></tr></table></div><br clear="all"/><br/><div class="s2"> <div id="disqus_thread"></div> <script type="text/rocketscript"> /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_shortname = 'vxheaven'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript></div> <div><small>By accessing, viewing, downloading or otherwise using this content you agree to be bound by the <a href="/agreement.php">Terms of Use</a>!</small> <small>vxheaven.org aka vx.netlux.org</small></div> <div style="margin-top: 2px; float: left;" class="adsapeu"> <script type="text/rocketscript"> <!-- var _acic={dataProvider:10};(function(){var e=document.createElement("script");e.type="text/javascript";e.async=true;e.src="//www.acint.net/aci.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})() //--> </script> </div> <script data-rocketsrc="http://www.google-analytics.com/urchin.js" type="text/rocketscript"></script><script type="text/rocketscript">try { _uacct = "UA-590608-1"; urchinTracker(); } catch(err) {}</script> <div style="display: none;"><a href="/vx.php?lang=de&amp;id=ec01">de</a><a href="/vx.php?lang=en&amp;id=ec01">en</a><a href="/vx.php?lang=es&amp;id=ec01">es</a><a href="/vx.php?lang=it&amp;id=ec01">it</a><a href="/vx.php?lang=fr&amp;id=ec01">fr</a><a href="/vx.php?lang=pl&amp;id=ec01">pl</a><a href="/vx.php?lang=ru&amp;id=ec01">ru</a><a href="/vx.php?lang=ua&amp;id=ec01">ua</a></div> </body> </html>
{ "pile_set_name": "Github" }
<?php namespace Psr\Http\Message; /** * HTTP messages consist of requests from a client to a server and responses * from a server to a client. This interface defines the methods common to * each. * * Messages are considered immutable; all methods that might change state MUST * be implemented such that they retain the internal state of the current * message and return an instance that contains the changed state. * * @link http://www.ietf.org/rfc/rfc7230.txt * @link http://www.ietf.org/rfc/rfc7231.txt */ interface MessageInterface { /** * Retrieves the HTTP protocol version as a string. * * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). * * @return string HTTP protocol version. */ public function getProtocolVersion(); /** * Return an instance with the specified HTTP protocol version. * * The version string MUST contain only the HTTP version number (e.g., * "1.1", "1.0"). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new protocol version. * * @param string $version HTTP protocol version * @return static */ public function withProtocolVersion($version); /** * Retrieves all message header values. * * The keys represent the header name as it will be sent over the wire, and * each value is an array of strings associated with the header. * * // Represent the headers as a string * foreach ($message->getHeaders() as $name => $values) { * echo $name . ": " . implode(", ", $values); * } * * // Emit headers iteratively: * foreach ($message->getHeaders() as $name => $values) { * foreach ($values as $value) { * header(sprintf('%s: %s', $name, $value), false); * } * } * * While header names are not case-sensitive, getHeaders() will preserve the * exact case in which headers were originally specified. * * @return string[][] Returns an associative array of the message's headers. Each * key MUST be a header name, and each value MUST be an array of strings * for that header. */ public function getHeaders(); /** * Checks if a header exists by the given case-insensitive name. * * @param string $name Case-insensitive header field name. * @return bool Returns true if any header names match the given header * name using a case-insensitive string comparison. Returns false if * no matching header name is found in the message. */ public function hasHeader($name); /** * Retrieves a message header value by the given case-insensitive name. * * This method returns an array of all the header values of the given * case-insensitive header name. * * If the header does not appear in the message, this method MUST return an * empty array. * * @param string $name Case-insensitive header field name. * @return string[] An array of string values as provided for the given * header. If the header does not appear in the message, this method MUST * return an empty array. */ public function getHeader($name); /** * Retrieves a comma-separated string of the values for a single header. * * This method returns all of the header values of the given * case-insensitive header name as a string concatenated together using * a comma. * * NOTE: Not all header values may be appropriately represented using * comma concatenation. For such headers, use getHeader() instead * and supply your own delimiter when concatenating. * * If the header does not appear in the message, this method MUST return * an empty string. * * @param string $name Case-insensitive header field name. * @return string A string of values as provided for the given header * concatenated together using a comma. If the header does not appear in * the message, this method MUST return an empty string. */ public function getHeaderLine($name); /** * Return an instance with the provided value replacing the specified header. * * While header names are case-insensitive, the casing of the header will * be preserved by this function, and returned from getHeaders(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new and/or updated header and value. * * @param string $name Case-insensitive header field name. * @param string|string[] $value Header value(s). * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withHeader($name, $value); /** * Return an instance with the specified header appended with the given value. * * Existing values for the specified header will be maintained. The new * value(s) will be appended to the existing list. If the header did not * exist previously, it will be added. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new header and/or value. * * @param string $name Case-insensitive header field name to add. * @param string|string[] $value Header value(s). * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withAddedHeader($name, $value); /** * Return an instance without the specified header. * * Header resolution MUST be done without case-sensitivity. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that removes * the named header. * * @param string $name Case-insensitive header field name to remove. * @return static */ public function withoutHeader($name); /** * Gets the body of the message. * * @return StreamInterface Returns the body as a stream. */ public function getBody(); /** * Return an instance with the specified message body. * * The body MUST be a StreamInterface object. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return a new instance that has the * new body stream. * * @param StreamInterface $body Body. * @return static * @throws \InvalidArgumentException When the body is not valid. */ public function withBody(StreamInterface $body); }
{ "pile_set_name": "Github" }
{ "config": { "abort": { "not_internet_accessible": "Instan\u021ba Home Assistant trebuie s\u0103 fie accesibil\u0103 de pe internet pentru a primi mesaje IFTTT.", "one_instance_allowed": "Este necesar\u0103 o singur\u0103 instan\u021b\u0103." }, "step": { "user": { "description": "Sigur dori\u021bi s\u0103 configura\u021bi IFTTT?" } } } }
{ "pile_set_name": "Github" }
package com.hedera.hashgraph.sdk.crypto; import com.hedera.hashgraph.sdk.Internal; import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.nist.NISTObjectIdentifiers; import org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo; import org.bouncycastle.asn1.pkcs.EncryptionScheme; import org.bouncycastle.asn1.pkcs.KeyDerivationFunc; import org.bouncycastle.asn1.pkcs.PBES2Parameters; import org.bouncycastle.asn1.pkcs.PBKDF2Params; import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; import org.bouncycastle.asn1.x509.AlgorithmIdentifier; import org.bouncycastle.crypto.params.KeyParameter; import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo; import org.bouncycastle.util.io.pem.PemObject; import org.bouncycastle.util.io.pem.PemReader; import org.bouncycastle.util.io.pem.PemWriter; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.Reader; import java.io.Writer; import java.security.AlgorithmParameters; import java.security.NoSuchAlgorithmException; import javax.annotation.Nullable; import javax.crypto.Cipher; @Internal public final class PemUtils { public static final String TYPE_PRIVATE_KEY = "PRIVATE KEY"; public static final String TYPE_ENCRYPTED_PRIVATE_KEY = "ENCRYPTED PRIVATE KEY"; private PemUtils() { } /* * For some reason, this generates PEM encodings that we ourselves can import, but OpenSSL * doesn't like. We decided to punt on generating encrypted PEMs for now but saving * the code for when we get back to it and/or any demand arises. */ @SuppressWarnings("unused") public static void writeEncryptedPrivateKey(PrivateKeyInfo pkInfo, Writer out, String passphrase) throws IOException { byte[] salt = CryptoUtils.randomBytes(CryptoUtils.SALT_LEN); KeyParameter derivedKey = CryptoUtils.deriveKeySha256( passphrase, salt, CryptoUtils.ITERATIONS, CryptoUtils.CBC_DK_LEN); byte[] iv = CryptoUtils.randomBytes(CryptoUtils.IV_LEN); Cipher cipher = CryptoUtils.initAesCbc128Encrypt(derivedKey, iv); byte[] encryptedKey = CryptoUtils.runCipher(cipher, pkInfo.getEncoded()); // I wanted to just do this with BC's PKCS8Generator and KcePKCSPBEOutputEncryptorBuilder // but it tries to init AES instance of `Cipher` with a `PBKDF2Key` and the former complains // So this is basically a reimplementation of that minus the excess OO PBES2Parameters parameters = new PBES2Parameters( new KeyDerivationFunc( PKCSObjectIdentifiers.id_PBKDF2, new PBKDF2Params( salt, CryptoUtils.ITERATIONS, CryptoUtils.CBC_DK_LEN, new AlgorithmIdentifier(PKCSObjectIdentifiers.id_hmacWithSHA256))), new EncryptionScheme(NISTObjectIdentifiers.id_aes128_CBC, ASN1Primitive.fromByteArray(cipher.getParameters().getEncoded()))); EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = new EncryptedPrivateKeyInfo( new AlgorithmIdentifier(PKCSObjectIdentifiers.id_PBES2, parameters), encryptedKey); PemWriter writer = new PemWriter(out); writer.writeObject(new PemObject(TYPE_ENCRYPTED_PRIVATE_KEY, encryptedPrivateKeyInfo.getEncoded())); writer.flush(); } public static PrivateKeyInfo readPrivateKey(Reader input, @Nullable String passphrase) throws IOException { final PemReader pemReader = new PemReader(input); PemObject readObject = null; for (;;) { PemObject nextObject = pemReader.readPemObject(); if (nextObject == null) break; readObject = nextObject; String objType = readObject.getType(); if (passphrase != null && !passphrase.isEmpty() && objType.equals(TYPE_ENCRYPTED_PRIVATE_KEY)) { return decryptPrivateKey(readObject.getContent(), passphrase); } else if (objType.equals(TYPE_PRIVATE_KEY)) { return PrivateKeyInfo.getInstance(readObject.getContent()); } } if (readObject != null && readObject.getType().equals(TYPE_ENCRYPTED_PRIVATE_KEY)) { throw new BadKeyException("PEM file contained an encrypted private key but no passphrase was given"); } throw new BadKeyException("PEM file did not contain a private key"); } private static PrivateKeyInfo decryptPrivateKey(byte[] encodedStruct, String passphrase) throws IOException { PKCS8EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = new PKCS8EncryptedPrivateKeyInfo(encodedStruct); AlgorithmIdentifier encryptAlg = encryptedPrivateKeyInfo.getEncryptionAlgorithm(); if (!encryptAlg.getAlgorithm().equals(PKCSObjectIdentifiers.id_PBES2)) { throw new BadKeyException("unsupported PEM key encryption: " + encryptAlg); } PBES2Parameters params = PBES2Parameters.getInstance(encryptAlg.getParameters()); KeyDerivationFunc kdf = params.getKeyDerivationFunc(); EncryptionScheme encScheme = params.getEncryptionScheme(); if (!kdf.getAlgorithm().equals(PKCSObjectIdentifiers.id_PBKDF2)) { throw new BadKeyException("unsupported KDF: " + kdf.getAlgorithm()); } if (!encScheme.getAlgorithm().equals(NISTObjectIdentifiers.id_aes128_CBC)) { throw new BadKeyException("unsupported encryption: " + encScheme.getAlgorithm()); } PBKDF2Params kdfParams = PBKDF2Params.getInstance(kdf.getParameters()); if (!kdfParams.getPrf().getAlgorithm().equals(PKCSObjectIdentifiers.id_hmacWithSHA256)) { throw new BadKeyException("unsupported PRF: " + kdfParams.getPrf()); } int keyLength = kdfParams.getKeyLength() != null ? kdfParams.getKeyLength().intValueExact() : CryptoUtils.CBC_DK_LEN; KeyParameter derivedKey = CryptoUtils.deriveKeySha256( passphrase, kdfParams.getSalt(), kdfParams.getIterationCount().intValueExact(), keyLength); AlgorithmParameters aesParams; try { aesParams = AlgorithmParameters.getInstance("AES"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } aesParams.init(encScheme.getParameters().toASN1Primitive().getEncoded()); Cipher cipher = CryptoUtils.initAesCbc128Decrypt(derivedKey, aesParams); byte[] decrypted = CryptoUtils.runCipher(cipher, encryptedPrivateKeyInfo.getEncryptedData()); // we need to parse our input data as the cipher may add padding ASN1InputStream inputStream = new ASN1InputStream(new ByteArrayInputStream(decrypted)); return PrivateKeyInfo.getInstance(inputStream.readObject()); } }
{ "pile_set_name": "Github" }
/** * Module dependencies */ var crypto = require('crypto'); /** * 62 characters in the ascii range that can be used in URLs without special * encoding. */ var UIDCHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; /** * Make a Buffer into a string ready for use in URLs * * @param {String} * @returns {String} * @api private */ function tostr(bytes) { var chars, r, i; r = []; for (i = 0; i < bytes.length; i++) { r.push(UIDCHARS[bytes[i] % UIDCHARS.length]); } return r.join(''); } /** * Generate an Unique Id * * @param {Number} length The number of chars of the uid * @param {Number} cb (optional) Callback for async uid generation * @api public */ function uid(length, cb) { if (typeof cb === 'undefined') { return tostr(crypto.pseudoRandomBytes(length)); } else { crypto.pseudoRandomBytes(length, function(err, bytes) { if (err) return cb(err); cb(null, tostr(bytes)); }) } } /** * Exports */ module.exports = uid;
{ "pile_set_name": "Github" }
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // <locale> // template <class charT> bool iscntrl (charT c, const locale& loc); #include <locale> #include <cassert> int main() { std::locale l; assert(!std::iscntrl(' ', l)); assert(!std::iscntrl('<', l)); assert( std::iscntrl('\x8', l)); assert(!std::iscntrl('A', l)); assert(!std::iscntrl('a', l)); assert(!std::iscntrl('z', l)); assert(!std::iscntrl('3', l)); assert(!std::iscntrl('.', l)); assert(!std::iscntrl('f', l)); assert(!std::iscntrl('9', l)); assert(!std::iscntrl('+', l)); }
{ "pile_set_name": "Github" }
<p>Narzędzie to usuwa aktualnie wybrane podmioty.</p>
{ "pile_set_name": "Github" }
// automatically generated by the FlatBuffers compiler, do not modify package nd4j.graph; import java.nio.*; import java.lang.*; import java.util.*; import com.google.flatbuffers.*; @SuppressWarnings("unused") public final class FlatVariable extends Table { public static FlatVariable getRootAsFlatVariable(ByteBuffer _bb) { return getRootAsFlatVariable(_bb, new FlatVariable()); } public static FlatVariable getRootAsFlatVariable(ByteBuffer _bb, FlatVariable obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } public FlatVariable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public IntPair id() { return id(new IntPair()); } public IntPair id(IntPair obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } public byte dtype() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } public long shape(int j) { int o = __offset(10); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } public int shapeLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } public ByteBuffer shapeAsByteBuffer() { return __vector_as_bytebuffer(10, 8); } public ByteBuffer shapeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 8); } public FlatArray ndarray() { return ndarray(new FlatArray()); } public FlatArray ndarray(FlatArray obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public int device() { int o = __offset(14); return o != 0 ? bb.getInt(o + bb_pos) : 0; } public byte variabletype() { int o = __offset(16); return o != 0 ? bb.get(o + bb_pos) : 0; } public String controlDeps(int j) { int o = __offset(18); return o != 0 ? __string(__vector(o) + j * 4) : null; } public int controlDepsLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; } public String controlDepForOp(int j) { int o = __offset(20); return o != 0 ? __string(__vector(o) + j * 4) : null; } public int controlDepForOpLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } public String controlDepsForVar(int j) { int o = __offset(22); return o != 0 ? __string(__vector(o) + j * 4) : null; } public int controlDepsForVarLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; } public static int createFlatVariable(FlatBufferBuilder builder, int idOffset, int nameOffset, byte dtype, int shapeOffset, int ndarrayOffset, int device, byte variabletype, int controlDepsOffset, int controlDepForOpOffset, int controlDepsForVarOffset) { builder.startObject(10); FlatVariable.addControlDepsForVar(builder, controlDepsForVarOffset); FlatVariable.addControlDepForOp(builder, controlDepForOpOffset); FlatVariable.addControlDeps(builder, controlDepsOffset); FlatVariable.addDevice(builder, device); FlatVariable.addNdarray(builder, ndarrayOffset); FlatVariable.addShape(builder, shapeOffset); FlatVariable.addName(builder, nameOffset); FlatVariable.addId(builder, idOffset); FlatVariable.addVariabletype(builder, variabletype); FlatVariable.addDtype(builder, dtype); return FlatVariable.endFlatVariable(builder); } public static void startFlatVariable(FlatBufferBuilder builder) { builder.startObject(10); } public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); } public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } public static void addDtype(FlatBufferBuilder builder, byte dtype) { builder.addByte(2, dtype, 0); } public static void addShape(FlatBufferBuilder builder, int shapeOffset) { builder.addOffset(3, shapeOffset, 0); } public static int createShapeVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } public static void startShapeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } public static void addNdarray(FlatBufferBuilder builder, int ndarrayOffset) { builder.addOffset(4, ndarrayOffset, 0); } public static void addDevice(FlatBufferBuilder builder, int device) { builder.addInt(5, device, 0); } public static void addVariabletype(FlatBufferBuilder builder, byte variabletype) { builder.addByte(6, variabletype, 0); } public static void addControlDeps(FlatBufferBuilder builder, int controlDepsOffset) { builder.addOffset(7, controlDepsOffset, 0); } public static int createControlDepsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } public static void startControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } public static void addControlDepForOp(FlatBufferBuilder builder, int controlDepForOpOffset) { builder.addOffset(8, controlDepForOpOffset, 0); } public static int createControlDepForOpVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } public static void startControlDepForOpVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } public static void addControlDepsForVar(FlatBufferBuilder builder, int controlDepsForVarOffset) { builder.addOffset(9, controlDepsForVarOffset, 0); } public static int createControlDepsForVarVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } public static void startControlDepsForVarVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } public static int endFlatVariable(FlatBufferBuilder builder) { int o = builder.endObject(); return o; } public static void finishFlatVariableBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } public static void finishSizePrefixedFlatVariableBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>SchemeUserState</key> <dict> <key>macOSLucidaGrande.xcscheme</key> <dict> <key>orderHint</key> <integer>0</integer> </dict> </dict> </dict> </plist>
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=../../libc/fn.posix_memalign.html"> </head> <body> <p>Redirecting to <a href="../../libc/fn.posix_memalign.html">../../libc/fn.posix_memalign.html</a>...</p> <script>location.replace("../../libc/fn.posix_memalign.html" + location.search + location.hash);</script> </body> </html>
{ "pile_set_name": "Github" }
jsonschema rich plotly jinja2 beautifulsoup4 aiohttp[speedups] toml pyyaml pytest pytest-xdist pytest-cov pytest-asyncio
{ "pile_set_name": "Github" }
/* * Minecraft Dev for IntelliJ * * https://minecraftdev.org * * Copyright (c) 2020 minecraft-dev * * MIT License */ package com.demonwav.mcdev.platform.mcp.at.completion import com.intellij.codeInsight.completion.PrefixMatcher import com.intellij.codeInsight.lookup.LookupElement class SrgPrefixMatcher(prefix: String) : PrefixMatcher(prefix) { override fun prefixMatches(name: String) = true override fun cloneWithPrefix(prefix: String) = SrgPrefixMatcher(prefix) override fun prefixMatches(element: LookupElement): Boolean { return element.lookupString.contains(myPrefix, ignoreCase = true) } }
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "universal", "filename" : "chevron-right.pdf" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } }
{ "pile_set_name": "Github" }
Set Implicit Arguments. Set Universe Polymorphism. Module success. Unset Primitive Projections. Record group := { carrier : Type; id : carrier }. Notation "1" := (id _) : g_scope. Delimit Scope g_scope with g. Bind Scope g_scope with carrier. Section foo. Variable g : group. Variable comp : carrier g -> carrier g -> carrier g. Check comp 1 1. End foo. End success. Module failure. Set Primitive Projections. Record group := { carrier : Type; id : carrier }. Notation "1" := (id _) : g_scope. Delimit Scope g_scope with g. Bind Scope g_scope with carrier. Section foo. Variable g : group. Variable comp : carrier g -> carrier g -> carrier g. Check comp 1 1. (* Toplevel input, characters 11-12: Error: In environment g : group comp : carrier g -> carrier g -> carrier g The term "1" has type "nat" while it is expected to have type "carrier g". *) End foo. End failure.
{ "pile_set_name": "Github" }
import FWCore.ParameterSet.Config as cms from Configuration.Generator.PythiaUEZ2starSettings_cfi import * generator = cms.EDFilter("Pythia6GeneratorFilter", pythiaPylistVerbosity = cms.untracked.int32(0), # put here the efficiency of your filter (1. if no filter) filterEfficiency = cms.untracked.double(1.0), pythiaHepMCVerbosity = cms.untracked.bool(False), # put here the cross section of your process (in pb) crossSection = cms.untracked.double(42.11), maxEventsToPrint = cms.untracked.int32(0), comEnergy = cms.double(14000.0), PythiaParameters = cms.PSet( pythiaUESettingsBlock, processParameters = cms.vstring('MSEL=39 ! All SUSY processes ', 'IMSS(1) = 11 ! Spectrum from external SLHA file', 'IMSS(21) = 33 ! LUN number for SLHA File (must be 33) ', 'IMSS(22) = 33 ! Read-in SLHA decay table '), # This is a vector of ParameterSet names to be read, in this order parameterSets = cms.vstring('pythiaUESettings', 'processParameters', 'SLHAParameters'), SLHAParameters = cms.vstring("SLHAFILE = \'Configuration/Generator/data/CSA07SUSYBSM_LM1_sftsdkpyt_slha.out\' ! Name of the SLHA spectrum file") ) )
{ "pile_set_name": "Github" }
<!doctype html> <title>CodeMirror: HTML mixed mode</title> <meta charset="utf-8"/> <link rel=stylesheet href="../../doc/docs.css"> <link rel="stylesheet" href="../../lib/codemirror.css"> <script src="../../lib/codemirror.js"></script> <script src="../../addon/selection/selection-pointer.js"></script> <script src="../xml/xml.js"></script> <script src="../javascript/javascript.js"></script> <script src="../css/css.js"></script> <script src="../vbscript/vbscript.js"></script> <script src="htmlmixed.js"></script> <style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> <div id=nav> <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> <ul> <li><a href="../../index.html">Home</a> <li><a href="../../doc/manual.html">Manual</a> <li><a href="https://github.com/codemirror/codemirror">Code</a> </ul> <ul> <li><a href="../index.html">Language modes</a> <li><a class=active href="#">HTML mixed</a> </ul> </div> <article> <h2>HTML mixed mode</h2> <form><textarea id="code" name="code"> <html style="color: green"> <!-- this is a comment --> <head> <title>Mixed HTML Example</title> <style type="text/css"> h1 {font-family: comic sans; color: #f0f;} div {background: yellow !important;} body { max-width: 50em; margin: 1em 2em 1em 5em; } </style> </head> <body> <h1>Mixed HTML Example</h1> <script> function jsFunc(arg1, arg2) { if (arg1 && arg2) document.body.innerHTML = "achoo"; } </script> </body> </html> </textarea></form> <script> // Define an extended mixed-mode that understands vbscript and // leaves mustache/handlebars embedded templates in html mode var mixedMode = { name: "htmlmixed", scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i, mode: null}, {matches: /(text|application)\/(x-)?vb(a|script)/i, mode: "vbscript"}] }; var editor = CodeMirror.fromTextArea(document.getElementById("code"), { mode: mixedMode, selectionPointer: true }); </script> <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p> <p>It takes an optional mode configuration option, <code>scriptTypes</code>, which can be used to add custom behavior for specific <code>&lt;script type="..."></code> tags. If given, it should hold an array of <code>{matches, mode}</code> objects, where <code>matches</code> is a string or regexp that matches the script type, and <code>mode</code> is either <code>null</code>, for script types that should stay in HTML mode, or a <a href="../../doc/manual.html#option_mode">mode spec</a> corresponding to the mode that should be used for the script.</p> <p><strong>MIME types defined:</strong> <code>text/html</code> (redefined, only takes effect if you load this parser after the XML parser).</p> </article>
{ "pile_set_name": "Github" }
<html> <body style="position:relative"> <fieldset style="height: 150px; padding: 0px; background:orange; border:0; margin:0;"> <div style="width:150px; height: 150px; overflow:scroll; background:red;"> text<br>text<br>text<br>text<br>text<br>text<br> text<br>text<br>text<br>text<br>text<br>text<br> text<br>text<br>text<br>text<br>text<br>text<br> text<br>text<br>text<br>text<br>text<br>text<br> text<br>text<br>text<br>text<br>text<br>text<br> </div> </fieldset> </body> </html>
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 325ecefe5027b8b42a7c653ca4af9dfb timeCreated: 1517455463 licenseType: Free MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <odoo> <record id="account_tax_sale_vat1" model="account.tax.template"> <field name="name">НӨАТ бараа</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">1</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group1"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag5')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag5')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag5')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag5')], }), ]"/> </record> <record id="account_tax_purchase_vat1" model="account.tax.template"> <field name="name">НӨАТ-тэй худалдан авалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">1</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag36'),ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag36')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag36'),ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag36')], }), ]"/> </record> <record id="account_tax_purchase_vat2" model="account.tax.template"> <field name="name">НӨАТ-гүй худалдан авалт</field> <field name="amount">0.0</field> <field name="price_include" eval="1"/> <field name="sequence">10</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">0%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> </record> <record id="account_tax_sale_vat2" model="account.tax.template"> <field name="name">НӨАТ 0% борлуулалт</field> <field name="amount">0.0</field> <field name="price_include" eval="1"/> <field name="sequence">10</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">0%</field> <field name="tax_group_id" ref="account_tax_group6"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag2')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag2')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> </record> <record id="account_tax_sale_vat3" model="account.tax.template"> <field name="name">НӨАТ чөлөөлөх борлуулалт</field> <field name="amount">0.0</field> <field name="price_include" eval="1"/> <field name="sequence">10</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">0%</field> <field name="tax_group_id" ref="account_tax_group6"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag2')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag2')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> </record> <record id="account_tax_sale_vat4" model="account.tax.template"> <field name="name">НӨАТ бусад барааны борлуулалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group1"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag6')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag6')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag6')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag6')], }), ]"/> </record> <record id="account_tax_sale_vat5" model="account.tax.template"> <field name="name">НӨАТ эрх борлуулалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group1"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag7')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag7')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag7')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag7')], }), ]"/> </record> <record id="account_tax_sale_vat6" model="account.tax.template"> <field name="name">НӨАТ татан буугдах үеийн борлуулалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group1"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag8')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag8')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag8')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag8')], }), ]"/> </record> <record id="account_tax_sale_vat7" model="account.tax.template"> <field name="name">НӨАТ өрийн төлбөрт өгсөн бараа</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group1"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag9')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag9')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag9')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag9')], }), ]"/> </record> <record id="account_tax_sale_vat8" model="account.tax.template"> <field name="name">НӨАТ нотариат үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag11')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag11')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag11')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag11')], }), ]"/> </record> <record id="account_tax_sale_vat9" model="account.tax.template"> <field name="name">НӨАТ өрийн төлбөрт өгсөн үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag12')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag12')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag12')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag12')], }), ]"/> </record> <record id="account_tax_sale_vat10" model="account.tax.template"> <field name="name">НӨАТ цахилгаан, дулаан, ус, шуудан, холбоо</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag13')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag13')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag13')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag13')], }), ]"/> </record> <record id="account_tax_sale_vat11" model="account.tax.template"> <field name="name">НӨАТ бараа түрээслүүлэх, эзэмшүүлэх</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag14')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag14')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag14')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag14')], }), ]"/> </record> <record id="account_tax_sale_vat12" model="account.tax.template"> <field name="name">НӨАТ байр түрээслүүлэх, эзэмшүүлэх</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag15')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag15')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag15')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag15')], }), ]"/> </record> <record id="account_tax_sale_vat13" model="account.tax.template"> <field name="name">НӨАТ хөрөнгө түрээслүүлэх, эзэмшүүлэх</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag16')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag16')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag16')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag16')], }), ]"/> </record> <record id="account_tax_sale_vat14" model="account.tax.template"> <field name="name">НӨАТ бүтээл, загвар, зохиогчийн эрх</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag17')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag17')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag17')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag17')], }), ]"/> </record> <record id="account_tax_sale_vat15" model="account.tax.template"> <field name="name">НӨАТ хонжворт сугалаа, таавар, бооцоо</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag18')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag18')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag18')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag18')], }), ]"/> </record> <record id="account_tax_sale_vat16" model="account.tax.template"> <field name="name">НӨАТ зуучлалын үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag19')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag19')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag19')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag19')], }), ]"/> </record> <record id="account_tax_sale_vat17" model="account.tax.template"> <field name="name">НӨАТ авсан хүү торгууль, алданги</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag20')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag20')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag20')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag20')], }), ]"/> </record> <record id="account_tax_sale_vat18" model="account.tax.template"> <field name="name">НӨАТ хөрөнгийн үнэлгээний үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag21')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag21')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag21')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag21')], }), ]"/> </record> <record id="account_tax_sale_vat19" model="account.tax.template"> <field name="name">НӨАТ төсвийн санхүүжилт, татаас</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag22')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag22')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag22')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag22')], }), ]"/> </record> <record id="account_tax_sale_vat20" model="account.tax.template"> <field name="name">НӨАТ хууль зүйн үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag23')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag23')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag23')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag23')], }), ]"/> </record> <record id="account_tax_sale_vat21" model="account.tax.template"> <field name="name">НӨАТ үсчин, гоо сайхан, угаалга, цэвэрлэгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag24')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag24')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag24')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag24')], }), ]"/> </record> <record id="account_tax_sale_vat22" model="account.tax.template"> <field name="name">НӨАТ бусад үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">20</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group2"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag25')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag25')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag25')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag25')], }), ]"/> </record> <record id="account_tax_sale_vat23" model="account.tax.template"> <field name="name">НӨАТ 0% экспорт бараа</field> <field name="amount">0.0</field> <field name="price_include" eval="1"/> <field name="sequence">30</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">0%</field> <field name="tax_group_id" ref="account_tax_group3"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag28')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag28')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> </record> <record id="account_tax_sale_vat24" model="account.tax.template"> <field name="name">НӨАТ 0% экспорт үйлчилгээ</field> <field name="amount">0.0</field> <field name="price_include" eval="1"/> <field name="sequence">30</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">0%</field> <field name="tax_group_id" ref="account_tax_group3"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag29')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag29')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', }), ]"/> </record> <record id="account_tax_purchase_vat3" model="account.tax.template"> <field name="name">НӨАТ импортоор авсан бараа, үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33'),ref('vat_report_tag35')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag35')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33'),ref('vat_report_tag35')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag35')], }), ]"/> </record> <record id="account_tax_purchase_vat4" model="account.tax.template"> <field name="name">НӨАТ төлөгчөөр бүртгүүлэх үед худалдан авсан</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33'),ref('vat_report_tag37')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag37')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33'),ref('vat_report_tag37')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag37')], }), ]"/> </record> <record id="account_tax_purchase_vat5" model="account.tax.template"> <field name="name">НӨАТ мал аж ахуй эрхлэгчээс худалдан авсан</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33'),ref('vat_report_tag38')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag38')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33'),ref('vat_report_tag38')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag38')], }), ]"/> </record> <record id="account_tax_purchase_vat6" model="account.tax.template"> <field name="name">НӨАТ автомашин, эд анги худалдан авалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag41')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag41')], }), ]"/> </record> <record id="account_tax_purchase_vat7" model="account.tax.template"> <field name="name">НӨАТ ажлын хэрэгцээнд авсан бараа</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag42')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag42')], }), ]"/> </record> <record id="account_tax_purchase_vat8" model="account.tax.template"> <field name="name">НӨАТ импортоор авсан үндсэн хөрөнгө</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag43')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag43')], }), ]"/> </record> <record id="account_tax_purchase_vat9" model="account.tax.template"> <field name="name">НӨАТ чөлөөлөгдөх үйлдвэрлэлд зориулсан бараа, үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag44')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag44')], }), ]"/> </record> <record id="account_tax_purchase_vat10" model="account.tax.template"> <field name="name">НӨАТ хайгуулд зориулсан импортын бараа, үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag45')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag45')], }), ]"/> </record> <record id="account_tax_purchase_vat11" model="account.tax.template"> <field name="name">НӨАТ импортын бусад хамааралгүй бараа, үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">40</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group4"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag46')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag33')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag46')], }), ]"/> </record> <record id="account_tax_sale_vat25" model="account.tax.template"> <field name="name">НӨАТ дотоодод зарсан санхүүгийн түрээс</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">50</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group5"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag48')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag48')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag48')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag48')], }), ]"/> </record> <record id="account_tax_sale_vat26" model="account.tax.template"> <field name="name">НӨАТ Факторинг, форфайтинг хэлцлийн үйлчилгээ</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">50</field> <field name="amount_type">percent</field> <field name="type_tax_use">sale</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group5"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag49')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag49')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag49')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_3401_0201'), 'tag_ids': [ref('vat_report_tag49')], }), ]"/> </record> <record id="account_tax_purchase_vat12" model="account.tax.template"> <field name="name">НӨАТ Санхүүгийн түрээсийн худалдан авалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">50</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group5"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag51')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag51')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag51')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag51')], }), ]"/> </record> <record id="account_tax_purchase_vat13" model="account.tax.template"> <field name="name">НӨАТ Факторинг, форфайтинг худалдан авалт</field> <field name="amount">10.0</field> <field name="price_include" eval="1"/> <field name="sequence">50</field> <field name="amount_type">percent</field> <field name="type_tax_use">purchase</field> <field name="description">10%</field> <field name="tax_group_id" ref="account_tax_group5"/> <field name="chart_template_id" ref="mn_chart_1"/> <field name="invoice_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag52')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag52')], }), ]"/> <field name="refund_repartition_line_ids" eval="[(5, 0, 0), (0,0, { 'factor_percent': 100, 'repartition_type': 'base', 'tag_ids': [ref('vat_report_tag52')], }), (0,0, { 'factor_percent': 100, 'repartition_type': 'tax', 'account_id': ref('account_template_1204_0301'), 'tag_ids': [ref('vat_report_tag52')], }), ]"/> </record> </odoo>
{ "pile_set_name": "Github" }
<!doctype html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Welcome to your Strapi app</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" rel="stylesheet" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" rel="stylesheet" /> <style> *{-webkit-box-sizing:border-box;text-decoration:none}body,html{margin:0;padding:0;font-size:62.5%;-webkit-font-smoothing:antialiased}body{font-size:1.3rem;font-family:Lato,Helvetica,Arial,Verdana,sans-serif;background:#fafafb;margin:0;padding:80px 0;color:#333740;line-height:1.8rem}strong{font-weight:700}.wrapper{width:684px;margin:auto}h1{text-align:center}h2{font-size:1.8rem;font-weight:700;margin-bottom:1px}.logo{height:40px;margin-bottom:74px}.informations{position:relative;overflow:hidden;display:flex;justify-content:space-between;width:100%;height:126px;margin-top:18px;padding:20px 30px;background:#fff;border-radius:2px;box-shadow:0 2px 4px 0 #e3e9f3}.informations:before{position:absolute;top:0;left:0;content:'';display:block;width:100%;height:2px;background:#007eff}.environment{display:inline-block;padding:0 10px;height:20px;margin-bottom:36px;background:#e6f0fb;border:1px solid #aed4fb;border-radius:2px;text-transform:uppercase;color:#007eff;font-size:1.2rem;font-weight:700;line-height:20px;letter-spacing:.05rem}.cta{display:inline-block;height:30px;padding:0 15px;margin-top:32px;border-radius:2px;color:#fff;font-weight:700;line-height:28px}.cta i{position:relative;display:inline-block;height:100%;vertical-align:middle;font-size:1rem;margin-right:20px}.cta i:before{position:absolute;top:8px}.cta-primary{background:#007eff}.cta-secondary{background:#6dbb1a}.text-align-right{text-align:right}.lets-started{position:relative;overflow:hidden;width:100%;height:144px;margin-top:18px;padding:20px 30px;background:#fff;border-radius:2px;box-shadow:0 2px 4px 0 #e3e9f3}.people-saying-hello{position:absolute;right:30px;bottom:-8px;width:113px;height:70px}.visible{opacity:1!important}.people-saying-hello img{position:absolute;max-width:100%;opacity:0;transition:opacity .2s ease-out}@media only screen and (max-width:768px){.wrapper{width:auto!important;margin:0 20px}.informations{flex-direction:column;height:auto}.environment{width:100%;text-align:center;margin-bottom:18px}.text-align-right{margin-top:18px;text-align:center}.cta{width:100%;text-align:center}.lets-started{height:auto}.people-saying-hello{display:none}} </style> </head> <body lang="en"> <section class="wrapper"> <h1><img class="logo" src="<%= strapi.config.server.url %>/assets/images/logo_login.png" /></h1> <% if (strapi.config.environment === 'development' && isInitialised) { %> <div class="informations"> <div> <span class="environment"><%= strapi.config.environment %></span> <p> The server is running successfully (<strong>v<%= strapi.config.info.version %>)</strong> </p> </div> <div class="text-align-right"> <p><%= serverTime %></p> <% if (strapi.config.serveAdminPanel) { %> <a class="cta cta-primary" href="<%= strapi.config.admin.url %>" target="_blank" title="Click to open the administration" ><i class="fas fa-external-link-alt"></i>Open the administration</a> <% } %> </div> </div> <% } else if (strapi.config.environment === 'development' && !isInitialised) { %> <div class="lets-started"> <h2>Let's get started!</h2> <p>To discover the power provided by Strapi, you need to create an administrator.</p> <a class="cta cta-secondary" href="<%= strapi.config.admin.url %>" target="_blank" title="Click to create the first administration" ><i class="fas fa-external-link-alt"></i>Create the first administrator</a> <div class="people-saying-hello"> <img class="visible" src="<%= strapi.config.server.url %>/assets/images/group_people_1.png" alt="People saying hello" /> <img src="<%= strapi.config.server.url %>/assets/images/group_people_2.png" alt="People saying hello" /> <img src="<%= strapi.config.server.url %>/assets/images/group_people_3.png" alt="People saying hello" /> </div> </div> <% } else { %> <div class="informations"> <div> <span class="environment"><%= strapi.config.environment %></span> <p>The server is running successfully.</p> </div> <div class="text-align-right"> <p><%= serverTime %></p> </div> </div> <% } %> </section> <% if (strapi.config.environment === 'development' && !isInitialised) { %> <script> var images=document.querySelectorAll('.people-saying-hello img');var nextIndex=0;setInterval(function(){var currentIndex=0;images.forEach(function(image,index){if(image.className==='visible'){currentIndex=index}});nextIndex=currentIndex+1;if(nextIndex===images.length){nextIndex=0} images.forEach(function(image){image.classList.remove('visible')}) images[nextIndex].classList.add('visible')},1500) </script> <% } %> </body> </html>
{ "pile_set_name": "Github" }
"TinyAppCommon:个人主页" = "个人主页"; "TinyAppCommon:微信号" = "微信号"; "TinyAppCommon:支付宝" = "支付宝"; "TinyAppCommon:住宅电话" = "住宅电话"; "TinyAppCommon:办公电话" = "办公电话"; "TinyAppCommon:公司电话" = "公司电话"; "TinyAppCommon:联系电话" = "联系电话"; "TinyAppCommon:住宅传真" = "住宅传真"; "TinyAppCommon:办公传真" = "办公传真"; "TinyAppCommon:联系地址" = "联系地址"; "TinyAppCommon:公司地址" = "公司地址"; "TinyAppCommon:住宅地址" = "住宅地址"; "TinyAppCommon:邮箱" = "邮箱"; "TinyAppCommon:创建新联系人" = "创建新联系人"; "TinyAppCommon:添加到现有联系人" = "添加到现有联系人"; "TinyAppCommon:取消" = "取消";
{ "pile_set_name": "Github" }
INTERFACE_INCLUDE_DIRECTORIES ----------------------------- .. |property_name| replace:: include directories .. |command_name| replace:: :command:`target_include_directories` .. |PROPERTY_INTERFACE_NAME| replace:: ``INTERFACE_INCLUDE_DIRECTORIES`` .. |PROPERTY_LINK| replace:: :prop_tgt:`INCLUDE_DIRECTORIES` .. |PROPERTY_GENEX| replace:: ``$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>`` .. include:: INTERFACE_BUILD_PROPERTY.txt Include directories usage requirements commonly differ between the build-tree and the install-tree. The ``BUILD_INTERFACE`` and ``INSTALL_INTERFACE`` generator expressions can be used to describe separate usage requirements based on the usage location. Relative paths are allowed within the ``INSTALL_INTERFACE`` expression and are interpreted relative to the installation prefix. For example: .. code-block:: cmake target_include_directories(mylib INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/mylib> $<INSTALL_INTERFACE:include/mylib> # <prefix>/include/mylib ) Creating Relocatable Packages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. |INTERFACE_PROPERTY_LINK| replace:: ``INTERFACE_INCLUDE_DIRECTORIES`` .. include:: /include/INTERFACE_INCLUDE_DIRECTORIES_WARNING.txt
{ "pile_set_name": "Github" }
/* * 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. */ package thrift import ( "bufio" "bytes" "encoding/base64" "encoding/json" "fmt" "io" "math" "strconv" ) type _ParseContext int const ( _CONTEXT_IN_TOPLEVEL _ParseContext = 1 _CONTEXT_IN_LIST_FIRST _ParseContext = 2 _CONTEXT_IN_LIST _ParseContext = 3 _CONTEXT_IN_OBJECT_FIRST _ParseContext = 4 _CONTEXT_IN_OBJECT_NEXT_KEY _ParseContext = 5 _CONTEXT_IN_OBJECT_NEXT_VALUE _ParseContext = 6 ) func (p _ParseContext) String() string { switch p { case _CONTEXT_IN_TOPLEVEL: return "TOPLEVEL" case _CONTEXT_IN_LIST_FIRST: return "LIST-FIRST" case _CONTEXT_IN_LIST: return "LIST" case _CONTEXT_IN_OBJECT_FIRST: return "OBJECT-FIRST" case _CONTEXT_IN_OBJECT_NEXT_KEY: return "OBJECT-NEXT-KEY" case _CONTEXT_IN_OBJECT_NEXT_VALUE: return "OBJECT-NEXT-VALUE" } return "UNKNOWN-PARSE-CONTEXT" } // JSON protocol implementation for thrift. // // This protocol produces/consumes a simple output format // suitable for parsing by scripting languages. It should not be // confused with the full-featured TJSONProtocol. // type TSimpleJSONProtocol struct { trans TTransport parseContextStack []int dumpContext []int writer *bufio.Writer reader *bufio.Reader } // Constructor func NewTSimpleJSONProtocol(t TTransport) *TSimpleJSONProtocol { v := &TSimpleJSONProtocol{trans: t, writer: bufio.NewWriter(t), reader: bufio.NewReader(t), } v.parseContextStack = append(v.parseContextStack, int(_CONTEXT_IN_TOPLEVEL)) v.dumpContext = append(v.dumpContext, int(_CONTEXT_IN_TOPLEVEL)) return v } // Factory type TSimpleJSONProtocolFactory struct{} func (p *TSimpleJSONProtocolFactory) GetProtocol(trans TTransport) TProtocol { return NewTSimpleJSONProtocol(trans) } func NewTSimpleJSONProtocolFactory() *TSimpleJSONProtocolFactory { return &TSimpleJSONProtocolFactory{} } var ( JSON_COMMA []byte JSON_COLON []byte JSON_LBRACE []byte JSON_RBRACE []byte JSON_LBRACKET []byte JSON_RBRACKET []byte JSON_QUOTE byte JSON_QUOTE_BYTES []byte JSON_NULL []byte JSON_TRUE []byte JSON_FALSE []byte JSON_INFINITY string JSON_NEGATIVE_INFINITY string JSON_NAN string JSON_INFINITY_BYTES []byte JSON_NEGATIVE_INFINITY_BYTES []byte JSON_NAN_BYTES []byte json_nonbase_map_elem_bytes []byte ) func init() { JSON_COMMA = []byte{','} JSON_COLON = []byte{':'} JSON_LBRACE = []byte{'{'} JSON_RBRACE = []byte{'}'} JSON_LBRACKET = []byte{'['} JSON_RBRACKET = []byte{']'} JSON_QUOTE = '"' JSON_QUOTE_BYTES = []byte{'"'} JSON_NULL = []byte{'n', 'u', 'l', 'l'} JSON_TRUE = []byte{'t', 'r', 'u', 'e'} JSON_FALSE = []byte{'f', 'a', 'l', 's', 'e'} JSON_INFINITY = "Infinity" JSON_NEGATIVE_INFINITY = "-Infinity" JSON_NAN = "NaN" JSON_INFINITY_BYTES = []byte{'I', 'n', 'f', 'i', 'n', 'i', 't', 'y'} JSON_NEGATIVE_INFINITY_BYTES = []byte{'-', 'I', 'n', 'f', 'i', 'n', 'i', 't', 'y'} JSON_NAN_BYTES = []byte{'N', 'a', 'N'} json_nonbase_map_elem_bytes = []byte{']', ',', '['} } func jsonQuote(s string) string { b, _ := json.Marshal(s) s1 := string(b) return s1 } func jsonUnquote(s string) (string, bool) { s1 := new(string) err := json.Unmarshal([]byte(s), s1) return *s1, err == nil } func mismatch(expected, actual string) error { return fmt.Errorf("Expected '%s' but found '%s' while parsing JSON.", expected, actual) } func (p *TSimpleJSONProtocol) WriteMessageBegin(name string, typeId TMessageType, seqId int32) error { p.resetContextStack() // THRIFT-3735 if e := p.OutputListBegin(); e != nil { return e } if e := p.WriteString(name); e != nil { return e } if e := p.WriteByte(int8(typeId)); e != nil { return e } if e := p.WriteI32(seqId); e != nil { return e } return nil } func (p *TSimpleJSONProtocol) WriteMessageEnd() error { return p.OutputListEnd() } func (p *TSimpleJSONProtocol) WriteStructBegin(name string) error { if e := p.OutputObjectBegin(); e != nil { return e } return nil } func (p *TSimpleJSONProtocol) WriteStructEnd() error { return p.OutputObjectEnd() } func (p *TSimpleJSONProtocol) WriteFieldBegin(name string, typeId TType, id int16) error { if e := p.WriteString(name); e != nil { return e } return nil } func (p *TSimpleJSONProtocol) WriteFieldEnd() error { //return p.OutputListEnd() return nil } func (p *TSimpleJSONProtocol) WriteFieldStop() error { return nil } func (p *TSimpleJSONProtocol) WriteMapBegin(keyType TType, valueType TType, size int) error { if e := p.OutputListBegin(); e != nil { return e } if e := p.WriteByte(int8(keyType)); e != nil { return e } if e := p.WriteByte(int8(valueType)); e != nil { return e } return p.WriteI32(int32(size)) } func (p *TSimpleJSONProtocol) WriteMapEnd() error { return p.OutputListEnd() } func (p *TSimpleJSONProtocol) WriteListBegin(elemType TType, size int) error { return p.OutputElemListBegin(elemType, size) } func (p *TSimpleJSONProtocol) WriteListEnd() error { return p.OutputListEnd() } func (p *TSimpleJSONProtocol) WriteSetBegin(elemType TType, size int) error { return p.OutputElemListBegin(elemType, size) } func (p *TSimpleJSONProtocol) WriteSetEnd() error { return p.OutputListEnd() } func (p *TSimpleJSONProtocol) WriteBool(b bool) error { return p.OutputBool(b) } func (p *TSimpleJSONProtocol) WriteByte(b int8) error { return p.WriteI32(int32(b)) } func (p *TSimpleJSONProtocol) WriteI16(v int16) error { return p.WriteI32(int32(v)) } func (p *TSimpleJSONProtocol) WriteI32(v int32) error { return p.OutputI64(int64(v)) } func (p *TSimpleJSONProtocol) WriteI64(v int64) error { return p.OutputI64(int64(v)) } func (p *TSimpleJSONProtocol) WriteDouble(v float64) error { return p.OutputF64(v) } func (p *TSimpleJSONProtocol) WriteString(v string) error { return p.OutputString(v) } func (p *TSimpleJSONProtocol) WriteBinary(v []byte) error { // JSON library only takes in a string, // not an arbitrary byte array, to ensure bytes are transmitted // efficiently we must convert this into a valid JSON string // therefore we use base64 encoding to avoid excessive escaping/quoting if e := p.OutputPreValue(); e != nil { return e } if _, e := p.write(JSON_QUOTE_BYTES); e != nil { return NewTProtocolException(e) } writer := base64.NewEncoder(base64.StdEncoding, p.writer) if _, e := writer.Write(v); e != nil { p.writer.Reset(p.trans) // THRIFT-3735 return NewTProtocolException(e) } if e := writer.Close(); e != nil { return NewTProtocolException(e) } if _, e := p.write(JSON_QUOTE_BYTES); e != nil { return NewTProtocolException(e) } return p.OutputPostValue() } // Reading methods. func (p *TSimpleJSONProtocol) ReadMessageBegin() (name string, typeId TMessageType, seqId int32, err error) { p.resetContextStack() // THRIFT-3735 if isNull, err := p.ParseListBegin(); isNull || err != nil { return name, typeId, seqId, err } if name, err = p.ReadString(); err != nil { return name, typeId, seqId, err } bTypeId, err := p.ReadByte() typeId = TMessageType(bTypeId) if err != nil { return name, typeId, seqId, err } if seqId, err = p.ReadI32(); err != nil { return name, typeId, seqId, err } return name, typeId, seqId, nil } func (p *TSimpleJSONProtocol) ReadMessageEnd() error { return p.ParseListEnd() } func (p *TSimpleJSONProtocol) ReadStructBegin() (name string, err error) { _, err = p.ParseObjectStart() return "", err } func (p *TSimpleJSONProtocol) ReadStructEnd() error { return p.ParseObjectEnd() } func (p *TSimpleJSONProtocol) ReadFieldBegin() (string, TType, int16, error) { if err := p.ParsePreValue(); err != nil { return "", STOP, 0, err } b, _ := p.reader.Peek(1) if len(b) > 0 { switch b[0] { case JSON_RBRACE[0]: return "", STOP, 0, nil case JSON_QUOTE: p.reader.ReadByte() name, err := p.ParseStringBody() // simplejson is not meant to be read back into thrift // - see http://wiki.apache.org/thrift/ThriftUsageJava // - use JSON instead if err != nil { return name, STOP, 0, err } return name, STOP, -1, p.ParsePostValue() /* if err = p.ParsePostValue(); err != nil { return name, STOP, 0, err } if isNull, err := p.ParseListBegin(); isNull || err != nil { return name, STOP, 0, err } bType, err := p.ReadByte() thetype := TType(bType) if err != nil { return name, thetype, 0, err } id, err := p.ReadI16() return name, thetype, id, err */ } e := fmt.Errorf("Expected \"}\" or '\"', but found: '%s'", string(b)) return "", STOP, 0, NewTProtocolExceptionWithType(INVALID_DATA, e) } return "", STOP, 0, NewTProtocolException(io.EOF) } func (p *TSimpleJSONProtocol) ReadFieldEnd() error { return nil //return p.ParseListEnd() } func (p *TSimpleJSONProtocol) ReadMapBegin() (keyType TType, valueType TType, size int, e error) { if isNull, e := p.ParseListBegin(); isNull || e != nil { return VOID, VOID, 0, e } // read keyType bKeyType, e := p.ReadByte() keyType = TType(bKeyType) if e != nil { return keyType, valueType, size, e } // read valueType bValueType, e := p.ReadByte() valueType = TType(bValueType) if e != nil { return keyType, valueType, size, e } // read size iSize, err := p.ReadI64() size = int(iSize) return keyType, valueType, size, err } func (p *TSimpleJSONProtocol) ReadMapEnd() error { return p.ParseListEnd() } func (p *TSimpleJSONProtocol) ReadListBegin() (elemType TType, size int, e error) { return p.ParseElemListBegin() } func (p *TSimpleJSONProtocol) ReadListEnd() error { return p.ParseListEnd() } func (p *TSimpleJSONProtocol) ReadSetBegin() (elemType TType, size int, e error) { return p.ParseElemListBegin() } func (p *TSimpleJSONProtocol) ReadSetEnd() error { return p.ParseListEnd() } func (p *TSimpleJSONProtocol) ReadBool() (bool, error) { var value bool if err := p.ParsePreValue(); err != nil { return value, err } f, _ := p.reader.Peek(1) if len(f) > 0 { switch f[0] { case JSON_TRUE[0]: b := make([]byte, len(JSON_TRUE)) _, err := p.reader.Read(b) if err != nil { return false, NewTProtocolException(err) } if string(b) == string(JSON_TRUE) { value = true } else { e := fmt.Errorf("Expected \"true\" but found: %s", string(b)) return value, NewTProtocolExceptionWithType(INVALID_DATA, e) } break case JSON_FALSE[0]: b := make([]byte, len(JSON_FALSE)) _, err := p.reader.Read(b) if err != nil { return false, NewTProtocolException(err) } if string(b) == string(JSON_FALSE) { value = false } else { e := fmt.Errorf("Expected \"false\" but found: %s", string(b)) return value, NewTProtocolExceptionWithType(INVALID_DATA, e) } break case JSON_NULL[0]: b := make([]byte, len(JSON_NULL)) _, err := p.reader.Read(b) if err != nil { return false, NewTProtocolException(err) } if string(b) == string(JSON_NULL) { value = false } else { e := fmt.Errorf("Expected \"null\" but found: %s", string(b)) return value, NewTProtocolExceptionWithType(INVALID_DATA, e) } default: e := fmt.Errorf("Expected \"true\", \"false\", or \"null\" but found: %s", string(f)) return value, NewTProtocolExceptionWithType(INVALID_DATA, e) } } return value, p.ParsePostValue() } func (p *TSimpleJSONProtocol) ReadByte() (int8, error) { v, err := p.ReadI64() return int8(v), err } func (p *TSimpleJSONProtocol) ReadI16() (int16, error) { v, err := p.ReadI64() return int16(v), err } func (p *TSimpleJSONProtocol) ReadI32() (int32, error) { v, err := p.ReadI64() return int32(v), err } func (p *TSimpleJSONProtocol) ReadI64() (int64, error) { v, _, err := p.ParseI64() return v, err } func (p *TSimpleJSONProtocol) ReadDouble() (float64, error) { v, _, err := p.ParseF64() return v, err } func (p *TSimpleJSONProtocol) ReadString() (string, error) { var v string if err := p.ParsePreValue(); err != nil { return v, err } f, _ := p.reader.Peek(1) if len(f) > 0 && f[0] == JSON_QUOTE { p.reader.ReadByte() value, err := p.ParseStringBody() v = value if err != nil { return v, err } } else if len(f) > 0 && f[0] == JSON_NULL[0] { b := make([]byte, len(JSON_NULL)) _, err := p.reader.Read(b) if err != nil { return v, NewTProtocolException(err) } if string(b) != string(JSON_NULL) { e := fmt.Errorf("Expected a JSON string, found unquoted data started with %s", string(b)) return v, NewTProtocolExceptionWithType(INVALID_DATA, e) } } else { e := fmt.Errorf("Expected a JSON string, found unquoted data started with %s", string(f)) return v, NewTProtocolExceptionWithType(INVALID_DATA, e) } return v, p.ParsePostValue() } func (p *TSimpleJSONProtocol) ReadBinary() ([]byte, error) { var v []byte if err := p.ParsePreValue(); err != nil { return nil, err } f, _ := p.reader.Peek(1) if len(f) > 0 && f[0] == JSON_QUOTE { p.reader.ReadByte() value, err := p.ParseBase64EncodedBody() v = value if err != nil { return v, err } } else if len(f) > 0 && f[0] == JSON_NULL[0] { b := make([]byte, len(JSON_NULL)) _, err := p.reader.Read(b) if err != nil { return v, NewTProtocolException(err) } if string(b) != string(JSON_NULL) { e := fmt.Errorf("Expected a JSON string, found unquoted data started with %s", string(b)) return v, NewTProtocolExceptionWithType(INVALID_DATA, e) } } else { e := fmt.Errorf("Expected a JSON string, found unquoted data started with %s", string(f)) return v, NewTProtocolExceptionWithType(INVALID_DATA, e) } return v, p.ParsePostValue() } func (p *TSimpleJSONProtocol) Flush() (err error) { return NewTProtocolException(p.writer.Flush()) } func (p *TSimpleJSONProtocol) Skip(fieldType TType) (err error) { return SkipDefaultDepth(p, fieldType) } func (p *TSimpleJSONProtocol) Transport() TTransport { return p.trans } func (p *TSimpleJSONProtocol) OutputPreValue() error { cxt := _ParseContext(p.dumpContext[len(p.dumpContext)-1]) switch cxt { case _CONTEXT_IN_LIST, _CONTEXT_IN_OBJECT_NEXT_KEY: if _, e := p.write(JSON_COMMA); e != nil { return NewTProtocolException(e) } break case _CONTEXT_IN_OBJECT_NEXT_VALUE: if _, e := p.write(JSON_COLON); e != nil { return NewTProtocolException(e) } break } return nil } func (p *TSimpleJSONProtocol) OutputPostValue() error { cxt := _ParseContext(p.dumpContext[len(p.dumpContext)-1]) switch cxt { case _CONTEXT_IN_LIST_FIRST: p.dumpContext = p.dumpContext[:len(p.dumpContext)-1] p.dumpContext = append(p.dumpContext, int(_CONTEXT_IN_LIST)) break case _CONTEXT_IN_OBJECT_FIRST: p.dumpContext = p.dumpContext[:len(p.dumpContext)-1] p.dumpContext = append(p.dumpContext, int(_CONTEXT_IN_OBJECT_NEXT_VALUE)) break case _CONTEXT_IN_OBJECT_NEXT_KEY: p.dumpContext = p.dumpContext[:len(p.dumpContext)-1] p.dumpContext = append(p.dumpContext, int(_CONTEXT_IN_OBJECT_NEXT_VALUE)) break case _CONTEXT_IN_OBJECT_NEXT_VALUE: p.dumpContext = p.dumpContext[:len(p.dumpContext)-1] p.dumpContext = append(p.dumpContext, int(_CONTEXT_IN_OBJECT_NEXT_KEY)) break } return nil } func (p *TSimpleJSONProtocol) OutputBool(value bool) error { if e := p.OutputPreValue(); e != nil { return e } var v string if value { v = string(JSON_TRUE) } else { v = string(JSON_FALSE) } switch _ParseContext(p.dumpContext[len(p.dumpContext)-1]) { case _CONTEXT_IN_OBJECT_FIRST, _CONTEXT_IN_OBJECT_NEXT_KEY: v = jsonQuote(v) default: } if e := p.OutputStringData(v); e != nil { return e } return p.OutputPostValue() } func (p *TSimpleJSONProtocol) OutputNull() error { if e := p.OutputPreValue(); e != nil { return e } if _, e := p.write(JSON_NULL); e != nil { return NewTProtocolException(e) } return p.OutputPostValue() } func (p *TSimpleJSONProtocol) OutputF64(value float64) error { if e := p.OutputPreValue(); e != nil { return e } var v string if math.IsNaN(value) { v = string(JSON_QUOTE) + JSON_NAN + string(JSON_QUOTE) } else if math.IsInf(value, 1) { v = string(JSON_QUOTE) + JSON_INFINITY + string(JSON_QUOTE) } else if math.IsInf(value, -1) { v = string(JSON_QUOTE) + JSON_NEGATIVE_INFINITY + string(JSON_QUOTE) } else { v = strconv.FormatFloat(value, 'g', -1, 64) switch _ParseContext(p.dumpContext[len(p.dumpContext)-1]) { case _CONTEXT_IN_OBJECT_FIRST, _CONTEXT_IN_OBJECT_NEXT_KEY: v = string(JSON_QUOTE) + v + string(JSON_QUOTE) default: } } if e := p.OutputStringData(v); e != nil { return e } return p.OutputPostValue() } func (p *TSimpleJSONProtocol) OutputI64(value int64) error { if e := p.OutputPreValue(); e != nil { return e } v := strconv.FormatInt(value, 10) switch _ParseContext(p.dumpContext[len(p.dumpContext)-1]) { case _CONTEXT_IN_OBJECT_FIRST, _CONTEXT_IN_OBJECT_NEXT_KEY: v = jsonQuote(v) default: } if e := p.OutputStringData(v); e != nil { return e } return p.OutputPostValue() } func (p *TSimpleJSONProtocol) OutputString(s string) error { if e := p.OutputPreValue(); e != nil { return e } if e := p.OutputStringData(jsonQuote(s)); e != nil { return e } return p.OutputPostValue() } func (p *TSimpleJSONProtocol) OutputStringData(s string) error { _, e := p.write([]byte(s)) return NewTProtocolException(e) } func (p *TSimpleJSONProtocol) OutputObjectBegin() error { if e := p.OutputPreValue(); e != nil { return e } if _, e := p.write(JSON_LBRACE); e != nil { return NewTProtocolException(e) } p.dumpContext = append(p.dumpContext, int(_CONTEXT_IN_OBJECT_FIRST)) return nil } func (p *TSimpleJSONProtocol) OutputObjectEnd() error { if _, e := p.write(JSON_RBRACE); e != nil { return NewTProtocolException(e) } p.dumpContext = p.dumpContext[:len(p.dumpContext)-1] if e := p.OutputPostValue(); e != nil { return e } return nil } func (p *TSimpleJSONProtocol) OutputListBegin() error { if e := p.OutputPreValue(); e != nil { return e } if _, e := p.write(JSON_LBRACKET); e != nil { return NewTProtocolException(e) } p.dumpContext = append(p.dumpContext, int(_CONTEXT_IN_LIST_FIRST)) return nil } func (p *TSimpleJSONProtocol) OutputListEnd() error { if _, e := p.write(JSON_RBRACKET); e != nil { return NewTProtocolException(e) } p.dumpContext = p.dumpContext[:len(p.dumpContext)-1] if e := p.OutputPostValue(); e != nil { return e } return nil } func (p *TSimpleJSONProtocol) OutputElemListBegin(elemType TType, size int) error { if e := p.OutputListBegin(); e != nil { return e } if e := p.WriteByte(int8(elemType)); e != nil { return e } if e := p.WriteI64(int64(size)); e != nil { return e } return nil } func (p *TSimpleJSONProtocol) ParsePreValue() error { if e := p.readNonSignificantWhitespace(); e != nil { return NewTProtocolException(e) } cxt := _ParseContext(p.parseContextStack[len(p.parseContextStack)-1]) b, _ := p.reader.Peek(1) switch cxt { case _CONTEXT_IN_LIST: if len(b) > 0 { switch b[0] { case JSON_RBRACKET[0]: return nil case JSON_COMMA[0]: p.reader.ReadByte() if e := p.readNonSignificantWhitespace(); e != nil { return NewTProtocolException(e) } return nil default: e := fmt.Errorf("Expected \"]\" or \",\" in list context, but found \"%s\"", string(b)) return NewTProtocolExceptionWithType(INVALID_DATA, e) } } break case _CONTEXT_IN_OBJECT_NEXT_KEY: if len(b) > 0 { switch b[0] { case JSON_RBRACE[0]: return nil case JSON_COMMA[0]: p.reader.ReadByte() if e := p.readNonSignificantWhitespace(); e != nil { return NewTProtocolException(e) } return nil default: e := fmt.Errorf("Expected \"}\" or \",\" in object context, but found \"%s\"", string(b)) return NewTProtocolExceptionWithType(INVALID_DATA, e) } } break case _CONTEXT_IN_OBJECT_NEXT_VALUE: if len(b) > 0 { switch b[0] { case JSON_COLON[0]: p.reader.ReadByte() if e := p.readNonSignificantWhitespace(); e != nil { return NewTProtocolException(e) } return nil default: e := fmt.Errorf("Expected \":\" in object context, but found \"%s\"", string(b)) return NewTProtocolExceptionWithType(INVALID_DATA, e) } } break } return nil } func (p *TSimpleJSONProtocol) ParsePostValue() error { if e := p.readNonSignificantWhitespace(); e != nil { return NewTProtocolException(e) } cxt := _ParseContext(p.parseContextStack[len(p.parseContextStack)-1]) switch cxt { case _CONTEXT_IN_LIST_FIRST: p.parseContextStack = p.parseContextStack[:len(p.parseContextStack)-1] p.parseContextStack = append(p.parseContextStack, int(_CONTEXT_IN_LIST)) break case _CONTEXT_IN_OBJECT_FIRST, _CONTEXT_IN_OBJECT_NEXT_KEY: p.parseContextStack = p.parseContextStack[:len(p.parseContextStack)-1] p.parseContextStack = append(p.parseContextStack, int(_CONTEXT_IN_OBJECT_NEXT_VALUE)) break case _CONTEXT_IN_OBJECT_NEXT_VALUE: p.parseContextStack = p.parseContextStack[:len(p.parseContextStack)-1] p.parseContextStack = append(p.parseContextStack, int(_CONTEXT_IN_OBJECT_NEXT_KEY)) break } return nil } func (p *TSimpleJSONProtocol) readNonSignificantWhitespace() error { for { b, _ := p.reader.Peek(1) if len(b) < 1 { return nil } switch b[0] { case ' ', '\r', '\n', '\t': p.reader.ReadByte() continue default: break } break } return nil } func (p *TSimpleJSONProtocol) ParseStringBody() (string, error) { line, err := p.reader.ReadString(JSON_QUOTE) if err != nil { return "", NewTProtocolException(err) } l := len(line) // count number of escapes to see if we need to keep going i := 1 for ; i < l; i++ { if line[l-i-1] != '\\' { break } } if i&0x01 == 1 { v, ok := jsonUnquote(string(JSON_QUOTE) + line) if !ok { return "", NewTProtocolException(err) } return v, nil } s, err := p.ParseQuotedStringBody() if err != nil { return "", NewTProtocolException(err) } str := string(JSON_QUOTE) + line + s v, ok := jsonUnquote(str) if !ok { e := fmt.Errorf("Unable to parse as JSON string %s", str) return "", NewTProtocolExceptionWithType(INVALID_DATA, e) } return v, nil } func (p *TSimpleJSONProtocol) ParseQuotedStringBody() (string, error) { line, err := p.reader.ReadString(JSON_QUOTE) if err != nil { return "", NewTProtocolException(err) } l := len(line) // count number of escapes to see if we need to keep going i := 1 for ; i < l; i++ { if line[l-i-1] != '\\' { break } } if i&0x01 == 1 { return line, nil } s, err := p.ParseQuotedStringBody() if err != nil { return "", NewTProtocolException(err) } v := line + s return v, nil } func (p *TSimpleJSONProtocol) ParseBase64EncodedBody() ([]byte, error) { line, err := p.reader.ReadBytes(JSON_QUOTE) if err != nil { return line, NewTProtocolException(err) } line2 := line[0 : len(line)-1] l := len(line2) if (l % 4) != 0 { pad := 4 - (l % 4) fill := [...]byte{'=', '=', '='} line2 = append(line2, fill[:pad]...) l = len(line2) } output := make([]byte, base64.StdEncoding.DecodedLen(l)) n, err := base64.StdEncoding.Decode(output, line2) return output[0:n], NewTProtocolException(err) } func (p *TSimpleJSONProtocol) ParseI64() (int64, bool, error) { if err := p.ParsePreValue(); err != nil { return 0, false, err } var value int64 var isnull bool if p.safePeekContains(JSON_NULL) { p.reader.Read(make([]byte, len(JSON_NULL))) isnull = true } else { num, err := p.readNumeric() isnull = (num == nil) if !isnull { value = num.Int64() } if err != nil { return value, isnull, err } } return value, isnull, p.ParsePostValue() } func (p *TSimpleJSONProtocol) ParseF64() (float64, bool, error) { if err := p.ParsePreValue(); err != nil { return 0, false, err } var value float64 var isnull bool if p.safePeekContains(JSON_NULL) { p.reader.Read(make([]byte, len(JSON_NULL))) isnull = true } else { num, err := p.readNumeric() isnull = (num == nil) if !isnull { value = num.Float64() } if err != nil { return value, isnull, err } } return value, isnull, p.ParsePostValue() } func (p *TSimpleJSONProtocol) ParseObjectStart() (bool, error) { if err := p.ParsePreValue(); err != nil { return false, err } var b []byte b, err := p.reader.Peek(1) if err != nil { return false, err } if len(b) > 0 && b[0] == JSON_LBRACE[0] { p.reader.ReadByte() p.parseContextStack = append(p.parseContextStack, int(_CONTEXT_IN_OBJECT_FIRST)) return false, nil } else if p.safePeekContains(JSON_NULL) { return true, nil } e := fmt.Errorf("Expected '{' or null, but found '%s'", string(b)) return false, NewTProtocolExceptionWithType(INVALID_DATA, e) } func (p *TSimpleJSONProtocol) ParseObjectEnd() error { if isNull, err := p.readIfNull(); isNull || err != nil { return err } cxt := _ParseContext(p.parseContextStack[len(p.parseContextStack)-1]) if (cxt != _CONTEXT_IN_OBJECT_FIRST) && (cxt != _CONTEXT_IN_OBJECT_NEXT_KEY) { e := fmt.Errorf("Expected to be in the Object Context, but not in Object Context (%d)", cxt) return NewTProtocolExceptionWithType(INVALID_DATA, e) } line, err := p.reader.ReadString(JSON_RBRACE[0]) if err != nil { return NewTProtocolException(err) } for _, char := range line { switch char { default: e := fmt.Errorf("Expecting end of object \"}\", but found: \"%s\"", line) return NewTProtocolExceptionWithType(INVALID_DATA, e) case ' ', '\n', '\r', '\t', '}': break } } p.parseContextStack = p.parseContextStack[:len(p.parseContextStack)-1] return p.ParsePostValue() } func (p *TSimpleJSONProtocol) ParseListBegin() (isNull bool, err error) { if e := p.ParsePreValue(); e != nil { return false, e } var b []byte b, err = p.reader.Peek(1) if err != nil { return false, err } if len(b) >= 1 && b[0] == JSON_LBRACKET[0] { p.parseContextStack = append(p.parseContextStack, int(_CONTEXT_IN_LIST_FIRST)) p.reader.ReadByte() isNull = false } else if p.safePeekContains(JSON_NULL) { isNull = true } else { err = fmt.Errorf("Expected \"null\" or \"[\", received %q", b) } return isNull, NewTProtocolExceptionWithType(INVALID_DATA, err) } func (p *TSimpleJSONProtocol) ParseElemListBegin() (elemType TType, size int, e error) { if isNull, e := p.ParseListBegin(); isNull || e != nil { return VOID, 0, e } bElemType, err := p.ReadByte() elemType = TType(bElemType) if err != nil { return elemType, size, err } nSize, err2 := p.ReadI64() size = int(nSize) return elemType, size, err2 } func (p *TSimpleJSONProtocol) ParseListEnd() error { if isNull, err := p.readIfNull(); isNull || err != nil { return err } cxt := _ParseContext(p.parseContextStack[len(p.parseContextStack)-1]) if cxt != _CONTEXT_IN_LIST { e := fmt.Errorf("Expected to be in the List Context, but not in List Context (%d)", cxt) return NewTProtocolExceptionWithType(INVALID_DATA, e) } line, err := p.reader.ReadString(JSON_RBRACKET[0]) if err != nil { return NewTProtocolException(err) } for _, char := range line { switch char { default: e := fmt.Errorf("Expecting end of list \"]\", but found: \"", line, "\"") return NewTProtocolExceptionWithType(INVALID_DATA, e) case ' ', '\n', '\r', '\t', rune(JSON_RBRACKET[0]): break } } p.parseContextStack = p.parseContextStack[:len(p.parseContextStack)-1] if _ParseContext(p.parseContextStack[len(p.parseContextStack)-1]) == _CONTEXT_IN_TOPLEVEL { return nil } return p.ParsePostValue() } func (p *TSimpleJSONProtocol) readSingleValue() (interface{}, TType, error) { e := p.readNonSignificantWhitespace() if e != nil { return nil, VOID, NewTProtocolException(e) } b, e := p.reader.Peek(1) if len(b) > 0 { c := b[0] switch c { case JSON_NULL[0]: buf := make([]byte, len(JSON_NULL)) _, e := p.reader.Read(buf) if e != nil { return nil, VOID, NewTProtocolException(e) } if string(JSON_NULL) != string(buf) { e = mismatch(string(JSON_NULL), string(buf)) return nil, VOID, NewTProtocolExceptionWithType(INVALID_DATA, e) } return nil, VOID, nil case JSON_QUOTE: p.reader.ReadByte() v, e := p.ParseStringBody() if e != nil { return v, UTF8, NewTProtocolException(e) } if v == JSON_INFINITY { return INFINITY, DOUBLE, nil } else if v == JSON_NEGATIVE_INFINITY { return NEGATIVE_INFINITY, DOUBLE, nil } else if v == JSON_NAN { return NAN, DOUBLE, nil } return v, UTF8, nil case JSON_TRUE[0]: buf := make([]byte, len(JSON_TRUE)) _, e := p.reader.Read(buf) if e != nil { return true, BOOL, NewTProtocolException(e) } if string(JSON_TRUE) != string(buf) { e := mismatch(string(JSON_TRUE), string(buf)) return true, BOOL, NewTProtocolExceptionWithType(INVALID_DATA, e) } return true, BOOL, nil case JSON_FALSE[0]: buf := make([]byte, len(JSON_FALSE)) _, e := p.reader.Read(buf) if e != nil { return false, BOOL, NewTProtocolException(e) } if string(JSON_FALSE) != string(buf) { e := mismatch(string(JSON_FALSE), string(buf)) return false, BOOL, NewTProtocolExceptionWithType(INVALID_DATA, e) } return false, BOOL, nil case JSON_LBRACKET[0]: _, e := p.reader.ReadByte() return make([]interface{}, 0), LIST, NewTProtocolException(e) case JSON_LBRACE[0]: _, e := p.reader.ReadByte() return make(map[string]interface{}), STRUCT, NewTProtocolException(e) case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'e', 'E', '.', '+', '-', JSON_INFINITY[0], JSON_NAN[0]: // assume numeric v, e := p.readNumeric() return v, DOUBLE, e default: e := fmt.Errorf("Expected element in list but found '%s' while parsing JSON.", string(c)) return nil, VOID, NewTProtocolExceptionWithType(INVALID_DATA, e) } } e = fmt.Errorf("Cannot read a single element while parsing JSON.") return nil, VOID, NewTProtocolExceptionWithType(INVALID_DATA, e) } func (p *TSimpleJSONProtocol) readIfNull() (bool, error) { cont := true for cont { b, _ := p.reader.Peek(1) if len(b) < 1 { return false, nil } switch b[0] { default: return false, nil case JSON_NULL[0]: cont = false break case ' ', '\n', '\r', '\t': p.reader.ReadByte() break } } if p.safePeekContains(JSON_NULL) { p.reader.Read(make([]byte, len(JSON_NULL))) return true, nil } return false, nil } func (p *TSimpleJSONProtocol) readQuoteIfNext() { b, _ := p.reader.Peek(1) if len(b) > 0 && b[0] == JSON_QUOTE { p.reader.ReadByte() } } func (p *TSimpleJSONProtocol) readNumeric() (Numeric, error) { isNull, err := p.readIfNull() if isNull || err != nil { return NUMERIC_NULL, err } hasDecimalPoint := false nextCanBeSign := true hasE := false MAX_LEN := 40 buf := bytes.NewBuffer(make([]byte, 0, MAX_LEN)) continueFor := true inQuotes := false for continueFor { c, err := p.reader.ReadByte() if err != nil { if err == io.EOF { break } return NUMERIC_NULL, NewTProtocolException(err) } switch c { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': buf.WriteByte(c) nextCanBeSign = false case '.': if hasDecimalPoint { e := fmt.Errorf("Unable to parse number with multiple decimal points '%s.'", buf.String()) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } if hasE { e := fmt.Errorf("Unable to parse number with decimal points in the exponent '%s.'", buf.String()) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } buf.WriteByte(c) hasDecimalPoint, nextCanBeSign = true, false case 'e', 'E': if hasE { e := fmt.Errorf("Unable to parse number with multiple exponents '%s%c'", buf.String(), c) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } buf.WriteByte(c) hasE, nextCanBeSign = true, true case '-', '+': if !nextCanBeSign { e := fmt.Errorf("Negative sign within number") return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } buf.WriteByte(c) nextCanBeSign = false case ' ', 0, '\t', '\n', '\r', JSON_RBRACE[0], JSON_RBRACKET[0], JSON_COMMA[0], JSON_COLON[0]: p.reader.UnreadByte() continueFor = false case JSON_NAN[0]: if buf.Len() == 0 { buffer := make([]byte, len(JSON_NAN)) buffer[0] = c _, e := p.reader.Read(buffer[1:]) if e != nil { return NUMERIC_NULL, NewTProtocolException(e) } if JSON_NAN != string(buffer) { e := mismatch(JSON_NAN, string(buffer)) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } if inQuotes { p.readQuoteIfNext() } return NAN, nil } else { e := fmt.Errorf("Unable to parse number starting with character '%c'", c) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } case JSON_INFINITY[0]: if buf.Len() == 0 || (buf.Len() == 1 && buf.Bytes()[0] == '+') { buffer := make([]byte, len(JSON_INFINITY)) buffer[0] = c _, e := p.reader.Read(buffer[1:]) if e != nil { return NUMERIC_NULL, NewTProtocolException(e) } if JSON_INFINITY != string(buffer) { e := mismatch(JSON_INFINITY, string(buffer)) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } if inQuotes { p.readQuoteIfNext() } return INFINITY, nil } else if buf.Len() == 1 && buf.Bytes()[0] == JSON_NEGATIVE_INFINITY[0] { buffer := make([]byte, len(JSON_NEGATIVE_INFINITY)) buffer[0] = JSON_NEGATIVE_INFINITY[0] buffer[1] = c _, e := p.reader.Read(buffer[2:]) if e != nil { return NUMERIC_NULL, NewTProtocolException(e) } if JSON_NEGATIVE_INFINITY != string(buffer) { e := mismatch(JSON_NEGATIVE_INFINITY, string(buffer)) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } if inQuotes { p.readQuoteIfNext() } return NEGATIVE_INFINITY, nil } else { e := fmt.Errorf("Unable to parse number starting with character '%c' due to existing buffer %s", c, buf.String()) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } case JSON_QUOTE: if !inQuotes { inQuotes = true } else { break } default: e := fmt.Errorf("Unable to parse number starting with character '%c'", c) return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } } if buf.Len() == 0 { e := fmt.Errorf("Unable to parse number from empty string ''") return NUMERIC_NULL, NewTProtocolExceptionWithType(INVALID_DATA, e) } return NewNumericFromJSONString(buf.String(), false), nil } // Safely peeks into the buffer, reading only what is necessary func (p *TSimpleJSONProtocol) safePeekContains(b []byte) bool { for i := 0; i < len(b); i++ { a, _ := p.reader.Peek(i + 1) if len(a) == 0 || a[i] != b[i] { return false } } return true } // Reset the context stack to its initial state. func (p *TSimpleJSONProtocol) resetContextStack() { p.parseContextStack = []int{int(_CONTEXT_IN_TOPLEVEL)} p.dumpContext = []int{int(_CONTEXT_IN_TOPLEVEL)} } func (p *TSimpleJSONProtocol) write(b []byte) (int, error) { n, err := p.writer.Write(b) if err != nil { p.writer.Reset(p.trans) // THRIFT-3735 } return n, err }
{ "pile_set_name": "Github" }
[kakao](../../index.md) / [com.agoda.kakao.delegate](../index.md) / [WebInteractionDelegate](index.md) / [&lt;init&gt;](./-init-.md) # &lt;init&gt; `WebInteractionDelegate(interaction: WebInteraction<*>)` Delegation class for [Web.WebInteraction](#). Wraps all available public calls and intercepts [check](check.md) and [perform](perform.md). **See Also** [Delegate](../-delegate/index.md) [Interceptor](../../com.agoda.kakao.intercept/-interceptor/index.md)
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 25 2017 03:49:04). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <swiftCore/_TtCs12_SwiftObject.h> @interface _TtC13ControlCenter17SidecarController : _TtCs12_SwiftObject { // Error parsing type: , name: __devices // Error parsing type: , name: displayManager // Error parsing type: , name: touchbarAllowed // Error parsing type: , name: statusNotification // Error parsing type: , name: statusSubscriber // Error parsing type: , name: cancellables } @end
{ "pile_set_name": "Github" }
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Contributor(s): # Mark Pilgrim - port to Python # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA ######################### END LICENSE BLOCK ######################### # EUCTW frequency table # Converted from big5 work # by Taiwan's Mandarin Promotion Council # <http:#www.edu.tw:81/mandr/> # 128 --> 0.42261 # 256 --> 0.57851 # 512 --> 0.74851 # 1024 --> 0.89384 # 2048 --> 0.97583 # # Idea Distribution Ratio = 0.74851/(1-0.74851) =2.98 # Random Distribution Ration = 512/(5401-512)=0.105 # # Typical Distribution Ratio about 25% of Ideal one, still much higher than RDR EUCTW_TYPICAL_DISTRIBUTION_RATIO = 0.75 # Char to FreqOrder table , EUCTW_TABLE_SIZE = 8102 EUCTWCharToFreqOrder = ( 1,1800,1506, 255,1431, 198, 9, 82, 6,7310, 177, 202,3615,1256,2808, 110, # 2742 3735, 33,3241, 261, 76, 44,2113, 16,2931,2184,1176, 659,3868, 26,3404,2643, # 2758 1198,3869,3313,4060, 410,2211, 302, 590, 361,1963, 8, 204, 58,4296,7311,1931, # 2774 63,7312,7313, 317,1614, 75, 222, 159,4061,2412,1480,7314,3500,3068, 224,2809, # 2790 3616, 3, 10,3870,1471, 29,2774,1135,2852,1939, 873, 130,3242,1123, 312,7315, # 2806 4297,2051, 507, 252, 682,7316, 142,1914, 124, 206,2932, 34,3501,3173, 64, 604, # 2822 7317,2494,1976,1977, 155,1990, 645, 641,1606,7318,3405, 337, 72, 406,7319, 80, # 2838 630, 238,3174,1509, 263, 939,1092,2644, 756,1440,1094,3406, 449, 69,2969, 591, # 2854 179,2095, 471, 115,2034,1843, 60, 50,2970, 134, 806,1868, 734,2035,3407, 180, # 2870 995,1607, 156, 537,2893, 688,7320, 319,1305, 779,2144, 514,2374, 298,4298, 359, # 2886 2495, 90,2707,1338, 663, 11, 906,1099,2545, 20,2436, 182, 532,1716,7321, 732, # 2902 1376,4062,1311,1420,3175, 25,2312,1056, 113, 399, 382,1949, 242,3408,2467, 529, # 2918 3243, 475,1447,3617,7322, 117, 21, 656, 810,1297,2295,2329,3502,7323, 126,4063, # 2934 706, 456, 150, 613,4299, 71,1118,2036,4064, 145,3069, 85, 835, 486,2114,1246, # 2950 1426, 428, 727,1285,1015, 800, 106, 623, 303,1281,7324,2127,2354, 347,3736, 221, # 2966 3503,3110,7325,1955,1153,4065, 83, 296,1199,3070, 192, 624, 93,7326, 822,1897, # 2982 2810,3111, 795,2064, 991,1554,1542,1592, 27, 43,2853, 859, 139,1456, 860,4300, # 2998 437, 712,3871, 164,2392,3112, 695, 211,3017,2096, 195,3872,1608,3504,3505,3618, # 3014 3873, 234, 811,2971,2097,3874,2229,1441,3506,1615,2375, 668,2076,1638, 305, 228, # 3030 1664,4301, 467, 415,7327, 262,2098,1593, 239, 108, 300, 200,1033, 512,1247,2077, # 3046 7328,7329,2173,3176,3619,2673, 593, 845,1062,3244, 88,1723,2037,3875,1950, 212, # 3062 266, 152, 149, 468,1898,4066,4302, 77, 187,7330,3018, 37, 5,2972,7331,3876, # 3078 7332,7333, 39,2517,4303,2894,3177,2078, 55, 148, 74,4304, 545, 483,1474,1029, # 3094 1665, 217,1869,1531,3113,1104,2645,4067, 24, 172,3507, 900,3877,3508,3509,4305, # 3110 32,1408,2811,1312, 329, 487,2355,2247,2708, 784,2674, 4,3019,3314,1427,1788, # 3126 188, 109, 499,7334,3620,1717,1789, 888,1217,3020,4306,7335,3510,7336,3315,1520, # 3142 3621,3878, 196,1034, 775,7337,7338, 929,1815, 249, 439, 38,7339,1063,7340, 794, # 3158 3879,1435,2296, 46, 178,3245,2065,7341,2376,7342, 214,1709,4307, 804, 35, 707, # 3174 324,3622,1601,2546, 140, 459,4068,7343,7344,1365, 839, 272, 978,2257,2572,3409, # 3190 2128,1363,3623,1423, 697, 100,3071, 48, 70,1231, 495,3114,2193,7345,1294,7346, # 3206 2079, 462, 586,1042,3246, 853, 256, 988, 185,2377,3410,1698, 434,1084,7347,3411, # 3222 314,2615,2775,4308,2330,2331, 569,2280, 637,1816,2518, 757,1162,1878,1616,3412, # 3238 287,1577,2115, 768,4309,1671,2854,3511,2519,1321,3737, 909,2413,7348,4069, 933, # 3254 3738,7349,2052,2356,1222,4310, 765,2414,1322, 786,4311,7350,1919,1462,1677,2895, # 3270 1699,7351,4312,1424,2437,3115,3624,2590,3316,1774,1940,3413,3880,4070, 309,1369, # 3286 1130,2812, 364,2230,1653,1299,3881,3512,3882,3883,2646, 525,1085,3021, 902,2000, # 3302 1475, 964,4313, 421,1844,1415,1057,2281, 940,1364,3116, 376,4314,4315,1381, 7, # 3318 2520, 983,2378, 336,1710,2675,1845, 321,3414, 559,1131,3022,2742,1808,1132,1313, # 3334 265,1481,1857,7352, 352,1203,2813,3247, 167,1089, 420,2814, 776, 792,1724,3513, # 3350 4071,2438,3248,7353,4072,7354, 446, 229, 333,2743, 901,3739,1200,1557,4316,2647, # 3366 1920, 395,2744,2676,3740,4073,1835, 125, 916,3178,2616,4317,7355,7356,3741,7357, # 3382 7358,7359,4318,3117,3625,1133,2547,1757,3415,1510,2313,1409,3514,7360,2145, 438, # 3398 2591,2896,2379,3317,1068, 958,3023, 461, 311,2855,2677,4074,1915,3179,4075,1978, # 3414 383, 750,2745,2617,4076, 274, 539, 385,1278,1442,7361,1154,1964, 384, 561, 210, # 3430 98,1295,2548,3515,7362,1711,2415,1482,3416,3884,2897,1257, 129,7363,3742, 642, # 3446 523,2776,2777,2648,7364, 141,2231,1333, 68, 176, 441, 876, 907,4077, 603,2592, # 3462 710, 171,3417, 404, 549, 18,3118,2393,1410,3626,1666,7365,3516,4319,2898,4320, # 3478 7366,2973, 368,7367, 146, 366, 99, 871,3627,1543, 748, 807,1586,1185, 22,2258, # 3494 379,3743,3180,7368,3181, 505,1941,2618,1991,1382,2314,7369, 380,2357, 218, 702, # 3510 1817,1248,3418,3024,3517,3318,3249,7370,2974,3628, 930,3250,3744,7371, 59,7372, # 3526 585, 601,4078, 497,3419,1112,1314,4321,1801,7373,1223,1472,2174,7374, 749,1836, # 3542 690,1899,3745,1772,3885,1476, 429,1043,1790,2232,2116, 917,4079, 447,1086,1629, # 3558 7375, 556,7376,7377,2020,1654, 844,1090, 105, 550, 966,1758,2815,1008,1782, 686, # 3574 1095,7378,2282, 793,1602,7379,3518,2593,4322,4080,2933,2297,4323,3746, 980,2496, # 3590 544, 353, 527,4324, 908,2678,2899,7380, 381,2619,1942,1348,7381,1341,1252, 560, # 3606 3072,7382,3420,2856,7383,2053, 973, 886,2080, 143,4325,7384,7385, 157,3886, 496, # 3622 4081, 57, 840, 540,2038,4326,4327,3421,2117,1445, 970,2259,1748,1965,2081,4082, # 3638 3119,1234,1775,3251,2816,3629, 773,1206,2129,1066,2039,1326,3887,1738,1725,4083, # 3654 279,3120, 51,1544,2594, 423,1578,2130,2066, 173,4328,1879,7386,7387,1583, 264, # 3670 610,3630,4329,2439, 280, 154,7388,7389,7390,1739, 338,1282,3073, 693,2857,1411, # 3686 1074,3747,2440,7391,4330,7392,7393,1240, 952,2394,7394,2900,1538,2679, 685,1483, # 3702 4084,2468,1436, 953,4085,2054,4331, 671,2395, 79,4086,2441,3252, 608, 567,2680, # 3718 3422,4087,4088,1691, 393,1261,1791,2396,7395,4332,7396,7397,7398,7399,1383,1672, # 3734 3748,3182,1464, 522,1119, 661,1150, 216, 675,4333,3888,1432,3519, 609,4334,2681, # 3750 2397,7400,7401,7402,4089,3025, 0,7403,2469, 315, 231,2442, 301,3319,4335,2380, # 3766 7404, 233,4090,3631,1818,4336,4337,7405, 96,1776,1315,2082,7406, 257,7407,1809, # 3782 3632,2709,1139,1819,4091,2021,1124,2163,2778,1777,2649,7408,3074, 363,1655,3183, # 3798 7409,2975,7410,7411,7412,3889,1567,3890, 718, 103,3184, 849,1443, 341,3320,2934, # 3814 1484,7413,1712, 127, 67, 339,4092,2398, 679,1412, 821,7414,7415, 834, 738, 351, # 3830 2976,2146, 846, 235,1497,1880, 418,1992,3749,2710, 186,1100,2147,2746,3520,1545, # 3846 1355,2935,2858,1377, 583,3891,4093,2573,2977,7416,1298,3633,1078,2549,3634,2358, # 3862 78,3750,3751, 267,1289,2099,2001,1594,4094, 348, 369,1274,2194,2175,1837,4338, # 3878 1820,2817,3635,2747,2283,2002,4339,2936,2748, 144,3321, 882,4340,3892,2749,3423, # 3894 4341,2901,7417,4095,1726, 320,7418,3893,3026, 788,2978,7419,2818,1773,1327,2859, # 3910 3894,2819,7420,1306,4342,2003,1700,3752,3521,2359,2650, 787,2022, 506, 824,3636, # 3926 534, 323,4343,1044,3322,2023,1900, 946,3424,7421,1778,1500,1678,7422,1881,4344, # 3942 165, 243,4345,3637,2521, 123, 683,4096, 764,4346, 36,3895,1792, 589,2902, 816, # 3958 626,1667,3027,2233,1639,1555,1622,3753,3896,7423,3897,2860,1370,1228,1932, 891, # 3974 2083,2903, 304,4097,7424, 292,2979,2711,3522, 691,2100,4098,1115,4347, 118, 662, # 3990 7425, 611,1156, 854,2381,1316,2861, 2, 386, 515,2904,7426,7427,3253, 868,2234, # 4006 1486, 855,2651, 785,2212,3028,7428,1040,3185,3523,7429,3121, 448,7430,1525,7431, # 4022 2164,4348,7432,3754,7433,4099,2820,3524,3122, 503, 818,3898,3123,1568, 814, 676, # 4038 1444, 306,1749,7434,3755,1416,1030, 197,1428, 805,2821,1501,4349,7435,7436,7437, # 4054 1993,7438,4350,7439,7440,2195, 13,2779,3638,2980,3124,1229,1916,7441,3756,2131, # 4070 7442,4100,4351,2399,3525,7443,2213,1511,1727,1120,7444,7445, 646,3757,2443, 307, # 4086 7446,7447,1595,3186,7448,7449,7450,3639,1113,1356,3899,1465,2522,2523,7451, 519, # 4102 7452, 128,2132, 92,2284,1979,7453,3900,1512, 342,3125,2196,7454,2780,2214,1980, # 4118 3323,7455, 290,1656,1317, 789, 827,2360,7456,3758,4352, 562, 581,3901,7457, 401, # 4134 4353,2248, 94,4354,1399,2781,7458,1463,2024,4355,3187,1943,7459, 828,1105,4101, # 4150 1262,1394,7460,4102, 605,4356,7461,1783,2862,7462,2822, 819,2101, 578,2197,2937, # 4166 7463,1502, 436,3254,4103,3255,2823,3902,2905,3425,3426,7464,2712,2315,7465,7466, # 4182 2332,2067, 23,4357, 193, 826,3759,2102, 699,1630,4104,3075, 390,1793,1064,3526, # 4198 7467,1579,3076,3077,1400,7468,4105,1838,1640,2863,7469,4358,4359, 137,4106, 598, # 4214 3078,1966, 780, 104, 974,2938,7470, 278, 899, 253, 402, 572, 504, 493,1339,7471, # 4230 3903,1275,4360,2574,2550,7472,3640,3029,3079,2249, 565,1334,2713, 863, 41,7473, # 4246 7474,4361,7475,1657,2333, 19, 463,2750,4107, 606,7476,2981,3256,1087,2084,1323, # 4262 2652,2982,7477,1631,1623,1750,4108,2682,7478,2864, 791,2714,2653,2334, 232,2416, # 4278 7479,2983,1498,7480,2654,2620, 755,1366,3641,3257,3126,2025,1609, 119,1917,3427, # 4294 862,1026,4109,7481,3904,3760,4362,3905,4363,2260,1951,2470,7482,1125, 817,4110, # 4310 4111,3906,1513,1766,2040,1487,4112,3030,3258,2824,3761,3127,7483,7484,1507,7485, # 4326 2683, 733, 40,1632,1106,2865, 345,4113, 841,2524, 230,4364,2984,1846,3259,3428, # 4342 7486,1263, 986,3429,7487, 735, 879, 254,1137, 857, 622,1300,1180,1388,1562,3907, # 4358 3908,2939, 967,2751,2655,1349, 592,2133,1692,3324,2985,1994,4114,1679,3909,1901, # 4374 2185,7488, 739,3642,2715,1296,1290,7489,4115,2198,2199,1921,1563,2595,2551,1870, # 4390 2752,2986,7490, 435,7491, 343,1108, 596, 17,1751,4365,2235,3430,3643,7492,4366, # 4406 294,3527,2940,1693, 477, 979, 281,2041,3528, 643,2042,3644,2621,2782,2261,1031, # 4422 2335,2134,2298,3529,4367, 367,1249,2552,7493,3530,7494,4368,1283,3325,2004, 240, # 4438 1762,3326,4369,4370, 836,1069,3128, 474,7495,2148,2525, 268,3531,7496,3188,1521, # 4454 1284,7497,1658,1546,4116,7498,3532,3533,7499,4117,3327,2684,1685,4118, 961,1673, # 4470 2622, 190,2005,2200,3762,4371,4372,7500, 570,2497,3645,1490,7501,4373,2623,3260, # 4486 1956,4374, 584,1514, 396,1045,1944,7502,4375,1967,2444,7503,7504,4376,3910, 619, # 4502 7505,3129,3261, 215,2006,2783,2553,3189,4377,3190,4378, 763,4119,3763,4379,7506, # 4518 7507,1957,1767,2941,3328,3646,1174, 452,1477,4380,3329,3130,7508,2825,1253,2382, # 4534 2186,1091,2285,4120, 492,7509, 638,1169,1824,2135,1752,3911, 648, 926,1021,1324, # 4550 4381, 520,4382, 997, 847,1007, 892,4383,3764,2262,1871,3647,7510,2400,1784,4384, # 4566 1952,2942,3080,3191,1728,4121,2043,3648,4385,2007,1701,3131,1551, 30,2263,4122, # 4582 7511,2026,4386,3534,7512, 501,7513,4123, 594,3431,2165,1821,3535,3432,3536,3192, # 4598 829,2826,4124,7514,1680,3132,1225,4125,7515,3262,4387,4126,3133,2336,7516,4388, # 4614 4127,7517,3912,3913,7518,1847,2383,2596,3330,7519,4389, 374,3914, 652,4128,4129, # 4630 375,1140, 798,7520,7521,7522,2361,4390,2264, 546,1659, 138,3031,2445,4391,7523, # 4646 2250, 612,1848, 910, 796,3765,1740,1371, 825,3766,3767,7524,2906,2554,7525, 692, # 4662 444,3032,2624, 801,4392,4130,7526,1491, 244,1053,3033,4131,4132, 340,7527,3915, # 4678 1041,2987, 293,1168, 87,1357,7528,1539, 959,7529,2236, 721, 694,4133,3768, 219, # 4694 1478, 644,1417,3331,2656,1413,1401,1335,1389,3916,7530,7531,2988,2362,3134,1825, # 4710 730,1515, 184,2827, 66,4393,7532,1660,2943, 246,3332, 378,1457, 226,3433, 975, # 4726 3917,2944,1264,3537, 674, 696,7533, 163,7534,1141,2417,2166, 713,3538,3333,4394, # 4742 3918,7535,7536,1186, 15,7537,1079,1070,7538,1522,3193,3539, 276,1050,2716, 758, # 4758 1126, 653,2945,3263,7539,2337, 889,3540,3919,3081,2989, 903,1250,4395,3920,3434, # 4774 3541,1342,1681,1718, 766,3264, 286, 89,2946,3649,7540,1713,7541,2597,3334,2990, # 4790 7542,2947,2215,3194,2866,7543,4396,2498,2526, 181, 387,1075,3921, 731,2187,3335, # 4806 7544,3265, 310, 313,3435,2299, 770,4134, 54,3034, 189,4397,3082,3769,3922,7545, # 4822 1230,1617,1849, 355,3542,4135,4398,3336, 111,4136,3650,1350,3135,3436,3035,4137, # 4838 2149,3266,3543,7546,2784,3923,3924,2991, 722,2008,7547,1071, 247,1207,2338,2471, # 4854 1378,4399,2009, 864,1437,1214,4400, 373,3770,1142,2216, 667,4401, 442,2753,2555, # 4870 3771,3925,1968,4138,3267,1839, 837, 170,1107, 934,1336,1882,7548,7549,2118,4139, # 4886 2828, 743,1569,7550,4402,4140, 582,2384,1418,3437,7551,1802,7552, 357,1395,1729, # 4902 3651,3268,2418,1564,2237,7553,3083,3772,1633,4403,1114,2085,4141,1532,7554, 482, # 4918 2446,4404,7555,7556,1492, 833,1466,7557,2717,3544,1641,2829,7558,1526,1272,3652, # 4934 4142,1686,1794, 416,2556,1902,1953,1803,7559,3773,2785,3774,1159,2316,7560,2867, # 4950 4405,1610,1584,3036,2419,2754, 443,3269,1163,3136,7561,7562,3926,7563,4143,2499, # 4966 3037,4406,3927,3137,2103,1647,3545,2010,1872,4144,7564,4145, 431,3438,7565, 250, # 4982 97, 81,4146,7566,1648,1850,1558, 160, 848,7567, 866, 740,1694,7568,2201,2830, # 4998 3195,4147,4407,3653,1687, 950,2472, 426, 469,3196,3654,3655,3928,7569,7570,1188, # 5014 424,1995, 861,3546,4148,3775,2202,2685, 168,1235,3547,4149,7571,2086,1674,4408, # 5030 3337,3270, 220,2557,1009,7572,3776, 670,2992, 332,1208, 717,7573,7574,3548,2447, # 5046 3929,3338,7575, 513,7576,1209,2868,3339,3138,4409,1080,7577,7578,7579,7580,2527, # 5062 3656,3549, 815,1587,3930,3931,7581,3550,3439,3777,1254,4410,1328,3038,1390,3932, # 5078 1741,3933,3778,3934,7582, 236,3779,2448,3271,7583,7584,3657,3780,1273,3781,4411, # 5094 7585, 308,7586,4412, 245,4413,1851,2473,1307,2575, 430, 715,2136,2449,7587, 270, # 5110 199,2869,3935,7588,3551,2718,1753, 761,1754, 725,1661,1840,4414,3440,3658,7589, # 5126 7590, 587, 14,3272, 227,2598, 326, 480,2265, 943,2755,3552, 291, 650,1883,7591, # 5142 1702,1226, 102,1547, 62,3441, 904,4415,3442,1164,4150,7592,7593,1224,1548,2756, # 5158 391, 498,1493,7594,1386,1419,7595,2055,1177,4416, 813, 880,1081,2363, 566,1145, # 5174 4417,2286,1001,1035,2558,2599,2238, 394,1286,7596,7597,2068,7598, 86,1494,1730, # 5190 3936, 491,1588, 745, 897,2948, 843,3340,3937,2757,2870,3273,1768, 998,2217,2069, # 5206 397,1826,1195,1969,3659,2993,3341, 284,7599,3782,2500,2137,2119,1903,7600,3938, # 5222 2150,3939,4151,1036,3443,1904, 114,2559,4152, 209,1527,7601,7602,2949,2831,2625, # 5238 2385,2719,3139, 812,2560,7603,3274,7604,1559, 737,1884,3660,1210, 885, 28,2686, # 5254 3553,3783,7605,4153,1004,1779,4418,7606, 346,1981,2218,2687,4419,3784,1742, 797, # 5270 1642,3940,1933,1072,1384,2151, 896,3941,3275,3661,3197,2871,3554,7607,2561,1958, # 5286 4420,2450,1785,7608,7609,7610,3942,4154,1005,1308,3662,4155,2720,4421,4422,1528, # 5302 2600, 161,1178,4156,1982, 987,4423,1101,4157, 631,3943,1157,3198,2420,1343,1241, # 5318 1016,2239,2562, 372, 877,2339,2501,1160, 555,1934, 911,3944,7611, 466,1170, 169, # 5334 1051,2907,2688,3663,2474,2994,1182,2011,2563,1251,2626,7612, 992,2340,3444,1540, # 5350 2721,1201,2070,2401,1996,2475,7613,4424, 528,1922,2188,1503,1873,1570,2364,3342, # 5366 3276,7614, 557,1073,7615,1827,3445,2087,2266,3140,3039,3084, 767,3085,2786,4425, # 5382 1006,4158,4426,2341,1267,2176,3664,3199, 778,3945,3200,2722,1597,2657,7616,4427, # 5398 7617,3446,7618,7619,7620,3277,2689,1433,3278, 131, 95,1504,3946, 723,4159,3141, # 5414 1841,3555,2758,2189,3947,2027,2104,3665,7621,2995,3948,1218,7622,3343,3201,3949, # 5430 4160,2576, 248,1634,3785, 912,7623,2832,3666,3040,3786, 654, 53,7624,2996,7625, # 5446 1688,4428, 777,3447,1032,3950,1425,7626, 191, 820,2120,2833, 971,4429, 931,3202, # 5462 135, 664, 783,3787,1997, 772,2908,1935,3951,3788,4430,2909,3203, 282,2723, 640, # 5478 1372,3448,1127, 922, 325,3344,7627,7628, 711,2044,7629,7630,3952,2219,2787,1936, # 5494 3953,3345,2220,2251,3789,2300,7631,4431,3790,1258,3279,3954,3204,2138,2950,3955, # 5510 3956,7632,2221, 258,3205,4432, 101,1227,7633,3280,1755,7634,1391,3281,7635,2910, # 5526 2056, 893,7636,7637,7638,1402,4161,2342,7639,7640,3206,3556,7641,7642, 878,1325, # 5542 1780,2788,4433, 259,1385,2577, 744,1183,2267,4434,7643,3957,2502,7644, 684,1024, # 5558 4162,7645, 472,3557,3449,1165,3282,3958,3959, 322,2152, 881, 455,1695,1152,1340, # 5574 660, 554,2153,4435,1058,4436,4163, 830,1065,3346,3960,4437,1923,7646,1703,1918, # 5590 7647, 932,2268, 122,7648,4438, 947, 677,7649,3791,2627, 297,1905,1924,2269,4439, # 5606 2317,3283,7650,7651,4164,7652,4165, 84,4166, 112, 989,7653, 547,1059,3961, 701, # 5622 3558,1019,7654,4167,7655,3450, 942, 639, 457,2301,2451, 993,2951, 407, 851, 494, # 5638 4440,3347, 927,7656,1237,7657,2421,3348, 573,4168, 680, 921,2911,1279,1874, 285, # 5654 790,1448,1983, 719,2167,7658,7659,4441,3962,3963,1649,7660,1541, 563,7661,1077, # 5670 7662,3349,3041,3451, 511,2997,3964,3965,3667,3966,1268,2564,3350,3207,4442,4443, # 5686 7663, 535,1048,1276,1189,2912,2028,3142,1438,1373,2834,2952,1134,2012,7664,4169, # 5702 1238,2578,3086,1259,7665, 700,7666,2953,3143,3668,4170,7667,4171,1146,1875,1906, # 5718 4444,2601,3967, 781,2422, 132,1589, 203, 147, 273,2789,2402, 898,1786,2154,3968, # 5734 3969,7668,3792,2790,7669,7670,4445,4446,7671,3208,7672,1635,3793, 965,7673,1804, # 5750 2690,1516,3559,1121,1082,1329,3284,3970,1449,3794, 65,1128,2835,2913,2759,1590, # 5766 3795,7674,7675, 12,2658, 45, 976,2579,3144,4447, 517,2528,1013,1037,3209,7676, # 5782 3796,2836,7677,3797,7678,3452,7679,2602, 614,1998,2318,3798,3087,2724,2628,7680, # 5798 2580,4172, 599,1269,7681,1810,3669,7682,2691,3088, 759,1060, 489,1805,3351,3285, # 5814 1358,7683,7684,2386,1387,1215,2629,2252, 490,7685,7686,4173,1759,2387,2343,7687, # 5830 4448,3799,1907,3971,2630,1806,3210,4449,3453,3286,2760,2344, 874,7688,7689,3454, # 5846 3670,1858, 91,2914,3671,3042,3800,4450,7690,3145,3972,2659,7691,3455,1202,1403, # 5862 3801,2954,2529,1517,2503,4451,3456,2504,7692,4452,7693,2692,1885,1495,1731,3973, # 5878 2365,4453,7694,2029,7695,7696,3974,2693,1216, 237,2581,4174,2319,3975,3802,4454, # 5894 4455,2694,3560,3457, 445,4456,7697,7698,7699,7700,2761, 61,3976,3672,1822,3977, # 5910 7701, 687,2045, 935, 925, 405,2660, 703,1096,1859,2725,4457,3978,1876,1367,2695, # 5926 3352, 918,2105,1781,2476, 334,3287,1611,1093,4458, 564,3146,3458,3673,3353, 945, # 5942 2631,2057,4459,7702,1925, 872,4175,7703,3459,2696,3089, 349,4176,3674,3979,4460, # 5958 3803,4177,3675,2155,3980,4461,4462,4178,4463,2403,2046, 782,3981, 400, 251,4179, # 5974 1624,7704,7705, 277,3676, 299,1265, 476,1191,3804,2121,4180,4181,1109, 205,7706, # 5990 2582,1000,2156,3561,1860,7707,7708,7709,4464,7710,4465,2565, 107,2477,2157,3982, # 6006 3460,3147,7711,1533, 541,1301, 158, 753,4182,2872,3562,7712,1696, 370,1088,4183, # 6022 4466,3563, 579, 327, 440, 162,2240, 269,1937,1374,3461, 968,3043, 56,1396,3090, # 6038 2106,3288,3354,7713,1926,2158,4467,2998,7714,3564,7715,7716,3677,4468,2478,7717, # 6054 2791,7718,1650,4469,7719,2603,7720,7721,3983,2661,3355,1149,3356,3984,3805,3985, # 6070 7722,1076, 49,7723, 951,3211,3289,3290, 450,2837, 920,7724,1811,2792,2366,4184, # 6086 1908,1138,2367,3806,3462,7725,3212,4470,1909,1147,1518,2423,4471,3807,7726,4472, # 6102 2388,2604, 260,1795,3213,7727,7728,3808,3291, 708,7729,3565,1704,7730,3566,1351, # 6118 1618,3357,2999,1886, 944,4185,3358,4186,3044,3359,4187,7731,3678, 422, 413,1714, # 6134 3292, 500,2058,2345,4188,2479,7732,1344,1910, 954,7733,1668,7734,7735,3986,2404, # 6150 4189,3567,3809,4190,7736,2302,1318,2505,3091, 133,3092,2873,4473, 629, 31,2838, # 6166 2697,3810,4474, 850, 949,4475,3987,2955,1732,2088,4191,1496,1852,7737,3988, 620, # 6182 3214, 981,1242,3679,3360,1619,3680,1643,3293,2139,2452,1970,1719,3463,2168,7738, # 6198 3215,7739,7740,3361,1828,7741,1277,4476,1565,2047,7742,1636,3568,3093,7743, 869, # 6214 2839, 655,3811,3812,3094,3989,3000,3813,1310,3569,4477,7744,7745,7746,1733, 558, # 6230 4478,3681, 335,1549,3045,1756,4192,3682,1945,3464,1829,1291,1192, 470,2726,2107, # 6246 2793, 913,1054,3990,7747,1027,7748,3046,3991,4479, 982,2662,3362,3148,3465,3216, # 6262 3217,1946,2794,7749, 571,4480,7750,1830,7751,3570,2583,1523,2424,7752,2089, 984, # 6278 4481,3683,1959,7753,3684, 852, 923,2795,3466,3685, 969,1519, 999,2048,2320,1705, # 6294 7754,3095, 615,1662, 151, 597,3992,2405,2321,1049, 275,4482,3686,4193, 568,3687, # 6310 3571,2480,4194,3688,7755,2425,2270, 409,3218,7756,1566,2874,3467,1002, 769,2840, # 6326 194,2090,3149,3689,2222,3294,4195, 628,1505,7757,7758,1763,2177,3001,3993, 521, # 6342 1161,2584,1787,2203,2406,4483,3994,1625,4196,4197, 412, 42,3096, 464,7759,2632, # 6358 4484,3363,1760,1571,2875,3468,2530,1219,2204,3814,2633,2140,2368,4485,4486,3295, # 6374 1651,3364,3572,7760,7761,3573,2481,3469,7762,3690,7763,7764,2271,2091, 460,7765, # 6390 4487,7766,3002, 962, 588,3574, 289,3219,2634,1116, 52,7767,3047,1796,7768,7769, # 6406 7770,1467,7771,1598,1143,3691,4198,1984,1734,1067,4488,1280,3365, 465,4489,1572, # 6422 510,7772,1927,2241,1812,1644,3575,7773,4490,3692,7774,7775,2663,1573,1534,7776, # 6438 7777,4199, 536,1807,1761,3470,3815,3150,2635,7778,7779,7780,4491,3471,2915,1911, # 6454 2796,7781,3296,1122, 377,3220,7782, 360,7783,7784,4200,1529, 551,7785,2059,3693, # 6470 1769,2426,7786,2916,4201,3297,3097,2322,2108,2030,4492,1404, 136,1468,1479, 672, # 6486 1171,3221,2303, 271,3151,7787,2762,7788,2049, 678,2727, 865,1947,4493,7789,2013, # 6502 3995,2956,7790,2728,2223,1397,3048,3694,4494,4495,1735,2917,3366,3576,7791,3816, # 6518 509,2841,2453,2876,3817,7792,7793,3152,3153,4496,4202,2531,4497,2304,1166,1010, # 6534 552, 681,1887,7794,7795,2957,2958,3996,1287,1596,1861,3154, 358, 453, 736, 175, # 6550 478,1117, 905,1167,1097,7796,1853,1530,7797,1706,7798,2178,3472,2287,3695,3473, # 6566 3577,4203,2092,4204,7799,3367,1193,2482,4205,1458,2190,2205,1862,1888,1421,3298, # 6582 2918,3049,2179,3474, 595,2122,7800,3997,7801,7802,4206,1707,2636, 223,3696,1359, # 6598 751,3098, 183,3475,7803,2797,3003, 419,2369, 633, 704,3818,2389, 241,7804,7805, # 6614 7806, 838,3004,3697,2272,2763,2454,3819,1938,2050,3998,1309,3099,2242,1181,7807, # 6630 1136,2206,3820,2370,1446,4207,2305,4498,7808,7809,4208,1055,2605, 484,3698,7810, # 6646 3999, 625,4209,2273,3368,1499,4210,4000,7811,4001,4211,3222,2274,2275,3476,7812, # 6662 7813,2764, 808,2606,3699,3369,4002,4212,3100,2532, 526,3370,3821,4213, 955,7814, # 6678 1620,4214,2637,2427,7815,1429,3700,1669,1831, 994, 928,7816,3578,1260,7817,7818, # 6694 7819,1948,2288, 741,2919,1626,4215,2729,2455, 867,1184, 362,3371,1392,7820,7821, # 6710 4003,4216,1770,1736,3223,2920,4499,4500,1928,2698,1459,1158,7822,3050,3372,2877, # 6726 1292,1929,2506,2842,3701,1985,1187,2071,2014,2607,4217,7823,2566,2507,2169,3702, # 6742 2483,3299,7824,3703,4501,7825,7826, 666,1003,3005,1022,3579,4218,7827,4502,1813, # 6758 2253, 574,3822,1603, 295,1535, 705,3823,4219, 283, 858, 417,7828,7829,3224,4503, # 6774 4504,3051,1220,1889,1046,2276,2456,4004,1393,1599, 689,2567, 388,4220,7830,2484, # 6790 802,7831,2798,3824,2060,1405,2254,7832,4505,3825,2109,1052,1345,3225,1585,7833, # 6806 809,7834,7835,7836, 575,2730,3477, 956,1552,1469,1144,2323,7837,2324,1560,2457, # 6822 3580,3226,4005, 616,2207,3155,2180,2289,7838,1832,7839,3478,4506,7840,1319,3704, # 6838 3705,1211,3581,1023,3227,1293,2799,7841,7842,7843,3826, 607,2306,3827, 762,2878, # 6854 1439,4221,1360,7844,1485,3052,7845,4507,1038,4222,1450,2061,2638,4223,1379,4508, # 6870 2585,7846,7847,4224,1352,1414,2325,2921,1172,7848,7849,3828,3829,7850,1797,1451, # 6886 7851,7852,7853,7854,2922,4006,4007,2485,2346, 411,4008,4009,3582,3300,3101,4509, # 6902 1561,2664,1452,4010,1375,7855,7856, 47,2959, 316,7857,1406,1591,2923,3156,7858, # 6918 1025,2141,3102,3157, 354,2731, 884,2224,4225,2407, 508,3706, 726,3583, 996,2428, # 6934 3584, 729,7859, 392,2191,1453,4011,4510,3707,7860,7861,2458,3585,2608,1675,2800, # 6950 919,2347,2960,2348,1270,4511,4012, 73,7862,7863, 647,7864,3228,2843,2255,1550, # 6966 1346,3006,7865,1332, 883,3479,7866,7867,7868,7869,3301,2765,7870,1212, 831,1347, # 6982 4226,4512,2326,3830,1863,3053, 720,3831,4513,4514,3832,7871,4227,7872,7873,4515, # 6998 7874,7875,1798,4516,3708,2609,4517,3586,1645,2371,7876,7877,2924, 669,2208,2665, # 7014 2429,7878,2879,7879,7880,1028,3229,7881,4228,2408,7882,2256,1353,7883,7884,4518, # 7030 3158, 518,7885,4013,7886,4229,1960,7887,2142,4230,7888,7889,3007,2349,2350,3833, # 7046 516,1833,1454,4014,2699,4231,4519,2225,2610,1971,1129,3587,7890,2766,7891,2961, # 7062 1422, 577,1470,3008,1524,3373,7892,7893, 432,4232,3054,3480,7894,2586,1455,2508, # 7078 2226,1972,1175,7895,1020,2732,4015,3481,4520,7896,2733,7897,1743,1361,3055,3482, # 7094 2639,4016,4233,4521,2290, 895, 924,4234,2170, 331,2243,3056, 166,1627,3057,1098, # 7110 7898,1232,2880,2227,3374,4522, 657, 403,1196,2372, 542,3709,3375,1600,4235,3483, # 7126 7899,4523,2767,3230, 576, 530,1362,7900,4524,2533,2666,3710,4017,7901, 842,3834, # 7142 7902,2801,2031,1014,4018, 213,2700,3376, 665, 621,4236,7903,3711,2925,2430,7904, # 7158 2431,3302,3588,3377,7905,4237,2534,4238,4525,3589,1682,4239,3484,1380,7906, 724, # 7174 2277, 600,1670,7907,1337,1233,4526,3103,2244,7908,1621,4527,7909, 651,4240,7910, # 7190 1612,4241,2611,7911,2844,7912,2734,2307,3058,7913, 716,2459,3059, 174,1255,2701, # 7206 4019,3590, 548,1320,1398, 728,4020,1574,7914,1890,1197,3060,4021,7915,3061,3062, # 7222 3712,3591,3713, 747,7916, 635,4242,4528,7917,7918,7919,4243,7920,7921,4529,7922, # 7238 3378,4530,2432, 451,7923,3714,2535,2072,4244,2735,4245,4022,7924,1764,4531,7925, # 7254 4246, 350,7926,2278,2390,2486,7927,4247,4023,2245,1434,4024, 488,4532, 458,4248, # 7270 4025,3715, 771,1330,2391,3835,2568,3159,2159,2409,1553,2667,3160,4249,7928,2487, # 7286 2881,2612,1720,2702,4250,3379,4533,7929,2536,4251,7930,3231,4252,2768,7931,2015, # 7302 2736,7932,1155,1017,3716,3836,7933,3303,2308, 201,1864,4253,1430,7934,4026,7935, # 7318 7936,7937,7938,7939,4254,1604,7940, 414,1865, 371,2587,4534,4535,3485,2016,3104, # 7334 4536,1708, 960,4255, 887, 389,2171,1536,1663,1721,7941,2228,4027,2351,2926,1580, # 7350 7942,7943,7944,1744,7945,2537,4537,4538,7946,4539,7947,2073,7948,7949,3592,3380, # 7366 2882,4256,7950,4257,2640,3381,2802, 673,2703,2460, 709,3486,4028,3593,4258,7951, # 7382 1148, 502, 634,7952,7953,1204,4540,3594,1575,4541,2613,3717,7954,3718,3105, 948, # 7398 3232, 121,1745,3837,1110,7955,4259,3063,2509,3009,4029,3719,1151,1771,3838,1488, # 7414 4030,1986,7956,2433,3487,7957,7958,2093,7959,4260,3839,1213,1407,2803, 531,2737, # 7430 2538,3233,1011,1537,7960,2769,4261,3106,1061,7961,3720,3721,1866,2883,7962,2017, # 7446 120,4262,4263,2062,3595,3234,2309,3840,2668,3382,1954,4542,7963,7964,3488,1047, # 7462 2704,1266,7965,1368,4543,2845, 649,3383,3841,2539,2738,1102,2846,2669,7966,7967, # 7478 1999,7968,1111,3596,2962,7969,2488,3842,3597,2804,1854,3384,3722,7970,7971,3385, # 7494 2410,2884,3304,3235,3598,7972,2569,7973,3599,2805,4031,1460, 856,7974,3600,7975, # 7510 2885,2963,7976,2886,3843,7977,4264, 632,2510, 875,3844,1697,3845,2291,7978,7979, # 7526 4544,3010,1239, 580,4545,4265,7980, 914, 936,2074,1190,4032,1039,2123,7981,7982, # 7542 7983,3386,1473,7984,1354,4266,3846,7985,2172,3064,4033, 915,3305,4267,4268,3306, # 7558 1605,1834,7986,2739, 398,3601,4269,3847,4034, 328,1912,2847,4035,3848,1331,4270, # 7574 3011, 937,4271,7987,3602,4036,4037,3387,2160,4546,3388, 524, 742, 538,3065,1012, # 7590 7988,7989,3849,2461,7990, 658,1103, 225,3850,7991,7992,4547,7993,4548,7994,3236, # 7606 1243,7995,4038, 963,2246,4549,7996,2705,3603,3161,7997,7998,2588,2327,7999,4550, # 7622 8000,8001,8002,3489,3307, 957,3389,2540,2032,1930,2927,2462, 870,2018,3604,1746, # 7638 2770,2771,2434,2463,8003,3851,8004,3723,3107,3724,3490,3390,3725,8005,1179,3066, # 7654 8006,3162,2373,4272,3726,2541,3163,3108,2740,4039,8007,3391,1556,2542,2292, 977, # 7670 2887,2033,4040,1205,3392,8008,1765,3393,3164,2124,1271,1689, 714,4551,3491,8009, # 7686 2328,3852, 533,4273,3605,2181, 617,8010,2464,3308,3492,2310,8011,8012,3165,8013, # 7702 8014,3853,1987, 618, 427,2641,3493,3394,8015,8016,1244,1690,8017,2806,4274,4552, # 7718 8018,3494,8019,8020,2279,1576, 473,3606,4275,3395, 972,8021,3607,8022,3067,8023, # 7734 8024,4553,4554,8025,3727,4041,4042,8026, 153,4555, 356,8027,1891,2888,4276,2143, # 7750 408, 803,2352,8028,3854,8029,4277,1646,2570,2511,4556,4557,3855,8030,3856,4278, # 7766 8031,2411,3396, 752,8032,8033,1961,2964,8034, 746,3012,2465,8035,4279,3728, 698, # 7782 4558,1892,4280,3608,2543,4559,3609,3857,8036,3166,3397,8037,1823,1302,4043,2706, # 7798 3858,1973,4281,8038,4282,3167, 823,1303,1288,1236,2848,3495,4044,3398, 774,3859, # 7814 8039,1581,4560,1304,2849,3860,4561,8040,2435,2161,1083,3237,4283,4045,4284, 344, # 7830 1173, 288,2311, 454,1683,8041,8042,1461,4562,4046,2589,8043,8044,4563, 985, 894, # 7846 8045,3399,3168,8046,1913,2928,3729,1988,8047,2110,1974,8048,4047,8049,2571,1194, # 7862 425,8050,4564,3169,1245,3730,4285,8051,8052,2850,8053, 636,4565,1855,3861, 760, # 7878 1799,8054,4286,2209,1508,4566,4048,1893,1684,2293,8055,8056,8057,4287,4288,2210, # 7894 479,8058,8059, 832,8060,4049,2489,8061,2965,2490,3731, 990,3109, 627,1814,2642, # 7910 4289,1582,4290,2125,2111,3496,4567,8062, 799,4291,3170,8063,4568,2112,1737,3013, # 7926 1018, 543, 754,4292,3309,1676,4569,4570,4050,8064,1489,8065,3497,8066,2614,2889, # 7942 4051,8067,8068,2966,8069,8070,8071,8072,3171,4571,4572,2182,1722,8073,3238,3239, # 7958 1842,3610,1715, 481, 365,1975,1856,8074,8075,1962,2491,4573,8076,2126,3611,3240, # 7974 433,1894,2063,2075,8077, 602,2741,8078,8079,8080,8081,8082,3014,1628,3400,8083, # 7990 3172,4574,4052,2890,4575,2512,8084,2544,2772,8085,8086,8087,3310,4576,2891,8088, # 8006 4577,8089,2851,4578,4579,1221,2967,4053,2513,8090,8091,8092,1867,1989,8093,8094, # 8022 8095,1895,8096,8097,4580,1896,4054, 318,8098,2094,4055,4293,8099,8100, 485,8101, # 8038 938,3862, 553,2670, 116,8102,3863,3612,8103,3498,2671,2773,3401,3311,2807,8104, # 8054 3613,2929,4056,1747,2930,2968,8105,8106, 207,8107,8108,2672,4581,2514,8109,3015, # 8070 890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114, 941, # 8086 2294, 208,3499,4057,2019, 330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118, # 8102 #Everything below is of no interest for detection purpose 2515,1613,4582,8119,3312,3866,2516,8120,4058,8121,1637,4059,2466,4583,3867,8122, # 8118 2493,3016,3734,8123,8124,2192,8125,8126,2162,8127,8128,8129,8130,8131,8132,8133, # 8134 8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149, # 8150 8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165, # 8166 8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181, # 8182 8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197, # 8198 8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213, # 8214 8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229, # 8230 8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245, # 8246 8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261, # 8262 8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277, # 8278 8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293, # 8294 8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309, # 8310 8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325, # 8326 8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341, # 8342 8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357, # 8358 8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373, # 8374 8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389, # 8390 8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405, # 8406 8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421, # 8422 8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437, # 8438 8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453, # 8454 8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469, # 8470 8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485, # 8486 8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501, # 8502 8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517, # 8518 8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533, # 8534 8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549, # 8550 8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565, # 8566 8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581, # 8582 8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597, # 8598 8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613, # 8614 8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629, # 8630 8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645, # 8646 8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661, # 8662 8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677, # 8678 8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693, # 8694 8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709, # 8710 8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725, # 8726 8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741) # 8742 # flake8: noqa
{ "pile_set_name": "Github" }
/* * Copyright © 2015 Inria. All rights reserved. * See COPYING in top-level directory. */ #ifndef HWLOC_PORT_WINDOWS_WINDOWSX_H #define HWLOC_PORT_WINDOWS_WINDOWSX_H #endif /* HWLOC_PORT_WINDOWS_WINDOWSX_H */
{ "pile_set_name": "Github" }
/* Copyright 2016-2020 Heiko Burau * * This file is part of PIConGPU. * * PIConGPU is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PIConGPU 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 PIConGPU. * If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include "picongpu/simulation_defines.hpp" #include "ScaledSpectrum.hpp" #include "PhotonEmissionAngle.hpp" #include "picongpu/fields/FieldTmp.hpp" #include <pmacc/random/methods/methods.hpp> #include <pmacc/random/distributions/Uniform.hpp> #include <pmacc/random/RNGProvider.hpp> #include <pmacc/traits/Resolve.hpp> namespace picongpu { namespace particles { namespace bremsstrahlung { /** Handling of the Bremsstrahlung effect. * * Here the screened Bethe-Heitler cross section is used. See e.g.: * Salvat, F., et al. "Monte Carlo simulation of bremsstrahlung emission by electrons." * Radiation Physics and Chemistry 75.10 (2006): 1201-1219. * * The numerics separates the energy spectrum into two parts. In the low-energy part * photon emission is neglected and a drag force is applied to the electrons. In the high-energy part * photons are created in addition to the drag force. * * Electron deflection is treated as screened Rutherford scattering, see e.g. Jackson, chap. 13.5 * * The photon emission angle is taken from the Lorentz-boosted dipole radiation formula, * see e.g. Jackson, chap. 15.2 * * \tparam T_ElectronSpecies * \tparam T_PhotonSpecies */ template<typename T_IonSpecies, typename T_ElectronSpecies, typename T_PhotonSpecies> struct Bremsstrahlung { using IonSpecies = T_IonSpecies; using ElectronSpecies = T_ElectronSpecies; using PhotonSpecies = T_PhotonSpecies; using FrameType = typename ElectronSpecies::FrameType; /* specify field to particle interpolation scheme */ using Field2ParticleInterpolation = typename pmacc::traits::Resolve< typename GetFlagType<FrameType,interpolation<> >::type >::type; /* margins around the supercell for the interpolation of the field on the cells */ using LowerMargin = typename GetMargin<Field2ParticleInterpolation>::LowerMargin; using UpperMargin = typename GetMargin<Field2ParticleInterpolation>::UpperMargin; /* relevant area of a block */ using BlockArea = SuperCellDescription< typename MappingDesc::SuperCellSize, LowerMargin, UpperMargin >; BlockArea BlockDescription; using TVec = MappingDesc::SuperCellSize; using ValueTypeIonDensity = FieldTmp::ValueType; private: /* global memory ion density field device databoxes */ PMACC_ALIGN(ionDensityBox, FieldTmp::DataBoxType); /* shared memory ion density device databoxes */ PMACC_ALIGN(cachedIonDensity, DataBox<SharedBox<ValueTypeIonDensity, typename BlockArea::FullSuperCellSize, 0> >); PMACC_ALIGN(scaledSpectrumFunctor, ScaledSpectrum::LookupTableFunctor); PMACC_ALIGN(stoppingPowerFunctor, ScaledSpectrum::LookupTableFunctor); PMACC_ALIGN(getPhotonAngleFunctor, GetPhotonAngle::GetPhotonAngleFunctor); PMACC_ALIGN(photonMom, float3_X); /* random number generator */ using RNGFactory = pmacc::random::RNGProvider<simDim, random::Generator>; using Distribution = pmacc::random::distributions::Uniform<float_X>; using RandomGen = typename RNGFactory::GetRandomType<Distribution>::type; RandomGen randomGen; public: /* host constructor initializing member */ HINLINE Bremsstrahlung( const ScaledSpectrum::LookupTableFunctor& scaledSpectrumFunctor, const ScaledSpectrum::LookupTableFunctor& stoppingPowerFunctor, const GetPhotonAngle::GetPhotonAngleFunctor& getPhotonAngleFunctor, const uint32_t currentStep); /** Initialization function on device * * \brief Cache ion density field on device * and initialize possible prerequisites, like e.g. random number generator. * * This function will be called inline on the device which must happen BEFORE threads diverge * during loop execution. The reason for this is the `__syncthreads()` call which is necessary after * initializing the ion density field in shared memory. */ template< typename T_Acc > DINLINE void init( T_Acc const & acc, const DataSpace<simDim>& blockCell, const int& linearThreadIdx, const DataSpace<simDim>& localCellOffset ); /** cache fields used by this functor * * @warning this is a collective method and calls synchronize * * @tparam T_Acc alpaka accelerator type * @tparam T_WorkerCfg pmacc::mappings::threads::WorkerCfg, configuration of the worker * * @param acc alpaka accelerator * @param blockCell relative offset (in cells) to the local domain plus the guarding cells * @param workerCfg configuration of the worker */ template< typename T_Acc , typename T_WorkerCfg > DINLINE void collectiveInit( const T_Acc & acc, const DataSpace<simDim>& blockCell, const T_WorkerCfg & workerCfg ); /** Rotates a vector to a given polar angle and a random azimuthal angle. * * @param vec vector to be rotated * @param theta polar angle * @return rotated vector */ template< typename T_Acc > DINLINE float3_X scatterByTheta(const T_Acc& acc, const float3_X vec, const float_X theta); /** Return the number of target particles to be created from each source particle. * * Called for each frame of the source species. * * @param sourceFrame Frame of the source species * @param localIdx Index of the source particle within frame * @return number of particle to be created from each source particle */ template< typename T_Acc > DINLINE unsigned int numNewParticles(const T_Acc& acc, FrameType& sourceFrame, int localIdx); /** Functor implementation. * * Called once for each single particle creation. * * \tparam Electron type of electron which creates the photon * \tparam Photon type of photon that is created */ template<typename Electron, typename Photon, typename T_Acc> DINLINE void operator()(const T_Acc& acc, Electron& electron, Photon& photon); }; } // namespace bremsstrahlung } // namespace particles } // namespace picongpu
{ "pile_set_name": "Github" }
package com.mashibing.controller.base; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; /** * <p> * 费用台账概要 前端控制器 * </p> * * @author lian * @since 2020-04-18 */ @Controller @RequestMapping("/fyStandingBook") public class FyStandingBookController { }
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="s"/> <variable name="o1"/> <variable name="o2"/> </head> <results> <result> <binding name="s"><uri>http://example.org/a</uri></binding> <binding name="o1"><literal>Alan</literal></binding> <binding name="o2"><literal>[email protected]</literal></binding> </result> </results> </sparql>
{ "pile_set_name": "Github" }
/* * Copyright 2006-2008 The FLWOR Foundation. * * 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 "stdafx.h" #include <ostream> #include "util/dynamic_bitset.h" namespace zorba { std::ostream& operator <<(std::ostream& s, const DynamicBitset& set) { s << "BitSet[" << set.size() << "] = {"; for(csize i = 0; i < set.size(); ++i) { if (set.get(i)) { s << i << ", "; } } s << "}"; return s; } } /* vim:set et sw=2 ts=2: */
{ "pile_set_name": "Github" }
{ "name": "namespace/resolver", "autoload": { "psr-0": { "Foo": "src/", "": "src/Null/" }, "psr-4": { "Hello\\World\\": "src/HelloWorld" } } }
{ "pile_set_name": "Github" }
<?php /** * Locale data for 'mk'. * * This file is automatically generated by yiic cldr command. * * Copyright © 1991-2007 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in http://www.unicode.org/copyright.html. * * Copyright © 2008-2011 Yii Software LLC (http://www.yiiframework.com/license/) */ return array ( 'version' => '4763', 'numberSymbols' => array ( 'decimal' => ',', 'group' => '.', 'list' => ';', 'percentSign' => '%', 'nativeZeroDigit' => '0', 'patternDigit' => '#', 'plusSign' => '+', 'minusSign' => '-', 'exponential' => 'E', 'perMille' => '‰', 'infinity' => '∞', 'nan' => 'NaN', ), 'decimalFormat' => '#,##0.###', 'scientificFormat' => '#E0', 'percentFormat' => '#,##0%', 'currencyFormat' => '¤ #,##0.00', 'currencySymbols' => array ( 'AFN' => 'Af', 'ANG' => 'NAf.', 'AOA' => 'Kz', 'ARA' => '₳', 'ARL' => '$L', 'ARM' => 'm$n', 'ARS' => 'AR$', 'AUD' => 'AU$', 'AWG' => 'Afl.', 'AZN' => 'man.', 'BAM' => 'KM', 'BBD' => 'Bds$', 'BDT' => 'Tk', 'BEF' => 'BF', 'BHD' => 'BD', 'BIF' => 'FBu', 'BMD' => 'BD$', 'BND' => 'BN$', 'BOB' => 'Bs', 'BOP' => '$b.', 'BRL' => 'R$', 'BSD' => 'BS$', 'BTN' => 'Nu.', 'BWP' => 'BWP', 'BZD' => 'BZ$', 'CAD' => 'CA$', 'CDF' => 'CDF', 'CLE' => 'Eº', 'CLP' => 'CL$', 'CNY' => 'CN¥', 'COP' => 'CO$', 'CRC' => '₡', 'CUC' => 'CUC$', 'CUP' => 'CU$', 'CVE' => 'CV$', 'CYP' => 'CY£', 'CZK' => 'Kč', 'DEM' => 'DM', 'DJF' => 'Fdj', 'DKK' => 'Dkr', 'DOP' => 'RD$', 'DZD' => 'DA', 'EEK' => 'Ekr', 'ERN' => 'Nfk', 'ESP' => 'Pts', 'ETB' => 'Br', 'EUR' => '€', 'FIM' => 'mk', 'FJD' => 'FJ$', 'FKP' => 'FK£', 'FRF' => '₣', 'GBP' => '£', 'GHC' => '₵', 'GHS' => 'GH₵', 'GIP' => 'GI£', 'GMD' => 'GMD', 'GNF' => 'FG', 'GRD' => '₯', 'GTQ' => 'GTQ', 'GYD' => 'GY$', 'HKD' => 'HK$', 'HNL' => 'HNL', 'HRK' => 'kn', 'HTG' => 'HTG', 'HUF' => 'Ft', 'IDR' => 'Rp', 'IEP' => 'IR£', 'ILP' => 'I£', 'ILS' => '₪', 'INR' => 'Rs', 'ISK' => 'Ikr', 'ITL' => 'IT₤', 'JMD' => 'J$', 'JOD' => 'JD', 'JPY' => 'JP¥', 'KES' => 'Ksh', 'KMF' => 'CF', 'KRW' => '₩', 'KWD' => 'KD', 'KYD' => 'KY$', 'LAK' => '₭', 'LBP' => 'LB£', 'LKR' => 'SLRs', 'LRD' => 'L$', 'LSL' => 'LSL', 'LTL' => 'Lt', 'LVL' => 'Ls', 'LYD' => 'LD', 'MMK' => 'MMK', 'MNT' => '₮', 'MOP' => 'MOP$', 'MRO' => 'UM', 'MTL' => 'Lm', 'MTP' => 'MT£', 'MUR' => 'MURs', 'MXN' => 'MX$', 'MYR' => 'RM', 'MZM' => 'Mt', 'MZN' => 'MTn', 'NAD' => 'N$', 'NGN' => '₦', 'NIO' => 'C$', 'NLG' => 'fl', 'NOK' => 'Nkr', 'NPR' => 'NPRs', 'NZD' => 'NZ$', 'PAB' => 'B/.', 'PEI' => 'I/.', 'PEN' => 'S/.', 'PGK' => 'PGK', 'PHP' => '₱', 'PKR' => 'PKRs', 'PLN' => 'zł', 'PTE' => 'Esc', 'PYG' => '₲', 'QAR' => 'QR', 'RHD' => 'RH$', 'RON' => 'RON', 'RSD' => 'din.', 'SAR' => 'SR', 'SBD' => 'SI$', 'SCR' => 'SRe', 'SDD' => 'LSd', 'SEK' => 'Skr', 'SGD' => 'S$', 'SHP' => 'SH£', 'SKK' => 'Sk', 'SLL' => 'Le', 'SOS' => 'Ssh', 'SRD' => 'SR$', 'SRG' => 'Sf', 'STD' => 'Db', 'SVC' => 'SV₡', 'SYP' => 'SY£', 'SZL' => 'SZL', 'THB' => '฿', 'TMM' => 'TMM', 'TND' => 'DT', 'TOP' => 'T$', 'TRL' => 'TRL', 'TRY' => 'TL', 'TTD' => 'TT$', 'TWD' => 'NT$', 'TZS' => 'TSh', 'UAH' => '₴', 'UGX' => 'USh', 'USD' => 'US$', 'UYU' => '$U', 'VEF' => 'Bs.F.', 'VND' => '₫', 'VUV' => 'VT', 'WST' => 'WS$', 'XAF' => 'FCFA', 'XCD' => 'EC$', 'XOF' => 'CFA', 'XPF' => 'CFPF', 'YER' => 'YR', 'ZAR' => 'R', 'ZMK' => 'ZK', 'ZRN' => 'NZ', 'ZRZ' => 'ZRZ', 'ZWD' => 'Z$', ), 'monthNames' => array ( 'wide' => array ( 1 => 'јануари', 2 => 'февруари', 3 => 'март', 4 => 'април', 5 => 'мај', 6 => 'јуни', 7 => 'јули', 8 => 'август', 9 => 'септември', 10 => 'октомври', 11 => 'ноември', 12 => 'декември', ), 'abbreviated' => array ( 1 => 'јан.', 2 => 'фев.', 3 => 'мар.', 4 => 'апр.', 5 => 'мај', 6 => 'јун.', 7 => 'јул.', 8 => 'авг.', 9 => 'септ.', 10 => 'окт.', 11 => 'ноем.', 12 => 'декем.', ), ), 'monthNamesSA' => array ( 'narrow' => array ( 1 => 'ј', 2 => 'ф', 3 => 'м', 4 => 'а', 5 => 'м', 6 => 'ј', 7 => 'ј', 8 => 'а', 9 => 'с', 10 => 'о', 11 => 'н', 12 => 'д', ), ), 'weekDayNames' => array ( 'wide' => array ( 0 => 'недела', 1 => 'понеделник', 2 => 'вторник', 3 => 'среда', 4 => 'четврток', 5 => 'петок', 6 => 'сабота', ), 'abbreviated' => array ( 0 => 'нед.', 1 => 'пон.', 2 => 'вт.', 3 => 'сре.', 4 => 'чет.', 5 => 'пет.', 6 => 'саб.', ), ), 'weekDayNamesSA' => array ( 'narrow' => array ( 0 => 'н', 1 => 'п', 2 => 'в', 3 => 'с', 4 => 'ч', 5 => 'п', 6 => 'с', ), ), 'eraNames' => array ( 'abbreviated' => array ( 0 => 'пр.н.е.', 1 => 'ае.', ), 'wide' => array ( 0 => 'пр.н.е.', 1 => 'ае.', ), 'narrow' => array ( 0 => 'пр.н.е.', 1 => 'ае.', ), ), 'dateFormats' => array ( 'full' => 'EEEE, dd MMMM y', 'long' => 'dd MMMM y', 'medium' => 'dd.M.yyyy', 'short' => 'dd.M.yy', ), 'timeFormats' => array ( 'full' => 'HH:mm:ss zzzz', 'long' => 'HH:mm:ss z', 'medium' => 'HH:mm:ss', 'short' => 'HH:mm', ), 'dateTimeFormat' => '{1} {0}', 'amName' => 'претпладне', 'pmName' => 'попладне', 'orientation' => 'ltr', 'pluralRules' => array ( 0 => 'fmod(n,10)==1&&n!=11', 1 => 'true', ), );
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_79) on Wed May 03 07:08:47 PDT 2017 --> <title>StreamUriLoader (glide 3.8.0 API)</title> <meta name="date" content="2017-05-03"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="StreamUriLoader (glide 3.8.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamStringLoader.Factory.html" title="class in com.bumptech.glide.load.model.stream"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.Factory.html" title="class in com.bumptech.glide.load.model.stream"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?com/bumptech/glide/load/model/stream/StreamUriLoader.html" target="_top">Frames</a></li> <li><a href="StreamUriLoader.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">com.bumptech.glide.load.model.stream</div> <h2 title="Class StreamUriLoader" class="title">Class StreamUriLoader</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> <li> <ul class="inheritance"> <li><a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html" title="class in com.bumptech.glide.load.model">com.bumptech.glide.load.model.UriLoader</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;</li> <li> <ul class="inheritance"> <li>com.bumptech.glide.load.model.stream.StreamUriLoader</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../../../com/bumptech/glide/load/model/ModelLoader.html" title="interface in com.bumptech.glide.load.model">ModelLoader</a>&lt;<a href="http://d.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;, <a href="../../../../../../com/bumptech/glide/load/model/stream/StreamModelLoader.html" title="interface in com.bumptech.glide.load.model.stream">StreamModelLoader</a>&lt;<a href="http://d.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&gt;</dd> </dl> <hr> <br> <pre>public class <span class="strong">StreamUriLoader</span> extends <a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html" title="class in com.bumptech.glide.load.model">UriLoader</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt; implements <a href="../../../../../../com/bumptech/glide/load/model/stream/StreamModelLoader.html" title="interface in com.bumptech.glide.load.model.stream">StreamModelLoader</a>&lt;<a href="http://d.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&gt;</pre> <div class="block">A <a href="../../../../../../com/bumptech/glide/load/model/ModelLoader.html" title="interface in com.bumptech.glide.load.model"><code>ModelLoader</code></a> for translating uri models into <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><code>InputStream</code></a> data. Capable of handling 'http', 'https', 'android.resource', 'content', and 'file' schemes. Unsupported schemes will throw an exception in <a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html#getResourceFetcher(android.net.Uri,%20int,%20int)"><code>UriLoader.getResourceFetcher(Uri, int, int)</code></a>.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== NESTED CLASS SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="nested_class_summary"> <!-- --> </a> <h3>Nested Class Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> <caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.Factory.html" title="class in com.bumptech.glide.load.model.stream">StreamUriLoader.Factory</a></strong></code> <div class="block">THe default factory for <a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.html" title="class in com.bumptech.glide.load.model.stream"><code>StreamUriLoader</code></a>s.</div> </td> </tr> </table> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.html#StreamUriLoader(android.content.Context)">StreamUriLoader</a></strong>(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colOne"><code><strong><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.html#StreamUriLoader(android.content.Context,%20com.bumptech.glide.load.model.ModelLoader)">StreamUriLoader</a></strong>(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context, <a href="../../../../../../com/bumptech/glide/load/model/ModelLoader.html" title="interface in com.bumptech.glide.load.model">ModelLoader</a>&lt;<a href="../../../../../../com/bumptech/glide/load/model/GlideUrl.html" title="class in com.bumptech.glide.load.model">GlideUrl</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;&nbsp;urlLoader)</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../../com/bumptech/glide/load/data/DataFetcher.html" title="interface in com.bumptech.glide.load.data">DataFetcher</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.html#getAssetPathFetcher(android.content.Context,%20java.lang.String)">getAssetPathFetcher</a></strong>(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;assetPath)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="../../../../../../com/bumptech/glide/load/data/DataFetcher.html" title="interface in com.bumptech.glide.load.data">DataFetcher</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.html#getLocalUriFetcher(android.content.Context,%20android.net.Uri)">getLocalUriFetcher</a></strong>(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context, <a href="http://d.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&nbsp;uri)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_com.bumptech.glide.load.model.UriLoader"> <!-- --> </a> <h3>Methods inherited from class&nbsp;com.bumptech.glide.load.model.<a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html" title="class in com.bumptech.glide.load.model">UriLoader</a></h3> <code><a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html#getResourceFetcher(android.net.Uri,%20int,%20int)">getResourceFetcher</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_com.bumptech.glide.load.model.ModelLoader"> <!-- --> </a> <h3>Methods inherited from interface&nbsp;com.bumptech.glide.load.model.<a href="../../../../../../com/bumptech/glide/load/model/ModelLoader.html" title="interface in com.bumptech.glide.load.model">ModelLoader</a></h3> <code><a href="../../../../../../com/bumptech/glide/load/model/ModelLoader.html#getResourceFetcher(T,%20int,%20int)">getResourceFetcher</a></code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="StreamUriLoader(android.content.Context)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>StreamUriLoader</h4> <pre>public&nbsp;StreamUriLoader(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context)</pre> </li> </ul> <a name="StreamUriLoader(android.content.Context, com.bumptech.glide.load.model.ModelLoader)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>StreamUriLoader</h4> <pre>public&nbsp;StreamUriLoader(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context, <a href="../../../../../../com/bumptech/glide/load/model/ModelLoader.html" title="interface in com.bumptech.glide.load.model">ModelLoader</a>&lt;<a href="../../../../../../com/bumptech/glide/load/model/GlideUrl.html" title="class in com.bumptech.glide.load.model">GlideUrl</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;&nbsp;urlLoader)</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getLocalUriFetcher(android.content.Context, android.net.Uri)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getLocalUriFetcher</h4> <pre>protected&nbsp;<a href="../../../../../../com/bumptech/glide/load/data/DataFetcher.html" title="interface in com.bumptech.glide.load.data">DataFetcher</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;&nbsp;getLocalUriFetcher(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context, <a href="http://d.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net">Uri</a>&nbsp;uri)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html#getLocalUriFetcher(android.content.Context,%20android.net.Uri)">getLocalUriFetcher</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html" title="class in com.bumptech.glide.load.model">UriLoader</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;</code></dd> </dl> </li> </ul> <a name="getAssetPathFetcher(android.content.Context, java.lang.String)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>getAssetPathFetcher</h4> <pre>protected&nbsp;<a href="../../../../../../com/bumptech/glide/load/data/DataFetcher.html" title="interface in com.bumptech.glide.load.data">DataFetcher</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;&nbsp;getAssetPathFetcher(<a href="http://d.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content">Context</a>&nbsp;context, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;assetPath)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html#getAssetPathFetcher(android.content.Context,%20java.lang.String)">getAssetPathFetcher</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../../com/bumptech/glide/load/model/UriLoader.html" title="class in com.bumptech.glide.load.model">UriLoader</a>&lt;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&gt;</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamStringLoader.Factory.html" title="class in com.bumptech.glide.load.model.stream"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../../com/bumptech/glide/load/model/stream/StreamUriLoader.Factory.html" title="class in com.bumptech.glide.load.model.stream"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?com/bumptech/glide/load/model/stream/StreamUriLoader.html" target="_top">Frames</a></li> <li><a href="StreamUriLoader.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>1.5. 管理工具(Utilities)</title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><meta name="keywords" content="企业管理,工商管理,人力资源管理,项目管理,产品管理,市场营销" /><link rel="home" href="../index.html" title="Netkiller Management 手札" /><link rel="up" href="../appendix.html" title="附录 1. 附录" /><link rel="prev" href="../apas04.html" title="1.4. 名词解释" /><link rel="next" href="7S.html" title="第 28 章 7S 管理" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> | <a xmlns="" href="//netkiller.github.io/">简体中文</a> | <a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> | <a xmlns="" href="/journal/index.html">杂文</a> | <a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> | <a xmlns="" href="https://github.com/netkiller">Github</a> | <a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> | <a xmlns="" href="https://cloud.tencent.com/developer/column/2078">云社区</a> | <a xmlns="" href="https://yq.aliyun.com/u/netkiller/">云栖社区</a> | <a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> | <a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> | <a xmlns="" href="//www.netkiller.cn/home/video.html">视频教程</a> | <a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> | <a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1.5. 管理工具(Utilities)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="../apas04.html">上一页</a> </td><th width="60%" align="center">附录 1. 附录</th><td width="20%" align="right"> <a accesskey="n" href="7S.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td><td></td><td><a href="https://zhuanlan.zhihu.com/netkiller"><img src="/images/logo/zhihu-card-default.svg" height="25" /></a></td><td valign="middle"><a href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> | <a href="https://www.zhihu.com/club/1241768772601950208">多维度架构</a></td><td> | </td><td>微信号 netkiller-ebook </td><td> | </td><td>QQ群:128659835 请注明“读者”</td></tr></table><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="index"></a>1.5. 管理工具(Utilities)</h2></div></div></div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="star"></a>1.5.1. STAR</h3></div></div></div> <p>Situation 情景, Task 任务, Action 行动, Result 结果</p> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="5w2h"></a>1.5.2. 5W2H分析法</h3></div></div></div> <p>5W2H分析法又叫七何分析法,是二战中美国陆军兵器修理部首创。简单、方便,易于理解、使用,富有启发意义,广泛用于企业管理和技术活动,对于决策和执行性的活动措施也非常有帮助,也有助于弥补考虑问题的疏漏。</p> <p>WHAT+WHY+WHEN+WHERE+WHO+HOW+HOW MUCH</p> <p>发明者用五个以W开头的英语单词和两个以H开头的英语单词进行设问,发现解决问题的线索,寻找发明5W2H分析法思路,进行设计构思,从而搞出新的发明项目,这就叫做5W2H法。</p> <pre class="screen"> (1) WHAT——是什么?目的是什么?做什么工作? (2)WHY——为什么要做?可不可以不做?有没有替代方案? (3)WHO——谁?由谁来做? (4)WHEN——何时?什么时间做?什么时机最适宜? (5) WHERE——何处?在哪里做? (6)HOW ——怎么做?如何提高效率?如何实施?方法是什么? (7) HOW MUCH——多少?做到什么程度?数量如何?质量水平如何?费用产出如何? </pre> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="mbo"></a>1.5.3. 目标管理(Management by Objective,MBO)</h3></div></div></div> <p>1、目标是什么?实现目标的中心问题、项目名称。</p> <p>2、达到什么程度?达到的质、量、状态。</p> <p>3、谁来完成目标?负责人与参与人。</p> <p>4、何时完成目标?期限、预定计划表、日程表。</p> <p>5、怎么办?应采取的措施、手段、方法。</p> <p>6、如何保证?应给予的资源配备和授权。</p> <p>7、是否达成了既定目标?对成果的检查、评价。</p> <p>8、如何对待完成情况?与奖惩安排的挂钩、进入下一轮目标管理循环。</p> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="smart"></a>1.5.4. SMART</h3></div></div></div> <pre class="screen"> smart (目标管理原则) 锁定 目标管理中,有一项原则叫做「SMART」,分别由「Specific、Measurable、Attainable、Relevant、Time-based」五个词组组成。这是订定工作目标时,必须谨记的五项要点。 s即specific,代表具体的,指绩效考核要切中特定的工作指标,不能笼统; m即measurable,代表可度量的,指绩效指标是数量化或者行为化的,验证这些绩效指标的数据或者信息是可以获得的; a即attainable,代表可实现的,指绩效指标在付出努力的情况下可以实现,避免设立过高或过低的目标; r即relevant,代表相关性,指实现此目标与其他目标的关联情况; t即time-based,代表有时限,注重完成绩效指标的特定期限。 Smart是确定关键绩效指标的一个重要的原则。 无论是制定团队的工作目标还是员工的绩效目标都必须符合上述原则,五个原则缺一不可。明确来讲: SMART原则一 S(Specific)——明确性 所谓明确就是要用具体的语言清楚地说明要达成的行为标准。明确的目标几乎是所有成功团队的一致特点。很多团队不成功的重要原因之一就因为目标定的模棱两可,或没有将目标有效的传达给相关成员。 示例:目标——“增强客户意识”。这种对目标的描述就很不明确,因为增强客户意识有许多具体做法,如:减少客户投诉,过去客户投诉率是3%,现在把它减低到1.5%或者1%。提升服务的速度,使用规范礼貌的用语,采用规范的服务流程,也是客户意识的一个方面。 有这么多增强客户意识的做法,我们所说的“增强客户意识”到底指哪一块?不明确就没有办法评判、衡量。所以建议这样修改,比方说,我们将在月底前把前台收银的速度提升至正常的标准,这个正常的标准可能是两分钟,也可能是一分钟,或分时段来确定标准。 实施要求:目标设置要有项目、衡量标准、达成措施、完成期限以及资源要求,使考核人能够很清晰的看到部门或科室月计划要做哪些那些事情,计划完成到什么样的程度。 SMART原则二 M(Measurable)——衡量性 衡量性就是指目标应该是明确的,而不是模糊的。应该有一组明确的数据,作为衡量是否达成目标的依据。 如果制定的目标没有办法衡量,就无法判断这个目标是否实现。比如领导有一天问“这个目标离实现大概有多远?”团队成员的回答是“我们早实现了”。这就是领导和下属对团队目标所产生的一种分歧。原因就在于没有给他一个定量的可以衡量的分析数据。但并不是所有的目标可以衡量,有时也会有例外,比如说大方向性质的目标就难以衡量。 比方说,“为所有的老员工安排进一步的管理培训”。进一步是一个既不明确也不容易衡量的概念,到底指什么?是不是只要安排了这个培训,不管谁讲,也不管效果好坏都叫“进一步”? 改进一下:准确地说,在什么时间完成对所有老员工关于某个主题的培训,并且在这个课程结束后,学员的评分在85分以上,低于85分就认为效果不理想,高于85分就是所期待的结果。这样目标变得可以衡量。 实施要求:目标的衡量标准遵循“能量化的量化,不能量化的质化”。使制定人与考核人有一个统一的、标准的、清晰的可度量的标尺,杜绝在目标设置中使用形容词等概念模糊、无法衡量的描述。 SMART原则三 A(Attainable)——可实现性 目标是要能够被执行人所接受的,如果上司利用一些行政手段,利用权利性的影响力一厢情愿地把自己所制定的目标强压给下属,下属典型的反映是一种心理和行为上的抗拒:我可以接受,但是否完成这个目标,有没有最终的把握,这个可不好说。一旦有一天这个目标真完成不了的时候,下属有一百个理由可以推卸责任:你看我早就说了,这个目标肯定完成不了,但你坚持要压给我。 “控制式”的领导喜欢自己定目标,然后交给下属去完成,他们不在乎下属的意见和反映,这种做法越来越没有市场。今天员工的知识层次、学历、自己本身的素质,以及他们主张的个性张扬的程度都远远超出从前。因此,领导者应该更多的吸纳下属来参与目标制定的过程,即便是团队整体的目标。 定目标成长,就先不要想达成的困难,不然热情还没点燃就先被畏惧给打消念头了。 实施要求:目标设置要坚持员工参与、上下左右沟通,使拟定的工作目标在组织及个人之间达成一致。既要使工作内容饱满,也要具有可达性。可以制定出跳起来“摘桃”的目标,不能制定出跳起来“摘星星”的目标。 SMART原则四 R(Relevant)——相关性 目标的相关性是指实现此目标与其他目标的关联情况。如果实现了这个目标,但对其他的目标完全不相关,或者相关度很低,那这个目标即使被达到了,意义也不是很大。 因为毕竟工作目标的设定,是要和岗位职责相关联的,不能跑题。比如一个前台,你让她学点英语以便接电话的时候用得上,这时候提升英语水平和前台接电话的服务质量有关联,即学英语这一目标与提高前台工作水准这一目标直接相关。若你让她去学习6sigma,就比较跑题了,因为前台学习6sigma这一目标与提高前台工作水准这一目标相关度很低。 SMART原则五 T(Time-based)——时限性 目标特性的时限性就是指目标是有时间限制的。例如,我将在2005年5月31日之前完成某事。5月31日就是一个确定的时间限制。没有时间限制的目标没有办法考核,或带来考核的不公。上下级之间对目标轻重缓急的认识程度不同,上司着急,但下面不知道。到头来上司可以暴跳如雷,而下属觉得委屈。这种没有明确的时间限定的方式也会带来考核的不公正,伤害工作关系,伤害下属的工作热情。 实施要求:目标设置要具有时间限制,根据工作任务的权重、事情的轻重缓急,拟定出完成目标项目的时间要求,定期检查项目的完成进度,及时掌握项目进展的变化情况,以方便对下属进行及时的工作指导,以及根据工作计划的异常情况变化及时地调整工作计划。 总之,无论是制定团队的工作目标,还是员工的绩效目标,都必须符合上述原则,五个原则缺一不可。 制定的过程也是对部门或科室先期的工作掌控能力提升的过程,完成计划的过程也就是对自己现代化管理能力历练和实践的过程。 </pre> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="utilities.6s"></a>1.5.5. 6S</h3></div></div></div> <p>6S就是整理(SEIRI)、整顿(SEITON)、清扫(SEISO)、清洁(SEIKETSU)、素养(SHITSUKE)、安全(SAFETY)六个项目,因均以“S”开头,简称6S。</p> <p>提起 6S ,首先要从 5S 谈起。 5S 起源于日本,指的是在生产现场中将人员、机器、材料、方法等生产要素进行有效管理,它针对企业中每位员工的日常行为方面提出要求,倡导从小事做起,力求使每位员工都养成事事“讲究”的习惯,从而达到提高整体工作质量的目的。是日式企业独特的一种管理方法。 1955年, 日本 5S 的宣传口号为“安全始于整理整顿,终于整理整顿”,当时只推行了前 2S ,其目的仅为了确保作业空间和安全,后因生产控制和品质控制的需要,而逐步提出后续 3S, 即“清扫、清洁、素养 ”,从而其应用空间及适用范围进一步拓展。1986年,首本 5S 著作问世,从而对整个日本现场管理模式起到了冲击作用, 并由此掀起 5S 热潮。 日企将 5S 活动作为工厂管理的基础,推行各种品质管理手法,二战后产品品质得以迅猛提升,奠定了经济大国的地位。而在丰田公司倡导推行下,5S 对于提升企业形象,安全生产,标准化的推进,创造令人心怡的工作场所等方面的巨大作用逐渐被各国管理界所认识。我国企业在 5S 现场管理的基础上,结合国家如火如荼的安全生产活动,在原来 5S 基础上增加了安全 (safety) 要素, 形成“6S”。</p> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="PCRDFI"></a>1.5.6. PCRDFI</h3></div></div></div> <p>执行理论包了六个要素:PCRDFI </p> <pre class="screen"> 计划(Plan) 沟通(Communicate) 风险评估(Risk-Evaluate) 实施(Do) 反馈(Feedback) 改进(Improve) </pre> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idp172"></a>1.5.7. GTD (Getting Things Done)</h3></div></div></div> <div class="orderedlist"><ol class="orderedlist compact" type="1"><li class="listitem"> <p> 收集:就是将你能够想到的所有的未尽事宜(GTD中称为stuff)统统罗列出来,放入inbox中,这个inbox既可以是用来放置各种实物的实际的文件夹或者篮子,也需要有用来记录各种事项的纸张或PDA。收集的关键在于把一切赶出你的大脑,记录下所有的工作。 </p> </li><li class="listitem"> <p> 整理:将stuff放入inbox之后,就需要定期或不定期地进行整理,清空inbox。将这些stuff按是否可以付诸行动进行区分整理,对于不能付诸行动的内容,可以进一步分为参考资料、日后可能需要处理以及垃圾几类,而对可行动的内容再考虑是否可在两分钟内完成,如果可以则立即行动完成它,如果不行对下一步行动进行组织。 </p> </li><li class="listitem"> <p> 组织:个人感觉组织中的最核心的步骤,组织主要分成对参考资料的组织与对下一步行动的组织。对参考资料的组织主要就是一个文档管理系统,而对下一步行动的组织则一般可分为:下一步行动清单,等待清单和未来/某天清单。下一步清单是具体的下一步工作,而且如果一个项目涉及到多步骤的工作,那么需要将其细化成具体的工作。GTD对下一步清单的处理与一般的to-dolist最大的不同在于,它作了进一步的细化,比如按照地点(电脑旁、办公室、电话旁、家里、超市)分别记录只有在这些地方才可以执行的行动,而当你到这些地点后也就能够一目了然地知道应该做那些工作。等待清单主要是记录那些委派他人去做的工作。未来/某天清单则是记录延迟处理且没有具体的完成日期的未来计划、电子邮件等等。 </p> </li><li class="listitem"> <p> 回顾:回顾是一个重要步骤,一般需要每周进行回顾与检查,通过回顾及检查你的所有清单并进行更新,可以确保系统的运作,而且在回顾的同时可能还需要进行未来一周的计划工作。 </p> </li><li class="listitem"> <p> 行动:根据时间的多少,精力情况以及重要性来选择清单上的事项来行动。 </p> </li></ol></div> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idp173"></a>1.5.8. ECRS分析原则</h3></div></div></div> <p>取消(Eliminate),就是看能不能排除某些流程工序,如果可以就取消这改流程工序。</p> <p>合并(Combine),就是看能不能把几道工序合并,尤其工作流合并的技巧能立竿见影地改善并提高效率。</p> <p>重排(Rearrange)如上所述,改变一下顺序,改变一下工艺就能提高效率。使其能有最佳的顺序、除去重复、办事有序。</p> <p>简化(Simplify)将复杂的功能变得简单一点,以节省人力、时间及费用,也能提高效率。</p> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idp174"></a>1.5.9. 霍兰德职业兴趣测试</h3></div></div></div> <p>霍兰德职业兴趣自测(Self-Directed Search)是由美国职业指导专家霍兰德(John Holland)根据他本人大量的职业咨询经验及其职业类型理论编制的测评工具。</p> <p>霍兰德认为,个人职业兴趣特性与职业之间应有一种内在的对应关系。根据兴趣的不同,人格可分为研究型(I)、艺术型(A)、社会型(S)、企业型(E)、传统型(C)、现实型(R)六个维度,每个人的性格都是这六个维度的不同程度组合。</p> </div> <div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="MBTI职业性格测试"></a>1.5.10. MBTI职业性格测试</h3></div></div></div> <p></p> </div> </div><div xmlns="" id="disqus_thread"></div><script xmlns=""> var disqus_config = function () { this.page.url = "http://www.netkiller.cn"; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = 'netkiller'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = '//netkiller.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&amp;d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="../apas04.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="../appendix.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="7S.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">1.4. 名词解释 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 第 28 章 7S 管理</td></tr></table></div><script xmlns=""> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11694057-1', 'auto'); ga('send', 'pageview'); </script><script xmlns="" async="async"> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script><script xmlns="" async="async"> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script></body></html>
{ "pile_set_name": "Github" }
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2014, Oracle and/or its affiliates. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_RANGE_TO_SEGMENT_OR_BOX_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_RANGE_TO_SEGMENT_OR_BOX_HPP #include <vector> #include <boost/range.hpp> #include <boost/geometry/core/closure.hpp> #include <boost/geometry/core/point_type.hpp> #include <boost/geometry/core/reverse_dispatch.hpp> #include <boost/geometry/core/tag.hpp> #include <boost/geometry/core/tags.hpp> #include <boost/geometry/strategies/distance.hpp> #include <boost/geometry/strategies/distance_comparable_to_regular.hpp> #include <boost/geometry/strategies/tags.hpp> #include <boost/geometry/algorithms/detail/assign_box_corners.hpp> #include <boost/geometry/algorithms/detail/assign_indexed_point.hpp> #include <boost/geometry/algorithms/intersects.hpp> #include <boost/geometry/algorithms/num_points.hpp> #include <boost/geometry/algorithms/num_points.hpp> #include <boost/geometry/algorithms/dispatch/distance.hpp> #include <boost/geometry/algorithms/detail/distance/point_to_geometry.hpp> namespace boost { namespace geometry { #ifndef DOXYGEN_NO_DETAIL namespace detail { namespace distance { template < typename Range, typename SegmentOrBox, typename Strategy > class range_to_segment_or_box { private: typedef typename point_type<SegmentOrBox>::type segment_or_box_point; typedef typename point_type<Range>::type range_point; typedef typename strategy::distance::services::comparable_type < Strategy >::type comparable_strategy; typedef typename strategy::distance::services::return_type < comparable_strategy, range_point, segment_or_box_point >::type comparable_return_type; typedef typename strategy::distance::services::tag < comparable_strategy >::type comparable_strategy_tag; typedef dispatch::distance < segment_or_box_point, Range, comparable_strategy, point_tag, typename tag<Range>::type, comparable_strategy_tag, false > comparable_point_to_range; // compute distance of a point to a segment or a box template < typename Point, typename SegOrBoxPoints, typename ComparableStrategy, typename Tag > struct comparable_distance_point_to_segment_or_box {}; template < typename Point, typename SegmentPoints, typename ComparableStrategy > struct comparable_distance_point_to_segment_or_box < Point, SegmentPoints, ComparableStrategy, segment_tag > { static inline comparable_return_type apply(Point const& point, SegmentPoints const& segment_points, ComparableStrategy const& strategy) { boost::ignore_unused_variable_warning(strategy); return strategy.apply(point, segment_points[0], segment_points[1]); } }; template < typename Point, typename BoxPoints, typename ComparableStrategy > struct comparable_distance_point_to_segment_or_box < Point, BoxPoints, ComparableStrategy, box_tag > { static inline comparable_return_type apply(Point const& point, BoxPoints const& box_points, ComparableStrategy const& strategy) { return point_to_range < Point, BoxPoints, open, ComparableStrategy >::apply(point, box_points, strategy); } }; // assign the points of a segment or a box to a range template < typename SegOrBox, typename PointRange, typename Tag = typename tag<SegOrBox>::type > struct assign_segment_or_box_points {}; template <typename Segment, typename PointRange> struct assign_segment_or_box_points<Segment, PointRange, segment_tag> { static inline void apply(Segment const& segment, PointRange& range) { detail::assign_point_from_index<0>(segment, range[0]); detail::assign_point_from_index<1>(segment, range[1]); } }; template <typename Box, typename PointRange> struct assign_segment_or_box_points<Box, PointRange, box_tag> { static inline void apply(Box const& box, PointRange& range) { detail::assign_box_corners_oriented<true>(box, range); } }; public: typedef typename strategy::distance::services::return_type < Strategy, range_point, segment_or_box_point >::type return_type; static inline return_type apply(Range const& range, SegmentOrBox const& segment_or_box, Strategy const& strategy, bool check_intersection = true) { if ( check_intersection && geometry::intersects(range, segment_or_box) ) { return 0; } comparable_strategy cstrategy = strategy::distance::services::get_comparable < Strategy >::apply(strategy); // get all points of the segment or the box std::vector<segment_or_box_point> segment_or_box_points(geometry::num_points(segment_or_box)); assign_segment_or_box_points < SegmentOrBox, std::vector<segment_or_box_point> >::apply(segment_or_box, segment_or_box_points); // consider all distances from each endpoint of the segment or box // to the range typename std::vector<segment_or_box_point>::const_iterator it = segment_or_box_points.begin(); comparable_return_type cd_min = comparable_point_to_range::apply(*it, range, cstrategy); for (++it; it != segment_or_box_points.end(); ++it) { comparable_return_type cd = comparable_point_to_range::apply(*it, range, cstrategy); if ( cd < cd_min ) { cd_min = cd; } } // consider all distances of the points in the range to the // segment or box typedef typename range_iterator<Range const>::type iterator_type; for (iterator_type it = boost::begin(range); it != boost::end(range); ++it) { comparable_return_type cd = comparable_distance_point_to_segment_or_box < typename point_type<Range>::type, std::vector<segment_or_box_point>, comparable_strategy, typename tag<SegmentOrBox>::type >::apply(*it, segment_or_box_points, cstrategy); if ( cd < cd_min ) { cd_min = cd; } } return strategy::distance::services::comparable_to_regular < comparable_strategy, Strategy, range_point, segment_or_box_point >::apply(cd_min); } static inline return_type apply(SegmentOrBox const& segment_or_box, Range const& range, Strategy const& strategy, bool check_intersection = true) { return apply(range, segment_or_box, strategy, check_intersection); } }; }} // namespace detail::distance #endif // DOXYGEN_NO_DETAIL #ifndef DOXYGEN_NO_DISPATCH namespace dispatch { template <typename Linestring, typename Segment, typename Strategy> struct distance < Linestring, Segment, Strategy, linestring_tag, segment_tag, strategy_tag_distance_point_segment, false > : detail::distance::range_to_segment_or_box < Linestring, Segment, Strategy > {}; template <typename Segment, typename Ring, typename Strategy> struct distance < Segment, Ring, Strategy, segment_tag, ring_tag, strategy_tag_distance_point_segment, false > : detail::distance::range_to_segment_or_box < Ring, Segment, Strategy > {}; template <typename Linestring, typename Box, typename Strategy> struct distance < Linestring, Box, Strategy, linestring_tag, box_tag, strategy_tag_distance_point_segment, false > : detail::distance::range_to_segment_or_box < Linestring, Box, Strategy > {}; template <typename Ring, typename Box, typename Strategy> struct distance < Ring, Box, Strategy, ring_tag, box_tag, strategy_tag_distance_point_segment, false > : detail::distance::range_to_segment_or_box < Ring, Box, Strategy > {}; } // namespace dispatch #endif // DOXYGEN_NO_DISPATCH }} // namespace boost::geometry #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_DISTANCE_RANGE_TO_SEGMENT_OR_BOX_HPP
{ "pile_set_name": "Github" }
<!--<%= error_messages_for 'query' %>--> <input type="hidden" name="confirm" value="1" /> <!--<%= hidden_field_tag 'confirm', 1 %>--> <?php //d($this->request->data['Query']) ?> <div class="box"> <div class="tabular"> <p><?php echo $this->Form->input('Query.name', array('type' => 'text', 'size' => '80', 'div' => false, 'label' => __('Name'))) ?></p> <?php if ($currentuser['admin'] || $this->Candy->authorize_for(':manage_public_queries')): ?> <p><label for="QueryIsPublic"><?php echo __('Public') ?></label> <?php echo $this->Form->input('Query.is_public', array('type' => 'checkbox', 'multiple' => false, 'onchange' => $currentuser['admin'] ? null : 'if (this.checked) {$("query_is_for_all").checked = false; $("query_is_for_all").disabled = true;} else {$("query_is_for_all").disabled = false;}', 'div' => false, 'label' => false)) ?></p> <?php endif ?> <p><label for="QueryQueryIsForAll"><?php echo __('For all projects') ?></label> <?php echo $this->Form->input('Query.query_is_for_all', array('type' => 'checkbox', 'value' => '1', 'div' => false, 'label' => false, 'disabled' => (!(isset($query_new_record) && $query_new_record) && ((!isset($main_project) || !$main_project) || ((isset($this->request->data['Query']['is_public']) && $this->request->data['Query']['is_public']) && !$currentuser['admin']))) ? true : false)) ?> <!--<%= check_box_tag 'query_is_for_all', 1, @query.project.nil?, :disabled => ([email protected]_record? && (@query.project.nil? || (@query.is_public? && !User.current.admin?))) %>--></p> <p><label for="query_default_columns"><?php echo __('Default columns') ?></label> <?php echo $this->Form->input('Query.default_columns', array('type' => 'checkbox', 'value' => '1', 'onclick' => 'if (this.checked) {Element.hide("columns")} else {Element.show("columns")}', 'div' => false, 'label' => false, 'id' => 'query_default_columns', 'checked' => $this->request->data['Query']['default_columns'])) ?> <!--<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns', :onclick => 'if (this.checked) {Element.hide("columns")} else {Element.show("columns")}' %>--></p> </div> <fieldset><legend><?php echo __('Filters') ?></legend> <?php echo $this->element('queries/filters', array('query' => array('Query' => $this->request->data['Query']))) ?> <!--<%= render :partial => 'queries/filters', :locals => {:query => query}%>--> </fieldset> <?php echo $this->element('queries/columns', array('query' => array('Query' => $this->request->data['Query']))) ?> <!--<%= render :partial => 'queries/columns', :locals => {:query => query}%>--> </div>
{ "pile_set_name": "Github" }
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React from 'react'; import PropTypes from 'prop-types'; import { Field, Form, Input, Select, Dialog, ConfigProvider } from '@alifd/next'; import { connect } from 'react-redux'; import { getNamespaces } from '../../../reducers/namespace'; const FormItem = Form.Item; const { Option } = Select; const formItemLayout = { labelCol: { fixedSpan: 4 }, wrapperCol: { span: 19 }, }; @connect(state => ({ namespaces: state.namespace.namespaces }), { getNamespaces }) @ConfigProvider.config class NewPermissions extends React.Component { static displayName = 'NewPermissions'; field = new Field(this); static propTypes = { locale: PropTypes.object, visible: PropTypes.bool, getNamespaces: PropTypes.func, onOk: PropTypes.func, onCancel: PropTypes.func, namespaces: PropTypes.array, }; componentDidMount() { this.props.getNamespaces(); } check() { const { locale } = this.props; const errors = { role: locale.roleError, resource: locale.resourceError, action: locale.actionError, }; const vals = Object.keys(errors).map(key => { const val = this.field.getValue(key); if (!val) { this.field.setError(key, errors[key]); } return val; }); if (vals.filter(v => v).length === 3) { return vals; } return null; } render() { const { getError } = this.field; const { visible, onOk, onCancel, locale, namespaces } = this.props; return ( <> <Dialog title={locale.addPermission} visible={visible} onOk={() => { const vals = this.check(); if (vals) { onOk(vals).then(() => onCancel()); } }} onClose={onCancel} onCancel={onCancel} afterClose={() => this.field.reset()} > <Form style={{ width: 400 }} {...formItemLayout} field={this.field}> <FormItem label={locale.role} required help={getError('role')}> <Input name="role" trim placeholder={locale.rolePlaceholder} /> </FormItem> <FormItem label={locale.resource} required help={getError('resource')}> <Select name="resource" placeholder={locale.resourcePlaceholder} style={{ width: '100%' }} > {namespaces.map(({ namespace, namespaceShowName }) => ( <Option value={`${namespace}:*:*`}> {namespaceShowName} {namespace ? `(${namespace})` : ''} </Option> ))} </Select> </FormItem> <FormItem label={locale.action} required help={getError('action')}> <Select name="action" placeholder={locale.actionPlaceholder} style={{ width: '100%' }} > <Option value="r">{locale.readOnly}(r)</Option> <Option value="w">{locale.writeOnly}(w)</Option> <Option value="rw">{locale.readWrite}(rw)</Option> </Select> </FormItem> </Form> </Dialog> </> ); } } export default NewPermissions;
{ "pile_set_name": "Github" }
Pod::Spec.new do |s| s.name = 'Polyglot' s.version = '0.5.0' s.platform = :ios, '8.0' s.requires_arc = true s.summary = 'Simple Swift API for Microsoft Translator' s.description = <<-DESC Swift wrapper around the Microsoft Translator API. It currently supports translations to and from 45 languages. DESC s.homepage = 'https://github.com/ayanonagon/Polyglot' s.license = { :type => 'MIT' } s.author = { 'Ayaka Nonaka' => '[email protected]' } s.social_media_url = 'http://twitter.com/ayanonagon' s.source = { :git => 'https://github.com/ayanonagon/Polyglot.git', :tag => s.version } s.source_files = 'Polyglot/*.{swift}' end
{ "pile_set_name": "Github" }
/* =========================================================== @author Resonance NPC Name: Maple Administrator Description: Quest - Kingdom of Mushroom in Danger ============================================================= Version 1.0 - Script Done.(17/7/2010) Version 2.0 - Script Reworked by Ronan - (16/11/2018) ============================================================= */ var status = -1; function start(mode, type, selection) { if (mode == -1) { qm.dispose(); } else { if(mode == 0 && type > 0) { if (status != 3) { qm.sendOk("Really? It's an urgent matter, so if you have some time, please see me."); qm.dispose(); } else { if (qm.canHold(4032375, 1)) { qm.sendNext("Okay. In that case, I'll just give you the routes to the Kingdom of Mushroom. #bNear the west entrance of Henesys,#k you'll find an #bempty house#k. Enter the house, and turn left to enter#b<Themed Dungeon : Mushroom Castle>#k. That's the entrance to the Kingdom of Mushroom. There's not much time!"); } else { qm.sendOk("Please have a slot available in your Etc inventory."); qm.dispose(); } } status++; } else { if (mode == 1) status++; else status--; if (status == 0) { qm.sendAcceptDecline("Now that you have made the job advancement, you look like you're ready for this. I have something I'd like to ask you for help. Are you willing to listen?"); } else if (status == 1) { qm.sendNext("What happened is that the #bKingdom of Mushroom#k is currently in disarray. Kingdom of Mushroom is located near Henesys, featuring the peace-loving, intelligent King Mush. Recently, he began to feel ill, so he decided to appoint his only daughter #bPrincess Violetta#k. Something must have happened since then for the kingdom to be in its current state."); } else if (status == 2) { qm.sendNext("I am not aware of the exact details, but it's obvious something terrible had taken place, so I think it'll be better if you go there and assess the damage yourself. An explorer like you seem more than capable of saving Kingdom of Mushroom. I have just written you a #brecommendation letter#k, so I suggest you head over to Kingdom of Mushroom immediately and look for the #bHead Patrol Officer#k.\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n#v4032375# #t4032375#"); } else if (status == 3) { qm.sendYesNo("By the way, do you know where Kingdom of Mushroom is located? It'll be okay if you can find your way there, but if you don't mind, I can take you straight to the entrance."); } else if (status == 4) { if (qm.canHold(4032375, 1)) { if (!qm.haveItem(4032375, 1)) { qm.gainItem(4032375, 1); } qm.warp(106020000, 0); qm.forceStartQuest(); } else { qm.sendOk("Please have a slot available in your Etc inventory."); } qm.dispose(); return; } else if (status == 5) { if (!qm.haveItem(4032375, 1)) { qm.gainItem(4032375, 1); } qm.forceStartQuest(); qm.dispose(); return; } } } } function end(mode, type, selection) { if (mode == -1) { qm.dispose(); } else { if(mode == 0 && type > 0) { qm.dispose(); return; } if (mode == 1) status++; else status--; if (status == 0) { if (!qm.haveItem(4032375, 1)) { qm.sendNext("What do you want, hmmm?"); qm.dispose(); return; } qm.sendNext("Hmmm? Is that a #brecommendation letter from the job instructor#k??! What is this, are you the one that came to save us, the Kingdom of Mushroom?"); } else if (status == 1) { qm.sendNextPrev("Hmmm... okay. Since the letter is from the job instructor, I suppose you are really the one. I apologize for not introducing myself to you earlier. I'm the #bHead Security Officer#k in charge of protecting King Mush. As you can see, this temporary hideout is protected by the team of security and soldiers. Our situation may be dire, but nevertheless, welcome to Kingdom of Mushroom."); } else if (status == 2) { qm.gainItem(4032375, -1); qm.gainExp(6000); qm.forceCompleteQuest(); qm.forceStartQuest(2312); qm.dispose(); } } }
{ "pile_set_name": "Github" }
log4j.rootLogger=DEBUG, CA log4j.logger.org.apache.camel=DEBUG log4j.logger.org.eclipse.jetty=DEBUG log4j.logger.com.alu=DEBUG log4j.appender.CA=org.apache.log4j.ConsoleAppender log4j.appender.CA.layout=org.apache.log4j.PatternLayout log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
{ "pile_set_name": "Github" }
package vazkii.quark.base.network.message; import net.minecraft.entity.Entity; import net.minecraft.entity.item.BoatEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.inventory.container.ChestContainer; import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TranslationTextComponent; import net.minecraftforge.fml.network.NetworkEvent; import vazkii.arl.network.IMessage; import vazkii.quark.management.entity.ChestPassengerEntity; import javax.annotation.Nonnull; import java.util.List; public class OpenBoatChestMessage implements IMessage { private static final long serialVersionUID = 4454710003473142954L; @Override public boolean receive(NetworkEvent.Context context) { context.enqueueWork(() -> { PlayerEntity player = context.getSender(); if(player != null && player.isPassenger() && player.openContainer == player.container) { Entity riding = player.getRidingEntity(); if(riding instanceof BoatEntity) { List<Entity> passengers = riding.getPassengers(); for(Entity passenger : passengers) { if (passenger instanceof ChestPassengerEntity) { player.openContainer(new INamedContainerProvider() { @Nonnull @Override public ITextComponent getDisplayName() { return new TranslationTextComponent("container.chest"); } @Nonnull @Override public Container createMenu(int id, @Nonnull PlayerInventory inventory, @Nonnull PlayerEntity player) { return ChestContainer.createGeneric9X3(id, inventory, (ChestPassengerEntity) passenger); } }); break; } } } } }); return true; } }
{ "pile_set_name": "Github" }
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" android:tint="?attr/colorControlNormal"> <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM6.5,17.5l7.51,-3.49L17.5,6.5 9.99,9.99 6.5,17.5zM12,10.9c0.61,0 1.1,0.49 1.1,1.1s-0.49,1.1 -1.1,1.1 -1.1,-0.49 -1.1,-1.1 0.49,-1.1 1.1,-1.1z"/> </vector>
{ "pile_set_name": "Github" }
TEMPLATE = subdirs #SUBDIRS += bauhaustests SUBDIRS += coretests #SUBDIRS += propertyeditortests
{ "pile_set_name": "Github" }
// // AutoFillBridge.m // Buttercup // // Created by Jacob Morris on 5/1/19. // /** * Copyright (c) 2017-present, Buttercup, Inc. * * This source code is licensed under the GNU GPLv3 license found in the * LICENSE file in the root directory of this source tree. */ #import "AutoFillBridge.h" #import "AutoFillHelpers.h" @implementation AutoFillBridge // The React Native bridge needs to know our module RCT_EXPORT_MODULE() + (BOOL)requiresMainQueueSetup { return YES; } - (instancetype)initWithExtensionContext:(ASCredentialProviderExtensionContext *)extensionContext API_AVAILABLE(ios(12.0)){ self = [super init]; if (self) { self.extensionContext = extensionContext; } return self; } - (NSDictionary *)constantsToExport { return @{ @"DEVICE_SUPPORTS_AUTOFILL": @([AutoFillHelpers deviceSupportsAutoFill]) }; } RCT_EXPORT_METHOD(getAutoFillSystemStatus: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { // We can actual check if the user has/has not enabled Autofill in system settings, to maintain compat with Android we just return true resolve(@YES); } RCT_EXPORT_METHOD(openAutoFillSystemSettings: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { // Apple does not allow us to use the 'private' API to access the settings app. // Immediately resolve to maintain compat with Android resolve(@YES); } /** * Retrieve a list of Source IDs that have autofill enabled */ RCT_EXPORT_METHOD(getAutoFillEnabledSources: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { NSMutableDictionary *autoFillEntries = [[AutoFillHelpers getAutoFillEntries] mutableCopy]; NSMutableArray *autoFillSources = [[NSMutableArray alloc] init]; [autoFillEntries enumerateKeysAndObjectsUsingBlock:^(NSString* sourceID, NSDictionary* childEntries, BOOL* outerStop) { [autoFillSources addObject:sourceID]; }]; resolve(autoFillSources); } /** * Merge Buttercup Credential Entries from a single Archive to the intermediate entry store (iOS Keychain), * then update the ASCredentialIdentityStore with the final list of Entries so they are available in the QuickBar * * The BCAutoFillExtension will use the intermediate store to reverse map the iOS supplied Identity ASCredentialIdentityStore * to a Buttercup Credential (and password) to complete the AutoFill process */ RCT_EXPORT_METHOD(updateEntriesForSourceID:(NSString *)sourceID entries:(NSDictionary *)entries resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { // First retrieve the current intermediate store state so we can merge into it NSMutableDictionary *autoFillEntries = [[AutoFillHelpers getAutoFillEntries] mutableCopy]; // Merge in the updated credentials autoFillEntries[sourceID] = entries; // Sync the entries to the Keychain NSError *saveError = [AutoFillHelpers setAutoFillEntries:autoFillEntries]; // Handle any errors saving to Keychain if (saveError != nil) { return reject([NSString stringWithFormat:@"%li", (long)saveError.code], [saveError localizedDescription], nil); } // Now that the store has been synced, update the ASCredentialIdentityStore with all the identies [AutoFillHelpers updateASCredentialIdentityStore:autoFillEntries]; return resolve(@YES); } /** * Remove all Entries for a Source from the credential store and update the ASCredentialIdentityStore to reflect the changes */ RCT_EXPORT_METHOD(removeEntriesForSourceID:(NSString *)sourceID resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { NSMutableDictionary *autoFillEntries = [[AutoFillHelpers getAutoFillEntries] mutableCopy]; // Delete the Source and it's Entries. removeObjectForKey continues if the source does or does not exist. [autoFillEntries removeObjectForKey:sourceID]; // Sync the entries to the Keychain NSError *saveError = [AutoFillHelpers setAutoFillEntries:autoFillEntries]; // Handle any errors saving to Keychain if (saveError != nil) { return reject([NSString stringWithFormat:@"%li", (long)saveError.code], [saveError localizedDescription], nil); } // Now that the store has been synced, update the ASCredentialIdentityStore with all the identies [AutoFillHelpers updateASCredentialIdentityStore:autoFillEntries]; return resolve(@YES); } /** * Complete the Manual AutoFill Process by sending a desired username and password back to the iOS AutoFill Extension Context. * Note: This method should ONLY be used when the module is loaded inside an iOS AutoFill Overlay. * Note: param entryPath is only used on Android, but needed here to main bridge compat */ RCT_EXPORT_METHOD(completeAutoFill:(NSString *)username password:(NSString *)password entryPath:(NSString *)entryPath resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { if (![AutoFillHelpers deviceSupportsAutoFill]) { reject(@"", @"Device does not support AutoFill.", nil); } else if (self.extensionContext == nil) { reject(@"", @"AutoFill Extension Context not available. This method should only be run from the Buttercup AutoFill Overlay.", nil); } else { ASPasswordCredential *credential = [[ASPasswordCredential alloc] initWithUser:username password:password]; [self.extensionContext completeRequestWithSelectedCredential:credential completionHandler:nil]; resolve(@YES); } } RCT_EXPORT_METHOD(cancelAutoFill:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) { if (![AutoFillHelpers deviceSupportsAutoFill]) { reject(@"", @"Device does not support AutoFill.", nil); } else if (self.extensionContext == nil) { reject(@"", @"AutoFill Extension Context not available. This method should only be run from the Buttercup AutoFill Overlay.", nil); } else { [self.extensionContext cancelRequestWithError:[NSError errorWithDomain:ASExtensionErrorDomain code:ASExtensionErrorCodeUserCanceled userInfo:nil]]; resolve(@YES); } } @end
{ "pile_set_name": "Github" }
/* * Copyright (c) 2018-2020 "Graph Foundation" * Graph Foundation, Inc. [https://graphfoundation.org] * * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of ONgDB Enterprise Edition. The included source * code can be redistributed and/or modified under the terms of the * GNU AFFERO GENERAL PUBLIC LICENSE Version 3 * (http://www.fsf.org/licensing/licenses/agpl-3.0.html) as found * in the associated LICENSE.txt file. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. */ package org.neo4j.causalclustering.catchup.tx; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import java.io.IOException; import java.util.function.BooleanSupplier; import java.util.function.Supplier; import org.neo4j.causalclustering.catchup.CatchupResult; import org.neo4j.causalclustering.catchup.CatchupServerProtocol; import org.neo4j.causalclustering.catchup.CatchupServerProtocol.State; import org.neo4j.causalclustering.catchup.ResponseMessageType; import org.neo4j.causalclustering.identity.StoreId; import org.neo4j.cursor.IOCursor; import org.neo4j.graphdb.DependencyResolver; import org.neo4j.kernel.NeoStoreDataSource; import org.neo4j.kernel.impl.transaction.CommittedTransactionRepresentation; import org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore; import org.neo4j.kernel.impl.transaction.log.NoSuchTransactionException; import org.neo4j.kernel.impl.transaction.log.TransactionIdStore; import org.neo4j.kernel.monitoring.Monitors; import org.neo4j.logging.Log; import org.neo4j.logging.LogProvider; import static java.lang.String.format; import static org.neo4j.causalclustering.catchup.CatchupResult.E_INVALID_REQUEST; import static org.neo4j.causalclustering.catchup.CatchupResult.E_STORE_ID_MISMATCH; import static org.neo4j.causalclustering.catchup.CatchupResult.E_STORE_UNAVAILABLE; import static org.neo4j.causalclustering.catchup.CatchupResult.E_TRANSACTION_PRUNED; import static org.neo4j.causalclustering.catchup.CatchupResult.SUCCESS_END_OF_STREAM; public class TxPullRequestHandler extends SimpleChannelInboundHandler<TxPullRequest> { private final CatchupServerProtocol protocol; private final Supplier<StoreId> storeIdSupplier; private final BooleanSupplier databaseAvailable; private final TransactionIdStore transactionIdStore; private final LogicalTransactionStore logicalTransactionStore; private final TxPullRequestsMonitor monitor; private final Log log; public TxPullRequestHandler( CatchupServerProtocol protocol, Supplier<StoreId> storeIdSupplier, BooleanSupplier databaseAvailable, Supplier<NeoStoreDataSource> dataSourceSupplier, Monitors monitors, LogProvider logProvider ) { this.protocol = protocol; this.storeIdSupplier = storeIdSupplier; this.databaseAvailable = databaseAvailable; DependencyResolver dependencies = dataSourceSupplier.get().getDependencyResolver(); this.transactionIdStore = dependencies.resolveDependency( TransactionIdStore.class ); this.logicalTransactionStore = dependencies.resolveDependency( LogicalTransactionStore.class ); this.monitor = monitors.newMonitor( TxPullRequestsMonitor.class ); this.log = logProvider.getLog( getClass() ); } @Override protected void channelRead0( ChannelHandlerContext ctx, final TxPullRequest msg ) throws Exception { monitor.increment(); if ( msg.previousTxId() <= 0 ) { log.error( "Illegal tx pull request" ); endInteraction( ctx, E_INVALID_REQUEST, -1 ); return; } StoreId localStoreId = storeIdSupplier.get(); StoreId expectedStoreId = msg.expectedStoreId(); long firstTxId = msg.previousTxId() + 1; /* * This is the minimum transaction id we must send to consider our streaming operation successful. The kernel can * concurrently prune even future transactions while iterating and the cursor will silently fail on iteration, so * we need to add our own protection for this reason and also as a generally important sanity check for the fulfillment * of the consistent recovery contract which requires us to stream transactions at least as far as the time when the * file copy operation completed. */ long txIdPromise = transactionIdStore.getLastCommittedTransactionId(); IOCursor<CommittedTransactionRepresentation> txCursor = getCursor( txIdPromise, ctx, firstTxId, localStoreId, expectedStoreId ); if ( txCursor != null ) { ChunkedTransactionStream txStream = new ChunkedTransactionStream( log, localStoreId, firstTxId, txIdPromise, txCursor, protocol ); // chunked transaction stream ends the interaction internally and closes the cursor ctx.writeAndFlush( txStream ).addListener( f -> { if ( log.isDebugEnabled() || !f.isSuccess() ) { String message = format( "Streamed transactions [%d--%d] to %s", firstTxId, txStream.lastTxId(), ctx.channel().remoteAddress() ); if ( f.isSuccess() ) { log.debug( message ); } else { log.warn( message, f.cause() ); } } } ); } } private IOCursor<CommittedTransactionRepresentation> getCursor( long txIdPromise, ChannelHandlerContext ctx, long firstTxId, StoreId localStoreId, StoreId expectedStoreId ) throws IOException { if ( localStoreId == null || !localStoreId.equals( expectedStoreId ) ) { log.info( "Failed to serve TxPullRequest for tx %d and storeId %s because that storeId is different " + "from this machine with %s", firstTxId, expectedStoreId, localStoreId ); endInteraction( ctx, E_STORE_ID_MISMATCH, txIdPromise ); return null; } else if ( !databaseAvailable.getAsBoolean() ) { log.info( "Failed to serve TxPullRequest for tx %d because the local database is unavailable.", firstTxId ); endInteraction( ctx, E_STORE_UNAVAILABLE, txIdPromise ); return null; } else if ( txIdPromise < firstTxId ) { endInteraction( ctx, SUCCESS_END_OF_STREAM, txIdPromise ); return null; } try { return logicalTransactionStore.getTransactions( firstTxId ); } catch ( NoSuchTransactionException e ) { log.info( "Failed to serve TxPullRequest for tx %d because the transaction does not exist.", firstTxId ); endInteraction( ctx, E_TRANSACTION_PRUNED, txIdPromise ); return null; } } private void endInteraction( ChannelHandlerContext ctx, CatchupResult status, long lastCommittedTransactionId ) { ctx.write( ResponseMessageType.TX_STREAM_FINISHED ); ctx.writeAndFlush( new TxStreamFinishedResponse( status, lastCommittedTransactionId ) ); protocol.expect( State.MESSAGE_TYPE ); } }
{ "pile_set_name": "Github" }
<?php class FeedWordPie_Parser extends SimplePie_Parser { function reset_parser (&$xml) { // reset members $this->namespace = array(''); $this->element = array(''); $this->xml_base = array(''); $this->xml_base_explicit = array(false); $this->xml_lang = array(''); $this->data = array(); $this->datas = array(array()); $this->current_xhtml_construct = -1; $this->xmlns_stack = array(); $this->xmlns_current = array(); // reset libxml parser xml_parser_free($xml); $xml = xml_parser_create_ns($this->encoding, $this->separator); xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0); xml_set_object($xml, $this); xml_set_character_data_handler($xml, 'cdata'); xml_set_element_handler($xml, 'tag_open', 'tag_close'); xml_set_start_namespace_decl_handler($xml, 'start_xmlns'); } public function parse (&$data, $encoding, $url = '') { $data = apply_filters('feedwordpress_parser_parse', $data, $encoding, $this, $url); if (class_exists('DOMXpath') && function_exists('Mf2\parse')) { $doc = new DOMDocument(); @$doc->loadHTML($data); $xpath = new DOMXpath($doc); // Check for both h-feed and h-entry, as both a feed with no entries // and a list of entries without an h-feed wrapper are both valid. $query = '//*[contains(concat(" ", @class, " "), " h-feed ") or '. 'contains(concat(" ", @class, " "), " h-entry ")]'; $result = $xpath->query($query); if ($result->length !== 0) { return $this->parse_microformats($data, $url); } } // Use UTF-8 if we get passed US-ASCII, as every US-ASCII character is a UTF-8 character if (strtoupper($encoding) === 'US-ASCII') { $this->encoding = 'UTF-8'; } else { $this->encoding = $encoding; } // Strip BOM: // UTF-32 Big Endian BOM if (substr($data, 0, 4) === "\x00\x00\xFE\xFF") { $data = substr($data, 4); } // UTF-32 Little Endian BOM elseif (substr($data, 0, 4) === "\xFF\xFE\x00\x00") { $data = substr($data, 4); } // UTF-16 Big Endian BOM elseif (substr($data, 0, 2) === "\xFE\xFF") { $data = substr($data, 2); } // UTF-16 Little Endian BOM elseif (substr($data, 0, 2) === "\xFF\xFE") { $data = substr($data, 2); } // UTF-8 BOM elseif (substr($data, 0, 3) === "\xEF\xBB\xBF") { $data = substr($data, 3); } if (substr($data, 0, 5) === '<?xml' && strspn(substr($data, 5, 1), "\x09\x0A\x0D\x20") && ($pos = strpos($data, '?>')) !== false) { $declaration = $this->registry->create('XML_Declaration_Parser', array(substr($data, 5, $pos - 5))); if ($declaration->parse()) { $data = substr($data, $pos + 2); $data = '<?xml version="' . $declaration->version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' ."\n". $this->declare_html_entities() . $data; } else { $this->error_string = 'SimplePie bug! Please report this!'; return false; } } $return = true; static $xml_is_sane = null; if ($xml_is_sane === null) { $parser_check = xml_parser_create(); xml_parse_into_struct($parser_check, '<foo>&amp;</foo>', $values); xml_parser_free($parser_check); $xml_is_sane = isset($values[0]['value']); } // Create the parser if ($xml_is_sane) { $xml = xml_parser_create_ns($this->encoding, $this->separator); xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0); xml_set_object($xml, $this); xml_set_character_data_handler($xml, 'cdata'); xml_set_element_handler($xml, 'tag_open', 'tag_close'); // Parse! $results = $this->do_xml_parse_attempt($xml, $data); $parseResults = $results[0]; $data = $results[1]; if (!$parseResults) { $this->error_code = xml_get_error_code($xml); $this->error_string = xml_error_string($this->error_code); $return = false; } $this->current_line = xml_get_current_line_number($xml); $this->current_column = xml_get_current_column_number($xml); $this->current_byte = xml_get_current_byte_index($xml); xml_parser_free($xml); return $return; } libxml_clear_errors(); $xml = new XMLReader(); $xml->xml($data); while (@$xml->read()) { switch ($xml->nodeType) { case constant('XMLReader::END_ELEMENT'): if ($xml->namespaceURI !== '') { $tagName = $xml->namespaceURI . $this->separator . $xml->localName; } else { $tagName = $xml->localName; } $this->tag_close(null, $tagName); break; case constant('XMLReader::ELEMENT'): $empty = $xml->isEmptyElement; if ($xml->namespaceURI !== '') { $tagName = $xml->namespaceURI . $this->separator . $xml->localName; } else { $tagName = $xml->localName; } $attributes = array(); while ($xml->moveToNextAttribute()) { if ($xml->namespaceURI !== '') { $attrName = $xml->namespaceURI . $this->separator . $xml->localName; } else { $attrName = $xml->localName; } $attributes[$attrName] = $xml->value; } $this->do_scan_attributes_namespaces($attributes); $this->tag_open(null, $tagName, $attributes); if ($empty) { $this->tag_close(null, $tagName); } break; case constant('XMLReader::TEXT'): case constant('XMLReader::CDATA'): $this->cdata(null, $xml->value); break; } } if ($error = libxml_get_last_error()) { $this->error_code = $error->code; $this->error_string = $error->message; $this->current_line = $error->line; $this->current_column = $error->column; return false; } return true; } /* FeedWordPie_Parser::parse() */ public function do_xml_parse_attempt ($xml, $data) { xml_set_start_namespace_decl_handler($xml, 'start_xmlns'); // Parse! $parseResults = xml_parse($xml, $data, true); $endOfJunk = strpos($data, '<?xml'); if (!$parseResults and $endOfJunk > 0) : // There is some junk before the feed prolog. Try to get rid of it. $data = substr($data, $endOfJunk); $data = trim($data); $this->reset_parser($xml); $parseResults = xml_parse($xml, $data, true); endif; $badEntity = (xml_get_error_code($xml) == 26); if (!$parseResults and $badEntity) : // There was an entity that libxml couldn't understand. // Chances are, it was a stray HTML entity. So let's try // converting all the named HTML entities to numeric XML // entities and starting over. $data = $this->html_convert_entities($data); $this->reset_parser($xml); $parseResults = xml_parse($xml, $data, true); endif; $result = array( $parseResults, $data ); return $result; } public function do_scan_attributes_namespaces ($attributes) { foreach ($attributes as $attr => $value) : list($ns, $local) = $this->split_ns($attr); if ($ns=='http://www.w3.org/2000/xmlns/') : if ('xmlns' == $local) : $local = false; endif; $this->start_xmlns(null, $local, $value); endif; endforeach; } var $xmlns_stack = array(); var $xmlns_current = array(); function tag_open ($parser, $tag, $attributes) { $ret = parent::tag_open($parser, $tag, $attributes); if ($this->current_xhtml_construct < 0) : $this->data['xmlns'] = $this->xmlns_current; $this->xmlns_stack[] = $this->xmlns_current; endif; return $ret; } function tag_close($parser, $tag) { if ($this->current_xhtml_construct < 0) : $this->xmlns_current = array_pop($this->xmlns_stack); endif; $ret = parent::tag_close($parser, $tag); return $ret; } function start_xmlns ($parser, $prefix, $uri) { if (!$prefix) : $prefix = ''; endif; if ($this->current_xhtml_construct < 0) : $this->xmlns_current[$prefix] = $uri; endif; return true; } /* FeedWordPie_Parser::start_xmlns() */ /* html_convert_entities($string) -- convert named HTML entities to * XML-compatible numeric entities. Adapted from code by @inanimatt: * https://gist.github.com/inanimatt/879249 */ public function html_convert_entities($string) { return preg_replace_callback('/&([a-zA-Z][a-zA-Z0-9]+);/S', array($this, 'convert_entity'), $string); } /* Swap HTML named entity with its numeric equivalent. If the entity * isn't in the lookup table, this function returns a blank, which * destroys the character in the output - this is probably the * desired behaviour when producing XML. Adapted from code by @inanimatt: * https://gist.github.com/inanimatt/879249 */ public function convert_entity($matches) { static $table = array( 'quot' => '&#34;', 'amp' => '&#38;', 'lt' => '&#60;', 'gt' => '&#62;', 'OElig' => '&#338;', 'oelig' => '&#339;', 'Scaron' => '&#352;', 'scaron' => '&#353;', 'Yuml' => '&#376;', 'circ' => '&#710;', 'tilde' => '&#732;', 'ensp' => '&#8194;', 'emsp' => '&#8195;', 'thinsp' => '&#8201;', 'zwnj' => '&#8204;', 'zwj' => '&#8205;', 'lrm' => '&#8206;', 'rlm' => '&#8207;', 'ndash' => '&#8211;', 'mdash' => '&#8212;', 'lsquo' => '&#8216;', 'rsquo' => '&#8217;', 'sbquo' => '&#8218;', 'ldquo' => '&#8220;', 'rdquo' => '&#8221;', 'bdquo' => '&#8222;', 'dagger' => '&#8224;', 'Dagger' => '&#8225;', 'permil' => '&#8240;', 'lsaquo' => '&#8249;', 'rsaquo' => '&#8250;', 'euro' => '&#8364;', 'fnof' => '&#402;', 'Alpha' => '&#913;', 'Beta' => '&#914;', 'Gamma' => '&#915;', 'Delta' => '&#916;', 'Epsilon' => '&#917;', 'Zeta' => '&#918;', 'Eta' => '&#919;', 'Theta' => '&#920;', 'Iota' => '&#921;', 'Kappa' => '&#922;', 'Lambda' => '&#923;', 'Mu' => '&#924;', 'Nu' => '&#925;', 'Xi' => '&#926;', 'Omicron' => '&#927;', 'Pi' => '&#928;', 'Rho' => '&#929;', 'Sigma' => '&#931;', 'Tau' => '&#932;', 'Upsilon' => '&#933;', 'Phi' => '&#934;', 'Chi' => '&#935;', 'Psi' => '&#936;', 'Omega' => '&#937;', 'alpha' => '&#945;', 'beta' => '&#946;', 'gamma' => '&#947;', 'delta' => '&#948;', 'epsilon' => '&#949;', 'zeta' => '&#950;', 'eta' => '&#951;', 'theta' => '&#952;', 'iota' => '&#953;', 'kappa' => '&#954;', 'lambda' => '&#955;', 'mu' => '&#956;', 'nu' => '&#957;', 'xi' => '&#958;', 'omicron' => '&#959;', 'pi' => '&#960;', 'rho' => '&#961;', 'sigmaf' => '&#962;', 'sigma' => '&#963;', 'tau' => '&#964;', 'upsilon' => '&#965;', 'phi' => '&#966;', 'chi' => '&#967;', 'psi' => '&#968;', 'omega' => '&#969;', 'thetasym' => '&#977;', 'upsih' => '&#978;', 'piv' => '&#982;', 'bull' => '&#8226;', 'hellip' => '&#8230;', 'prime' => '&#8242;', 'Prime' => '&#8243;', 'oline' => '&#8254;', 'frasl' => '&#8260;', 'weierp' => '&#8472;', 'image' => '&#8465;', 'real' => '&#8476;', 'trade' => '&#8482;', 'alefsym' => '&#8501;', 'larr' => '&#8592;', 'uarr' => '&#8593;', 'rarr' => '&#8594;', 'darr' => '&#8595;', 'harr' => '&#8596;', 'crarr' => '&#8629;', 'lArr' => '&#8656;', 'uArr' => '&#8657;', 'rArr' => '&#8658;', 'dArr' => '&#8659;', 'hArr' => '&#8660;', 'forall' => '&#8704;', 'part' => '&#8706;', 'exist' => '&#8707;', 'empty' => '&#8709;', 'nabla' => '&#8711;', 'isin' => '&#8712;', 'notin' => '&#8713;', 'ni' => '&#8715;', 'prod' => '&#8719;', 'sum' => '&#8721;', 'minus' => '&#8722;', 'lowast' => '&#8727;', 'radic' => '&#8730;', 'prop' => '&#8733;', 'infin' => '&#8734;', 'ang' => '&#8736;', 'and' => '&#8743;', 'or' => '&#8744;', 'cap' => '&#8745;', 'cup' => '&#8746;', 'int' => '&#8747;', 'there4' => '&#8756;', 'sim' => '&#8764;', 'cong' => '&#8773;', 'asymp' => '&#8776;', 'ne' => '&#8800;', 'equiv' => '&#8801;', 'le' => '&#8804;', 'ge' => '&#8805;', 'sub' => '&#8834;', 'sup' => '&#8835;', 'nsub' => '&#8836;', 'sube' => '&#8838;', 'supe' => '&#8839;', 'oplus' => '&#8853;', 'otimes' => '&#8855;', 'perp' => '&#8869;', 'sdot' => '&#8901;', 'lceil' => '&#8968;', 'rceil' => '&#8969;', 'lfloor' => '&#8970;', 'rfloor' => '&#8971;', 'lang' => '&#9001;', 'rang' => '&#9002;', 'loz' => '&#9674;', 'spades' => '&#9824;', 'clubs' => '&#9827;', 'hearts' => '&#9829;', 'diams' => '&#9830;', 'nbsp' => '&#160;', 'iexcl' => '&#161;', 'cent' => '&#162;', 'pound' => '&#163;', 'curren' => '&#164;', 'yen' => '&#165;', 'brvbar' => '&#166;', 'sect' => '&#167;', 'uml' => '&#168;', 'copy' => '&#169;', 'ordf' => '&#170;', 'laquo' => '&#171;', 'not' => '&#172;', 'shy' => '&#173;', 'reg' => '&#174;', 'macr' => '&#175;', 'deg' => '&#176;', 'plusmn' => '&#177;', 'sup2' => '&#178;', 'sup3' => '&#179;', 'acute' => '&#180;', 'micro' => '&#181;', 'para' => '&#182;', 'middot' => '&#183;', 'cedil' => '&#184;', 'sup1' => '&#185;', 'ordm' => '&#186;', 'raquo' => '&#187;', 'frac14' => '&#188;', 'frac12' => '&#189;', 'frac34' => '&#190;', 'iquest' => '&#191;', 'Agrave' => '&#192;', 'Aacute' => '&#193;', 'Acirc' => '&#194;', 'Atilde' => '&#195;', 'Auml' => '&#196;', 'Aring' => '&#197;', 'AElig' => '&#198;', 'Ccedil' => '&#199;', 'Egrave' => '&#200;', 'Eacute' => '&#201;', 'Ecirc' => '&#202;', 'Euml' => '&#203;', 'Igrave' => '&#204;', 'Iacute' => '&#205;', 'Icirc' => '&#206;', 'Iuml' => '&#207;', 'ETH' => '&#208;', 'Ntilde' => '&#209;', 'Ograve' => '&#210;', 'Oacute' => '&#211;', 'Ocirc' => '&#212;', 'Otilde' => '&#213;', 'Ouml' => '&#214;', 'times' => '&#215;', 'Oslash' => '&#216;', 'Ugrave' => '&#217;', 'Uacute' => '&#218;', 'Ucirc' => '&#219;', 'Uuml' => '&#220;', 'Yacute' => '&#221;', 'THORN' => '&#222;', 'szlig' => '&#223;', 'agrave' => '&#224;', 'aacute' => '&#225;', 'acirc' => '&#226;', 'atilde' => '&#227;', 'auml' => '&#228;', 'aring' => '&#229;', 'aelig' => '&#230;', 'ccedil' => '&#231;', 'egrave' => '&#232;', 'eacute' => '&#233;', 'ecirc' => '&#234;', 'euml' => '&#235;', 'igrave' => '&#236;', 'iacute' => '&#237;', 'icirc' => '&#238;', 'iuml' => '&#239;', 'eth' => '&#240;', 'ntilde' => '&#241;', 'ograve' => '&#242;', 'oacute' => '&#243;', 'ocirc' => '&#244;', 'otilde' => '&#245;', 'ouml' => '&#246;', 'divide' => '&#247;', 'oslash' => '&#248;', 'ugrave' => '&#249;', 'uacute' => '&#250;', 'ucirc' => '&#251;', 'uuml' => '&#252;', 'yacute' => '&#253;', 'thorn' => '&#254;', 'yuml' => '&#255;' ); // Entity not found? Destroy it. return isset($table[$matches[1]]) ? $table[$matches[1]] : ''; } /* FeedWordPie_Parser::convert_entity() */ private function declare_html_entities() { // This is required because the RSS specification says that entity-encoded // html is allowed, but the xml specification says they must be declared. return '<!DOCTYPE html [ <!ENTITY nbsp "&#x00A0;"> <!ENTITY iexcl "&#x00A1;"> <!ENTITY cent "&#x00A2;"> <!ENTITY pound "&#x00A3;"> <!ENTITY curren "&#x00A4;"> <!ENTITY yen "&#x00A5;"> <!ENTITY brvbar "&#x00A6;"> <!ENTITY sect "&#x00A7;"> <!ENTITY uml "&#x00A8;"> <!ENTITY copy "&#x00A9;"> <!ENTITY ordf "&#x00AA;"> <!ENTITY laquo "&#x00AB;"> <!ENTITY not "&#x00AC;"> <!ENTITY shy "&#x00AD;"> <!ENTITY reg "&#x00AE;"> <!ENTITY macr "&#x00AF;"> <!ENTITY deg "&#x00B0;"> <!ENTITY plusmn "&#x00B1;"> <!ENTITY sup2 "&#x00B2;"> <!ENTITY sup3 "&#x00B3;"> <!ENTITY acute "&#x00B4;"> <!ENTITY micro "&#x00B5;"> <!ENTITY para "&#x00B6;"> <!ENTITY middot "&#x00B7;"> <!ENTITY cedil "&#x00B8;"> <!ENTITY sup1 "&#x00B9;"> <!ENTITY ordm "&#x00BA;"> <!ENTITY raquo "&#x00BB;"> <!ENTITY frac14 "&#x00BC;"> <!ENTITY frac12 "&#x00BD;"> <!ENTITY frac34 "&#x00BE;"> <!ENTITY iquest "&#x00BF;"> <!ENTITY Agrave "&#x00C0;"> <!ENTITY Aacute "&#x00C1;"> <!ENTITY Acirc "&#x00C2;"> <!ENTITY Atilde "&#x00C3;"> <!ENTITY Auml "&#x00C4;"> <!ENTITY Aring "&#x00C5;"> <!ENTITY AElig "&#x00C6;"> <!ENTITY Ccedil "&#x00C7;"> <!ENTITY Egrave "&#x00C8;"> <!ENTITY Eacute "&#x00C9;"> <!ENTITY Ecirc "&#x00CA;"> <!ENTITY Euml "&#x00CB;"> <!ENTITY Igrave "&#x00CC;"> <!ENTITY Iacute "&#x00CD;"> <!ENTITY Icirc "&#x00CE;"> <!ENTITY Iuml "&#x00CF;"> <!ENTITY ETH "&#x00D0;"> <!ENTITY Ntilde "&#x00D1;"> <!ENTITY Ograve "&#x00D2;"> <!ENTITY Oacute "&#x00D3;"> <!ENTITY Ocirc "&#x00D4;"> <!ENTITY Otilde "&#x00D5;"> <!ENTITY Ouml "&#x00D6;"> <!ENTITY times "&#x00D7;"> <!ENTITY Oslash "&#x00D8;"> <!ENTITY Ugrave "&#x00D9;"> <!ENTITY Uacute "&#x00DA;"> <!ENTITY Ucirc "&#x00DB;"> <!ENTITY Uuml "&#x00DC;"> <!ENTITY Yacute "&#x00DD;"> <!ENTITY THORN "&#x00DE;"> <!ENTITY szlig "&#x00DF;"> <!ENTITY agrave "&#x00E0;"> <!ENTITY aacute "&#x00E1;"> <!ENTITY acirc "&#x00E2;"> <!ENTITY atilde "&#x00E3;"> <!ENTITY auml "&#x00E4;"> <!ENTITY aring "&#x00E5;"> <!ENTITY aelig "&#x00E6;"> <!ENTITY ccedil "&#x00E7;"> <!ENTITY egrave "&#x00E8;"> <!ENTITY eacute "&#x00E9;"> <!ENTITY ecirc "&#x00EA;"> <!ENTITY euml "&#x00EB;"> <!ENTITY igrave "&#x00EC;"> <!ENTITY iacute "&#x00ED;"> <!ENTITY icirc "&#x00EE;"> <!ENTITY iuml "&#x00EF;"> <!ENTITY eth "&#x00F0;"> <!ENTITY ntilde "&#x00F1;"> <!ENTITY ograve "&#x00F2;"> <!ENTITY oacute "&#x00F3;"> <!ENTITY ocirc "&#x00F4;"> <!ENTITY otilde "&#x00F5;"> <!ENTITY ouml "&#x00F6;"> <!ENTITY divide "&#x00F7;"> <!ENTITY oslash "&#x00F8;"> <!ENTITY ugrave "&#x00F9;"> <!ENTITY uacute "&#x00FA;"> <!ENTITY ucirc "&#x00FB;"> <!ENTITY uuml "&#x00FC;"> <!ENTITY yacute "&#x00FD;"> <!ENTITY thorn "&#x00FE;"> <!ENTITY yuml "&#x00FF;"> <!ENTITY OElig "&#x0152;"> <!ENTITY oelig "&#x0153;"> <!ENTITY Scaron "&#x0160;"> <!ENTITY scaron "&#x0161;"> <!ENTITY Yuml "&#x0178;"> <!ENTITY fnof "&#x0192;"> <!ENTITY circ "&#x02C6;"> <!ENTITY tilde "&#x02DC;"> <!ENTITY Alpha "&#x0391;"> <!ENTITY Beta "&#x0392;"> <!ENTITY Gamma "&#x0393;"> <!ENTITY Epsilon "&#x0395;"> <!ENTITY Zeta "&#x0396;"> <!ENTITY Eta "&#x0397;"> <!ENTITY Theta "&#x0398;"> <!ENTITY Iota "&#x0399;"> <!ENTITY Kappa "&#x039A;"> <!ENTITY Lambda "&#x039B;"> <!ENTITY Mu "&#x039C;"> <!ENTITY Nu "&#x039D;"> <!ENTITY Xi "&#x039E;"> <!ENTITY Omicron "&#x039F;"> <!ENTITY Pi "&#x03A0;"> <!ENTITY Rho "&#x03A1;"> <!ENTITY Sigma "&#x03A3;"> <!ENTITY Tau "&#x03A4;"> <!ENTITY Upsilon "&#x03A5;"> <!ENTITY Phi "&#x03A6;"> <!ENTITY Chi "&#x03A7;"> <!ENTITY Psi "&#x03A8;"> <!ENTITY Omega "&#x03A9;"> <!ENTITY alpha "&#x03B1;"> <!ENTITY beta "&#x03B2;"> <!ENTITY gamma "&#x03B3;"> <!ENTITY delta "&#x03B4;"> <!ENTITY epsilon "&#x03B5;"> <!ENTITY zeta "&#x03B6;"> <!ENTITY eta "&#x03B7;"> <!ENTITY theta "&#x03B8;"> <!ENTITY iota "&#x03B9;"> <!ENTITY kappa "&#x03BA;"> <!ENTITY lambda "&#x03BB;"> <!ENTITY mu "&#x03BC;"> <!ENTITY nu "&#x03BD;"> <!ENTITY xi "&#x03BE;"> <!ENTITY omicron "&#x03BF;"> <!ENTITY pi "&#x03C0;"> <!ENTITY rho "&#x03C1;"> <!ENTITY sigmaf "&#x03C2;"> <!ENTITY sigma "&#x03C3;"> <!ENTITY tau "&#x03C4;"> <!ENTITY upsilon "&#x03C5;"> <!ENTITY phi "&#x03C6;"> <!ENTITY chi "&#x03C7;"> <!ENTITY psi "&#x03C8;"> <!ENTITY omega "&#x03C9;"> <!ENTITY thetasym "&#x03D1;"> <!ENTITY upsih "&#x03D2;"> <!ENTITY piv "&#x03D6;"> <!ENTITY ensp "&#x2002;"> <!ENTITY emsp "&#x2003;"> <!ENTITY thinsp "&#x2009;"> <!ENTITY zwnj "&#x200C;"> <!ENTITY zwj "&#x200D;"> <!ENTITY lrm "&#x200E;"> <!ENTITY rlm "&#x200F;"> <!ENTITY ndash "&#x2013;"> <!ENTITY mdash "&#x2014;"> <!ENTITY lsquo "&#x2018;"> <!ENTITY rsquo "&#x2019;"> <!ENTITY sbquo "&#x201A;"> <!ENTITY ldquo "&#x201C;"> <!ENTITY rdquo "&#x201D;"> <!ENTITY bdquo "&#x201E;"> <!ENTITY dagger "&#x2020;"> <!ENTITY Dagger "&#x2021;"> <!ENTITY bull "&#x2022;"> <!ENTITY hellip "&#x2026;"> <!ENTITY permil "&#x2030;"> <!ENTITY prime "&#x2032;"> <!ENTITY Prime "&#x2033;"> <!ENTITY lsaquo "&#x2039;"> <!ENTITY rsaquo "&#x203A;"> <!ENTITY oline "&#x203E;"> <!ENTITY frasl "&#x2044;"> <!ENTITY euro "&#x20AC;"> <!ENTITY image "&#x2111;"> <!ENTITY weierp "&#x2118;"> <!ENTITY real "&#x211C;"> <!ENTITY trade "&#x2122;"> <!ENTITY alefsym "&#x2135;"> <!ENTITY larr "&#x2190;"> <!ENTITY uarr "&#x2191;"> <!ENTITY rarr "&#x2192;"> <!ENTITY darr "&#x2193;"> <!ENTITY harr "&#x2194;"> <!ENTITY crarr "&#x21B5;"> <!ENTITY lArr "&#x21D0;"> <!ENTITY uArr "&#x21D1;"> <!ENTITY rArr "&#x21D2;"> <!ENTITY dArr "&#x21D3;"> <!ENTITY hArr "&#x21D4;"> <!ENTITY forall "&#x2200;"> <!ENTITY part "&#x2202;"> <!ENTITY exist "&#x2203;"> <!ENTITY empty "&#x2205;"> <!ENTITY nabla "&#x2207;"> <!ENTITY isin "&#x2208;"> <!ENTITY notin "&#x2209;"> <!ENTITY ni "&#x220B;"> <!ENTITY prod "&#x220F;"> <!ENTITY sum "&#x2211;"> <!ENTITY minus "&#x2212;"> <!ENTITY lowast "&#x2217;"> <!ENTITY radic "&#x221A;"> <!ENTITY prop "&#x221D;"> <!ENTITY infin "&#x221E;"> <!ENTITY ang "&#x2220;"> <!ENTITY and "&#x2227;"> <!ENTITY or "&#x2228;"> <!ENTITY cap "&#x2229;"> <!ENTITY cup "&#x222A;"> <!ENTITY int "&#x222B;"> <!ENTITY there4 "&#x2234;"> <!ENTITY sim "&#x223C;"> <!ENTITY cong "&#x2245;"> <!ENTITY asymp "&#x2248;"> <!ENTITY ne "&#x2260;"> <!ENTITY equiv "&#x2261;"> <!ENTITY le "&#x2264;"> <!ENTITY ge "&#x2265;"> <!ENTITY sub "&#x2282;"> <!ENTITY sup "&#x2283;"> <!ENTITY nsub "&#x2284;"> <!ENTITY sube "&#x2286;"> <!ENTITY supe "&#x2287;"> <!ENTITY oplus "&#x2295;"> <!ENTITY otimes "&#x2297;"> <!ENTITY perp "&#x22A5;"> <!ENTITY sdot "&#x22C5;"> <!ENTITY lceil "&#x2308;"> <!ENTITY rceil "&#x2309;"> <!ENTITY lfloor "&#x230A;"> <!ENTITY rfloor "&#x230B;"> <!ENTITY lang "&#x2329;"> <!ENTITY rang "&#x232A;"> <!ENTITY loz "&#x25CA;"> <!ENTITY spades "&#x2660;"> <!ENTITY clubs "&#x2663;"> <!ENTITY hearts "&#x2665;"> <!ENTITY diams "&#x2666;"> ]>'; } } /* class FeedWordPie_Parser */
{ "pile_set_name": "Github" }
import copy import itertools import os import random import time from collections import defaultdict, namedtuple import numpy as np import torch import torch.nn.functional as F from tabulate import tabulate from tqdm import tqdm from cogdl import options from cogdl.tasks import build_task def main(args): if torch.cuda.is_available() and not args.cpu: torch.cuda.set_device(args.device_id[0]) random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) torch.cuda.manual_seed(args.seed) task = build_task(args) result = task.train() if "ValAcc" in result: result.pop("ValAcc") return result def gen_variants(**items): Variant = namedtuple("Variant", items.keys()) return itertools.starmap(Variant, itertools.product(*items.values())) def variant_args_generator(args, variants): """Form variants as group with size of num_workers""" for variant in variants: args.dataset, args.model, args.seed = variant yield copy.deepcopy(args) def tabulate_results(results_dict): # Average for different seeds tab_data = [] for variant in results_dict: results = np.array([list(res.values()) for res in results_dict[variant]]) tab_data.append( [variant] + list( itertools.starmap( lambda x, y: f"{x:.4f}±{y:.4f}", zip( np.mean(results, axis=0).tolist(), np.std(results, axis=0).tolist(), ), ) ) ) return tab_data if __name__ == "__main__": parser = options.get_training_parser() args, _ = parser.parse_known_args() args = options.parse_args_and_arch(parser, args) print(args) assert len(args.device_id) == 1 variants = list( gen_variants(dataset=args.dataset, model=args.model, seed=args.seed) ) # Collect results results_dict = defaultdict(list) results = [main(args) for args in variant_args_generator(args, variants)] for variant, result in zip(variants, results): results_dict[variant[:-1]].append(result) col_names = ["Variant"] + list(results_dict[variant[:-1]][-1].keys()) tab_data = tabulate_results(results_dict) print(tabulate(tab_data, headers=col_names, tablefmt="github"))
{ "pile_set_name": "Github" }
namespace LibgenDesktop.Views.Tabs { public partial class LibraryTab { public LibraryTab() { InitializeComponent(); } } }
{ "pile_set_name": "Github" }
"mars_impale_enemies_on_arena" { "desc" "#DOTA_ChallengeDesc_MarsImpaleEnemiesOnArena" "status_text" "#DOTA_ChallengeStatus_MarsImpaleEnemiesOnArena" "requiredhero" "mars" "image" "images/spellicons/mars_spear.png" "events" { "matching_type" "linear_series" "query" { "enemy_impales" { "event" "kill_eater" "caster" "!hero" "kill_eater_event" "798" } } "postmatch_increments" { "storage" { "1" { "aggregator" "increment" } } } "progress_stored_in" "1" "post_tests" { "test_enemy_impales" { "storage" "1" "compare" ">=" "amount" "<enemies_impaled>" } } } "variables" { "<enemies_impaled>" { "format" "int" "index" "0" } } }
{ "pile_set_name": "Github" }
/******************************************************************* * Copyright (c) 2010-2020 Xilinx, Inc. All Rights Reserved. * SPDX-License-Identifier: MIT *******************************************************************/ #include "xparameters.h" #include "xi2srx.h" /* * The configuration table for devices */ XI2srx_Config XI2srx_ConfigTable[XPAR_XI2SRX_NUM_INSTANCES] = { { XPAR_I2S_RECEIVER_0_DEVICE_ID, XPAR_I2S_RECEIVER_0_BASEADDR, XPAR_I2S_RECEIVER_0_DWIDTH, XPAR_I2S_RECEIVER_0_IS_MASTER, XPAR_I2S_RECEIVER_0_NUM_CHANNELS, XPAR_I2S_RECEIVER_0_32BIT_LR } };
{ "pile_set_name": "Github" }
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build s390x // +build linux // +build !gccgo #include "textflag.h" // // System calls for s390x, Linux // // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. TEXT ·Syscall(SB),NOSPLIT,$0-56 BR syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 BR syscall·Syscall6(SB) TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 BL runtime·entersyscall(SB) MOVD a1+8(FP), R2 MOVD a2+16(FP), R3 MOVD a3+24(FP), R4 MOVD $0, R5 MOVD $0, R6 MOVD $0, R7 MOVD trap+0(FP), R1 // syscall entry SYSCALL MOVD R2, r1+32(FP) MOVD R3, r2+40(FP) BL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 BR syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 BR syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVD a1+8(FP), R2 MOVD a2+16(FP), R3 MOVD a3+24(FP), R4 MOVD $0, R5 MOVD $0, R6 MOVD $0, R7 MOVD trap+0(FP), R1 // syscall entry SYSCALL MOVD R2, r1+32(FP) MOVD R3, r2+40(FP) RET
{ "pile_set_name": "Github" }
module Wee VERSION = "2.3.0" Version = VERSION end
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" default-locale="en-US"> <!-- Generated with https://github.com/citation-style-language/utilities/tree/master/generate_dependent_styles/data/springer --> <info> <title>Systematic Parasitology</title> <title-short>Syst Parasitol</title-short> <id>http://www.zotero.org/styles/systematic-parasitology</id> <link href="http://www.zotero.org/styles/systematic-parasitology" rel="self"/> <link href="http://www.zotero.org/styles/springer-socpsych-author-date" rel="independent-parent"/> <link href="http://www.springer.com/cda/content/document/cda_downloaddocument/Key_Style_Points_1.0.pdf" rel="documentation"/> <link href="http://www.springer.com/cda/content/document/cda_downloaddocument/manuscript-guidelines-1.0.pdf" rel="documentation"/> <category citation-format="author-date"/> <category field="psychology"/> <issn>0165-5752</issn> <eissn>1573-5192</eissn> <updated>2014-05-15T12:00:00+00:00</updated> <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights> </info> </style>
{ "pile_set_name": "Github" }
@import 'list-view/bootstrap4.scss'; @import 'sortable/bootstrap4.scss';
{ "pile_set_name": "Github" }
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing struct B<T where g: a { struct Q<I : j { enum b { { { } } enum b { var _ = { { } typealias d }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=constant.PF_UNSPEC.html"> </head> <body> <p>Redirecting to <a href="constant.PF_UNSPEC.html">constant.PF_UNSPEC.html</a>...</p> <script>location.replace("constant.PF_UNSPEC.html" + location.search + location.hash);</script> </body> </html>
{ "pile_set_name": "Github" }
# SoftAP + HTTPD based Provisioning Example (Legacy) > Note: It is recommended to use the new `wifi_prov_mgr` example which is based on the simpler `wifi_provisioning` APIs. Check this example only if you wish to use lower level provisioning and protocomm APIs and want more control over the handlers. (See the README.md file in the upper level 'examples' directory for more information about examples.) `softap_prov` example demonstrates the implementation and integration of various IDF components for building a provisioning application. For this example Wi-Fi SoftAP is chosen as the mode of transport, over which the provisioning related communication is to take place, between the device (to be provisioned) and the client (owner of the device). The provisioning service is hosted by an HTTP server which accepts requests to specific URIs corresponding to the available provisioning endpoints (eg. for session establishment, for Wi-Fi credentials configuration, etc.). In the provisioning process the device is configured as a Wi-Fi station with specified credentials. Once configured, the device will retain the Wi-Fi configuration, until a flash erase is performed. Right after provisioning is complete, Wi-Fi SoftAP and the HTTP server are deactivated. Though, that is specific to this example, and the user can choose to keep SoftAP / HTTP server active in their own application. `softap_prov` uses the following components : * `wifi_provisioning` : provides data structures and protocomm endpoint handlers for Wi-Fi configuration * `protocomm` : for protocol based communication and secure session establishment * `protobuf` : Google's protocol buffer library for serialization of protocomm data structures This example can be used, as it is, for adding a provisioning service to any application intended for IoT. ## How to use example ### Hardware Required Example should be able to run on any commonly available ESP32 development board. ### Application Required Provisioning applications are available for various platforms. See below #### Platform : Android For Android, a provisioning application along with source code is available on GitHub : [esp-idf-provisioning-android](https://github.com/espressif/esp-idf-provisioning-android) #### Platform : iOS For iOS, a provisioning application along with source code is available on GitHub : [esp-idf-provisioning-ios](https://github.com/espressif/esp-idf-provisioning-ios) #### Platform : Linux / Windows / macOS To provision the device running this example, the `esp_prov.py` script needs to be run (found under `$IDF_PATH/tools/esp_prov`). This feature of `esp_prov` should work on all platforms, given the dependencies are satisfied. ### Configure the project ``` idf.py menuconfig ``` * Under Example Configuration set the following : * SoftAP SSID (Defaults to PROV_<MACID>) * SoftAP Password (Defaults to PROV_PASS) * Security Version (default 1) * Proof of Possession (default "abcd1234") ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: ``` idf.py -p PORT flash monitor ``` (To exit the serial monitor, type ``Ctrl-]``.) See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. ## Example Output ``` I (1562) app: SoftAP started I (1572) app_prov: SoftAP Provisioning started with SSID 'PROV_261FCC', Password 'PROV_PASS' ``` Make sure to connect the client computer to the SoftAP network, whose SSID and Password are displayed in the serial monitor log. On successful connection the monitor log will show : ``` I (519482) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2 ``` In a separate terminal run the `esp_prov.py` script under `$IDP_PATH/tools/esp_prov` directory (please replace `myssid` and `mypassword` with the credentials of the AP to which the device is supposed to connect to after provisioning). The SoftAP endpoint corresponds to the IP and port of the device on the SoftAP network, but this is usually same as the default value and may be left out. Assuming default example configuration, the script should be run as follows : ``` python esp_prov.py --transport softap --service_name "192.168.4.1:80" --sec_ver 1 --pop abcd1234 --ssid myssid --passphrase mypassword ``` Above command will perform the provisioning steps, and the monitor log should display something like this : ``` I (634572) app_prov_handler: WiFi Credentials Received : ssid : myssid password : mypassword . . . I (634652) app_prov_handler: WiFi Credentials Applied I (634652) app_prov: STA Start . . . I (688270) app_prov_handler: Connecting state . . . I (637732) app_prov: STA Got IP I (637732) app: got ip:192.168.43.220 . . . I (654562) app_prov_handler: Connected state ``` After sometime the provisioning app will exit, SoftAP will be turned off and HTTP server will be stopped ``` I (667732) app_prov: Stopping provisioning I (668732) app_prov: Provisioning stopped I (668742) app: SoftAP stopped ``` ## Troubleshooting ### Provisioning failed It is possible that the Wi-Fi credentials provided were incorrect, or the device was not able to establish connection to the network, in which the the `esp_prov` script will notify failure (with reason) and the provisioning app will continue running, allowing the user to retry the process. Serial monitor log will display the failure along with disconnect reason : ``` E (39291) app_prov: STA Disconnected E (39291) app_prov: Disconnect reason : 201 I (39291) app_prov: STA AP Not found I (42021) app_prov_handler: Disconnected state ``` ### Provisioning does not start If the serial monitor log is different, as shown below : ``` I (539) app_prov: Found ssid myssid I (539) app_prov: Found password mypassword I (549) app: Starting WiFi station ``` It means the Wi-Fi credentials were already set by some other application flashed previously to your device. To erase these credentials either do full erase and then flash the example ``` make erase_flash idf.py -p PORT flash monitor ``` Or, enable `Reset Provisioning` option under `Example Configuration` under menuconfig. But this will erase the saved Wi-Fi credentials every time the device boots, so this is not the preferred solution.
{ "pile_set_name": "Github" }
// GLOBAL VARS var socket; var canvas; var ctx = null; var canvasData; var data; var type; //---------------------------------------------------------------------------------------------------------------- // ON READY, SETUP SOCKET! //---------------------------------------------------------------------------------------------------------------- $(window).load( function() { setupSocket(); canvas = document.getElementById('contourCanvas'); if (canvas.getContext) { ctx = canvas.getContext('2d'); canvasData = ctx.getImageData(0,0,canvas.width, canvas.height); data = canvasData.data; } else { alert("Sorry, your browser doesn't support canvas!"); } document.getElementById("brow").textContent = " " + BrowserDetect.browser + " " + BrowserDetect.version +" " + BrowserDetect.OS +" "; }); //---------------------------------------------------------------------------------------------------------------- // WS:ON OPEN //---------------------------------------------------------------------------------------------------------------- function onOpen(){ document.getElementById("wslm_statustd").style.backgroundColor = "#40ff40"; document.getElementById("wslm_statustd").textContent = " websocket connection opened "; } //---------------------------------------------------------------------------------------------------------------- // WS: ON CLOSE //---------------------------------------------------------------------------------------------------------------- function onClose(){ document.getElementById("wslm_statustd").style.backgroundColor = "#ff4040"; document.getElementById("wslm_statustd").textContent = " websocket connection CLOSED "; } //---------------------------------------------------------------------------------------------------------------- // WS: ON MESSAGE //---------------------------------------------------------------------------------------------------------------- function onMessage( messageEvent ){ if ( ctx == null ){ console.error("Context is null. Check for browser support!"); return; } // check for binary if (messageEvent.data instanceof ArrayBuffer) { var image = new Image(); data = canvasData.data; var bytearray = new Uint8Array( messageEvent.data ); var index = 0; // b & w if ( type == 0 ){ for (var i = 0; i < data.length; i+=4) { data[i] = bytearray[index]; data[i + 1] = bytearray[index]; data[i + 2] = bytearray[index]; data[i + 3] = 255; index++; } // rgb } else if ( type == 1 ){ for (var i = 0; i < data.length; i+=4) { data[i] = bytearray[index]; index++; data[i + 1] = bytearray[index]; index++; data[i + 2] = bytearray[index]; index++; data[i + 3] = 255; } // rgba } else { console.log( bytearray.length ); console.log( data.length ); for (var i = 0; i < bytearray.length; i++) { data[i] = bytearray[i] } } ctx.putImageData(canvasData,0,0); } else if (messageEvent.data instanceof Blob) { var image = new Image(); image.onload = function () { ctx.clearRect(0, 0, destinationCanvas.width, destinationCanvas.height); ctx.drawImage(image, 0, 0); document.body.appendChild(image); } if ( window.URL ){ image.src = window.URL.createObjectURL(messageEvent.data); } else if ( window.webkitURL ){ image.src = window.webkitURL.createObjectURL(messageEvent.data); } else { console.error( "your browser does not have a window.URL method :(") } } else { // here's where we'll catch the image stuff! var imgData; try { imgData = jQuery.parseJSON( messageEvent.data ); } catch( e ){ imgData = messageEvent.data; var vals = imgData.split(":"); try { if ( canvas.width != vals[0] || canvas.height != vals[1] ){ canvas.width = vals[0]; canvas.height = vals[1]; canvasData = ctx.getImageData(0,0,canvas.width, canvas.height); data = canvasData.data; } type = vals[2]; } catch ( e ){ } } } } //---------------------------------------------------------------------------------------------------------------- // setup web socket //---------------------------------------------------------------------------------------------------------------- function setupSocket(){ // setup! socket = new WebSocket( get_appropriate_ws_url()); socket.binaryType = "arraybuffer"; // open try { socket.onopen = onOpen; socket.onmessage = onMessage; socket.onclose = onClose; } catch(exception) { alert('Error' + exception); } }
{ "pile_set_name": "Github" }
package org.tuxdevelop.spring.batch.lightmin.exception; /** * @author Marcel Becker * @since 0.1 */ public class NoSuchJobException extends Exception { private static final long serialVersionUID = 1L; public NoSuchJobException(final String message) { super(message); } public NoSuchJobException(final Throwable t, final String message) { super(message, t); } }
{ "pile_set_name": "Github" }
Rails.application.routes.draw do root to: 'visitors#index' devise_for :users resources :users end
{ "pile_set_name": "Github" }
var isObject = require('./_is-object') , setPrototypeOf = require('./_set-proto').set; module.exports = function(that, target, C){ var P, S = target.constructor; if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ setPrototypeOf(that, P); } return that; };
{ "pile_set_name": "Github" }
-- boundary1.test -- -- db eval { -- SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY x -- } SELECT a FROM t1 WHERE rowid >= 36028797018963967 ORDER BY x
{ "pile_set_name": "Github" }
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Layout"> <item name="android:orientation">vertical</item> </style> <style name="Layout.Horizontal"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> </style> <style name="MyButtonStyle" parent="@style/Layout"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> </style> </resources>
{ "pile_set_name": "Github" }
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function() { 'use strict'; /** * Class constructor for Layout MDL component. * Implements MDL component design pattern defined at: * https://github.com/jasonmayes/mdl-component-design-pattern * * @constructor * @param {HTMLElement} element The element that will be upgraded. */ var MaterialLayout = function MaterialLayout(element) { this.element_ = element; this.innerContainer_ = element.querySelector('.' + this.CssClasses_.INNER_CONTAINER); // Initialize instance. this.init(); }; window['MaterialLayout'] = MaterialLayout; /** * Store constants in one place so they can be updated easily. * * @enum {string | number} * @private */ MaterialLayout.prototype.Constant_ = { MAX_WIDTH: '(max-width: 1024px)', TAB_SCROLL_PIXELS: 100, RESIZE_TIMEOUT: 100, MENU_ICON: '&#xE5D2;', CHEVRON_LEFT: 'chevron_left', CHEVRON_RIGHT: 'chevron_right' }; /** * Keycodes, for code readability. * * @enum {number} * @private */ MaterialLayout.prototype.Keycodes_ = { ENTER: 13, ESCAPE: 27, SPACE: 32 }; /** * Modes. * * @enum {number} * @private */ MaterialLayout.prototype.Mode_ = { STANDARD: 0, SEAMED: 1, WATERFALL: 2, SCROLL: 3 }; /** * Store strings for class names defined by this component that are used in * JavaScript. This allows us to simply change it in one place should we * decide to modify at a later date. * * @enum {string} * @private */ MaterialLayout.prototype.CssClasses_ = { INNER_CONTAINER: 'mdl-layout__inner-container', HEADER: 'mdl-layout__header', DRAWER: 'mdl-layout__drawer', CONTENT: 'mdl-layout__content', DRAWER_BTN: 'mdl-layout__drawer-button', ICON: 'material-icons', JS_RIPPLE_EFFECT: 'mdl-js-ripple-effect', RIPPLE_CONTAINER: 'mdl-layout__tab-ripple-container', RIPPLE: 'mdl-ripple', RIPPLE_IGNORE_EVENTS: 'mdl-js-ripple-effect--ignore-events', HEADER_SEAMED: 'mdl-layout__header--seamed', HEADER_WATERFALL: 'mdl-layout__header--waterfall', HEADER_SCROLL: 'mdl-layout__header--scroll', FIXED_HEADER: 'mdl-layout--fixed-header', OBFUSCATOR: 'mdl-layout__obfuscator', TAB_BAR: 'mdl-layout__tab-bar', TAB_CONTAINER: 'mdl-layout__tab-bar-container', TAB: 'mdl-layout__tab', TAB_BAR_BUTTON: 'mdl-layout__tab-bar-button', TAB_BAR_LEFT_BUTTON: 'mdl-layout__tab-bar-left-button', TAB_BAR_RIGHT_BUTTON: 'mdl-layout__tab-bar-right-button', PANEL: 'mdl-layout__tab-panel', HAS_DRAWER: 'has-drawer', HAS_TABS: 'has-tabs', HAS_SCROLLING_HEADER: 'has-scrolling-header', CASTING_SHADOW: 'is-casting-shadow', IS_COMPACT: 'is-compact', IS_SMALL_SCREEN: 'is-small-screen', IS_DRAWER_OPEN: 'is-visible', IS_ACTIVE: 'is-active', IS_UPGRADED: 'is-upgraded', IS_ANIMATING: 'is-animating', ON_LARGE_SCREEN: 'mdl-layout--large-screen-only', ON_SMALL_SCREEN: 'mdl-layout--small-screen-only' }; /** * Handles scrolling on the content. * * @private */ MaterialLayout.prototype.contentScrollHandler_ = function() { if (this.header_.classList.contains(this.CssClasses_.IS_ANIMATING)) { return; } var headerVisible = !this.element_.classList.contains(this.CssClasses_.IS_SMALL_SCREEN) || this.element_.classList.contains(this.CssClasses_.FIXED_HEADER); if (this.content_.scrollTop > 0 && !this.header_.classList.contains(this.CssClasses_.IS_COMPACT)) { this.header_.classList.add(this.CssClasses_.CASTING_SHADOW); this.header_.classList.add(this.CssClasses_.IS_COMPACT); if (headerVisible) { this.header_.classList.add(this.CssClasses_.IS_ANIMATING); } } else if (this.content_.scrollTop <= 0 && this.header_.classList.contains(this.CssClasses_.IS_COMPACT)) { this.header_.classList.remove(this.CssClasses_.CASTING_SHADOW); this.header_.classList.remove(this.CssClasses_.IS_COMPACT); if (headerVisible) { this.header_.classList.add(this.CssClasses_.IS_ANIMATING); } } }; /** * Handles a keyboard event on the drawer. * * @param {Event} evt The event that fired. * @private */ MaterialLayout.prototype.keyboardEventHandler_ = function(evt) { // Only react when the drawer is open. if (evt.keyCode === this.Keycodes_.ESCAPE && this.drawer_.classList.contains(this.CssClasses_.IS_DRAWER_OPEN)) { this.toggleDrawer(); } }; /** * Handles changes in screen size. * * @private */ MaterialLayout.prototype.screenSizeHandler_ = function() { if (this.screenSizeMediaQuery_.matches) { this.element_.classList.add(this.CssClasses_.IS_SMALL_SCREEN); } else { this.element_.classList.remove(this.CssClasses_.IS_SMALL_SCREEN); // Collapse drawer (if any) when moving to a large screen size. if (this.drawer_) { this.drawer_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN); this.obfuscator_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN); } } }; /** * Handles events of drawer button. * * @param {Event} evt The event that fired. * @private */ MaterialLayout.prototype.drawerToggleHandler_ = function(evt) { if (evt && (evt.type === 'keydown')) { if (evt.keyCode === this.Keycodes_.SPACE || evt.keyCode === this.Keycodes_.ENTER) { // prevent scrolling in drawer nav evt.preventDefault(); } else { // prevent other keys return; } } this.toggleDrawer(); }; /** * Handles (un)setting the `is-animating` class * * @private */ MaterialLayout.prototype.headerTransitionEndHandler_ = function() { this.header_.classList.remove(this.CssClasses_.IS_ANIMATING); }; /** * Handles expanding the header on click * * @private */ MaterialLayout.prototype.headerClickHandler_ = function() { if (this.header_.classList.contains(this.CssClasses_.IS_COMPACT)) { this.header_.classList.remove(this.CssClasses_.IS_COMPACT); this.header_.classList.add(this.CssClasses_.IS_ANIMATING); } }; /** * Reset tab state, dropping active classes * * @private */ MaterialLayout.prototype.resetTabState_ = function(tabBar) { for (var k = 0; k < tabBar.length; k++) { tabBar[k].classList.remove(this.CssClasses_.IS_ACTIVE); } }; /** * Reset panel state, droping active classes * * @private */ MaterialLayout.prototype.resetPanelState_ = function(panels) { for (var j = 0; j < panels.length; j++) { panels[j].classList.remove(this.CssClasses_.IS_ACTIVE); } }; /** * Toggle drawer state * * @public */ MaterialLayout.prototype.toggleDrawer = function() { var drawerButton = this.innerContainer_.querySelector('.' + this.CssClasses_.DRAWER_BTN); this.drawer_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN); this.obfuscator_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN); // Set accessibility properties. if (this.drawer_.classList.contains(this.CssClasses_.IS_DRAWER_OPEN)) { this.drawer_.setAttribute('aria-hidden', 'false'); drawerButton.setAttribute('aria-expanded', 'true'); } else { this.drawer_.setAttribute('aria-hidden', 'true'); drawerButton.setAttribute('aria-expanded', 'false'); } }; MaterialLayout.prototype['toggleDrawer'] = MaterialLayout.prototype.toggleDrawer; /** * Initialize element. */ MaterialLayout.prototype.init = function() { if (this.element_) { var focusedElement = this.element_.querySelector(':focus'); if (focusedElement) { focusedElement.focus(); } var directChildren = this.innerContainer_.childNodes; var numChildren = directChildren.length; for (var c = 0; c < numChildren; c++) { var child = directChildren[c]; if (child.classList && child.classList.contains(this.CssClasses_.HEADER)) { this.header_ = child; } if (child.classList && child.classList.contains(this.CssClasses_.DRAWER)) { this.drawer_ = child; } if (child.classList && child.classList.contains(this.CssClasses_.CONTENT)) { this.content_ = child; } } window.addEventListener('pageshow', function(e) { if (e.persisted) { // when page is loaded from back/forward cache // trigger repaint to let layout scroll in safari this.innerContainer_.style.overflowY = 'hidden'; requestAnimationFrame(function() { this.innerContainer_.style.overflowY = ''; }.bind(this)); } }.bind(this), false); if (this.header_) { this.tabBar_ = this.header_.querySelector('.' + this.CssClasses_.TAB_BAR); } var mode = this.Mode_.STANDARD; if (this.header_) { if (this.header_.classList.contains(this.CssClasses_.HEADER_SEAMED)) { mode = this.Mode_.SEAMED; } else if (this.header_.classList.contains( this.CssClasses_.HEADER_WATERFALL)) { mode = this.Mode_.WATERFALL; this.header_.addEventListener('transitionend', this.headerTransitionEndHandler_.bind(this)); this.header_.addEventListener('click', this.headerClickHandler_.bind(this)); } else if (this.header_.classList.contains( this.CssClasses_.HEADER_SCROLL)) { mode = this.Mode_.SCROLL; this.element_.classList.add(this.CssClasses_.HAS_SCROLLING_HEADER); } if (mode === this.Mode_.STANDARD) { this.header_.classList.add(this.CssClasses_.CASTING_SHADOW); if (this.tabBar_) { this.tabBar_.classList.add(this.CssClasses_.CASTING_SHADOW); } } else if (mode === this.Mode_.SEAMED || mode === this.Mode_.SCROLL) { this.header_.classList.remove(this.CssClasses_.CASTING_SHADOW); if (this.tabBar_) { this.tabBar_.classList.remove(this.CssClasses_.CASTING_SHADOW); } } else if (mode === this.Mode_.WATERFALL) { // Add and remove shadows depending on scroll position. // Also add/remove auxiliary class for styling of the compact version of // the header. this.content_.addEventListener('scroll', this.contentScrollHandler_.bind(this)); this.contentScrollHandler_(); } } // Add drawer toggling button to our layout, if we have an openable drawer. if (this.drawer_) { var drawerButton = this.innerContainer_.querySelector('.' + this.CssClasses_.DRAWER_BTN); if (!drawerButton) { drawerButton = document.createElement('div'); drawerButton.setAttribute('aria-expanded', 'false'); drawerButton.setAttribute('role', 'button'); drawerButton.setAttribute('tabindex', '0'); drawerButton.classList.add(this.CssClasses_.DRAWER_BTN); var drawerButtonIcon = document.createElement('i'); drawerButtonIcon.classList.add(this.CssClasses_.ICON); drawerButtonIcon.innerHTML = this.Constant_.MENU_ICON; drawerButton.appendChild(drawerButtonIcon); } if (this.drawer_.classList.contains(this.CssClasses_.ON_LARGE_SCREEN)) { //If drawer has ON_LARGE_SCREEN class then add it to the drawer toggle button as well. drawerButton.classList.add(this.CssClasses_.ON_LARGE_SCREEN); } else if (this.drawer_.classList.contains(this.CssClasses_.ON_SMALL_SCREEN)) { //If drawer has ON_SMALL_SCREEN class then add it to the drawer toggle button as well. drawerButton.classList.add(this.CssClasses_.ON_SMALL_SCREEN); } drawerButton.addEventListener('click', this.drawerToggleHandler_.bind(this)); drawerButton.addEventListener('keydown', this.drawerToggleHandler_.bind(this)); // Add a class if the layout has a drawer, for altering the left padding. // Adds the HAS_DRAWER to the elements since this.header_ may or may // not be present. this.element_.classList.add(this.CssClasses_.HAS_DRAWER); // If we have a fixed header, add the button to the header rather than // the layout. if (this.element_.classList.contains(this.CssClasses_.FIXED_HEADER)) { this.header_.insertBefore(drawerButton, this.header_.firstChild); } else { this.innerContainer_.insertBefore(drawerButton, this.content_); } var obfuscator = document.createElement('div'); obfuscator.classList.add(this.CssClasses_.OBFUSCATOR); this.innerContainer_.appendChild(obfuscator); obfuscator.addEventListener('click', this.drawerToggleHandler_.bind(this)); this.obfuscator_ = obfuscator; this.drawer_.addEventListener('keydown', this.keyboardEventHandler_.bind(this)); this.drawer_.setAttribute('aria-hidden', 'true'); } // Keep an eye on screen size, and add/remove auxiliary class for styling // of small screens. this.screenSizeMediaQuery_ = window.matchMedia( /** @type {string} */ (this.Constant_.MAX_WIDTH)); this.screenSizeMediaQuery_.addListener(this.screenSizeHandler_.bind(this)); this.screenSizeHandler_(); // Initialize tabs, if any. if (this.header_ && this.tabBar_) { this.element_.classList.add(this.CssClasses_.HAS_TABS); var tabContainer = document.createElement('div'); tabContainer.classList.add(this.CssClasses_.TAB_CONTAINER); this.header_.insertBefore(tabContainer, this.tabBar_); this.header_.removeChild(this.tabBar_); var leftButton = document.createElement('div'); leftButton.classList.add(this.CssClasses_.TAB_BAR_BUTTON); leftButton.classList.add(this.CssClasses_.TAB_BAR_LEFT_BUTTON); var leftButtonIcon = document.createElement('i'); leftButtonIcon.classList.add(this.CssClasses_.ICON); leftButtonIcon.textContent = this.Constant_.CHEVRON_LEFT; leftButton.appendChild(leftButtonIcon); leftButton.addEventListener('click', function() { this.tabBar_.scrollLeft -= this.Constant_.TAB_SCROLL_PIXELS; }.bind(this)); var rightButton = document.createElement('div'); rightButton.classList.add(this.CssClasses_.TAB_BAR_BUTTON); rightButton.classList.add(this.CssClasses_.TAB_BAR_RIGHT_BUTTON); var rightButtonIcon = document.createElement('i'); rightButtonIcon.classList.add(this.CssClasses_.ICON); rightButtonIcon.textContent = this.Constant_.CHEVRON_RIGHT; rightButton.appendChild(rightButtonIcon); rightButton.addEventListener('click', function() { this.tabBar_.scrollLeft += this.Constant_.TAB_SCROLL_PIXELS; }.bind(this)); tabContainer.appendChild(leftButton); tabContainer.appendChild(this.tabBar_); tabContainer.appendChild(rightButton); // Add and remove tab buttons depending on scroll position and total // window size. var tabUpdateHandler = function() { if (this.tabBar_.scrollLeft > 0) { leftButton.classList.add(this.CssClasses_.IS_ACTIVE); } else { leftButton.classList.remove(this.CssClasses_.IS_ACTIVE); } if (this.tabBar_.scrollLeft < this.tabBar_.scrollWidth - this.tabBar_.offsetWidth) { rightButton.classList.add(this.CssClasses_.IS_ACTIVE); } else { rightButton.classList.remove(this.CssClasses_.IS_ACTIVE); } }.bind(this); this.tabBar_.addEventListener('scroll', tabUpdateHandler); tabUpdateHandler(); // Update tabs when the window resizes. var windowResizeHandler = function() { // Use timeouts to make sure it doesn't happen too often. if (this.resizeTimeoutId_) { clearTimeout(this.resizeTimeoutId_); } this.resizeTimeoutId_ = setTimeout(function() { tabUpdateHandler(); this.resizeTimeoutId_ = null; }.bind(this), /** @type {number} */ (this.Constant_.RESIZE_TIMEOUT)); }.bind(this); window.addEventListener('resize', windowResizeHandler); if (this.tabBar_.classList.contains(this.CssClasses_.JS_RIPPLE_EFFECT)) { this.tabBar_.classList.add(this.CssClasses_.RIPPLE_IGNORE_EVENTS); } // Select element tabs, document panels var tabs = this.tabBar_.querySelectorAll('.' + this.CssClasses_.TAB); var panels = this.content_.querySelectorAll('.' + this.CssClasses_.PANEL); // Create new tabs for each tab element for (var i = 0; i < tabs.length; i++) { new MaterialLayoutTab(tabs[i], tabs, panels, this); } } this.element_.classList.add(this.CssClasses_.IS_UPGRADED); } }; /** * Constructor for an individual tab. * * @constructor * @param {HTMLElement} tab The HTML element for the tab. * @param {!Array<HTMLElement>} tabs Array with HTML elements for all tabs. * @param {!Array<HTMLElement>} panels Array with HTML elements for all panels. * @param {MaterialLayout} layout The MaterialLayout object that owns the tab. */ function MaterialLayoutTab(tab, tabs, panels, layout) { /** * Auxiliary method to programmatically select a tab in the UI. */ function selectTab() { layout.resetTabState_(tabs); tab.classList.add(layout.CssClasses_.IS_ACTIVE); } if (layout.tabBar_.classList.contains( layout.CssClasses_.JS_RIPPLE_EFFECT)) { var rippleContainer = document.createElement('span'); rippleContainer.classList.add(layout.CssClasses_.RIPPLE_CONTAINER); rippleContainer.classList.add(layout.CssClasses_.JS_RIPPLE_EFFECT); var ripple = document.createElement('span'); ripple.classList.add(layout.CssClasses_.RIPPLE); rippleContainer.appendChild(ripple); tab.appendChild(rippleContainer); } tab.addEventListener('click', function(e) { e.preventDefault(); selectTab(); }); tab.show = selectTab; } window['MaterialLayoutTab'] = MaterialLayoutTab; // The component registers itself. It can assume componentHandler is available // in the global scope. componentHandler.register({ constructor: MaterialLayout, classAsString: 'MaterialLayout', cssClass: 'mdl-js-layout' }); })();
{ "pile_set_name": "Github" }
/* * 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. */ package org.apache.phoenix.expression.visitor; import java.util.Collections; import java.util.Iterator; import org.apache.phoenix.expression.Expression; public abstract class TraverseNoExpressionVisitor<E> extends BaseExpressionVisitor<E> { @Override public Iterator<Expression> defaultIterator(Expression node) { return Collections.emptyIterator(); } }
{ "pile_set_name": "Github" }