text
stringlengths
4
5.48M
meta
stringlengths
14
6.54k
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <meta name="collection" content="api"> <!-- Generated by javadoc (build 1.5.0-rc) on Wed Aug 11 07:22:56 PDT 2004 --> <TITLE> TypeVariable (Java 2 Platform SE 5.0) </TITLE> <META NAME="keywords" CONTENT="java.lang.reflect.TypeVariable interface"> <META NAME="keywords" CONTENT="getBounds()"> <META NAME="keywords" CONTENT="getGenericDeclaration()"> <META NAME="keywords" CONTENT="getName()"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="TypeVariable (Java 2 Platform SE 5.0)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TypeVariable.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../java/lang/reflect/Type.html" title="interface in java.lang.reflect"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../java/lang/reflect/UndeclaredThrowableException.html" title="class in java.lang.reflect"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?java/lang/reflect/TypeVariable.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TypeVariable.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> java.lang.reflect</FONT> <BR> Interface TypeVariable&lt;D extends <A HREF="../../../java/lang/reflect/GenericDeclaration.html" title="interface in java.lang.reflect">GenericDeclaration</A>&gt;</H2> <DL> <DT><B>All Superinterfaces:</B> <DD><A HREF="../../../java/lang/reflect/Type.html" title="interface in java.lang.reflect">Type</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>TypeVariable&lt;D extends <A HREF="../../../java/lang/reflect/GenericDeclaration.html" title="interface in java.lang.reflect">GenericDeclaration</A>&gt;</B><DT>extends <A HREF="../../../java/lang/reflect/Type.html" title="interface in java.lang.reflect">Type</A></DL> </PRE> <P> TypeVariable is the common superinterface for type variables of kinds. A type variable is created the first time it is needed by a reflective method, as specified in this package. If a type variable t is referenced by a type (i.e, class, interface or annotation type) T, and T is declared by the nth enclosing class of T (see JLS 8.1.2), then the creation of t requires the resolution (see JVMS 5) of the ith enclosing class of T, for i = 0 to n, inclusive. Creating a type variable must not cause the creation of its bounds. Repeated creation of a type variable has no effect. <p>Multiple objects may be instantiated at run-time to represent a given type variable. Even though a type variable is created only once, this does not imply any requirement to cache instances representing the type variable. However, all instances representing a type variable must be equal() to each other. As a consequence, users of type variables must not rely on the identity of instances of classes implementing this interface. <p>The type parameter D represents the type of generic declaration that declared the underlying type variable. <P> <P> <DL> <DT><B>Since:</B></DT> <DD>1.5</DD> </DL> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../java/lang/reflect/Type.html" title="interface in java.lang.reflect">Type</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../java/lang/reflect/TypeVariable.html#getBounds()">getBounds</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of <tt>Type</tt> objects representing the upper bound(s) of this type variable.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../java/lang/reflect/TypeVariable.html" title="type parameter in TypeVariable">D</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../java/lang/reflect/TypeVariable.html#getGenericDeclaration()">getGenericDeclaration</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <tt>GenericDeclaration</tt> object representing the generic declaration declared this type variable.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../java/lang/reflect/TypeVariable.html#getName()">getName</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of this type variable, as it occurs in the source code.</TD> </TR> </TABLE> &nbsp; <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getBounds()"><!-- --></A><H3> getBounds</H3> <PRE> <A HREF="../../../java/lang/reflect/Type.html" title="interface in java.lang.reflect">Type</A>[] <B>getBounds</B>()</PRE> <DL> <DD>Returns an array of <tt>Type</tt> objects representing the upper bound(s) of this type variable. Note that if no upper bound is explicitly declared, the upper bound is <tt>Object</tt>. <p>For each upper bound B: <ul> <li>if B is a parameterized type or a type variable, it is created, (see <A HREF="../../../java/lang/reflect/ParameterizedType.html" title="interface in java.lang.reflect"><CODE>ParameterizedType</CODE></A> for the details of the creation process for parameterized types). <li>Otherwise, B is resolved. </ul> <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of <tt>Type</tt>s representing the upper bound(s) of this type variable <DT><B>Throws:</B> <DD><CODE><A HREF="../../../java/lang/TypeNotPresentException.html" title="class in java.lang">TypeNotPresentException</A></CODE> - if any of the bounds refers to a non-existent type declaration <DD><CODE><A HREF="../../../java/lang/reflect/MalformedParameterizedTypeException.html" title="class in java.lang.reflect">MalformedParameterizedTypeException</A></CODE> - if any of the bounds refer to a parameterized type that cannot be instantiated for any reason</DL> </DD> </DL> <HR> <A NAME="getGenericDeclaration()"><!-- --></A><H3> getGenericDeclaration</H3> <PRE> <A HREF="../../../java/lang/reflect/TypeVariable.html" title="type parameter in TypeVariable">D</A> <B>getGenericDeclaration</B>()</PRE> <DL> <DD>Returns the <tt>GenericDeclaration</tt> object representing the generic declaration declared this type variable. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the generic declaration declared for this type variable.<DT><B>Since:</B></DT> <DD>1.5</DD> </DL> </DD> </DL> <HR> <A NAME="getName()"><!-- --></A><H3> getName</H3> <PRE> <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getName</B>()</PRE> <DL> <DD>Returns the name of this type variable, as it occurs in the source code. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the name of this type variable, as it appears in the source code</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TypeVariable.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../java/lang/reflect/Type.html" title="interface in java.lang.reflect"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../java/lang/reflect/UndeclaredThrowableException.html" title="class in java.lang.reflect"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?java/lang/reflect/TypeVariable.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TypeVariable.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="../../../../relnotes/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Copyright &#169; 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to <a href="../../../../relnotes/license.html">license terms</a>. Also see the <a href="http://java.sun.com/docs/redist.html">documentation redistribution policy</a>.</font> <!-- Start SiteCatalyst code --> <script language="JavaScript" src="http://www.oracle.com/ocom/groups/systemobject/@mktg_admin/documents/systemobject/s_code_download.js"></script> <script language="JavaScript" src="http://www.oracle.com/ocom/groups/systemobject/@mktg_admin/documents/systemobject/s_code.js"></script> <!-- ********** DO NOT ALTER ANYTHING BELOW THIS LINE ! *********** --> <!-- Below code will send the info to Omniture server --> <script language="javascript">var s_code=s.t();if(s_code)document.write(s_code)</script> <!-- End SiteCatalyst code --> </body> </HTML>
{'content_hash': '2cb3828698fc26e6fe31202e5af8c41a', 'timestamp': '', 'source': 'github', 'line_count': 320, 'max_line_length': 689, 'avg_line_length': 45.68125, 'alnum_prop': 0.6606922971678753, 'repo_name': 'Smolations/more-dash-docsets', 'id': '85d1e16325dc4f0f8edddce902d9f8b50410a925', 'size': '14618', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docsets/Java 5.docset/Contents/Resources/Documents/java/lang/reflect/TypeVariable.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1456655'}, {'name': 'Emacs Lisp', 'bytes': '3680'}, {'name': 'JavaScript', 'bytes': '139712'}, {'name': 'Puppet', 'bytes': '15851'}, {'name': 'Ruby', 'bytes': '66500'}, {'name': 'Shell', 'bytes': '11437'}]}
@interface NVZoomBounceButton () { float zoonInScale; BOOL touchedInside; } @property (strong, nonatomic) UIView *zoomView; @property (strong, nonatomic) UILabel *zoomLabel; @property (strong, nonatomic) UIImageView *zoomImageView; @property (strong, nonatomic) NSMutableArray *paddingConstraints; @end @implementation NVZoomBounceButton - (instancetype)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if (self) { [self commonInit]; } return self; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self commonInit]; } return self; } - (instancetype)init { self = [super init]; if (self) { [self commonInit]; } return self; } #pragma mark - Getter/Setter - (UIView *)zoomView { if (!_zoomView) { _zoomView = [[UIView alloc] initWithFrame:self.bounds]; _zoomView.translatesAutoresizingMaskIntoConstraints = NO; _zoomView.backgroundColor = [UIColor whiteColor]; } return _zoomView; } - (UIImageView *)zoomImageView { if (!_zoomImageView) { _zoomImageView = [[UIImageView alloc] init]; _zoomImageView.contentMode = UIViewContentModeCenter; _zoomImageView.translatesAutoresizingMaskIntoConstraints = NO; } return _zoomImageView; } - (UILabel *)zoomLabel { if (!_zoomLabel) { _zoomLabel = [[UILabel alloc] init]; _zoomLabel.translatesAutoresizingMaskIntoConstraints = NO; _zoomLabel.textAlignment = NSTextAlignmentCenter; } return _zoomLabel; } - (void)setRoundedCorner:(BOOL)roundedCorner { _roundedCorner = roundedCorner; if (roundedCorner) { self.layer.cornerRadius = self.bounds.size.width/2; self.zoomView.layer.cornerRadius = self.zoomView.bounds.size.width/2; } else { self.layer.cornerRadius = 0; self.zoomView.layer.cornerRadius = 0; } } - (void)setZoomViewPadding:(int)zoomViewPadding { if (zoomViewPadding == _zoomViewPadding) { return; } _zoomViewPadding = zoomViewPadding; for (NSLayoutConstraint *constraint in _paddingConstraints) { constraint.constant = zoomViewPadding; } [self.zoomView setNeedsLayout]; [self.zoomView layoutIfNeeded]; if (_roundedCorner) { [self setRoundedCorner:_roundedCorner]; } } - (void)setZoomViewColor:(UIColor *)zoomViewColor { self.zoomView.backgroundColor = zoomViewColor; } - (UIColor *)zoomViewColor { return self.zoomView.backgroundColor; } #pragma mark Override - (void)setTintColor:(UIColor *)tintColor { self.zoomLabel.textColor = tintColor; self.zoomImageView.tintColor = tintColor; } - (void)setImage:(UIImage *)image forState:(UIControlState)state { UIImage *temp = image; if (image && self.tintColor) { temp = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; } self.zoomImageView.image = temp; self.zoomImageView.hidden = NO; self.zoomLabel.hidden = YES; } - (void)setTitle:(NSString *)title forState:(UIControlState)state { self.zoomLabel.text = title; self.zoomLabel.hidden = NO; self.zoomImageView.hidden = YES; } #pragma mark - Init - (void) commonInit { self.translatesAutoresizingMaskIntoConstraints = NO; [super setTitle:@"" forState:UIControlStateNormal]; [super setImage:nil forState:UIControlStateNormal]; self.titleLabel.hidden = YES; self.imageView.hidden = YES; [self.zoomView addSubview:self.zoomLabel]; [self.zoomView addSubview:self.zoomImageView]; [self addSubview:self.zoomView]; [self setupConstraints]; self.roundedCorner = YES; self.zoomViewPadding = 10; zoonInScale = 0.5; } - (void)setupConstraints { NSDictionary *views = @{@"zoomView": self.zoomView, @"zoomLabel": self.zoomLabel, @"zoomImageView": self.zoomImageView}; _paddingConstraints = [NSMutableArray new]; [_paddingConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(0)-[zoomView]-(0)-|" options:0 metrics:nil views:views]]; [_paddingConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(0)-[zoomView]-(0)-|" options:0 metrics:nil views:views]]; [self addConstraints:_paddingConstraints]; [self.zoomView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(5)-[zoomLabel]-(5)-|" options:0 metrics:nil views:views]]; [self.zoomView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(5)-[zoomLabel]-(5)-|" options:0 metrics:nil views:views]]; [self.zoomView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(5)-[zoomImageView]-(5)-|" options:0 metrics:nil views:views]]; [self.zoomView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(5)-[zoomImageView]-(5)-|" options:0 metrics:nil views:views]]; [self setNeedsLayout]; [self layoutIfNeeded]; } #pragma mark - Override touch handle - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { touchedInside = YES; [self.superview bringSubviewToFront:self]; CABasicAnimation* ba = [CABasicAnimation animationWithKeyPath:@"transform"]; ba.fillMode = kCAFillModeForwards; ba.removedOnCompletion = NO; ba.duration = 0.3; ba.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(zoonInScale, zoonInScale, 1)]; [self.zoomView.layer addAnimation:ba forKey:nil]; } - (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { CGPoint location = [[touches anyObject] locationInView:self]; if (CGRectContainsPoint(self.bounds, location)) { if (!touchedInside) { [self sendActionsForControlEvents:UIControlEventTouchDragEnter]; } touchedInside = YES; [self sendActionsForControlEvents:UIControlEventTouchDragInside]; } else { if (touchedInside) { [self sendActionsForControlEvents:UIControlEventTouchDragExit]; } touchedInside = NO; [self sendActionsForControlEvents:UIControlEventTouchDragOutside]; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { float extraScale = self.bounds.size.width/(zoonInScale*self.zoomView.bounds.size.width); CABasicAnimation* animExtra = [CABasicAnimation animationWithKeyPath:@"transform"]; animExtra.fillMode = kCAFillModeForwards; animExtra.removedOnCompletion = NO; animExtra.duration = 0.3; animExtra.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(extraScale, extraScale, 1)]; CABasicAnimation* anim2 = [CABasicAnimation animationWithKeyPath:@"transform"]; anim2.fillMode = kCAFillModeForwards; anim2.removedOnCompletion = NO; anim2.duration = 0.3; anim2.toValue = [NSValue valueWithCATransform3D:CATransform3DIdentity]; [UIView animateWithDuration:0.15 delay:0.0 options:0 animations:^{ [self.zoomView.layer addAnimation:animExtra forKey:nil]; } completion:^(BOOL finished) { [UIView animateWithDuration:0.15 delay:0.0 options:0 animations:^{ [self.zoomView.layer addAnimation:anim2 forKey:nil]; } completion:^(BOOL finished) { CGPoint location = [[touches anyObject] locationInView:self]; if (CGRectContainsPoint(self.bounds, location)) { [self sendActionsForControlEvents:UIControlEventTouchUpInside]; } else { [self sendActionsForControlEvents:UIControlEventTouchUpOutside]; } }]; }]; } @end
{'content_hash': '32207bc57a61b2671a458cde9ead38a9', 'timestamp': '', 'source': 'github', 'line_count': 219, 'max_line_length': 157, 'avg_line_length': 34.80821917808219, 'alnum_prop': 0.698675062311426, 'repo_name': 'nhuanvd/NVZoomBounceButton', 'id': '84a6cf81ae220c6dea76e62f55817cde6549eb0e', 'size': '7811', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'NVZoomBounceButton/NVZoomBounceButton.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '13626'}, {'name': 'Ruby', 'bytes': '576'}]}
ACCEPTED #### According to Index Fungorum #### Published in Notul. Syst. Sect. Crypt. Inst. Bot. Acad. Sci. U. S. S. R. 10: 161 (1955) #### Original name Sporotrichum verticillatum Neophyt. ### Remarks null
{'content_hash': '2b1bde10d768d8258f6d7b57886b48d4', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 74, 'avg_line_length': 16.153846153846153, 'alnum_prop': 0.680952380952381, 'repo_name': 'mdoering/backbone', 'id': '10c458888319b2fa1f33edcb25d1ee0553a92ea7', 'size': '269', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Fungi/Basidiomycota/Agaricomycetes/Polyporales/Fomitopsidaceae/Sporotrichum/Sporotrichum verticillatum/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
<?xml version="1.0" encoding="UTF-8"?> <!-- 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.camel</groupId> <artifactId>components</artifactId> <version>3.12.0-SNAPSHOT</version> </parent> <artifactId>camel-mustache</artifactId> <packaging>jar</packaging> <name>Camel :: Mustache</name> <description>Camel Mustache support</description> <properties> </properties> <dependencies> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-support</artifactId> </dependency> <dependency> <groupId>com.github.spullara.mustache.java</groupId> <artifactId>compiler</artifactId> <version>${mustache-java-version}</version> </dependency> <!-- testing --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-test-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> <scope>test</scope> </dependency> </dependencies> </project>
{'content_hash': 'a46ea806a34cfe4a8d66bd402757e185', 'timestamp': '', 'source': 'github', 'line_count': 62, 'max_line_length': 201, 'avg_line_length': 36.274193548387096, 'alnum_prop': 0.6585148955091151, 'repo_name': 'tdiesler/camel', 'id': '9dfb20a82d4d8dcf519ae836045a14637e90cae6', 'size': '2249', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'components/camel-mustache/pom.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Apex', 'bytes': '6521'}, {'name': 'Batchfile', 'bytes': '2353'}, {'name': 'CSS', 'bytes': '5472'}, {'name': 'Dockerfile', 'bytes': '5675'}, {'name': 'Elm', 'bytes': '10852'}, {'name': 'FreeMarker', 'bytes': '8015'}, {'name': 'Groovy', 'bytes': '249715'}, {'name': 'HTML', 'bytes': '203529'}, {'name': 'Java', 'bytes': '105215396'}, {'name': 'JavaScript', 'bytes': '103621'}, {'name': 'Jsonnet', 'bytes': '1734'}, {'name': 'Kotlin', 'bytes': '41816'}, {'name': 'Mustache', 'bytes': '525'}, {'name': 'RobotFramework', 'bytes': '8461'}, {'name': 'Ruby', 'bytes': '88'}, {'name': 'Shell', 'bytes': '15162'}, {'name': 'Tcl', 'bytes': '4974'}, {'name': 'Thrift', 'bytes': '6979'}, {'name': 'XQuery', 'bytes': '546'}, {'name': 'XSLT', 'bytes': '276597'}]}
using System; class Vacation { static void Main() { double oldPpl = double.Parse(Console.ReadLine()); double students = double.Parse(Console.ReadLine()); double nights = double.Parse(Console.ReadLine()); string transport = Console.ReadLine(); double transportPrice = 0; double hotelPrice = 0; double totalPrice = 0; if (oldPpl + students == 0) { Console.WriteLine("0"); } if (transport.Equals("train")) { transportPrice = 2* ((oldPpl * 24.99) + (students * 14.99)); hotelPrice = nights * 82.99; if (oldPpl + students >= 50) { transportPrice = transportPrice / 2; } totalPrice = 1.1 * (transportPrice + hotelPrice); Console.WriteLine("{0:F2}", totalPrice); } else if (transport.Equals("bus")) { transportPrice = 2*((oldPpl * 32.50) + (students * 28.5)); hotelPrice = nights * 82.99; totalPrice = 1.1 * (transportPrice + hotelPrice); Console.WriteLine("{0:F2}", totalPrice); } else if (transport.Equals("boat")) { transportPrice = 2*((oldPpl * 42.99) + (students * 39.99)); hotelPrice = nights * 82.99; totalPrice = 1.1 * (transportPrice + hotelPrice); Console.WriteLine("{0:F2}", totalPrice); } else if (transport.Equals("airplane")) { transportPrice = 2 * (oldPpl * 70 + students * 50); hotelPrice = nights * 82.99; totalPrice = 1.1 * (transportPrice + hotelPrice); Console.WriteLine("{0:F2}", totalPrice); } } }
{'content_hash': 'e06ed5f7498f6688adf5a0a7bca9bdbf', 'timestamp': '', 'source': 'github', 'line_count': 54, 'max_line_length': 72, 'avg_line_length': 32.833333333333336, 'alnum_prop': 0.5093062605752962, 'repo_name': 'komitoff/Softuni-Programming-Fundamentals', 'id': '55c8c4625cf4bb36dd41b12a5b95198a2ed98f87', 'size': '1775', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '1.Programing basics/Exam_Morning_SU/3.Vacation/Vacation.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '102'}, {'name': 'Batchfile', 'bytes': '10012'}, {'name': 'C#', 'bytes': '603594'}, {'name': 'CSS', 'bytes': '685'}, {'name': 'HTML', 'bytes': '5125'}, {'name': 'Java', 'bytes': '15147'}, {'name': 'JavaScript', 'bytes': '248489'}, {'name': 'Shell', 'bytes': '14116'}]}
package org.aikodi.chameleon.oo.language; import org.aikodi.chameleon.core.language.Language; public interface LanguageWithErasure extends Language { }
{'content_hash': '02647ca171a4e753f160b0ee1b92311b', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 55, 'avg_line_length': 25.666666666666668, 'alnum_prop': 0.8311688311688312, 'repo_name': 'markovandooren/chameleon', 'id': 'd4b7d13c9ba5c0d62a54d47199edff74afa8bb75', 'size': '154', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/org/aikodi/chameleon/oo/language/LanguageWithErasure.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '2110668'}]}
package com.helmuthnaumer.spheromapper; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Observable; import java.util.Observer; import java.util.concurrent.atomic.AtomicInteger; import com.helmuthnaumer.mapping.PointCross; import com.helmuthnaumer.mapping.RoomMap; import com.helmuthnaumer.mapping.RoomMapXMLException; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.util.Log; import android.view.GestureDetector; import android.view.GestureDetector.SimpleOnGestureListener; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.Toast; public class MainActivity extends Activity { private RoomMapView rmv; private PointCross currentPoint; private AtomicInteger numHits; private MappingAIThread mapper; private RobotCompatabilityLayer compLayer; private RefThread refThread; private RandomMappingThread rmt; private SettingView settings; private GestureDetector gd; private OnTouchListener touchListener; private ObserveBoolean settingsChanged; private Observer settingsChangedObserver; private boolean cornerStart = true; private ExampleThread exThread; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setContentView(R.layout.activity_main); gd = new GestureDetector(this, new FlingListener()); findViewById(R.id.sphero_connection_view).setVisibility(View.GONE); settings = (SettingView) findViewById(R.id.settingView); settingsChanged = settings.getObserveBoolean(); currentPoint = new PointCross(0, 0); rmv = (RoomMapView) this.findViewById(R.id.room); rmv.setOnTouchListener(touchListener); settings.setOnTouchListener(touchListener); rmv.setRobotPosition(currentPoint); numHits = new AtomicInteger(); File f = new File(this.getFilesDir(), "currentMap.xml"); try { FileInputStream fis = new FileInputStream(f); byte[] buffer = new byte[fis.available()]; fis.read(buffer); fis.close(); String xml = new String(buffer); RoomMap rm = new RoomMap(); try { rm.fromXML(xml); rmv.changeRoomMap(rm); } catch (RoomMapXMLException e) { Log.d("debug", "ERROR IN XML"); } } catch (IOException e) { Log.d("Debug", "Error in File"); } compLayer = new RobotCompatabilityLayer(numHits, rmv, currentPoint, this, rmv.getRoom().getUpdateBool(), settings.getCollisionThresh()); refThread = new RefThread(); refThread.start(); settingsChangedObserver = new Observer() { @Override public void update(Observable obs, Object obj) { if (((ObserveBoolean) obs).getBoolean() == true) { if (settings.isCornerStart() != cornerStart) { updateCornerStart(settings.isCornerStart()); return; } updateSettings(settings.getCollisionThresh(), settings.getPointConnectThresh(), settings.getSpeed()); } } }; settingsChanged.addObserver(settingsChangedObserver); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onTouchEvent(MotionEvent e) { gd.onTouchEvent(e); return super.onTouchEvent(e); } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection switch (item.getItemId()) { case R.id.clear: newMap(); return true; case R.id.map: if (mapper != null) { mapper.stopMapping(); try { mapper.join(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } mapper = new MappingAIThread(currentPoint, numHits, rmv.getRoom().getWalls(), compLayer, rmv.getRoom().getAtomicIndex(), rmv.getRoom().hasIndexChanged(), rmv.getRoom().getUpdateBool(), cornerStart, rmv.getRoom().getAllPoints()); mapper.start(); return true; case R.id.export: exportMap(); return true; case R.id.forward: moveForward(); return true; case R.id.backward: moveBackword(); return true; case R.id.left: moveLeft(); return true; case R.id.right: moveRight(); return true; case R.id.stopSphero: stopSphero(); return true; case R.id.connect: compLayer.connectSphero(this); return true; case R.id.disconnect: compLayer.disconnect(); return true; case R.id.random: rmt = new RandomMappingThread(compLayer, rmv.getRoom().getUpdateBool()); rmt.start(); return true; case R.id.reset: rmv.redoMapWalls(); return true; case R.id.example: toggleExampleMode(); return true; case R.id.ResetToZero: resetToZero(); return true; case R.id.toggleCollision: toggleCollision(); return true; default: return super.onOptionsItemSelected(item); } } public void toggleCollision(){ if(compLayer.getCollisionEnabled()){ compLayer.stopCollisionDetection(); Toast.makeText(this, "Collision Disabled", Toast.LENGTH_SHORT).show(); } else{ compLayer.resumeDetection(); Toast.makeText(this, "Collision Enabled", Toast.LENGTH_SHORT).show(); } } @Override public void onPause() { super.onPause(); getCurrentMap(this); compLayer.disconnect(); refThread.endThread(); refThread = null; } @Override public void onResume() { super.onResume(); File f = new File(this.getFilesDir(), "currentMap.xml"); try { FileInputStream fis = new FileInputStream(f); byte[] buffer = new byte[fis.available()]; fis.read(buffer); fis.close(); String xml = new String(buffer); RoomMap rm = new RoomMap(); try { rm.fromXML(xml); rmv.changeRoomMap(rm); } catch (RoomMapXMLException e) { Log.d("debug", "ERROR IN XML"); } } catch (IOException e) { Log.d("debug", "Error in File"); } refThread = new RefThread(); refThread.start(); } /** * Creates a new map and file for "currentMap.xml" */ public void newMap() { new File(this.getFilesDir(), "currentMap.xml").delete(); rmv.changeRoomMap(new RoomMap("Unknown")); } /** * Stores the current map into the file "currentMap.xml". This file is used * on the startup of the application. * * @param context * The context of the application for the file to be stored. * @return The file that the xml is stored in. */ public File getCurrentMap(Context context) { new File(context.getFilesDir(), "currentMap.xml").delete(); File file = null; try { file = new File(context.getFilesDir(), "currentMap.xml"); file.createNewFile(); FileOutputStream fs = new FileOutputStream(file); fs.write(rmv.getRoom().toXML().getBytes()); fs.close(); } catch (IOException e) { } return file; } /** * Logs the XML for the map. Will be replaced with storing file. */ public void exportMap() { Log.d("Current Map", rmv.getRoom().toString()); } /** * Causes the robot/simulation to move forward. Temporary */ public void moveForward() { compLayer.go(90); } /** * Causes the robot/simulation to move back. Temporary */ public void moveBackword() { compLayer.go(270); } /** * Causes the robot/simulation to move left. Temporary */ public void moveLeft() { compLayer.go(180); } /** * Causes the robot/simulation to move right. Temporary */ public void moveRight() { compLayer.go(0); } /** * Stops from the robot or simulation. */ public void stopSphero() { if (mapper != null) { mapper.stopMapping(); try { mapper.join(); } catch (InterruptedException e) { Log.e("Sphero Mapper", "From Mapper.join() Line 240 MainActivity"); } mapper = null; } if (rmt != null) { rmt.end(); try { rmt.join(); } catch (InterruptedException e) { Log.e("Sphero Mapper", "From rmt.join() Line 249 MainActivity"); } rmt = null; } compLayer.stopFromButton(); } public void resetToZero(){ compLayer.setNewSpheroAntiDrift(currentPoint.getDifference(new PointCross())); } /** * Updates the collision threshold, the point connect distance threshold, * and the Sphero's speed. * * @param collisionThresh * The threshold for detecting collisions * @param distancePointThresh * The maximum distance for two points to be connected * @param spheroSpeed * The speed for the Sphero */ public void updateSettings(int collisionThresh, int distancePointThresh, int spheroSpeed) { Toast.makeText(this, "Collision Thresh: " + collisionThresh + " Distance Point Thresh: " + distancePointThresh + " Sphero Speed: " + spheroSpeed, Toast.LENGTH_SHORT).show(); rmv.getRoom().setDistanceForBreak(distancePointThresh); rmv.invalidate(); compLayer.setCollisionThreshold(collisionThresh); compLayer.setSpheroSpeed(spheroSpeed); } /** * Updates if the Sphero will start in a corner. * * @param cornerStart * If the Sphero will start in a corner */ public void updateCornerStart(boolean cornerStart) { this.cornerStart = cornerStart; Toast.makeText(this, "Corner is start: " + cornerStart, Toast.LENGTH_SHORT).show(); } public void toggleExampleMode() { if (rmv.toggleExampleAndGet()) { Toast.makeText(this, "Example Mode Enabled", Toast.LENGTH_SHORT).show(); exThread = new ExampleThread(); exThread.start(); } else { if (exThread != null) { exThread.endNow(); exThread = null; } } } /** * A thread that refreshes the RoomMapView every 50 milliseconds * * @author Helmuth Naumer * */ private class RefThread extends Thread { private boolean stop = false; public void run() { while (!stop) { runOnUiThread(new Runnable() { public void run() { rmv.invalidate(); } }); try { this.sleep(50); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } /** * Ends the thread */ public void endThread() { stop = true; } } /** * Tests for a fling gesture on the screen. If it is in an upward direction * and the settings panel is not visible, it makes it visible. If it is in a * downward direction and the settings panel is visible, it dismisses the * panel. * * @author Helmuth Naumer * */ private class FlingListener extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent me1, MotionEvent me2, float xVelocity, float yVelocity) { if (settings.isShown()) { if (yVelocity > 100) { settings.setVisibility(View.GONE); } } else { if (yVelocity < -100) { settings.setVisibility(View.VISIBLE); } } return true; } @Override public boolean onDown(MotionEvent e) { return super.onDown(e); } } private class ExampleThread extends Thread { boolean cont = true; @Override public void run() { while (cont) { runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(0, 0)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(10, 0)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(30, 1)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(50, -1)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(73, 0)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(70, 30)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(71, 50)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(70, 10)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(69, 70)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(71, 90)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(10, 80)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(30, 80)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(42, 80)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(50, 81)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(62, 80)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(-10, 10)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(-10, 20)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(-10, 35)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(-11, 50)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(-9, 60)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } runOnUiThread(new Runnable() { public void run() { rmv.addPoint(new PointCross(-10, 70)); } }); if (!cont) return; try { sleep(300); } catch (InterruptedException e) { e.printStackTrace(); } if (!cont) return; new File(getFilesDir(), "currentMap.xml").delete(); runOnUiThread(new Runnable() { public void run() { rmv.changeRoomMap(new RoomMap("cm")); } }); } } public void endNow() { cont = false; } } }
{'content_hash': '4d777e2a0a59e41e9e324a96e9377db6', 'timestamp': '', 'source': 'github', 'line_count': 743, 'max_line_length': 231, 'avg_line_length': 22.071332436069987, 'alnum_prop': 0.6338191353131288, 'repo_name': 'Helmuthn/SpheroMapping', 'id': 'a1632e784639958ba25eb219fd43ac400214adf2', 'size': '16399', 'binary': False, 'copies': '1', 'ref': 'refs/heads/ManyPoints', 'path': 'spheromapper/Java/MainActivity.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '147475'}]}
from __future__ import annotations import json import unittest from unittest import mock from unittest.mock import MagicMock, Mock import pandas as pd import unicodecsv as csv from airflow.providers.google.cloud.hooks.gcs import GCSHook from airflow.providers.google.cloud.transfers.sql_to_gcs import BaseSQLToGCSOperator SQL = "SELECT * FROM test_table" BUCKET = "TEST-BUCKET-1" FILENAME = "test_results_{}.csv" TASK_ID = "TEST_TASK_ID" SCHEMA = [ {"name": "column_a", "type": "3"}, {"name": "column_b", "type": "253"}, {"name": "column_c", "type": "10"}, ] COLUMNS = ["column_a", "column_b", "column_c"] ROW = ["convert_type_return_value", "convert_type_return_value", "convert_type_return_value"] CURSOR_DESCRIPTION = [ ("column_a", "3", 0, 0, 0, 0, False), ("column_b", "253", 0, 0, 0, 0, False), ("column_c", "10", 0, 0, 0, 0, False), ] TMP_FILE_NAME = "temp-file" INPUT_DATA = [ ["101", "school", "2015-01-01"], ["102", "business", "2017-05-24"], ["103", "non-profit", "2018-10-01"], ] OUTPUT_DATA = json.dumps( { "column_a": "convert_type_return_value", "column_b": "convert_type_return_value", "column_c": "convert_type_return_value", } ).encode("utf-8") SCHEMA_FILE = "schema_file.json" APP_JSON = "application/json" OUTPUT_DF = pd.DataFrame([['convert_type_return_value'] * 3] * 3, columns=COLUMNS) EXCLUDE_COLUMNS = set('column_c') NEW_COLUMNS = [c for c in COLUMNS if c not in EXCLUDE_COLUMNS] OUTPUT_DF_WITH_EXCLUDE_COLUMNS = pd.DataFrame( [['convert_type_return_value'] * len(NEW_COLUMNS)] * 3, columns=NEW_COLUMNS ) class DummySQLToGCSOperator(BaseSQLToGCSOperator): def field_to_bigquery(self, field) -> dict[str, str]: return { 'name': field[0], 'type': 'STRING', 'mode': 'NULLABLE', } def convert_type(self, value, schema_type, stringify_dict): return 'convert_type_return_value' def query(self): pass class TestBaseSQLToGCSOperator(unittest.TestCase): @mock.patch("airflow.providers.google.cloud.transfers.sql_to_gcs.NamedTemporaryFile") @mock.patch.object(csv.writer, "writerow") @mock.patch.object(GCSHook, "upload") @mock.patch.object(DummySQLToGCSOperator, "query") @mock.patch.object(DummySQLToGCSOperator, "convert_type") def test_exec(self, mock_convert_type, mock_query, mock_upload, mock_writerow, mock_tempfile): cursor_mock = Mock() cursor_mock.description = CURSOR_DESCRIPTION cursor_mock.__iter__ = Mock(return_value=iter(INPUT_DATA)) mock_query.return_value = cursor_mock mock_convert_type.return_value = "convert_type_return_value" mock_file = Mock() mock_tell = Mock() mock_tell.return_value = 3 mock_file.tell = mock_tell mock_flush = Mock() mock_file.flush = mock_flush mock_close = Mock() mock_file.close = mock_close mock_file.name = TMP_FILE_NAME mock_write = Mock() mock_file.write = mock_write mock_tempfile.return_value = mock_file # Test CSV operator = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, schema_filename=SCHEMA_FILE, approx_max_file_size_bytes=1, export_format="csv", gzip=True, schema=SCHEMA, gcp_conn_id='google_cloud_default', upload_metadata=True, ) result = operator.execute(context=dict()) assert result == { 'bucket': 'TEST-BUCKET-1', 'total_row_count': 3, 'total_files': 3, 'files': [ {'file_name': 'test_results_0.csv', 'file_mime_type': 'text/csv', 'file_row_count': 1}, {'file_name': 'test_results_1.csv', 'file_mime_type': 'text/csv', 'file_row_count': 1}, {'file_name': 'test_results_2.csv', 'file_mime_type': 'text/csv', 'file_row_count': 1}, ], } mock_query.assert_called_once() mock_writerow.assert_has_calls( [ mock.call(COLUMNS), mock.call(ROW), mock.call(COLUMNS), mock.call(ROW), mock.call(COLUMNS), mock.call(ROW), mock.call(COLUMNS), ] ) mock_flush.assert_has_calls([mock.call(), mock.call(), mock.call(), mock.call()]) csv_calls = [] for i in range(0, 3): csv_calls.append( mock.call( BUCKET, FILENAME.format(i), TMP_FILE_NAME, mime_type='text/csv', gzip=True, metadata={'row_count': 1}, ) ) json_call = mock.call( BUCKET, SCHEMA_FILE, TMP_FILE_NAME, mime_type=APP_JSON, gzip=False, metadata=None ) upload_calls = [json_call, csv_calls[0], csv_calls[1], csv_calls[2]] mock_upload.assert_has_calls(upload_calls) mock_close.assert_has_calls([mock.call(), mock.call(), mock.call(), mock.call()]) mock_query.reset_mock() mock_flush.reset_mock() mock_upload.reset_mock() mock_close.reset_mock() cursor_mock.reset_mock() cursor_mock.__iter__ = Mock(return_value=iter(INPUT_DATA)) # Test JSON operator = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, export_format="json", schema=SCHEMA ) result = operator.execute(context=dict()) assert result == { 'bucket': 'TEST-BUCKET-1', 'total_row_count': 3, 'total_files': 1, 'files': [ {'file_name': 'test_results_0.csv', 'file_mime_type': 'application/json', 'file_row_count': 3} ], } mock_query.assert_called_once() mock_write.assert_has_calls( [ mock.call(OUTPUT_DATA), mock.call(b"\n"), mock.call(OUTPUT_DATA), mock.call(b"\n"), mock.call(OUTPUT_DATA), mock.call(b"\n"), ] ) mock_flush.assert_called_once() mock_upload.assert_called_once_with( BUCKET, FILENAME.format(0), TMP_FILE_NAME, mime_type=APP_JSON, gzip=False, metadata=None ) mock_close.assert_called_once() mock_query.reset_mock() mock_flush.reset_mock() mock_upload.reset_mock() mock_close.reset_mock() cursor_mock.reset_mock() cursor_mock.__iter__ = Mock(return_value=iter(INPUT_DATA)) # Test Metadata Upload operator = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, export_format="json", schema=SCHEMA, upload_metadata=True, ) result = operator.execute(context=dict()) assert result == { 'bucket': 'TEST-BUCKET-1', 'total_row_count': 3, 'total_files': 1, 'files': [ {'file_name': 'test_results_0.csv', 'file_mime_type': 'application/json', 'file_row_count': 3} ], } mock_query.assert_called_once() mock_write.assert_has_calls( [ mock.call(OUTPUT_DATA), mock.call(b"\n"), mock.call(OUTPUT_DATA), mock.call(b"\n"), mock.call(OUTPUT_DATA), mock.call(b"\n"), ] ) mock_flush.assert_called_once() mock_upload.assert_called_once_with( BUCKET, FILENAME.format(0), TMP_FILE_NAME, mime_type=APP_JSON, gzip=False, metadata={'row_count': 3}, ) mock_close.assert_called_once() mock_query.reset_mock() mock_flush.reset_mock() mock_upload.reset_mock() mock_close.reset_mock() cursor_mock.reset_mock() cursor_mock.__iter__ = Mock(return_value=iter(INPUT_DATA)) # Test parquet operator = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, export_format="parquet", schema=SCHEMA ) result = operator.execute(context=dict()) assert result == { 'bucket': 'TEST-BUCKET-1', 'total_row_count': 3, 'total_files': 1, 'files': [ { 'file_name': 'test_results_0.csv', 'file_mime_type': 'application/octet-stream', 'file_row_count': 3, } ], } mock_query.assert_called_once() mock_flush.assert_called_once() mock_upload.assert_called_once_with( BUCKET, FILENAME.format(0), TMP_FILE_NAME, mime_type='application/octet-stream', gzip=False, metadata=None, ) mock_close.assert_called_once() # Test null marker cursor_mock.__iter__ = Mock(return_value=iter(INPUT_DATA)) mock_convert_type.return_value = None operator = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, export_format="csv", null_marker="NULL", ) result = operator.execute(context=dict()) assert result == { 'bucket': 'TEST-BUCKET-1', 'total_row_count': 3, 'total_files': 1, 'files': [{'file_name': 'test_results_0.csv', 'file_mime_type': 'text/csv', 'file_row_count': 3}], } mock_writerow.assert_has_calls( [ mock.call(COLUMNS), mock.call(["NULL", "NULL", "NULL"]), mock.call(["NULL", "NULL", "NULL"]), mock.call(["NULL", "NULL", "NULL"]), ] ) def test__write_local_data_files_csv(self): op = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, schema_filename=SCHEMA_FILE, export_format="csv", gzip=False, schema=SCHEMA, gcp_conn_id='google_cloud_default', ) cursor = MagicMock() cursor.__iter__.return_value = INPUT_DATA cursor.description = CURSOR_DESCRIPTION files = op._write_local_data_files(cursor) file = next(files)['file_handle'] file.flush() df = pd.read_csv(file.name) assert df.equals(OUTPUT_DF) def test__write_local_data_files_json(self): op = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, schema_filename=SCHEMA_FILE, export_format="json", gzip=False, schema=SCHEMA, gcp_conn_id='google_cloud_default', ) cursor = MagicMock() cursor.__iter__.return_value = INPUT_DATA cursor.description = CURSOR_DESCRIPTION files = op._write_local_data_files(cursor) file = next(files)['file_handle'] file.flush() df = pd.read_json(file.name, orient='records', lines=True) assert df.equals(OUTPUT_DF) def test__write_local_data_files_parquet(self): op = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, schema_filename=SCHEMA_FILE, export_format="parquet", gzip=False, schema=SCHEMA, gcp_conn_id='google_cloud_default', ) cursor = MagicMock() cursor.__iter__.return_value = INPUT_DATA cursor.description = CURSOR_DESCRIPTION files = op._write_local_data_files(cursor) file = next(files)['file_handle'] file.flush() df = pd.read_parquet(file.name) assert df.equals(OUTPUT_DF) def test__write_local_data_files_json_with_exclude_columns(self): op = DummySQLToGCSOperator( sql=SQL, bucket=BUCKET, filename=FILENAME, task_id=TASK_ID, schema_filename=SCHEMA_FILE, export_format="json", gzip=False, schema=SCHEMA, gcp_conn_id='google_cloud_default', exclude_columns=EXCLUDE_COLUMNS, ) cursor = MagicMock() cursor.__iter__.return_value = INPUT_DATA cursor.description = CURSOR_DESCRIPTION files = op._write_local_data_files(cursor) file = next(files)['file_handle'] file.flush() df = pd.read_json(file.name, orient='records', lines=True) assert df.equals(OUTPUT_DF_WITH_EXCLUDE_COLUMNS)
{'content_hash': 'b86ca498454537dd39e263fb204e85fa', 'timestamp': '', 'source': 'github', 'line_count': 409, 'max_line_length': 110, 'avg_line_length': 32.13447432762836, 'alnum_prop': 0.5340485429506201, 'repo_name': 'cfei18/incubator-airflow', 'id': '5fbe13a00bd0044ed4d721af87c5032bd3704001', 'size': '13928', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/providers/google/cloud/transfers/test_sql_to_gcs.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '25980'}, {'name': 'Dockerfile', 'bytes': '72003'}, {'name': 'HCL', 'bytes': '3786'}, {'name': 'HTML', 'bytes': '173434'}, {'name': 'JavaScript', 'bytes': '143068'}, {'name': 'Jinja', 'bytes': '38808'}, {'name': 'Jupyter Notebook', 'bytes': '5482'}, {'name': 'Mako', 'bytes': '1339'}, {'name': 'Python', 'bytes': '22660683'}, {'name': 'R', 'bytes': '313'}, {'name': 'Shell', 'bytes': '312715'}, {'name': 'TypeScript', 'bytes': '472379'}]}
from django.db import models from django.db.models.query import EmptyQuerySet from ...decorators import not_implemented from query import NodeQuerySet class NodeModelManager(models.Manager): def __init__(self): super(NodeModelManager, self).__init__() self._using = None self.model = None self._inherited = False @not_implemented def _insert(self, values, **kwargs): pass @not_implemented def _update(self, values, **kwargs): pass def get_empty_query_set(self): return EmptyQuerySet() @not_implemented def exclude(self, *args, **kwargs): pass def get_query_set(self): return NodeQuerySet(self.model) def all(self): return self.get_query_set() def get(self, *args, **kwargs): return self.get_query_set().get(*args, **kwargs) def dates(self, *args, **kwargs): return self.get_query_set().dates(*args, **kwargs) def create(self, **kwargs): return self.get_query_set().create(**kwargs) def filter(self, *args, **kwargs): return self.get_query_set().filter(*args, **kwargs)
{'content_hash': 'a7feb437a37c738ef71c11ca6ac05494', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 59, 'avg_line_length': 25.0, 'alnum_prop': 0.6217391304347826, 'repo_name': 'mpetyx/django-rdfGraph', 'id': 'c98a22e663a32e4e66a2f513958899b92ef8b733', 'size': '1150', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'graphBackend/graphBackend/api/neo4django/db/models/manager.py', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Groovy', 'bytes': '9849'}, {'name': 'Python', 'bytes': '329628'}]}
typedef void(^ZYCallBackHandler)(NSInteger index); @interface ZYCarouselView : UIView @property (nonatomic,strong) NSArray<UIImage *> *images; +(instancetype)zy_CarouselViewWithFrame:(CGRect)frame images:(NSArray<UIImage *> *)images isFireTimer:(BOOL)isFire imageClickAction:(ZYCallBackHandler)action; -(void)zy_configFromNibWithImages:(NSArray<UIImage *> *)images isFireTimer:(BOOL)isFire imageClickAction:(ZYCallBackHandler)action; @end
{'content_hash': 'a4444dbe96a9b95388d3279b26f3d128', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 68, 'avg_line_length': 37.733333333333334, 'alnum_prop': 0.6325088339222615, 'repo_name': 'Lzy8/ZYMyTestLibarary', 'id': '28cc7b9c5e356c9bf9edc5fa5720c20990b55422', 'size': '727', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'ZYMyTestLibrary/Classes/ZYCarouselView.h', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '198101'}, {'name': 'Ruby', 'bytes': '2058'}, {'name': 'Shell', 'bytes': '18178'}, {'name': 'Swift', 'bytes': '6166'}]}
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "build/build_config.h" // We need nacl_irt_start injection in SFI mode. Non-SFI has a different // start up procedure so we just exclude it. #if defined(OS_NACL_SFI) #include <stdint.h> #include "base/at_exit.h" #include "native_client/src/public/chrome_main.h" #include "native_client/src/public/irt_core.h" #include "ppapi/nacl_irt/irt_interfaces.h" #include "ppapi/nacl_irt/plugin_startup.h" namespace { IPC::ChannelHandle MakeIPCHandle(const char* name, int fd) { return IPC::ChannelHandle(name, base::FileDescriptor(fd, false /* auto_close */)); } } // namespace void nacl_irt_start(uint32_t* info) { nacl_irt_init(info); // Though it isn't referenced here, we must instantiate an AtExitManager. base::AtExitManager exit_manager; // In SFI mode, the FDs of IPC channels are NACL_CHROME_DESC_BASE and its // successor, which is set in nacl_listener.cc. ppapi::SetIPCChannelHandles( MakeIPCHandle("NaCl Browser", NACL_CHROME_DESC_BASE), MakeIPCHandle("NaCl Renderer", NACL_CHROME_DESC_BASE + 1), MakeIPCHandle("NaCl Manifest", NACL_CHROME_DESC_BASE + 2)); ppapi::StartUpPlugin(); nacl_irt_enter_user_code(info, chrome_irt_query); } #endif // defined(OS_NACL_SFI)
{'content_hash': 'f4f3787d61db460820c3ecd12e3525a0', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 78, 'avg_line_length': 32.93023255813954, 'alnum_prop': 0.7083333333333334, 'repo_name': 'danakj/chromium', 'id': '9390acecf5719ec37871ec92ad0baf7b0cb1f9d6', 'size': '1416', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'ppapi/nacl_irt/irt_start.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
__author__ = 'Jeff Roy' from mi.core.log import get_logger log = get_logger() from mi.idk.config import Config import unittest import os from mi.dataset.driver.ctdpf_ckl.wfp_sio.ctdpf_ckl_wfp_sio_telemetered_driver import parse from mi.dataset.dataset_driver import ParticleDataHandler class SampleTest(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_one(self): source_file_path = os.path.join('mi', 'dataset', 'driver', 'ctdpf_ckl', 'wfp_sio', 'resource', 'node58p1_0.wc_wfp.dat') particle_data_hdlr_obj = ParticleDataHandler() particle_data_hdlr_obj = parse(Config().base_dir(), source_file_path, particle_data_hdlr_obj) log.debug("SAMPLES: %s", particle_data_hdlr_obj._samples) log.debug("FAILURE: %s", particle_data_hdlr_obj._failure) self.assertEquals(particle_data_hdlr_obj._failure, False) if __name__ == '__main__': test = SampleTest('test_one') test.test_one()
{'content_hash': '2507a6ead1c31b240c23dc0e83a88427', 'timestamp': '', 'source': 'github', 'line_count': 41, 'max_line_length': 101, 'avg_line_length': 26.26829268292683, 'alnum_prop': 0.6193129062209842, 'repo_name': 'JeffRoy/mi-dataset', 'id': '16eb3f2e6d553611827337edf50de3f8c0e9aca2', 'size': '1135', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'mi/dataset/driver/ctdpf_ckl/wfp_sio/test/test_ctdpf_ckl_wfp_sio_driver.py', 'mode': '33261', 'license': 'bsd-2-clause', 'language': [{'name': 'Python', 'bytes': '3610231'}]}
using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace ShipStationAccess.V2.Models.Order { [ DataContract ] public sealed class ShipStationOrderShipments { [ DataMember( Name = "shipments" ) ] public IEnumerable< ShipStationOrderShipment > Shipments { get; set; } [ DataMember( Name = "total" ) ] public int Total { get; set; } [ DataMember( Name = "page" ) ] public int Page { get; set; } [ DataMember( Name = "pages" ) ] public int Pages { get; set; } } [ DataContract ] public sealed class ShipStationOrderShipment { [ DataMember( Name = "shipmentId" ) ] public long Id { get; set; } [ DataMember( Name = "orderId" ) ] public long OrderId { get; set; } [ DataMember( Name = "createDate" ) ] public DateTime CreateDate { get; set; } [ DataMember( Name = "shipDate" ) ] public DateTime? ShipDate { get; set; } [ DataMember( Name = "shipmentCost" ) ] public decimal Cost { get; set; } [ DataMember( Name = "insuranceCost" ) ] public decimal InsuranceCost { get; set; } [ DataMember( Name = "trackingNumber" ) ] public string TrackingNumber { get; set; } [ DataMember( Name = "carrierCode" ) ] public string CarrierCode { get; set; } [ DataMember( Name = "serviceCode" ) ] public string ServiceCode { get; set; } [ DataMember( Name = "confirmation" ) ] public string Confirmation { get; set; } [ DataMember( Name = "voided" ) ] public bool Voided { get; set; } [ DataMember( Name = "weight" ) ] public ShipmentWeight Weight { get; set; } [ DataMember( Name = "dimensions" ) ] public ShipmentDimensions Dimensions { get; set; } [ DataMember( Name = "shipmentItems" ) ] public IEnumerable< ShipmentItem > Items { get; set; } } [ DataContract ] public sealed class ShipmentWeight { [ DataMember( Name = "value" ) ] public decimal Value { get; set; } [ DataMember( Name = "units" ) ] public string Units { get; set; } } [ DataContract ] public sealed class ShipmentDimensions { [ DataMember( Name = "units" ) ] public string Units { get; set; } [ DataMember( Name = "length" ) ] public decimal Length { get; set; } [ DataMember( Name = "width" ) ] public decimal Width { get; set; } [ DataMember( Name = "height" ) ] public decimal Height { get; set; } } [ DataContract ] public sealed class ShipmentItem { [ DataMember( Name = "sku" ) ] public string Sku { get; set; } [ DataMember( Name = "quantity" ) ] public int Quantity { get; set; } } }
{'content_hash': 'b9ce346fc907a4980260b4fb8abf9452', 'timestamp': '', 'source': 'github', 'line_count': 104, 'max_line_length': 72, 'avg_line_length': 25.307692307692307, 'alnum_prop': 0.6200607902735562, 'repo_name': 'agileharbor/shipStationAccess', 'id': 'b5d9c6f5828719a4997ff2a691c4121388aab1a0', 'size': '2634', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/ShipStationAccess/V2/Models/Order/ShipStationOrderShipment.cs', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '368'}, {'name': 'C#', 'bytes': '61630'}, {'name': 'PowerShell', 'bytes': '4164'}]}
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?> <root> <document> <sentences> <sentence id="1"> <tokens> <token id="1"> <word>From</word> <lemma>from</lemma> <CharacterOffsetBegin>0</CharacterOffsetBegin> <CharacterOffsetEnd>4</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="2"> <word>the</word> <lemma>the</lemma> <CharacterOffsetBegin>5</CharacterOffsetBegin> <CharacterOffsetEnd>8</CharacterOffsetEnd> <POS>DT</POS> </token> <token id="3"> <word>point</word> <lemma>point</lemma> <CharacterOffsetBegin>9</CharacterOffsetBegin> <CharacterOffsetEnd>14</CharacterOffsetEnd> <POS>NN</POS> </token> <token id="4"> <word>of</word> <lemma>of</lemma> <CharacterOffsetBegin>15</CharacterOffsetBegin> <CharacterOffsetEnd>17</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="5"> <word>view</word> <lemma>view</lemma> <CharacterOffsetBegin>18</CharacterOffsetBegin> <CharacterOffsetEnd>22</CharacterOffsetEnd> <POS>NN</POS> </token> <token id="6"> <word>of</word> <lemma>of</lemma> <CharacterOffsetBegin>23</CharacterOffsetBegin> <CharacterOffsetEnd>25</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="7"> <word>the</word> <lemma>the</lemma> <CharacterOffsetBegin>26</CharacterOffsetBegin> <CharacterOffsetEnd>29</CharacterOffsetEnd> <POS>DT</POS> </token> <token id="8"> <word>Committee</word> <lemma>Committee</lemma> <CharacterOffsetBegin>30</CharacterOffsetBegin> <CharacterOffsetEnd>39</CharacterOffsetEnd> <POS>NNP</POS> </token> <token id="9"> <word>on</word> <lemma>on</lemma> <CharacterOffsetBegin>40</CharacterOffsetBegin> <CharacterOffsetEnd>42</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="10"> <word>Legal</word> <lemma>Legal</lemma> <CharacterOffsetBegin>43</CharacterOffsetBegin> <CharacterOffsetEnd>48</CharacterOffsetEnd> <POS>NNP</POS> </token> <token id="11"> <word>Affairs</word> <lemma>Affairs</lemma> <CharacterOffsetBegin>49</CharacterOffsetBegin> <CharacterOffsetEnd>56</CharacterOffsetEnd> <POS>NNP</POS> </token> <token id="12"> <word>and</word> <lemma>and</lemma> <CharacterOffsetBegin>57</CharacterOffsetBegin> <CharacterOffsetEnd>60</CharacterOffsetEnd> <POS>CC</POS> </token> <token id="13"> <word>the</word> <lemma>the</lemma> <CharacterOffsetBegin>61</CharacterOffsetBegin> <CharacterOffsetEnd>64</CharacterOffsetEnd> <POS>DT</POS> </token> <token id="14"> <word>Internal</word> <lemma>Internal</lemma> <CharacterOffsetBegin>65</CharacterOffsetBegin> <CharacterOffsetEnd>73</CharacterOffsetEnd> <POS>NNP</POS> </token> <token id="15"> <word>Market</word> <lemma>Market</lemma> <CharacterOffsetBegin>74</CharacterOffsetBegin> <CharacterOffsetEnd>80</CharacterOffsetEnd> <POS>NNP</POS> </token> <token id="16"> <word>,</word> <lemma>,</lemma> <CharacterOffsetBegin>80</CharacterOffsetBegin> <CharacterOffsetEnd>81</CharacterOffsetEnd> <POS>,</POS> </token> <token id="17"> <word>what</word> <lemma>what</lemma> <CharacterOffsetBegin>82</CharacterOffsetBegin> <CharacterOffsetEnd>86</CharacterOffsetEnd> <POS>WP</POS> </token> <token id="18"> <word>I</word> <lemma>I</lemma> <CharacterOffsetBegin>87</CharacterOffsetBegin> <CharacterOffsetEnd>88</CharacterOffsetEnd> <POS>PRP</POS> </token> <token id="19"> <word>would</word> <lemma>would</lemma> <CharacterOffsetBegin>89</CharacterOffsetBegin> <CharacterOffsetEnd>94</CharacterOffsetEnd> <POS>MD</POS> </token> <token id="20"> <word>like</word> <lemma>like</lemma> <CharacterOffsetBegin>95</CharacterOffsetBegin> <CharacterOffsetEnd>99</CharacterOffsetEnd> <POS>VB</POS> </token> <token id="21"> <word>to</word> <lemma>to</lemma> <CharacterOffsetBegin>100</CharacterOffsetBegin> <CharacterOffsetEnd>102</CharacterOffsetEnd> <POS>TO</POS> </token> <token id="22"> <word>point</word> <lemma>point</lemma> <CharacterOffsetBegin>103</CharacterOffsetBegin> <CharacterOffsetEnd>108</CharacterOffsetEnd> <POS>VB</POS> </token> <token id="23"> <word>out</word> <lemma>out</lemma> <CharacterOffsetBegin>109</CharacterOffsetBegin> <CharacterOffsetEnd>112</CharacterOffsetEnd> <POS>RP</POS> </token> <token id="24"> <word>is</word> <lemma>be</lemma> <CharacterOffsetBegin>113</CharacterOffsetBegin> <CharacterOffsetEnd>115</CharacterOffsetEnd> <POS>VBZ</POS> </token> <token id="25"> <word>that</word> <lemma>that</lemma> <CharacterOffsetBegin>116</CharacterOffsetBegin> <CharacterOffsetEnd>120</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="26"> <word>,</word> <lemma>,</lemma> <CharacterOffsetBegin>120</CharacterOffsetBegin> <CharacterOffsetEnd>121</CharacterOffsetEnd> <POS>,</POS> </token> <token id="27"> <word>in</word> <lemma>in</lemma> <CharacterOffsetBegin>122</CharacterOffsetBegin> <CharacterOffsetEnd>124</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="28"> <word>actual</word> <lemma>actual</lemma> <CharacterOffsetBegin>125</CharacterOffsetBegin> <CharacterOffsetEnd>131</CharacterOffsetEnd> <POS>JJ</POS> </token> <token id="29"> <word>fact</word> <lemma>fact</lemma> <CharacterOffsetBegin>132</CharacterOffsetBegin> <CharacterOffsetEnd>136</CharacterOffsetEnd> <POS>NN</POS> </token> <token id="30"> <word>,</word> <lemma>,</lemma> <CharacterOffsetBegin>136</CharacterOffsetBegin> <CharacterOffsetEnd>137</CharacterOffsetEnd> <POS>,</POS> </token> <token id="31"> <word>we</word> <lemma>we</lemma> <CharacterOffsetBegin>138</CharacterOffsetBegin> <CharacterOffsetEnd>140</CharacterOffsetEnd> <POS>PRP</POS> </token> <token id="32"> <word>can</word> <lemma>can</lemma> <CharacterOffsetBegin>141</CharacterOffsetBegin> <CharacterOffsetEnd>144</CharacterOffsetEnd> <POS>MD</POS> </token> <token id="33"> <word>only</word> <lemma>only</lemma> <CharacterOffsetBegin>145</CharacterOffsetBegin> <CharacterOffsetEnd>149</CharacterOffsetEnd> <POS>RB</POS> </token> <token id="34"> <word>treat</word> <lemma>treat</lemma> <CharacterOffsetBegin>150</CharacterOffsetBegin> <CharacterOffsetEnd>155</CharacterOffsetEnd> <POS>VB</POS> </token> <token id="35"> <word>equally</word> <lemma>equally</lemma> <CharacterOffsetBegin>156</CharacterOffsetBegin> <CharacterOffsetEnd>163</CharacterOffsetEnd> <POS>RB</POS> </token> <token id="36"> <word>what</word> <lemma>what</lemma> <CharacterOffsetBegin>164</CharacterOffsetBegin> <CharacterOffsetEnd>168</CharacterOffsetEnd> <POS>WP</POS> </token> <token id="37"> <word>is</word> <lemma>be</lemma> <CharacterOffsetBegin>169</CharacterOffsetBegin> <CharacterOffsetEnd>171</CharacterOffsetEnd> <POS>VBZ</POS> </token> <token id="38"> <word>equal</word> <lemma>equal</lemma> <CharacterOffsetBegin>172</CharacterOffsetBegin> <CharacterOffsetEnd>177</CharacterOffsetEnd> <POS>JJ</POS> </token> <token id="39"> <word>.</word> <lemma>.</lemma> <CharacterOffsetBegin>177</CharacterOffsetBegin> <CharacterOffsetEnd>178</CharacterOffsetEnd> <POS>.</POS> </token> </tokens> <parse>(ROOT (S (PP (IN From) (NP (NP (DT the) (NN point)) (PP (IN of) (NP (NP (NN view)) (PP (IN of) (NP (NP (DT the) (NNP Committee)) (PP (IN on) (NP (NP (NNP Legal) (NNP Affairs)) (CC and) (NP (DT the) (NNP Internal) (NNP Market)))))))))) (, ,) (SBAR (WHNP (WP what)) (S (NP (PRP I)) (VP (MD would) (VP (VB like) (S (VP (TO to) (VP (VB point) (PRT (RP out))))))))) (VP (VBZ is) (SBAR (IN that) (S (, ,) (PP (IN in) (NP (JJ actual) (NN fact))) (, ,) (NP (PRP we)) (VP (MD can) (ADVP (RB only)) (VP (VB treat) (ADVP (RB equally)) (SBAR (WHNP (WP what)) (S (VP (VBZ is) (ADJP (JJ equal)))))))))) (. .))) </parse> <dependencies type="basic-dependencies"> <dep type="root"> <governor idx="0">ROOT</governor> <dependent idx="24">is</dependent> </dep> <dep type="prep"> <governor idx="24">is</governor> <dependent idx="1">From</dependent> </dep> <dep type="det"> <governor idx="3">point</governor> <dependent idx="2">the</dependent> </dep> <dep type="pobj"> <governor idx="1">From</governor> <dependent idx="3">point</dependent> </dep> <dep type="prep"> <governor idx="3">point</governor> <dependent idx="4">of</dependent> </dep> <dep type="pobj"> <governor idx="4">of</governor> <dependent idx="5">view</dependent> </dep> <dep type="prep"> <governor idx="5">view</governor> <dependent idx="6">of</dependent> </dep> <dep type="det"> <governor idx="8">Committee</governor> <dependent idx="7">the</dependent> </dep> <dep type="pobj"> <governor idx="6">of</governor> <dependent idx="8">Committee</dependent> </dep> <dep type="prep"> <governor idx="8">Committee</governor> <dependent idx="9">on</dependent> </dep> <dep type="nn"> <governor idx="11">Affairs</governor> <dependent idx="10">Legal</dependent> </dep> <dep type="pobj"> <governor idx="9">on</governor> <dependent idx="11">Affairs</dependent> </dep> <dep type="cc"> <governor idx="11">Affairs</governor> <dependent idx="12">and</dependent> </dep> <dep type="det"> <governor idx="15">Market</governor> <dependent idx="13">the</dependent> </dep> <dep type="nn"> <governor idx="15">Market</governor> <dependent idx="14">Internal</dependent> </dep> <dep type="conj"> <governor idx="11">Affairs</governor> <dependent idx="15">Market</dependent> </dep> <dep type="dobj"> <governor idx="20">like</governor> <dependent idx="17">what</dependent> </dep> <dep type="nsubj"> <governor idx="20">like</governor> <dependent idx="18">I</dependent> </dep> <dep type="aux"> <governor idx="20">like</governor> <dependent idx="19">would</dependent> </dep> <dep type="csubj"> <governor idx="24">is</governor> <dependent idx="20">like</dependent> </dep> <dep type="aux"> <governor idx="22">point</governor> <dependent idx="21">to</dependent> </dep> <dep type="xcomp"> <governor idx="20">like</governor> <dependent idx="22">point</dependent> </dep> <dep type="prt"> <governor idx="22">point</governor> <dependent idx="23">out</dependent> </dep> <dep type="mark"> <governor idx="34">treat</governor> <dependent idx="25">that</dependent> </dep> <dep type="prep"> <governor idx="34">treat</governor> <dependent idx="27">in</dependent> </dep> <dep type="amod"> <governor idx="29">fact</governor> <dependent idx="28">actual</dependent> </dep> <dep type="pobj"> <governor idx="27">in</governor> <dependent idx="29">fact</dependent> </dep> <dep type="nsubj"> <governor idx="34">treat</governor> <dependent idx="31">we</dependent> </dep> <dep type="aux"> <governor idx="34">treat</governor> <dependent idx="32">can</dependent> </dep> <dep type="advmod"> <governor idx="34">treat</governor> <dependent idx="33">only</dependent> </dep> <dep type="ccomp"> <governor idx="24">is</governor> <dependent idx="34">treat</dependent> </dep> <dep type="advmod"> <governor idx="34">treat</governor> <dependent idx="35">equally</dependent> </dep> <dep type="nsubj"> <governor idx="38">equal</governor> <dependent idx="36">what</dependent> </dep> <dep type="cop"> <governor idx="38">equal</governor> <dependent idx="37">is</dependent> </dep> <dep type="ccomp"> <governor idx="34">treat</governor> <dependent idx="38">equal</dependent> </dep> </dependencies> <dependencies type="collapsed-dependencies"> <dep type="root"> <governor idx="0">ROOT</governor> <dependent idx="24">is</dependent> </dep> <dep type="det"> <governor idx="3">point</governor> <dependent idx="2">the</dependent> </dep> <dep type="prep_from"> <governor idx="24">is</governor> <dependent idx="3">point</dependent> </dep> <dep type="prep_of"> <governor idx="3">point</governor> <dependent idx="5">view</dependent> </dep> <dep type="det"> <governor idx="8">Committee</governor> <dependent idx="7">the</dependent> </dep> <dep type="prep_of"> <governor idx="5">view</governor> <dependent idx="8">Committee</dependent> </dep> <dep type="nn"> <governor idx="11">Affairs</governor> <dependent idx="10">Legal</dependent> </dep> <dep type="prep_on"> <governor idx="8">Committee</governor> <dependent idx="11">Affairs</dependent> </dep> <dep type="det"> <governor idx="15">Market</governor> <dependent idx="13">the</dependent> </dep> <dep type="nn"> <governor idx="15">Market</governor> <dependent idx="14">Internal</dependent> </dep> <dep type="conj_and"> <governor idx="11">Affairs</governor> <dependent idx="15">Market</dependent> </dep> <dep type="dobj"> <governor idx="20">like</governor> <dependent idx="17">what</dependent> </dep> <dep type="nsubj"> <governor idx="20">like</governor> <dependent idx="18">I</dependent> </dep> <dep type="aux"> <governor idx="20">like</governor> <dependent idx="19">would</dependent> </dep> <dep type="csubj"> <governor idx="24">is</governor> <dependent idx="20">like</dependent> </dep> <dep type="aux"> <governor idx="22">point</governor> <dependent idx="21">to</dependent> </dep> <dep type="xcomp"> <governor idx="20">like</governor> <dependent idx="22">point</dependent> </dep> <dep type="prt"> <governor idx="22">point</governor> <dependent idx="23">out</dependent> </dep> <dep type="mark"> <governor idx="34">treat</governor> <dependent idx="25">that</dependent> </dep> <dep type="amod"> <governor idx="29">fact</governor> <dependent idx="28">actual</dependent> </dep> <dep type="prep_in"> <governor idx="34">treat</governor> <dependent idx="29">fact</dependent> </dep> <dep type="nsubj"> <governor idx="34">treat</governor> <dependent idx="31">we</dependent> </dep> <dep type="aux"> <governor idx="34">treat</governor> <dependent idx="32">can</dependent> </dep> <dep type="advmod"> <governor idx="34">treat</governor> <dependent idx="33">only</dependent> </dep> <dep type="ccomp"> <governor idx="24">is</governor> <dependent idx="34">treat</dependent> </dep> <dep type="advmod"> <governor idx="34">treat</governor> <dependent idx="35">equally</dependent> </dep> <dep type="nsubj"> <governor idx="38">equal</governor> <dependent idx="36">what</dependent> </dep> <dep type="cop"> <governor idx="38">equal</governor> <dependent idx="37">is</dependent> </dep> <dep type="ccomp"> <governor idx="34">treat</governor> <dependent idx="38">equal</dependent> </dep> </dependencies> <dependencies type="collapsed-ccprocessed-dependencies"> <dep type="root"> <governor idx="0">ROOT</governor> <dependent idx="24">is</dependent> </dep> <dep type="det"> <governor idx="3">point</governor> <dependent idx="2">the</dependent> </dep> <dep type="prep_from"> <governor idx="24">is</governor> <dependent idx="3">point</dependent> </dep> <dep type="prep_of"> <governor idx="3">point</governor> <dependent idx="5">view</dependent> </dep> <dep type="det"> <governor idx="8">Committee</governor> <dependent idx="7">the</dependent> </dep> <dep type="prep_of"> <governor idx="5">view</governor> <dependent idx="8">Committee</dependent> </dep> <dep type="nn"> <governor idx="11">Affairs</governor> <dependent idx="10">Legal</dependent> </dep> <dep type="prep_on"> <governor idx="8">Committee</governor> <dependent idx="11">Affairs</dependent> </dep> <dep type="det"> <governor idx="15">Market</governor> <dependent idx="13">the</dependent> </dep> <dep type="nn"> <governor idx="15">Market</governor> <dependent idx="14">Internal</dependent> </dep> <dep type="prep_on"> <governor idx="8">Committee</governor> <dependent idx="15">Market</dependent> </dep> <dep type="conj_and"> <governor idx="11">Affairs</governor> <dependent idx="15">Market</dependent> </dep> <dep type="dobj"> <governor idx="20">like</governor> <dependent idx="17">what</dependent> </dep> <dep type="nsubj"> <governor idx="20">like</governor> <dependent idx="18">I</dependent> </dep> <dep type="aux"> <governor idx="20">like</governor> <dependent idx="19">would</dependent> </dep> <dep type="csubj"> <governor idx="24">is</governor> <dependent idx="20">like</dependent> </dep> <dep type="aux"> <governor idx="22">point</governor> <dependent idx="21">to</dependent> </dep> <dep type="xcomp"> <governor idx="20">like</governor> <dependent idx="22">point</dependent> </dep> <dep type="prt"> <governor idx="22">point</governor> <dependent idx="23">out</dependent> </dep> <dep type="mark"> <governor idx="34">treat</governor> <dependent idx="25">that</dependent> </dep> <dep type="amod"> <governor idx="29">fact</governor> <dependent idx="28">actual</dependent> </dep> <dep type="prep_in"> <governor idx="34">treat</governor> <dependent idx="29">fact</dependent> </dep> <dep type="nsubj"> <governor idx="34">treat</governor> <dependent idx="31">we</dependent> </dep> <dep type="aux"> <governor idx="34">treat</governor> <dependent idx="32">can</dependent> </dep> <dep type="advmod"> <governor idx="34">treat</governor> <dependent idx="33">only</dependent> </dep> <dep type="ccomp"> <governor idx="24">is</governor> <dependent idx="34">treat</dependent> </dep> <dep type="advmod"> <governor idx="34">treat</governor> <dependent idx="35">equally</dependent> </dep> <dep type="nsubj"> <governor idx="38">equal</governor> <dependent idx="36">what</dependent> </dep> <dep type="cop"> <governor idx="38">equal</governor> <dependent idx="37">is</dependent> </dep> <dep type="ccomp"> <governor idx="34">treat</governor> <dependent idx="38">equal</dependent> </dep> </dependencies> </sentence> <sentence id="2"> <tokens> <token id="1"> <word>differences</word> <lemma>difference</lemma> <CharacterOffsetBegin>179</CharacterOffsetBegin> <CharacterOffsetEnd>190</CharacterOffsetEnd> <POS>NNS</POS> </token> <token id="2"> <word>in</word> <lemma>in</lemma> <CharacterOffsetBegin>191</CharacterOffsetBegin> <CharacterOffsetEnd>193</CharacterOffsetEnd> <POS>IN</POS> </token> <token id="3"> <word>the</word> <lemma>the</lemma> <CharacterOffsetBegin>194</CharacterOffsetBegin> <CharacterOffsetEnd>197</CharacterOffsetEnd> <POS>DT</POS> </token> <token id="4"> <word>proposed</word> <lemma>propose</lemma> <CharacterOffsetBegin>198</CharacterOffsetBegin> <CharacterOffsetEnd>206</CharacterOffsetEnd> <POS>VBN</POS> </token> <token id="5"> <word>amendments</word> <lemma>amendment</lemma> <CharacterOffsetBegin>207</CharacterOffsetBegin> <CharacterOffsetEnd>217</CharacterOffsetEnd> <POS>NNS</POS> </token> </tokens> <parse>(ROOT (NP (NP (NNS differences)) (PP (IN in) (NP (DT the) (VBN proposed) (NNS amendments))))) </parse> <dependencies type="basic-dependencies"> <dep type="root"> <governor idx="0">ROOT</governor> <dependent idx="1">differences</dependent> </dep> <dep type="prep"> <governor idx="1">differences</governor> <dependent idx="2">in</dependent> </dep> <dep type="det"> <governor idx="5">amendments</governor> <dependent idx="3">the</dependent> </dep> <dep type="amod"> <governor idx="5">amendments</governor> <dependent idx="4">proposed</dependent> </dep> <dep type="pobj"> <governor idx="2">in</governor> <dependent idx="5">amendments</dependent> </dep> </dependencies> <dependencies type="collapsed-dependencies"> <dep type="root"> <governor idx="0">ROOT</governor> <dependent idx="1">differences</dependent> </dep> <dep type="det"> <governor idx="5">amendments</governor> <dependent idx="3">the</dependent> </dep> <dep type="amod"> <governor idx="5">amendments</governor> <dependent idx="4">proposed</dependent> </dep> <dep type="prep_in"> <governor idx="1">differences</governor> <dependent idx="5">amendments</dependent> </dep> </dependencies> <dependencies type="collapsed-ccprocessed-dependencies"> <dep type="root"> <governor idx="0">ROOT</governor> <dependent idx="1">differences</dependent> </dep> <dep type="det"> <governor idx="5">amendments</governor> <dependent idx="3">the</dependent> </dep> <dep type="amod"> <governor idx="5">amendments</governor> <dependent idx="4">proposed</dependent> </dep> <dep type="prep_in"> <governor idx="1">differences</governor> <dependent idx="5">amendments</dependent> </dep> </dependencies> </sentence> </sentences> </document> </root>
{'content_hash': 'eb8ebac1a6da9025436af956735b66c3', 'timestamp': '', 'source': 'github', 'line_count': 766, 'max_line_length': 620, 'avg_line_length': 37.29895561357702, 'alnum_prop': 0.4813972209583144, 'repo_name': 'osmanbaskaya/semeval14-task3', 'id': '82fddd87263e1c392d06e59411838fdda03fc24e', 'size': '28571', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'run/corenlp-sentence2phrase.test/352.xml', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '22682'}, {'name': 'Scala', 'bytes': '1451'}, {'name': 'Shell', 'bytes': '532'}, {'name': 'TeX', 'bytes': '215954'}]}
; (function ($, window, document, undefined) { 'use strict'; Foundation.libs.topbar = { name: 'topbar', version: '{{ VERSION }}', settings: { index: 0, sticky_class: 'sticky', custom_back_text: true, back_text: 'Back', mobile_show_parent_link: true, is_hover: true, scrolltop: true, // jump to top when sticky nav menu toggle is clicked sticky_on: 'all' }, init: function (section, method, options) { Foundation.inherit(this, 'add_custom_rule register_media throttle'); var self = this; self.register_media('topbar', 'foundation-mq-topbar'); this.bindings(method, options); self.S('[' + this.attr_name() + ']', this.scope).each(function () { var topbar = $(this), settings = topbar.data(self.attr_name(true) + '-init'), section = self.S('section', this); topbar.data('index', 0); var topbarContainer = topbar.parent(); if (topbarContainer.hasClass('fixed') || self.is_sticky(topbar, topbarContainer, settings)) { self.settings.sticky_class = settings.sticky_class; self.settings.sticky_topbar = topbar; topbar.data('height', topbarContainer.outerHeight()); topbar.data('stickyoffset', topbarContainer.offset().top); } else { topbar.data('height', topbar.outerHeight()); } if (!settings.assembled) { self.assemble(topbar); } if (settings.is_hover) { self.S('.has-dropdown', topbar).addClass('not-click'); } else { self.S('.has-dropdown', topbar).removeClass('not-click'); } // Pad body when sticky (scrolled) or fixed. self.add_custom_rule('.f-topbar-fixed { padding-top: ' + topbar.data('height') + 'px }'); if (topbarContainer.hasClass('fixed')) { self.S('body').addClass('f-topbar-fixed'); } }); }, is_sticky: function (topbar, topbarContainer, settings) { var sticky = topbarContainer.hasClass(settings.sticky_class); if (sticky && settings.sticky_on === 'all') { return true; } else if (sticky && this.small() && settings.sticky_on === 'small') { return (matchMedia(Foundation.media_queries.small).matches && !matchMedia(Foundation.media_queries.medium).matches && !matchMedia(Foundation.media_queries.large).matches); //return true; } else if (sticky && this.medium() && settings.sticky_on === 'medium') { return (matchMedia(Foundation.media_queries.small).matches && matchMedia(Foundation.media_queries.medium).matches && !matchMedia(Foundation.media_queries.large).matches); //return true; } else if (sticky && this.large() && settings.sticky_on === 'large') { return (matchMedia(Foundation.media_queries.small).matches && matchMedia(Foundation.media_queries.medium).matches && matchMedia(Foundation.media_queries.large).matches); //return true; } return false; }, toggle: function (toggleEl) { var self = this, topbar; if (toggleEl) { topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']'); } else { topbar = self.S('[' + this.attr_name() + ']'); } var settings = topbar.data(this.attr_name(true) + '-init'); var section = self.S('section, .section', topbar); if (self.breakpoint()) { if (!self.rtl) { section.css({left: '0%'}); $('>.name', section).css({left: '100%'}); } else { section.css({right: '0%'}); $('>.name', section).css({right: '100%'}); } self.S('li.moved', section).removeClass('moved'); topbar.data('index', 0); topbar .toggleClass('expanded') .css('height', ''); } if (settings.scrolltop) { if (!topbar.hasClass('expanded')) { if (topbar.hasClass('fixed')) { topbar.parent().addClass('fixed'); topbar.removeClass('fixed'); self.S('body').addClass('f-topbar-fixed'); } } else if (topbar.parent().hasClass('fixed')) { if (settings.scrolltop) { topbar.parent().removeClass('fixed'); topbar.addClass('fixed'); self.S('body').removeClass('f-topbar-fixed'); window.scrollTo(0, 0); } else { topbar.parent().removeClass('expanded'); } } } else { if (self.is_sticky(topbar, topbar.parent(), settings)) { topbar.parent().addClass('fixed'); } if (topbar.parent().hasClass('fixed')) { if (!topbar.hasClass('expanded')) { topbar.removeClass('fixed'); topbar.parent().removeClass('expanded'); self.update_sticky_positioning(); } else { topbar.addClass('fixed'); topbar.parent().addClass('expanded'); self.S('body').addClass('f-topbar-fixed'); } } } }, timer: null, events: function (bar) { var self = this, S = this.S; S(this.scope) .off('.topbar') .on('click.fndtn.topbar', '[' + this.attr_name() + '] .toggle-topbar', function (e) { e.preventDefault(); self.toggle(this); }) .on('click.fndtn.topbar', '.top-bar .top-bar-section li a[href^="#"],[' + this.attr_name() + '] .top-bar-section li a[href^="#"]', function (e) { var li = $(this).closest('li'); if (self.breakpoint() && !li.hasClass('back') && !li.hasClass('has-dropdown')) { self.toggle(); } }) .on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) { var li = S(this), target = S(e.target), topbar = li.closest('[' + self.attr_name() + ']'), settings = topbar.data(self.attr_name(true) + '-init'); if (target.data('revealId')) { self.toggle(); return; } if (self.breakpoint()) return; if (settings.is_hover && !Modernizr.touch) return; e.stopImmediatePropagation(); if (li.hasClass('hover')) { li .removeClass('hover') .find('li') .removeClass('hover'); li.parents('li.hover') .removeClass('hover'); } else { li.addClass('hover'); $(li).siblings().removeClass('hover'); if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) { e.preventDefault(); } } }) .on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown>a', function (e) { if (self.breakpoint()) { e.preventDefault(); var $this = S(this), topbar = $this.closest('[' + self.attr_name() + ']'), section = topbar.find('section, .section'), dropdownHeight = $this.next('.dropdown').outerHeight(), $selectedLi = $this.closest('li'); topbar.data('index', topbar.data('index') + 1); $selectedLi.addClass('moved'); if (!self.rtl) { section.css({left: -(100 * topbar.data('index')) + '%'}); section.find('>.name').css({left: 100 * topbar.data('index') + '%'}); } else { section.css({right: -(100 * topbar.data('index')) + '%'}); section.find('>.name').css({right: 100 * topbar.data('index') + '%'}); } topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height')); } }); S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () { self.resize.call(self); }, 50)).trigger('resize').trigger('resize.fndtn.topbar'); S('body').off('.topbar').on('click.fndtn.topbar', function (e) { var parent = S(e.target).closest('li').closest('li.hover'); if (parent.length > 0) { return; } S('[' + self.attr_name() + '] li.hover').removeClass('hover'); }); // Go up a level on Click S(this.scope).on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown .back', function (e) { e.preventDefault(); var $this = S(this), topbar = $this.closest('[' + self.attr_name() + ']'), section = topbar.find('section, .section'), settings = topbar.data(self.attr_name(true) + '-init'), $movedLi = $this.closest('li.moved'), $previousLevelUl = $movedLi.parent(); topbar.data('index', topbar.data('index') - 1); if (!self.rtl) { section.css({left: -(100 * topbar.data('index')) + '%'}); section.find('>.name').css({left: 100 * topbar.data('index') + '%'}); } else { section.css({right: -(100 * topbar.data('index')) + '%'}); section.find('>.name').css({right: 100 * topbar.data('index') + '%'}); } if (topbar.data('index') === 0) { topbar.css('height', ''); } else { topbar.css('height', $previousLevelUl.outerHeight(true) + topbar.data('height')); } setTimeout(function () { $movedLi.removeClass('moved'); }, 300); }); }, resize: function () { var self = this; self.S('[' + this.attr_name() + ']').each(function () { var topbar = self.S(this), settings = topbar.data(self.attr_name(true) + '-init'); var stickyContainer = topbar.parent('.' + self.settings.sticky_class); var stickyOffset; if (!self.breakpoint()) { var doToggle = topbar.hasClass('expanded'); topbar .css('height', '') .removeClass('expanded') .find('li') .removeClass('hover'); if (doToggle) { self.toggle(topbar); } } if (self.is_sticky(topbar, stickyContainer, settings)) { if (stickyContainer.hasClass('fixed')) { // Remove the fixed to allow for correct calculation of the offset. stickyContainer.removeClass('fixed'); stickyOffset = stickyContainer.offset().top; if (self.S(document.body).hasClass('f-topbar-fixed')) { stickyOffset -= topbar.data('height'); } topbar.data('stickyoffset', stickyOffset); stickyContainer.addClass('fixed'); } else { stickyOffset = stickyContainer.offset().top; topbar.data('stickyoffset', stickyOffset); } } }); }, breakpoint: function () { return !matchMedia(Foundation.media_queries['topbar']).matches; }, small: function () { return matchMedia(Foundation.media_queries['small']).matches; }, medium: function () { return matchMedia(Foundation.media_queries['medium']).matches; }, large: function () { return matchMedia(Foundation.media_queries['large']).matches; }, assemble: function (topbar) { var self = this, settings = topbar.data(this.attr_name(true) + '-init'), section = self.S('section', topbar); // Pull element out of the DOM for manipulation section.detach(); self.S('.has-dropdown>a', section).each(function () { var $link = self.S(this), $dropdown = $link.siblings('.dropdown'), url = $link.attr('href'), $titleLi; if (!$dropdown.find('.title.back').length) { if (settings.mobile_show_parent_link == true && url) { $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link show-for-small"><a class="parent-link js-generated" href="' + url + '">' + $link.html() + '</a></li>'); } else { $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>'); } // Copy link to subnav if (settings.custom_back_text == true) { $('h5>a', $titleLi).html(settings.back_text); } else { $('h5>a', $titleLi).html('&laquo; ' + $link.html()); } $dropdown.prepend($titleLi); } }); // Put element back in the DOM section.appendTo(topbar); // check for sticky this.sticky(); this.assembled(topbar); }, assembled: function (topbar) { topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled: true})); }, height: function (ul) { var total = 0, self = this; $('> li', ul).each(function () { total += self.S(this).outerHeight(true); }); return total; }, sticky: function () { var self = this; this.S(window).on('scroll', function () { self.update_sticky_positioning(); }); }, update_sticky_positioning: function () { var klass = '.' + this.settings.sticky_class, $window = this.S(window), self = this; if (self.settings.sticky_topbar && self.is_sticky(this.settings.sticky_topbar, this.settings.sticky_topbar.parent(), this.settings)) { var distance = this.settings.sticky_topbar.data('stickyoffset'); if (!self.S(klass).hasClass('expanded')) { if ($window.scrollTop() > (distance)) { if (!self.S(klass).hasClass('fixed')) { self.S(klass).addClass('fixed'); self.S('body').addClass('f-topbar-fixed'); } } else if ($window.scrollTop() <= distance) { if (self.S(klass).hasClass('fixed')) { self.S(klass).removeClass('fixed'); self.S('body').removeClass('f-topbar-fixed'); } } } } }, off: function () { this.S(this.scope).off('.fndtn.topbar'); this.S(window).off('.fndtn.topbar'); }, reflow: function () { } }; }(jQuery, this, this.document));
{'content_hash': '24406a3c0109f8be956bdc14bd14b16e', 'timestamp': '', 'source': 'github', 'line_count': 432, 'max_line_length': 229, 'avg_line_length': 29.48148148148148, 'alnum_prop': 0.5849560301507538, 'repo_name': 'vforge/hermes', 'id': '242a5a7d3814e680aa11a334dceac2f7d757e523', 'size': '12736', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/assets/javascripts/vendor/foundation/foundation.topbar.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '305012'}, {'name': 'HTML', 'bytes': '26587'}, {'name': 'JavaScript', 'bytes': '210'}, {'name': 'Ruby', 'bytes': '87863'}, {'name': 'Shell', 'bytes': '617'}]}
/** * Measure Selector Handler */ define(["./datasourcealias"], function () { /** * Create UI5 Extension */ org.scn.community.aps.ComplexItem.extend("org.scn.community.aps.DataSelection2", { metadata : {}, /* * Overrides parent */ hLabel : function (label, component, tt) { if (component instanceof org.scn.community.aps.ColorBuilder) { return component; } else { var hLayout = new sap.ui.commons.layout.HorizontalLayout({}); hLayout.addContent(new sap.ui.commons.Label({ text : label, tooltip : tt, width : "100px" })); hLayout.addContent(component); return hLayout; } }, _config : {}, setValue : function (value) { var deltas = ["alias"]; var oldValues = []; for (var i = 0; i < deltas.length; i++) { oldValues.push(this.getValue()[deltas[i]]); } org.scn.community.aps.ComplexItem.prototype.setValue.apply(this, arguments); var changed = false; for (var i = 0; i < deltas.length; i++) { if (oldValues[i] != this.getValue()[deltas[i]]) changed = true; } if (changed) { this.makeLayout(); this.layoutComponents(); } }, createComponents : function () { try { this._props = { alias : { opts : { desc : "Data Source Alias", apsControl : "datasourcealias" } }, selection : { handler : { serialize : true, setter : function(property, value){ this["cmp_selection"].setTooltip(JSON.stringify(value));}, getter : function(property, control){ }, createComponent : function (property, propertyOptions, changeHandler) { var component = new sap.ui.commons.Button({ icon : "sap-icon://database" }); component.attachPress(function (e) { var o = JSON.parse(JSON.stringify(this.getValue())); var newSelection = ds_openDataSelectionDialog(o.alias, JSON.stringify(o.selection)); try{ var ns = JSON.parse(newSelection); if(ns) { o.selection = ns; this.setValue(o); this.fireValueChange(); // This doesn't work for SDK components. // com.sap.ip.bi.zen.ui_16.0.5.jar - com.sap.ip.bi.zen.ui.internal.view.additionalproperties.AdditionalPropertyView // GetDataJsonFunction checks if control is an instanceof IZenUiQueryReferenceHelper :( var r = ds_getDataJSON("DS_1", "", "includeMetadata","true", "fillMetadataProperty","true", "includeData","true", "includeAttributes", "true", "includeAxesTuples","true", "includeTuples","true" ); alert(r); } }catch(e){ alert("Data Selection invalid.\n\n" + e); } }, this); return component; } }, opts : { desc : "Data Selection", apsControl : "text" } } };/* this.tooltips = { alias : "Data Source Alias", selection : "Data Selection" }; this.cmps.alias = new org.scn.community.aps.DataSourceAlias({}); this.cmps.selection = new sap.ui.commons.Button({ icon : "sap-icon://database" }); this.cmps.alias.attachChange(function (e) { var o = JSON.parse(JSON.stringify(this.getValue())); o.alias = e.getSource().getSelectedKey(); this.setValue(o); }, this); this.cmps.selection.attachPress(function (e) { var o = JSON.parse(JSON.stringify(this.getValue())); var newSelection = ds_openDataSelectionDialog(o.alias, JSON.stringify(o.selection)); try{ var ns = JSON.parse(newSelection); if(ns) { o.selection = ns; this.setValue(o); // This doesn't work for SDK components. // com.sap.ip.bi.zen.ui_16.0.5.jar - com.sap.ip.bi.zen.ui.internal.view.additionalproperties.AdditionalPropertyView // GetDataJsonFunction checks if control is an instanceof IZenUiQueryReferenceHelper :( var r = ds_getDataJSON("DS_1", "", "includeMetadata","true", "fillMetadataProperty","true", "includeData","true", "includeAttributes", "true", "includeAxesTuples","true", "includeTuples","true" ); alert(r); } }catch(e){ alert("Data Selection invalid.\n\n" + e); } }, this); */ this.makeLayout(); this.layoutComponents(); } catch (e) { alert(e); } }, makeLayout : function () { this.layout = []; this.layout.push({ desc : "Data Source", comp : "alias" }); this.layout.push({ desc : "Data Selection", comp : "selection" }); }, renderer : {} }); return { id : "dataselection2.0", serialized : true, setter : function (property, value) { var newValue = jQuery.parseJSON(value); this["cmp_" + property].setValue(newValue); }, getter : function (property, control) { var arrayValue = control.getValue(); newValue = JSON.stringify(arrayValue); return newValue; }, createComponent : function (property, propertyOptions, changeHandler) { var component = new org.scn.community.aps.DataSelection2({ width : "100%", title : new sap.ui.commons.Title({ text : propertyOptions.desc }), showCollapseIcon : false }); component.attachValueChange(changeHandler, this); return component; } }; });
{'content_hash': '5e25d0177d0c870a9dcc556cf2ebc87a', 'timestamp': '', 'source': 'github', 'line_count': 180, 'max_line_length': 126, 'avg_line_length': 31.016666666666666, 'alnum_prop': 0.5660039405337632, 'repo_name': 'org-scn-design-studio-community/lumiradesignercommunityext_src', 'id': '81f951e84b62cf5fd2b21b18ee12420c689167c9', 'size': '5583', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'legacy_src/org.scn.community.shared/aps/dataselection2.0.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '27333'}, {'name': 'CSS', 'bytes': '2639483'}, {'name': 'HTML', 'bytes': '162729'}, {'name': 'Java', 'bytes': '197833'}, {'name': 'JavaScript', 'bytes': '13143865'}, {'name': 'Shell', 'bytes': '443'}, {'name': 'XSLT', 'bytes': '552'}]}
package com.emitrom.touch4j.charts.client; import com.emitrom.touch4j.charts.client.laf.ToolTipRenderer; import com.emitrom.touch4j.client.core.JsObject; import com.emitrom.touch4j.client.core.JsoHelper; import com.google.gwt.core.client.JavaScriptObject; /** * A tooltip to the visualization's markers for charts * */ public class ToolTip extends JsObject { public ToolTip() { jsObj = JsoHelper.createObject(); } ToolTip(JavaScriptObject obj) { jsObj = obj; } /** * True to have the tooltip follow the mouse as it moves over the target * element. * * @param value */ public void setTrackMouse(boolean value) { JsoHelper.setAttribute(jsObj, "trackMouse", value); } public boolean trackMouse() { return JsoHelper.getAttributeAsBoolean(jsObj, "trackMouse"); } public void setWidth(double value) { JsoHelper.setAttribute(jsObj, "width", value); } public double getWidth() { return JsoHelper.getAttributeAsDouble(jsObj, "width"); } public void setHeight(double value) { JsoHelper.setAttribute(jsObj, "height", value); } public double getHeight() { return JsoHelper.getAttributeAsDouble(jsObj, "height"); } public native void setRenderer(ToolTipRenderer renderer)/*-{ var jso = [email protected]::getJsObj()(); jso.renderer = function(sroteItem, item) { var model = @com.emitrom.touch4j.client.data.BaseModel::new(Lcom/google/gwt/core/client/JavaScriptObject;)(storeItem); var chartItem = @com.emitrom.touch4j.charts.client.interactions.ChartItem::new(Lcom/google/gwt/core/client/JavaScriptObject;)(item); [email protected]::onRender(Lcom/emitrom/touch4j/client/data/BaseModel;Lcom/emitrom/touch4j/charts/client/interactions/ChartItem;)(model, chartItem); }; }-*/; public void setAnchor(String value) { JsoHelper.setAttribute(jsObj, "anchor", value); } public void setAnchorOffset(double value) { JsoHelper.setAttribute(jsObj, "anchorOffset", value); } public void setAnchorToTarget(boolean value) { JsoHelper.setAttribute(jsObj, "anchorToTarget", value); } public void setAntoHide(boolean value) { JsoHelper.setAttribute(jsObj, "autoHide", value); } public void setDismissDelay(int value) { JsoHelper.setAttribute(jsObj, "dissmissDelay", value); } public void hideDelay(int value) { JsoHelper.setAttribute(jsObj, "hideDelay", value); } public void setShowDelay(double value) { JsoHelper.setAttribute(jsObj, "showDelay", value); } }
{'content_hash': '55f777778a941a81e999776e1826374b', 'timestamp': '', 'source': 'github', 'line_count': 90, 'max_line_length': 198, 'avg_line_length': 31.22222222222222, 'alnum_prop': 0.6669039145907474, 'repo_name': 'paulvi/touch4j', 'id': '0514e7af90307b8f4bb9ac1fb2aa0614c879065c', 'size': '3600', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/com/emitrom/touch4j/charts/client/ToolTip.java', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
var fs = require('fs'); fs.readFile('./a.txt',{encoding:"UTF8"},function(err,data){ if(err) throw err; console.log(data); });
{'content_hash': 'e3bed2a56da931e2dc50e29166da4565', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 59, 'avg_line_length': 26.6, 'alnum_prop': 0.6165413533834586, 'repo_name': 'ldjking/wbscreen', 'id': '41c5b7b93985c962d0b0dd078f95cf542feaf457', 'size': '133', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'web/study/node.js/file/read.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2372081'}, {'name': 'JavaScript', 'bytes': '4614176'}, {'name': 'LiveScript', 'bytes': '6103'}]}
[?php require_once(dirname(__FILE__).'/../lib/Base<?php echo ucfirst($this->moduleName) ?>GeneratorConfiguration.class.php'); require_once(dirname(__FILE__).'/../lib/Base<?php echo ucfirst($this->moduleName) ?>GeneratorHelper.class.php'); /** * <?php echo $this->getModuleName() ?> actions. * * @package ##PROJECT_NAME## * @subpackage <?php echo $this->getModuleName()."\n" ?> * @author ##AUTHOR_NAME## * @version SVN: $Id: actions.class.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $ */ abstract class <?php echo $this->getGeneratedModuleName() ?>Actions extends <?php echo $this->getActionsBaseClass()."\n" ?> { public function preExecute() { $this->configuration = new <?php echo $this->getModuleName() ?>GeneratorConfiguration(); if (!$this->getUser()->hasCredential($this->configuration->getCredentials($this->getActionName()))) { $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action')); } $this->dispatcher->notify(new sfEvent($this, 'admin.pre_execute', array('configuration' => $this->configuration))); $this->helper = new <?php echo $this->getModuleName() ?>GeneratorHelper(); $route_options = $this->getRoute()->getOptions(); $skip = array('new', 'create', 'update'); if (isset($route_options['type']) && $route_options['type'] == 'object' && !in_array($this->getActionName(), $skip)) { $method = sfInflector::camelize('can_'.$this->getActionName()); if (method_exists($this->getRoute()->getObject(), $method) && !call_user_func(array($this->getRoute()->getObject(), $method), $this->getUser())) { $verb = strtolower(sfInflector::humanize($this->getActionName())); $verb .= (substr($verb, -1) == 'e') ? 'd' : 'ed'; $this->getUser()->setFlash('error', "The item cannot be $verb."); $this->redirect('@<?php echo $this->getUrlForAction('list') ?>'); } } } <?php include dirname(__FILE__).'/../../parts/actions/indexAction.php' ?> <?php if ($this->configuration->hasFilterForm()): ?> <?php include dirname(__FILE__).'/../../parts/actions/filterAction.php' ?> <?php endif; ?> <?php include dirname(__FILE__).'/../../parts/actions/newAction.php' ?> <?php include dirname(__FILE__).'/../../parts/actions/createAction.php' ?> <?php include dirname(__FILE__).'/../../parts/actions/editAction.php' ?> <?php include dirname(__FILE__).'/../../parts/actions/updateAction.php' ?> <?php include dirname(__FILE__).'/../../parts/actions/deleteAction.php' ?> <?php include dirname(__FILE__).'/../../parts/actions/showAction.php' ?> <?php if ($this->configuration->getValue('list.batch_actions')): ?> <?php include dirname(__FILE__).'/../../parts/actions/batchAction.php' ?> <?php endif; ?> <?php include dirname(__FILE__).'/../../parts/actions/processFormAction.php' ?> <?php if ($this->configuration->hasFilterForm()): ?> <?php include dirname(__FILE__).'/../../parts/actions/filtersAction.php' ?> <?php endif; ?> <?php include dirname(__FILE__).'/../../parts/actions/paginationAction.php' ?> <?php include dirname(__FILE__).'/../../parts/actions/sortingAction.php' ?> }
{'content_hash': 'da3e59c7daf541e56d7572348c979385', 'timestamp': '', 'source': 'github', 'line_count': 75, 'max_line_length': 150, 'avg_line_length': 41.89333333333333, 'alnum_prop': 0.6282622533418205, 'repo_name': 'Symfony-Plugins/pmDoctrineGeneratorPlugin', 'id': 'f9c7d8a13e9395ead92961f22c0af3113dd0d9ab', 'size': '3142', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'data/generator/sfDoctrineModule/basic/template/actions/actions.class.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '70490'}]}
package nl.dead_pixel.telebot.interfaces; /** * The interface Response type. */ public interface IResponseType { }
{'content_hash': '5c01137ee67aa2a55e4a14dd51e5978e', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 41, 'avg_line_length': 13.333333333333334, 'alnum_prop': 0.725, 'repo_name': 'iSDP/Telebot', 'id': '7656cfea7a3aeb4b0c8bd91df86583ed4168de2b', 'size': '809', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/nl/dead_pixel/telebot/interfaces/IResponseType.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '194946'}]}
import IBuffer from "../../interface/IBuffer"; import RGBA from "../../data/RGBA"; import Rectangle from "../../geom/Rectangle"; /** * Creates a Canvas element of the given size. * * @class CanvasBuffer * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas */ export class CanvasBuffer implements IBuffer { /** * The Canvas object that belongs to this CanvasBuffer. * * @member {HTMLCanvasElement} */ public domElement:HTMLCanvasElement; public context:CanvasRenderingContext2D; protected _transparent:boolean; protected _backgroundColor:string; protected _width:number; protected _height:number; protected _quality:string = null; constructor(width:number, height:number, options:ICanvasBufferOptions = { domElement: <HTMLCanvasElement> document.createElement('canvas'), transparent:true, backgroundColor:'#000000' }) { if(!options.transparent && !options.backgroundColor) { throw new Error('options.backgroundColor is requered when transparent is false'); } this._transparent = options.transparent; this._backgroundColor = options.backgroundColor; this.domElement = options.domElement; this.context = <CanvasRenderingContext2D> this.domElement.getContext('2d', {alpha: this._transparent}); this.setSize(width, height); } set width(value:number) { this._width = value; this.domElement.width = value; this.setQuality(this._quality); } get width():number { return this._width; } set height(value:number) { this._height = value; this.domElement.height = value; this.setQuality(this._quality); } get height():number { return this._height; } public draw(ctx:CanvasRenderingContext2D, ignoreCache?:boolean):void { var w = this._width, h = this._height; ctx.drawImage(this.domElement, 0, 0, w, h, 0, 0, w, h); } public reset():void { this.context.setTransform(1, 0, 0, 1, 0, 0); this.clear(); } public clear():void { if(this._transparent) { this.context.clearRect(0, 0, this._width, this._height); } else { this.context.fillStyle = this._backgroundColor; this.context.fillRect(0, 0, this._width, this._height); } } /** * @method toDataURL * @param backgroundColor * @param mimeType The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image. * @param quality Quality of the image 0.1 low, 1.0 high * @returns {string} */ public toDataURL(backgroundColor?:string, mimeType:string = "image/png", quality:number = 1.0):string { var ctx = this.getContext(); var w = this.width; var h = this.height; var data; if(backgroundColor) { //get the current ImageData for the canvas. data = ctx.getImageData(0, 0, w, h); //store the current globalCompositeOperation var compositeOperation = ctx.globalCompositeOperation; //set to draw behind current content ctx.globalCompositeOperation = "destination-over"; //set background color ctx.fillStyle = backgroundColor; //draw background on entire canvas ctx.fillRect(0, 0, w, h); } //get the image data from the canvas var dataURL = this.domElement.toDataURL(mimeType, quality); if(backgroundColor) { //clear the canvas ctx.clearRect(0, 0, w + 1, h + 1); //restore it with original settings ctx.putImageData(data, 0, 0); //reset the globalCompositeOperation to what it was ctx.globalCompositeOperation = compositeOperation; } return dataURL; } /** * * @returns {Rectangle} */ public getImageData(x:number = 0, y:number = 0, width:number = this._width, height:number = this._height):ImageData { return this.context.getImageData(x, y, width, height); } /** * * @returns {Rectangle} */ public getDrawBounds():Rectangle { var width = Math.ceil(this.width); var height = Math.ceil(this.height); var pixels = this.getImageData(); var data = pixels.data, x0 = width, y0 = height, x1 = 0, y1 = 0; for(var i = 3, l = data.length, p = 0; i < l; i += 4, ++p) { var px = p % width; var py = Math.floor(p / width); if(data[i - 3] > 0 || data[i - 2] > 0 || data[i - 1] > 0 || data[i] > 0) { x0 = Math.min(x0, px); y0 = Math.min(y0, py); x1 = Math.max(x1, px); y1 = Math.max(y1, py); } } return new Rectangle(x0, y0, x1 - x0, y1 - y0); } public getContext():CanvasRenderingContext2D { return this.context; } /** * * @param width * @param height */ public setSize(width:number, height:number):void { this.domElement.width = this._width = width; this.domElement.height = this._height = height; this.setQuality(this._quality); } /** * @method setQuality * @param {string} name */ public setQuality(name:string):void { var ctx = this.context; switch(name) { case 'low': { this._quality = name; ctx['mozImageSmoothingEnabled'] = false; ctx['webkitImageSmoothingEnabled'] = false; ctx['msImageSmoothingEnabled'] = false; ctx['imageSmoothingEnabled'] = false; break; } case 'normal': { this._quality = name; ctx['mozImageSmoothingEnabled'] = true; ctx['webkitImageSmoothingEnabled'] = true; ctx['msImageSmoothingEnabled'] = true; ctx['imageSmoothingEnabled'] = true; break; } } } /** * */ public destruct():void { this.context = null; this.domElement = null; } } export interface ICanvasBufferOptions { domElement:HTMLCanvasElement; transparent:boolean; backgroundColor?:string; }
{'content_hash': 'ee24de66c69d52adb79441b4b82edb4b', 'timestamp': '', 'source': 'github', 'line_count': 260, 'max_line_length': 153, 'avg_line_length': 21.515384615384615, 'alnum_prop': 0.6657132642116553, 'repo_name': 'mientjan/EaselTS', 'id': 'a3a51c069b9785012b714e493fdec885b72c6c69', 'size': '5594', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/easelts/renderer/buffer/CanvasBuffer.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '678959'}, {'name': 'TypeScript', 'bytes': '870179'}]}
from django.db import models from users.models import User # Create your models here. class Location(models.Model): user = models.OneToOneField(User) latitude = models.DecimalField(max_digits=10, decimal_places=6) longitude = models.DecimalField(max_digits=10, decimal_places=6) travel_distance = models.IntegerField(default=0, blank=True, null=True)
{'content_hash': '86b2a04a0ce282e7511b9dcbdda9bd9e', 'timestamp': '', 'source': 'github', 'line_count': 14, 'max_line_length': 75, 'avg_line_length': 26.642857142857142, 'alnum_prop': 0.7506702412868632, 'repo_name': 'jimfmunro/djangodash2013', 'id': '19f129d5c8f9030dde74783d94bf70de3e328dd5', 'size': '373', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'dash/search/models.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '13769'}, {'name': 'JavaScript', 'bytes': '16495'}, {'name': 'Python', 'bytes': '59593'}, {'name': 'Shell', 'bytes': '5083'}]}
<html> <!-- Mirrored from www.sekolahkoding.com/forum/tag/dll. by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 18 Mar 2016 10:48:41 GMT --> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack --> <head> <title>Forum dll di - Sekolah Koding </title> <meta charset="UTF-8"> <meta name="description" content="Forum dll indonesia, diskusi seputar web development, programming dan design di sini. SekolahKoding, tempat belajar web development online"> <meta name="keywords" content="forum,dll,indonesia,html,bahasa,belajar,tutorial,css,javascript,java,photshop,illustrator"> <meta name="author" content="SekolahKoding"> <link rel="stylesheet" href="../../user/css/main-app.css" charset="utf-8"> <script src="../../../code.jquery.com/jquery-2.1.3.min.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link rel="icon" href="../../favicon.ico" type="image/x-icon" /> <!-- for facebook graph--> <meta property="og:title" content="Forum Sekolah Koding"> <meta property="og:image" content="/asset/blue-logo.png"> <meta property="og:description" content="Forum dll indonesia, diskusi seputar web development, programming dan design di sini. SekolahKoding, tempat belajar web development online"> </head> <body class="body-class"> <script> (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-59878621-1', 'auto'); ga('send', 'pageview'); </script> <div id="page-wrapper"> <div id="menu_left_back"></div> <div id="menu_left" class="menu_forum"> <div id="menu_title"> <h2><a href="../../forum.html">Forum SekolahKoding</a></h2> <h3> Buka pintu ilmu pengetahuan dengan kunci pertanyaan </h3> </div> <div id="menu_left_bottom"> <a href="../../upacara.html"><li> <img src="../../asset/upacara-icon.png" alt="" /> Upacara </li></a> <a href="../../forum.html"><li> <img src="../../asset/forum-icon.png" alt="" /> Forum</li></a> <a href="../../perpustakaan.html"><li> <img src="../../asset/perpus-icon.png" alt="" /> Perpustakaan </li></a> <a href="../../kelas/index.html"><li> <img src="../../asset/kelas-icon.png" alt="" /> Kelas </li></a> <a href="../../perjalanan.html"><li> <img src="../../asset/jejak-icon.png" alt="" /> Perjalanan </li></a> <a href="../../member.html"><li> <img src="../../asset/member-icon.png" alt="" /> Member </li></a> <!-- <a href="/syarat"> <li> <img src="/asset/donasi-icon.png" alt="" /> Syarat </li></a> --> </div> <div class="top_user"> <h3>Poin Terbanyak</h3> <a class="each_top_user" href="../../user/profile/immeng.html"> <div class=""> @Immeng (72)</div> </a> <a class="each_top_user" href="../../user/profile/paulpogba.html"> <div class=""> @Paulpogba (55)</div> </a> <a class="each_top_user" href="../../user/profile/Saputroandhi.html"> <div class=""> @Saputroandhi (48)</div> </a> <a class="each_top_user" href="../../user/profile/ardyhim.html"> <div class=""> @Ardyhim (35)</div> </a> <a class="each_top_user" href="../../user/profile/hilmanrdn.html"> <div class=""> @Hilmanrdn (28)</div> </a> <a class="each_top_user" href="../../user/profile/sekolahkoding.html"> <div class=""> @Sekolahkoding (23)</div> </a> <a class="each_top_user" href="../../user/profile/frans.html"> <div class=""> @Frans (20)</div> </a> <a class="each_top_user" href="../../user/profile/username.html"> <div class=""> @Username (16)</div> </a> <a class="each_top_user" href="../../user/profile/knightofgray.html"> <div class=""> @Knightofgray (15)</div> </a> <a class="each_top_user" href="../../user/profile/ronaidea.html"> <div class=""> @Ronaidea (11)</div> </a> </div> <div class="clear"></div> <div class="top_user"> <h3>Kontribusi Terbanyak</h3> <a class="each_top_user" href="../../user/profile/hilmanrdn.html"> <div class=""> @Hilmanrdn (273)</div> </a> <a class="each_top_user" href="../../user/profile/Saputroandhi.html"> <div class=""> @Saputroandhi (242)</div> </a> <a class="each_top_user" href="../../user/profile/paulpogba.html"> <div class=""> @Paulpogba (224)</div> </a> <a class="each_top_user" href="../../user/profile/immeng.html"> <div class=""> @Immeng (210)</div> </a> <a class="each_top_user" href="../../user/profile/fadhil.html"> <div class=""> @Fadhil (126)</div> </a> <a class="each_top_user" href="../../user/profile/cescgie.html"> <div class=""> @Cescgie (105)</div> </a> <a class="each_top_user" href="../../user/profile/frans.html"> <div class=""> @Frans (91)</div> </a> <a class="each_top_user" href="../../user/profile/ardyhim.html"> <div class=""> @Ardyhim (86)</div> </a> <a class="each_top_user" href="../../user/profile/knightofgray.html"> <div class=""> @Knightofgray (86)</div> </a> <a class="each_top_user" href="../../user/profile/username.html"> <div class=""> @Username (70)</div> </a> </div> <div class="clear"></div> <div class="top_user"> <!-- <h3>Aktivitas Terakhir</h3> --> </div> <br> <div id="halalad_companion_ad_div_TGKcTDQBBfRZZhEVEHgq5Rb3v2U=dhbdsljhbdDjTchvMzkx" style="display: none;"> <script id="widget_lib_TGKcTDQBBfRZZhEVEHgq5Rb3v2U=dhbdsljhbdDjTchvMzkx" src="../../../www.halal.ad/assets/javascripts/publisher/widgets/had_widget_lib.js" async></script> <script id="widget_formatter_TGKcTDQBBfRZZhEVEHgq5Rb3v2U=dhbdsljhbdDjTchvMzkx" type="text/javascript" src="../../../www.halal.ad/assets/javascripts/publisher/widgets/widget_300_250.js" async></script> <iframe id="halalad_ads_frame_TGKcTDQBBfRZZhEVEHgq5Rb3v2U=dhbdsljhbdDjTchvMzkx" style="display : block ;" name="halalad_ads_frame" target-domain="https://www.halal.ad" width="0" height="0" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true"> </iframe> <script src="https://www.halal.ad/getWidgetBootstrap?widgetToken=TGKcTDQBBfRZZhEVEHgq5Rb3v2U=dhbdsljhbdDjTchvMzkx" async></script> </div> </div><!-- end menu_left --> <div id="main_wrapper" class="main_forum"> <div id="menu-top-profil"> <div id="blue-logo"> <a href="../../user.html"><img src="../../../sekolahkoding.com/asset/blue-logo.png" alt=""/></a> </div> <ul> <li class="login"><a href="../../user/login.html">Masuk</a></li> <li><a href="../../user.html">Profil</a></li> <li><a href="../../kelas/index.html">Kelas</a></li> <li> <!-- notifikasi --> <!-- end of notifikasi --> </li> </ul> <!-- sweetalert--> <script src="../../../sekolahkoding.com/user/js/sweetalert-dev.js"></script> <link rel="stylesheet" href="../../../sekolahkoding.com/user/js/sweetalert.css"> <script> $(document).ready(function() { $(".logout").on('click',function(){ swal({ title: "Yakin mau keluar?", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Keluar", cancelButtonText: "Batal", closeOnConfirm: false },function(response){ if(response == true){ $url = '../../index.html'; $data = { args : 'logout' } $.post($url, $data).done(function(){ swal("Sampai jumpa!", "istirahat ya.."); setTimeout(keluar, 1500) }); function keluar() { window.location.href = "../../user/login.html"; } } }); return false; }); }); //end jquery doc ready </script> </div> <div class="title_content"> <h1> Aktivitas Terakhir Forum | dll | </h1> </div> <div class="content"> <div id="create_forum"> <a href="../../user.html"><span>Tanya ✎</span></a> </div> <div id="filter_populer" class="filter_forum" value="populer" style="display:none;"> <span>Populer</span> </div> <div id="filter_noanswer" class="filter_forum" value="belum-terjawab"> <span>Belum terjawab</span> </div> <!-- <div class="clear_on_sp"></div> --> <!-- <a href="#" class="toggle"> Topik Forum</a> <div id="forum_cat_list" class="daftar_umum"> </div> --> <select name="daftar_pelajaran" id="select_daftar_pelajaran"> <option class="option_pelajaran" value="/forum">Semua Topik</option> <option class="option_pelajaran" value="/forum/tag/html" > Html </option> <option class="option_pelajaran" value="/forum/tag/css" > Css </option> <option class="option_pelajaran" value="/forum/tag/javascript" > Javascript </option> <option class="option_pelajaran" value="/forum/tag/database" > Database </option> <option class="option_pelajaran" value="/forum/tag/php" > Php </option> <option class="option_pelajaran" value="/forum/tag/ruby" > Ruby </option> <option class="option_pelajaran" value="/forum/tag/design" > Design </option> <option class="option_pelajaran" value="/forum/tag/java" > Java </option> <option class="option_pelajaran" value="/forum/tag/tool" > Tool </option> <option class="option_pelajaran" value="/forum/tag/bebas" > Bebas </option> <option class="option_pelajaran" value="/forum/tag/blog" > Blog </option> <option class="option_pelajaran" value="/forum/tag/android" > Android </option> <option class="option_pelajaran" value="/forum/tag/google" > Google </option> <option class="option_pelajaran" value="/forum/tag/yahoo" > Yahoo </option> <option class="option_pelajaran" value="/forum/tag/eclipse" > Eclipse </option> <option class="option_pelajaran" value="/forum/tag/hosting" > Hosting </option> <option class="option_pelajaran" value="/forum/tag/wordpress" > Wordpress </option> <option class="option_pelajaran" value="/forum/tag/codeigniter" > Codeigniter </option> <option class="option_pelajaran" value="/forum/tag/cms" > Cms </option> <option class="option_pelajaran" value="/forum/tag/web" > Web </option> <option class="option_pelajaran" value="/forum/tag/mysql" > Mysql </option> <option class="option_pelajaran" value="/forum/tag/crud" > Crud </option> <option class="option_pelajaran" value="/forum/tag/jquery" > Jquery </option> <option class="option_pelajaran" value="/forum/tag/angularjs" > Angularjs </option> <option class="option_pelajaran" value="/forum/tag/analytics" > Analytics </option> <option class="option_pelajaran" value="/forum/tag/session" > Session </option> <option class="option_pelajaran" value="/forum/tag/code" > Code </option> <option class="option_pelajaran" value="/forum/tag/dll" selected > Dll </option> <option class="option_pelajaran" value="/forum/tag/convert" > Convert </option> <option class="option_pelajaran" value="/forum/tag/decimal" > Decimal </option> <option class="option_pelajaran" value="/forum/tag/ke" > Ke </option> <option class="option_pelajaran" value="/forum/tag/binary" > Binary </option> <option class="option_pelajaran" value="/forum/tag/laravel" > Laravel </option> <option class="option_pelajaran" value="/forum/tag/html5" > Html5 </option> <option class="option_pelajaran" value="/forum/tag/gamification" > Gamification </option> <option class="option_pelajaran" value="/forum/tag/rewardable" > Rewardable </option> <option class="option_pelajaran" value="/forum/tag/nodejs" > Nodejs </option> <option class="option_pelajaran" value="/forum/tag/photoshop" > Photoshop </option> <option class="option_pelajaran" value="/forum/tag/c" > C </option> <option class="option_pelajaran" value="/forum/tag/assembly" > Assembly </option> <option class="option_pelajaran" value="/forum/tag/button" > Button </option> <option class="option_pelajaran" value="/forum/tag/Rails" > Rails </option> <option class="option_pelajaran" value="/forum/tag/oracle" > Oracle </option> <option class="option_pelajaran" value="/forum/tag/ css" > css </option> <option class="option_pelajaran" value="/forum/tag/ php" > php </option> <option class="option_pelajaran" value="/forum/tag/framework" > Framework </option> <option class="option_pelajaran" value="/forum/tag/tanya" > Tanya </option> <option class="option_pelajaran" value="/forum/tag/cara" > Cara </option> <option class="option_pelajaran" value="/forum/tag/ajax" > Ajax </option> <option class="option_pelajaran" value="/forum/tag/json" > Json </option> <option class="option_pelajaran" value="/forum/tag/easyui" > Easyui </option> <option class="option_pelajaran" value="/forum/tag/pemula" > Pemula </option> <option class="option_pelajaran" value="/forum/tag/table" > Table </option> <option class="option_pelajaran" value="/forum/tag/lukajiwa" > Lukajiwa </option> <option class="option_pelajaran" value="/forum/tag/form" > Form </option> <option class="option_pelajaran" value="/forum/tag/ang" > Ang </option> <option class="option_pelajaran" value="/forum/tag/koding" > Koding </option> <option class="option_pelajaran" value="/forum/tag/HTM" > HTM </option> <option class="option_pelajaran" value="/forum/tag/ semua topik" > semua topik </option> <option class="option_pelajaran" value="/forum/tag/xampp" > Xampp </option> <option class="option_pelajaran" value="/forum/tag/hardware" > Hardware </option> <option class="option_pelajaran" value="/forum/tag/santai" > Santai </option> <option class="option_pelajaran" value="/forum/tag/array" > Array </option> <option class="option_pelajaran" value="/forum/tag/netbeans" > Netbeans </option> <option class="option_pelajaran" value="/forum/tag/responsive" > Responsive </option> <option class="option_pelajaran" value="/forum/tag/kritik&amp;saran" > Kritik&amp;saran </option> <option class="option_pelajaran" value="/forum/tag/website" > Website </option> <option class="option_pelajaran" value="/forum/tag/hml" > Hml </option> <option class="option_pelajaran" value="/forum/tag/saran" > Saran </option> <option class="option_pelajaran" value="/forum/tag/belajar" > Belajar </option> <option class="option_pelajaran" value="/forum/tag/random" > Random </option> <option class="option_pelajaran" value="/forum/tag/CI" > CI </option> <option class="option_pelajaran" value="/forum/tag/bootstrap" > Bootstrap </option> <option class="option_pelajaran" value="/forum/tag/terimakasih" > Terimakasih </option> <option class="option_pelajaran" value="/forum/tag/editor" > Editor </option> <option class="option_pelajaran" value="/forum/tag/texteditor" > Texteditor </option> <option class="option_pelajaran" value="/forum/tag/notepad++" > Notepad++ </option> <option class="option_pelajaran" value="/forum/tag/mysqli" > Mysqli </option> <option class="option_pelajaran" value="/forum/tag/oop" > Oop </option> <option class="option_pelajaran" value="/forum/tag/localhost" > Localhost </option> <option class="option_pelajaran" value="/forum/tag/phpmyadmin" > Phpmyadmin </option> <option class="option_pelajaran" value="/forum/tag/tipsdantrik" > Tipsdantrik </option> <option class="option_pelajaran" value="/forum/tag/semua" > Semua </option> <option class="option_pelajaran" value="/forum/tag/cookies" > Cookies </option> <option class="option_pelajaran" value="/forum/tag/footer" > Footer </option> <option class="option_pelajaran" value="/forum/tag/chrome" > Chrome </option> <option class="option_pelajaran" value="/forum/tag/phonegap" > Phonegap </option> <option class="option_pelajaran" value="/forum/tag/frontend" > Frontend </option> <option class="option_pelajaran" value="/forum/tag/backend" > Backend </option> <option class="option_pelajaran" value="/forum/tag/webdeveloper" > Webdeveloper </option> <option class="option_pelajaran" value="/forum/tag/.htaccess" > .htaccess </option> <option class="option_pelajaran" value="/forum/tag/umum" > Umum </option> <option class="option_pelajaran" value="/forum/tag/scss" > Scss </option> <option class="option_pelajaran" value="/forum/tag/vb" > Vb </option> <option class="option_pelajaran" value="/forum/tag/pengalaman" > Pengalaman </option> <option class="option_pelajaran" value="/forum/tag/otodidak" > Otodidak </option> <option class="option_pelajaran" value="/forum/tag/curhat" > Curhat </option> <option class="option_pelajaran" value="/forum/tag/facebook" > Facebook </option> <option class="option_pelajaran" value="/forum/tag/mvc" > Mvc </option> <option class="option_pelajaran" value="/forum/tag/EclipseError" > EclipseError </option> <option class="option_pelajaran" value="/forum/tag/upload" > Upload </option> <option class="option_pelajaran" value="/forum/tag/pdo" > Pdo </option> <option class="option_pelajaran" value="/forum/tag/file" > File </option> <option class="option_pelajaran" value="/forum/tag/js" > Js </option> <option class="option_pelajaran" value="/forum/tag/dreamweaver" > Dreamweaver </option> <option class="option_pelajaran" value="/forum/tag/terminal" > Terminal </option> <option class="option_pelajaran" value="/forum/tag/oot" > Oot </option> <option class="option_pelajaran" value="/forum/tag/Bertanya" > Bertanya </option> <option class="option_pelajaran" value="/forum/tag/Algoritma" > Algoritma </option> <option class="option_pelajaran" value="/forum/tag/Pemrograman" > Pemrograman </option> <option class="option_pelajaran" value="/forum/tag/coding" > Coding </option> <option class="option_pelajaran" value="/forum/tag/tutorial" > Tutorial </option> <option class="option_pelajaran" value="/forum/tag/wert" > Wert </option> <option class="option_pelajaran" value="/forum/tag/javasc" > Javasc </option> <option class="option_pelajaran" value="/forum/tag/ubuntu" > Ubuntu </option> <option class="option_pelajaran" value="/forum/tag/mongoose" > Mongoose </option> <option class="option_pelajaran" value="/forum/tag/e-commerce" > E-commerce </option> <option class="option_pelajaran" value="/forum/tag/other" > Other </option> <option class="option_pelajaran" value="/forum/tag/googleapi" > Googleapi </option> <option class="option_pelajaran" value="/forum/tag/c++" > C++ </option> <option class="option_pelajaran" value="/forum/tag/mylog" > Mylog </option> <option class="option_pelajaran" value="/forum/tag/p" > P </option> <option class="option_pelajaran" value="/forum/tag/css3" > Css3 </option> <option class="option_pelajaran" value="/forum/tag/c#" > C# </option> <option class="option_pelajaran" value="/forum/tag/cc" > Cc </option> <option class="option_pelajaran" value="/forum/tag/aplikasi" > Aplikasi </option> <option class="option_pelajaran" value="/forum/tag/kok tidak ada yg men" > Kok tidak ada yg men </option> <option class="option_pelajaran" value="/forum/tag/aplikasi textmate" > Aplikasi textmate </option> <option class="option_pelajaran" value="/forum/tag/videoturorial" > Videoturorial </option> <option class="option_pelajaran" value="/forum/tag/ latihan bootsrta" > latihan bootsrta </option> <option class="option_pelajaran" value="/forum/tag/postgresql" > Postgresql </option> <option class="option_pelajaran" value="/forum/tag/alert" > Alert </option> <option class="option_pelajaran" value="/forum/tag/boostrap" > Boostrap </option> <option class="option_pelajaran" value="/forum/tag/landing-page" > Landing-page </option> <option class="option_pelajaran" value="/forum/tag/it" > It </option> <option class="option_pelajaran" value="/forum/tag/ kembali rp. " > kembali rp. </option> <option class="option_pelajaran" value="/forum/tag/all" > All </option> <option class="option_pelajaran" value="html.css.html" > Html.css.php </option> <option class="option_pelajaran" value="/forum/tag/ dll" > dll </option> <option class="option_pelajaran" value="/forum/tag/style" > Style </option> <option class="option_pelajaran" value="/forum/tag/.net" > .net </option> <option class="option_pelajaran" value="/forum/tag/asp.net (c#)" > Asp.net (c#) </option> <option class="option_pelajaran" value="/forum/tag/#browser" > #browser </option> <option class="option_pelajaran" value="/forum/tag/atom" > Atom </option> <option class="option_pelajaran" value="/forum/tag/security" > Security </option> <option class="option_pelajaran" value="/forum/tag/html css bootstrap j" > Html css bootstrap j </option> <option class="option_pelajaran" value="/forum/tag/htlm bootstrap css f" > Htlm bootstrap css f </option> <option class="option_pelajaran" value="/forum/tag/flashcs6" > Flashcs6 </option> <option class="option_pelajaran" value="/forum/tag/diphpin" > Diphpin </option> <option class="option_pelajaran" value="/forum/tag/filter" > Filter </option> <option class="option_pelajaran" value="/forum/tag/input" > Input </option> <option class="option_pelajaran" value="/forum/tag/os" > Os </option> <option class="option_pelajaran" value="/forum/tag/.dll" > .dll </option> <option class="option_pelajaran" value="/forum/tag/data" > Data </option> <option class="option_pelajaran" value="/forum/tag/ionic" > Ionic </option> <option class="option_pelajaran" value="/forum/tag/phpmail" > Phpmail </option> <option class="option_pelajaran" value="/forum/tag/sql" > Sql </option> <option class="option_pelajaran" value="/forum/tag/cmd" > Cmd </option> <option class="option_pelajaran" value="/forum/tag/dropdown" > Dropdown </option> <option class="option_pelajaran" value="/forum/tag/runtimeexception" > Runtimeexception </option> <option class="option_pelajaran" value="/forum/tag/direktori" > Direktori </option> <option class="option_pelajaran" value="/forum/tag/require_once" > Require_once </option> <option class="option_pelajaran" value="/forum/tag/filepath" > Filepath </option> <option class="option_pelajaran" value="/forum/tag/seo" > Seo </option> <option class="option_pelajaran" value="/forum/tag/phperror" > Phperror </option> <option class="option_pelajaran" value="/forum/tag/@registercodeigniter" > @registercodeigniter </option> <option class="option_pelajaran" value="/forum/tag/visualstudio" > Visualstudio </option> <option class="option_pelajaran" value="/forum/tag/api" > Api </option> <option class="option_pelajaran" value="/forum/tag/alur" > Alur </option> <option class="option_pelajaran" value="/forum/tag/innerjoin" > Innerjoin </option> <option class="option_pelajaran" value="/forum/tag/github" > Github </option> <option class="option_pelajaran" value="/forum/tag/video" > Video </option> <option class="option_pelajaran" value="/forum/tag/jekyll" > Jekyll </option> <option class="option_pelajaran" value="/forum/tag/error" > Error </option> <option class="option_pelajaran" value="/forum/tag/blogger" > Blogger </option> <option class="option_pelajaran" value="/forum/tag/ database" > database </option> <option class="option_pelajaran" value="/forum/tag/middleware laravel" > Middleware laravel </option> <option class="option_pelajaran" value="/forum/tag/update" > Update </option> <option class="option_pelajaran" value="/forum/tag/select" > Select </option> <option class="option_pelajaran" value="/forum/tag/option" > Option </option> <option class="option_pelajaran" value="/forum/tag/fatalerrorexception " > Fatalerrorexception </option> <option class="option_pelajaran" value="/forum/tag/paging" > Paging </option> <option class="option_pelajaran" value="/forum/tag/pagination" > Pagination </option> <option class="option_pelajaran" value="/forum/tag/fungsi" > Fungsi </option> <option class="option_pelajaran" value="/forum/tag/variable" > Variable </option> <option class="option_pelajaran" value="/forum/tag/query" > Query </option> <option class="option_pelajaran" value="/forum/tag/server" > Server </option> <option class="option_pelajaran" value="/forum/tag/5.1" > 5.1 </option> <option class="option_pelajaran" value="/forum/tag/magic" > Magic </option> <option class="option_pelajaran" value="/forum/tag/larave" > Larave </option> <option class="option_pelajaran" value="/forum/tag/domain" > Domain </option> <option class="option_pelajaran" value="/forum/tag/ hosting" > hosting </option> <option class="option_pelajaran" value="/forum/tag/keamanan" > Keamanan </option> <option class="option_pelajaran" value="/forum/tag/game" > Game </option> <option class="option_pelajaran" value="/forum/tag/login" > Login </option> <option class="option_pelajaran" value="/forum/tag/smartcity" > Smartcity </option> <option class="option_pelajaran" value="/forum/tag/androidprogramming" > Androidprogramming </option> <option class="option_pelajaran" value="/forum/tag/imacros" > Imacros </option> <option class="option_pelajaran" value="/forum/tag/root" > Root </option> <option class="option_pelajaran" value="/forum/tag/routingsystem" > Routingsystem </option> <option class="option_pelajaran" value="index.html" > Index.html </option> </select> <script type="text/javascript"> $(document).ready(function(){ //toggle for menu left var pull = $('.toggle'); menu = $('.daftar_umum'); menuHeight = menu.height(); $(pull).on('click', function(e) { e.preventDefault(); menu.slideToggle(); }); //dropdown change $('select[name="daftar_pelajaran"]').change(function() { window.location.replace($(this).val()); }); //oncklick $('#filter_populer').on('click', function(){ window.location.replace('../filter/populer.html'); }); //oncklick $('#filter_noanswer').on('click', function(){ window.location.replace('../filter/belum-terjawab.html'); }); //oncklick $('#filter_terupdate').on('click', function(){ window.location.replace('../filter/terupdate.html'); }); }); </script> <div id="search_forum"> <form action="https://www.sekolahkoding.com/forum" method="get"> <input type="search" name="cari" value="" placeholder="Cari Pertanyaan"> </form> </div> <div class="clear"></div> <div id="topic_wrapper"> <!-- _________________________ pengumuman di forum _________________________ --> <div class="each_topic"> <div class="pertanyaan"> <a href="../pertanyaan/Bagaimana-cara-beraktivitas-di-Forum-Sekolah-Koding.html">☕ Bagaimana cara beraktivitas di Forum Sekolah Koding (Baca sebelum bertanya) </a> </div> </div> <!-- _________________________ pengumuman di forum _________________________ --> <div class="each_topic" id="1027" last_activity="2016-03-13 02:01:02" last_activity_by ="1045" judul="bagaimana-cara-membuat-web"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/ups.png" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/bagaimana-cara-membuat-web.html"> bagaimana cara membuat web </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/lawan.html">lawan</a> <!-- | 1 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 5 hari yang lalu oleh @<a href="../../user/profile/Saputroandhi.html" style="color:#928A8A;font-weight:bold;">Saputroandhi</a> </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban "> 1 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 30 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="996" last_activity="2016-03-06 07:50:56" last_activity_by ="" judul="visual-basic-2010"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/11046788_911986278867834_6945530977196086425_n_1457246716.jpg" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/visual-basic-2010.html"> visual basic 2010 </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/raemaulana.html">raemaulana</a> <!-- | 1 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Diposting 12 hari yang lalu </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban jumlah_jawaban_kosong"> 0 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 24 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="888" last_activity="2016-02-19 15:16:52" last_activity_by ="10689" judul="sofware-yang-di-gunakan"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/ups.png" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/sofware-yang-di-gunakan.html"> sofware yang di gunakan </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/Young123.html">Young123</a> <!-- | 1 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 27 hari yang lalu oleh @<a href="../../user/profile/demaram.html" style="color:#928A8A;font-weight:bold;">demaram</a> </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban "> 2 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 61 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="855" last_activity="2016-02-17 10:44:37" last_activity_by ="11512" judul="mulai-dari-mana-belajarnya?"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/ups.png" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/mulai-dari-mana-belajarnya.html"> mulai dari mana belajarnya? </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/firdan.html">firdan</a> <!-- | 2 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 1 bulan yang lalu oleh @<a href="../../user/profile/firdan.html" style="color:#928A8A;font-weight:bold;">firdan</a> </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban "> 4 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 100 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="853" last_activity="2016-02-12 07:00:14" last_activity_by ="10151" judul="Bagaimana-cara-membuat-menu-sosial-media-di-website-?"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/ups.png" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/Bagaimana-cara-membuat-menu-sosial-media-di-website.html"> Bagaimana cara membuat menu sosial media di website ? </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/Roby.html">Roby</a> <!-- | 4 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 1 bulan yang lalu oleh @<a href="../../user/profile/Roby.html" style="color:#928A8A;font-weight:bold;">Roby</a> </div> <div class="tag_pertanyaan"> <span><a href="css.html">css</a></span> <span><a href="html.html">html</a></span> <span><a href="dll.html">dll</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban "> 3 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 72 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="823" last_activity="2016-02-10 10:40:23" last_activity_by ="6642" judul="Cara-menggunakan-CMD"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/Screenshot%20-%202_17_2016%20%2c%203_37_04%20PM.jpg" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/Cara-menggunakan-CMD.html"> Cara menggunakan CMD </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/fadhil.html">fadhil</a> <!-- | 126 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 1 bulan yang lalu oleh @<a href="../../user/profile/oketobali.html" style="color:#928A8A;font-weight:bold;">oketobali</a> </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> <span><a href="cmd.html">cmd</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban jumlah_jawaban_terjawab"> <div class='check_on_forum'>✔</div> 1 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 56 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="788" last_activity="2016-02-04 06:38:58" last_activity_by ="7978" judul="scroll-otomatis"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/Screenshot%20-%202_17_2016%20%2c%203_37_04%20PM.jpg" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/scroll-otomatis.html"> scroll otomatis </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/fadhil.html">fadhil</a> <!-- | 126 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 1 bulan yang lalu oleh @<a href="../../user/profile/immeng.html" style="color:#928A8A;font-weight:bold;">immeng</a> </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> <span><a href="pemula.html">pemula</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban "> 1 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 55 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> <div class="each_topic" id="774" last_activity="2016-02-04 02:48:02" last_activity_by ="7473" judul="Help-me-membuat-tampilan-frozen-saat-upload-data"> <div class="col-15"> <div class="pertanyaan_by_foto"> <img src="../../user/foto/IMG_4796.jpg" width=50 /> </div> </div> <div class="col-65"> <div class="pertanyaan"> <a href="../pertanyaan/Help-me-membuat-tampilan-frozen-saat-upload-data.html"> Help me membuat tampilan frozen saat upload data </a> </div> <div class="pertanyaan_by"> oleh @<a href="../../user/profile/arif90.html">arif90</a> <!-- | 48 kontribusi | --> </div> <div class="waktu_pertanyaan">|| Aktivitas terakhir 1 bulan yang lalu oleh @<a href="../../user/profile/arif90.html" style="color:#928A8A;font-weight:bold;">arif90</a> </div> <div class="tag_pertanyaan"> <span><a href="dll.html">dll</a></span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban "> 4 <span>Jawaban</span> </div> </div> <div class="col-10"> <div class="jumlah_jawaban"> 72 <span>kali dilihat</span> </div> </div> <div class="clear"></div> </div> <!-- end each_topic --> </div><!-- end topic wrapper --> <!-- ______________________Pagination______________________ --> <!-- ______________________Pagination______________________ --> <div class="load_more" id=""> Lihat Pertanyaan Sebelumnya </div> </div><!-- end content--> <div class="clear_h"></div> <div id="footer"> <span style="padding-left:10px;">&copy; 2016 <span>SekolahKoding</span></span> <div id="soc-med-menu"> <a target="_blank" href="https://twitter.com/sekolahkoding"><img src="../../../sekolahkoding.com/img/twitter.png" alt="logo twitter sekolah koding" /></a> <a target="_blank" href="https://youtube.com/SekolahKoding"><img src="../../../sekolahkoding.com/img/utube.png" alt="logo youtube sekolah koding" /></a> <a target="_blank" href="https://www.facebook.com/sekolahkoding"><img src="../../../sekolahkoding.com/img/fb.png" alt="logo facebook sekolah koding" /></a> </div> <div id="footer_extra_menu"> <a href="../../blog/index.html">Blog</a> <a href="../../tentang.html">Tentang</a> <a href="../../syarat.html">Syarat</a> </div> </div> </div> <!-- end main wrapper --> <div class="clear"></div> </div> <!-- end page wrapper --> <script type="text/javascript"> $(document).ready(function(){ $(window).scroll(function() { if($(window).scrollTop() + $(window).height() == $(document).height()) { setTimeout(load_forum, 500) } }); //if something wrong, use document.on +tablet touchstart $('.load_more').on('click', function(){ load_forum(); }); function load_forum(){ $last_id = $('.each_topic:last').attr('id'); $last_activity_at = $('.each_topic:last').attr('last_activity'); $last_judul = $('.each_topic:last').attr('judul'); $.ajax({ type: "POST", url : "/user/ajax_req/loadmore.php", data: { last_id: $last_id, last_activity_at : $last_activity_at, page: "forum" , tag:'dll' }, beforeSend: function(){ //bagusan gambar gif $('.load_more').text('load..'); }, success: function(data){ if(data.indexOf("|x||x|empty|x||x|") > -1){ data = data.replace("|x||x|empty|x||x|", ""); $("#topic_wrapper").append(data); $('.load_more').fadeOut(); }else{ $("#topic_wrapper").append(data); $('.load_more').text('Lihat Pertanyaan Sebelumnya'); } } }); //end ajax return false; } }); </script>
{'content_hash': '777ab3cb90dd0ec24072f36746c14900', 'timestamp': '', 'source': 'github', 'line_count': 1330, 'max_line_length': 953, 'avg_line_length': 37.067669172932334, 'alnum_prop': 0.5023529411764706, 'repo_name': 'Rpl3rd/mp', 'id': '2dc280e7c40db985f6cc1a175ffefcd7918cf539', 'size': '49307', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'assets/forum/tag/dll-2.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '405'}, {'name': 'CSS', 'bytes': '442404'}, {'name': 'HTML', 'bytes': '13007041'}, {'name': 'JavaScript', 'bytes': '390628'}, {'name': 'PHP', 'bytes': '1958462'}]}
// 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. using System; using System.Buffers; using System.Buffers.Binary; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; using Apache.Arrow.Arrays; using Apache.Arrow.Types; using FlatBuffers; namespace Apache.Arrow.Ipc { public class ArrowStreamWriter : IDisposable { internal class ArrowRecordBatchFlatBufferBuilder : IArrowArrayVisitor<Int8Array>, IArrowArrayVisitor<Int16Array>, IArrowArrayVisitor<Int32Array>, IArrowArrayVisitor<Int64Array>, IArrowArrayVisitor<UInt8Array>, IArrowArrayVisitor<UInt16Array>, IArrowArrayVisitor<UInt32Array>, IArrowArrayVisitor<UInt64Array>, IArrowArrayVisitor<FloatArray>, IArrowArrayVisitor<DoubleArray>, IArrowArrayVisitor<BooleanArray>, IArrowArrayVisitor<TimestampArray>, IArrowArrayVisitor<Date32Array>, IArrowArrayVisitor<Date64Array>, IArrowArrayVisitor<ListArray>, IArrowArrayVisitor<StringArray>, IArrowArrayVisitor<BinaryArray>, IArrowArrayVisitor<FixedSizeBinaryArray>, IArrowArrayVisitor<StructArray>, IArrowArrayVisitor<Decimal128Array>, IArrowArrayVisitor<Decimal256Array>, IArrowArrayVisitor<DictionaryArray> { public readonly struct Buffer { public readonly ArrowBuffer DataBuffer; public readonly int Offset; public Buffer(ArrowBuffer buffer, int offset) { DataBuffer = buffer; Offset = offset; } } private readonly List<Buffer> _buffers; public IReadOnlyList<Buffer> Buffers => _buffers; public int TotalLength { get; private set; } public ArrowRecordBatchFlatBufferBuilder() { _buffers = new List<Buffer>(); TotalLength = 0; } public void Visit(Int8Array array) => CreateBuffers(array); public void Visit(Int16Array array) => CreateBuffers(array); public void Visit(Int32Array array) => CreateBuffers(array); public void Visit(Int64Array array) => CreateBuffers(array); public void Visit(UInt8Array array) => CreateBuffers(array); public void Visit(UInt16Array array) => CreateBuffers(array); public void Visit(UInt32Array array) => CreateBuffers(array); public void Visit(UInt64Array array) => CreateBuffers(array); public void Visit(FloatArray array) => CreateBuffers(array); public void Visit(DoubleArray array) => CreateBuffers(array); public void Visit(TimestampArray array) => CreateBuffers(array); public void Visit(BooleanArray array) => CreateBuffers(array); public void Visit(Date32Array array) => CreateBuffers(array); public void Visit(Date64Array array) => CreateBuffers(array); public void Visit(ListArray array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueOffsetsBuffer)); array.Values.Accept(this); } public void Visit(StringArray array) => Visit(array as BinaryArray); public void Visit(BinaryArray array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueOffsetsBuffer)); _buffers.Add(CreateBuffer(array.ValueBuffer)); } public void Visit(FixedSizeBinaryArray array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueBuffer)); } public void Visit(Decimal128Array array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueBuffer)); } public void Visit(Decimal256Array array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueBuffer)); } public void Visit(StructArray array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); for (int i = 0; i < array.Fields.Count; i++) { array.Fields[i].Accept(this); } } public void Visit(DictionaryArray array) { // Dictionary is serialized separately in Dictionary serialization. // We are only interested in indices at this context. _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.IndicesBuffer)); } private void CreateBuffers(BooleanArray array) { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueBuffer)); } private void CreateBuffers<T>(PrimitiveArray<T> array) where T : struct { _buffers.Add(CreateBuffer(array.NullBitmapBuffer)); _buffers.Add(CreateBuffer(array.ValueBuffer)); } private Buffer CreateBuffer(ArrowBuffer buffer) { int offset = TotalLength; int paddedLength = checked((int)BitUtility.RoundUpToMultipleOf8(buffer.Length)); TotalLength += paddedLength; return new Buffer(buffer, offset); } public void Visit(IArrowArray array) { throw new NotImplementedException(); } } protected Stream BaseStream { get; } protected ArrayPool<byte> Buffers { get; } private protected FlatBufferBuilder Builder { get; } protected bool HasWrittenSchema { get; set; } private bool HasWrittenDictionaryBatch { get; set; } private bool HasWrittenStart { get; set; } private bool HasWrittenEnd { get; set; } protected Schema Schema { get; } private readonly bool _leaveOpen; private readonly IpcOptions _options; private protected const Flatbuf.MetadataVersion CurrentMetadataVersion = Flatbuf.MetadataVersion.V4; private static readonly byte[] s_padding = new byte[64]; private readonly ArrowTypeFlatbufferBuilder _fieldTypeBuilder; private DictionaryMemo _dictionaryMemo; private DictionaryMemo DictionaryMemo => _dictionaryMemo ??= new DictionaryMemo(); public ArrowStreamWriter(Stream baseStream, Schema schema) : this(baseStream, schema, leaveOpen: false) { } public ArrowStreamWriter(Stream baseStream, Schema schema, bool leaveOpen) : this(baseStream, schema, leaveOpen, options: null) { } public ArrowStreamWriter(Stream baseStream, Schema schema, bool leaveOpen, IpcOptions options) { BaseStream = baseStream ?? throw new ArgumentNullException(nameof(baseStream)); Schema = schema ?? throw new ArgumentNullException(nameof(schema)); _leaveOpen = leaveOpen; Buffers = ArrayPool<byte>.Create(); Builder = new FlatBufferBuilder(1024); HasWrittenSchema = false; _fieldTypeBuilder = new ArrowTypeFlatbufferBuilder(Builder); _options = options ?? IpcOptions.Default; } private void CreateSelfAndChildrenFieldNodes(ArrayData data) { if (data.DataType is NestedType) { // flatbuffer struct vectors have to be created in reverse order for (int i = data.Children.Length - 1; i >= 0; i--) { CreateSelfAndChildrenFieldNodes(data.Children[i]); } } Flatbuf.FieldNode.CreateFieldNode(Builder, data.Length, data.NullCount); } private static int CountAllNodes(IReadOnlyDictionary<string, Field> fields) { int count = 0; foreach (Field arrowArray in fields.Values) { CountSelfAndChildrenNodes(arrowArray.DataType, ref count); } return count; } private static void CountSelfAndChildrenNodes(IArrowType type, ref int count) { if (type is NestedType nestedType) { foreach (Field childField in nestedType.Fields) { CountSelfAndChildrenNodes(childField.DataType, ref count); } } count++; } private protected void WriteRecordBatchInternal(RecordBatch recordBatch) { // TODO: Truncate buffers with extraneous padding / unused capacity if (!HasWrittenSchema) { WriteSchema(Schema); HasWrittenSchema = true; } if (!HasWrittenDictionaryBatch) { DictionaryCollector.Collect(recordBatch, ref _dictionaryMemo); WriteDictionaries(recordBatch); HasWrittenDictionaryBatch = true; } (ArrowRecordBatchFlatBufferBuilder recordBatchBuilder, VectorOffset fieldNodesVectorOffset) = PreparingWritingRecordBatch(recordBatch); VectorOffset buffersVectorOffset = Builder.EndVector(); // Serialize record batch StartingWritingRecordBatch(); Offset<Flatbuf.RecordBatch> recordBatchOffset = Flatbuf.RecordBatch.CreateRecordBatch(Builder, recordBatch.Length, fieldNodesVectorOffset, buffersVectorOffset); long metadataLength = WriteMessage(Flatbuf.MessageHeader.RecordBatch, recordBatchOffset, recordBatchBuilder.TotalLength); long bufferLength = WriteBufferData(recordBatchBuilder.Buffers); FinishedWritingRecordBatch(bufferLength, metadataLength); } private protected async Task WriteRecordBatchInternalAsync(RecordBatch recordBatch, CancellationToken cancellationToken = default) { // TODO: Truncate buffers with extraneous padding / unused capacity if (!HasWrittenSchema) { await WriteSchemaAsync(Schema, cancellationToken).ConfigureAwait(false); HasWrittenSchema = true; } if (!HasWrittenDictionaryBatch) { DictionaryCollector.Collect(recordBatch, ref _dictionaryMemo); await WriteDictionariesAsync(recordBatch, cancellationToken).ConfigureAwait(false); HasWrittenDictionaryBatch = true; } (ArrowRecordBatchFlatBufferBuilder recordBatchBuilder, VectorOffset fieldNodesVectorOffset) = PreparingWritingRecordBatch(recordBatch); VectorOffset buffersVectorOffset = Builder.EndVector(); // Serialize record batch StartingWritingRecordBatch(); Offset<Flatbuf.RecordBatch> recordBatchOffset = Flatbuf.RecordBatch.CreateRecordBatch(Builder, recordBatch.Length, fieldNodesVectorOffset, buffersVectorOffset); long metadataLength = await WriteMessageAsync(Flatbuf.MessageHeader.RecordBatch, recordBatchOffset, recordBatchBuilder.TotalLength, cancellationToken).ConfigureAwait(false); long bufferLength = await WriteBufferDataAsync(recordBatchBuilder.Buffers, cancellationToken).ConfigureAwait(false); FinishedWritingRecordBatch(bufferLength, metadataLength); } private long WriteBufferData(IReadOnlyList<ArrowRecordBatchFlatBufferBuilder.Buffer> buffers) { long bodyLength = 0; for (int i = 0; i < buffers.Count; i++) { ArrowBuffer buffer = buffers[i].DataBuffer; if (buffer.IsEmpty) continue; WriteBuffer(buffer); int paddedLength = checked((int)BitUtility.RoundUpToMultipleOf8(buffer.Length)); int padding = paddedLength - buffer.Length; if (padding > 0) { WritePadding(padding); } bodyLength += paddedLength; } // Write padding so the record batch message body length is a multiple of 8 bytes int bodyPaddingLength = CalculatePadding(bodyLength); WritePadding(bodyPaddingLength); return bodyLength + bodyPaddingLength; } private async ValueTask<long> WriteBufferDataAsync(IReadOnlyList<ArrowRecordBatchFlatBufferBuilder.Buffer> buffers, CancellationToken cancellationToken = default) { long bodyLength = 0; for (int i = 0; i < buffers.Count; i++) { ArrowBuffer buffer = buffers[i].DataBuffer; if (buffer.IsEmpty) continue; await WriteBufferAsync(buffer, cancellationToken).ConfigureAwait(false); int paddedLength = checked((int)BitUtility.RoundUpToMultipleOf8(buffer.Length)); int padding = paddedLength - buffer.Length; if (padding > 0) { await WritePaddingAsync(padding).ConfigureAwait(false); } bodyLength += paddedLength; } // Write padding so the record batch message body length is a multiple of 8 bytes int bodyPaddingLength = CalculatePadding(bodyLength); await WritePaddingAsync(bodyPaddingLength).ConfigureAwait(false); return bodyLength + bodyPaddingLength; } private Tuple<ArrowRecordBatchFlatBufferBuilder, VectorOffset> PreparingWritingRecordBatch(RecordBatch recordBatch) { return PreparingWritingRecordBatch(recordBatch.Schema.Fields, recordBatch.ArrayList); } private Tuple<ArrowRecordBatchFlatBufferBuilder, VectorOffset> PreparingWritingRecordBatch(IReadOnlyDictionary<string, Field> fields, IReadOnlyList<IArrowArray> arrays) { Builder.Clear(); // Serialize field nodes int fieldCount = fields.Count; Flatbuf.RecordBatch.StartNodesVector(Builder, CountAllNodes(fields)); // flatbuffer struct vectors have to be created in reverse order for (int i = fieldCount - 1; i >= 0; i--) { CreateSelfAndChildrenFieldNodes(arrays[i].Data); } VectorOffset fieldNodesVectorOffset = Builder.EndVector(); // Serialize buffers var recordBatchBuilder = new ArrowRecordBatchFlatBufferBuilder(); for (int i = 0; i < fieldCount; i++) { IArrowArray fieldArray = arrays[i]; fieldArray.Accept(recordBatchBuilder); } IReadOnlyList<ArrowRecordBatchFlatBufferBuilder.Buffer> buffers = recordBatchBuilder.Buffers; Flatbuf.RecordBatch.StartBuffersVector(Builder, buffers.Count); // flatbuffer struct vectors have to be created in reverse order for (int i = buffers.Count - 1; i >= 0; i--) { Flatbuf.Buffer.CreateBuffer(Builder, buffers[i].Offset, buffers[i].DataBuffer.Length); } return Tuple.Create(recordBatchBuilder, fieldNodesVectorOffset); } private protected void WriteDictionaries(RecordBatch recordBatch) { foreach (Field field in recordBatch.Schema.Fields.Values) { WriteDictionary(field); } } private protected void WriteDictionary(Field field) { if (field.DataType.TypeId != ArrowTypeId.Dictionary) { if (field.DataType is NestedType nestedType) { foreach (Field child in nestedType.Fields) { WriteDictionary(child); } } return; } (ArrowRecordBatchFlatBufferBuilder recordBatchBuilder, Offset<Flatbuf.DictionaryBatch> dictionaryBatchOffset) = CreateDictionaryBatchOffset(field); WriteMessage(Flatbuf.MessageHeader.DictionaryBatch, dictionaryBatchOffset, recordBatchBuilder.TotalLength); WriteBufferData(recordBatchBuilder.Buffers); } private protected async Task WriteDictionariesAsync(RecordBatch recordBatch, CancellationToken cancellationToken) { foreach (Field field in recordBatch.Schema.Fields.Values) { await WriteDictionaryAsync(field, cancellationToken).ConfigureAwait(false); } } private protected async Task WriteDictionaryAsync(Field field, CancellationToken cancellationToken) { if (field.DataType.TypeId != ArrowTypeId.Dictionary) { if (field.DataType is NestedType nestedType) { foreach (Field child in nestedType.Fields) { await WriteDictionaryAsync(child, cancellationToken).ConfigureAwait(false); } } return; } (ArrowRecordBatchFlatBufferBuilder recordBatchBuilder, Offset<Flatbuf.DictionaryBatch> dictionaryBatchOffset) = CreateDictionaryBatchOffset(field); await WriteMessageAsync(Flatbuf.MessageHeader.DictionaryBatch, dictionaryBatchOffset, recordBatchBuilder.TotalLength, cancellationToken).ConfigureAwait(false); await WriteBufferDataAsync(recordBatchBuilder.Buffers, cancellationToken).ConfigureAwait(false); } private Tuple<ArrowRecordBatchFlatBufferBuilder, Offset<Flatbuf.DictionaryBatch>> CreateDictionaryBatchOffset(Field field) { Field dictionaryField = new Field("dummy", ((DictionaryType)field.DataType).ValueType, false); long id = DictionaryMemo.GetId(field); IArrowArray dictionary = DictionaryMemo.GetDictionary(id); var fieldsDictionary = new Dictionary<string, Field> { { dictionaryField.Name, dictionaryField } }; var arrays = new List<IArrowArray> { dictionary }; (ArrowRecordBatchFlatBufferBuilder recordBatchBuilder, VectorOffset fieldNodesVectorOffset) = PreparingWritingRecordBatch(fieldsDictionary, arrays); VectorOffset buffersVectorOffset = Builder.EndVector(); // Serialize record batch Offset<Flatbuf.RecordBatch> recordBatchOffset = Flatbuf.RecordBatch.CreateRecordBatch(Builder, dictionary.Length, fieldNodesVectorOffset, buffersVectorOffset); // TODO: Support delta. Offset<Flatbuf.DictionaryBatch> dictionaryBatchOffset = Flatbuf.DictionaryBatch.CreateDictionaryBatch(Builder, id, recordBatchOffset, false); return Tuple.Create(recordBatchBuilder, dictionaryBatchOffset); } private protected virtual void WriteStartInternal() { if (!HasWrittenSchema) { WriteSchema(Schema); HasWrittenSchema = true; } } private protected async virtual ValueTask WriteStartInternalAsync(CancellationToken cancellationToken) { if (!HasWrittenSchema) { await WriteSchemaAsync(Schema, cancellationToken).ConfigureAwait(false); HasWrittenSchema = true; } } private protected virtual void WriteEndInternal() { WriteIpcMessageLength(length: 0); } private protected virtual ValueTask WriteEndInternalAsync(CancellationToken cancellationToken) { return WriteIpcMessageLengthAsync(length: 0, cancellationToken); } private protected virtual void StartingWritingRecordBatch() { } private protected virtual void FinishedWritingRecordBatch(long bodyLength, long metadataLength) { } public virtual void WriteRecordBatch(RecordBatch recordBatch) { WriteRecordBatchInternal(recordBatch); } public virtual Task WriteRecordBatchAsync(RecordBatch recordBatch, CancellationToken cancellationToken = default) { return WriteRecordBatchInternalAsync(recordBatch, cancellationToken); } public void WriteStart() { if (!HasWrittenStart) { WriteStartInternal(); HasWrittenStart = true; } } public async Task WriteStartAsync(CancellationToken cancellationToken = default) { if (!HasWrittenStart) { await WriteStartInternalAsync(cancellationToken); HasWrittenStart = true; } } public void WriteEnd() { if (!HasWrittenEnd) { WriteEndInternal(); HasWrittenEnd = true; } } public async Task WriteEndAsync(CancellationToken cancellationToken = default) { if (!HasWrittenEnd) { await WriteEndInternalAsync(cancellationToken); HasWrittenEnd = true; } } private void WriteBuffer(ArrowBuffer arrowBuffer) { BaseStream.Write(arrowBuffer.Memory); } private ValueTask WriteBufferAsync(ArrowBuffer arrowBuffer, CancellationToken cancellationToken = default) { return BaseStream.WriteAsync(arrowBuffer.Memory, cancellationToken); } private protected Offset<Flatbuf.Schema> SerializeSchema(Schema schema) { // Build metadata VectorOffset metadataVectorOffset = default; if (schema.HasMetadata) { Offset<Flatbuf.KeyValue>[] metadataOffsets = GetMetadataOffsets(schema.Metadata); metadataVectorOffset = Flatbuf.Schema.CreateCustomMetadataVector(Builder, metadataOffsets); } // Build fields var fieldOffsets = new Offset<Flatbuf.Field>[schema.Fields.Count]; for (int i = 0; i < fieldOffsets.Length; i++) { Field field = schema.GetFieldByIndex(i); StringOffset fieldNameOffset = Builder.CreateString(field.Name); ArrowTypeFlatbufferBuilder.FieldType fieldType = _fieldTypeBuilder.BuildFieldType(field); VectorOffset fieldChildrenVectorOffset = GetChildrenFieldOffset(field); VectorOffset fieldMetadataVectorOffset = GetFieldMetadataOffset(field); Offset<Flatbuf.DictionaryEncoding> dictionaryOffset = GetDictionaryOffset(field); fieldOffsets[i] = Flatbuf.Field.CreateField(Builder, fieldNameOffset, field.IsNullable, fieldType.Type, fieldType.Offset, dictionaryOffset, fieldChildrenVectorOffset, fieldMetadataVectorOffset); } VectorOffset fieldsVectorOffset = Flatbuf.Schema.CreateFieldsVector(Builder, fieldOffsets); // Build schema Flatbuf.Endianness endianness = BitConverter.IsLittleEndian ? Flatbuf.Endianness.Little : Flatbuf.Endianness.Big; return Flatbuf.Schema.CreateSchema( Builder, endianness, fieldsVectorOffset, metadataVectorOffset); } private VectorOffset GetChildrenFieldOffset(Field field) { IArrowType targetDataType = field.DataType is DictionaryType dictionaryType ? dictionaryType.ValueType : field.DataType; if (!(targetDataType is NestedType type)) { return default; } int childrenCount = type.Fields.Count; var children = new Offset<Flatbuf.Field>[childrenCount]; for (int i = 0; i < childrenCount; i++) { Field childField = type.Fields[i]; StringOffset childFieldNameOffset = Builder.CreateString(childField.Name); ArrowTypeFlatbufferBuilder.FieldType childFieldType = _fieldTypeBuilder.BuildFieldType(childField); VectorOffset childFieldChildrenVectorOffset = GetChildrenFieldOffset(childField); VectorOffset childFieldMetadataVectorOffset = GetFieldMetadataOffset(childField); Offset<Flatbuf.DictionaryEncoding> dictionaryOffset = GetDictionaryOffset(childField); children[i] = Flatbuf.Field.CreateField(Builder, childFieldNameOffset, childField.IsNullable, childFieldType.Type, childFieldType.Offset, dictionaryOffset, childFieldChildrenVectorOffset, childFieldMetadataVectorOffset); } return Builder.CreateVectorOfTables(children); } private VectorOffset GetFieldMetadataOffset(Field field) { if (!field.HasMetadata) { return default; } Offset<Flatbuf.KeyValue>[] metadataOffsets = GetMetadataOffsets(field.Metadata); return Flatbuf.Field.CreateCustomMetadataVector(Builder, metadataOffsets); } private Offset<Flatbuf.DictionaryEncoding> GetDictionaryOffset(Field field) { if (field.DataType.TypeId != ArrowTypeId.Dictionary) { return default; } long id = DictionaryMemo.GetOrAssignId(field); var dicType = field.DataType as DictionaryType; var indexType = dicType.IndexType as NumberType; Offset<Flatbuf.Int> indexOffset = Flatbuf.Int.CreateInt(Builder, indexType.BitWidth, indexType.IsSigned); return Flatbuf.DictionaryEncoding.CreateDictionaryEncoding(Builder, id, indexOffset, dicType.Ordered); } private Offset<Flatbuf.KeyValue>[] GetMetadataOffsets(IReadOnlyDictionary<string, string> metadata) { Debug.Assert(metadata != null); Debug.Assert(metadata.Count > 0); Offset<Flatbuf.KeyValue>[] metadataOffsets = new Offset<Flatbuf.KeyValue>[metadata.Count]; int index = 0; foreach (KeyValuePair<string, string> metadatum in metadata) { StringOffset keyOffset = Builder.CreateString(metadatum.Key); StringOffset valueOffset = Builder.CreateString(metadatum.Value); metadataOffsets[index++] = Flatbuf.KeyValue.CreateKeyValue(Builder, keyOffset, valueOffset); } return metadataOffsets; } private Offset<Flatbuf.Schema> WriteSchema(Schema schema) { Builder.Clear(); // Build schema Offset<Flatbuf.Schema> schemaOffset = SerializeSchema(schema); // Build message WriteMessage(Flatbuf.MessageHeader.Schema, schemaOffset, 0); return schemaOffset; } private async ValueTask<Offset<Flatbuf.Schema>> WriteSchemaAsync(Schema schema, CancellationToken cancellationToken) { Builder.Clear(); // Build schema Offset<Flatbuf.Schema> schemaOffset = SerializeSchema(schema); // Build message await WriteMessageAsync(Flatbuf.MessageHeader.Schema, schemaOffset, 0, cancellationToken) .ConfigureAwait(false); return schemaOffset; } /// <summary> /// Writes the message to the <see cref="BaseStream"/>. /// </summary> /// <returns> /// The number of bytes written to the stream. /// </returns> private protected long WriteMessage<T>( Flatbuf.MessageHeader headerType, Offset<T> headerOffset, int bodyLength) where T : struct { Offset<Flatbuf.Message> messageOffset = Flatbuf.Message.CreateMessage( Builder, CurrentMetadataVersion, headerType, headerOffset.Value, bodyLength); Builder.Finish(messageOffset.Value); ReadOnlyMemory<byte> messageData = Builder.DataBuffer.ToReadOnlyMemory(Builder.DataBuffer.Position, Builder.Offset); int messagePaddingLength = CalculatePadding(_options.SizeOfIpcLength + messageData.Length); WriteIpcMessageLength(messageData.Length + messagePaddingLength); BaseStream.Write(messageData); WritePadding(messagePaddingLength); checked { return _options.SizeOfIpcLength + messageData.Length + messagePaddingLength; } } /// <summary> /// Writes the message to the <see cref="BaseStream"/>. /// </summary> /// <returns> /// The number of bytes written to the stream. /// </returns> private protected virtual async ValueTask<long> WriteMessageAsync<T>( Flatbuf.MessageHeader headerType, Offset<T> headerOffset, int bodyLength, CancellationToken cancellationToken) where T : struct { Offset<Flatbuf.Message> messageOffset = Flatbuf.Message.CreateMessage( Builder, CurrentMetadataVersion, headerType, headerOffset.Value, bodyLength); Builder.Finish(messageOffset.Value); ReadOnlyMemory<byte> messageData = Builder.DataBuffer.ToReadOnlyMemory(Builder.DataBuffer.Position, Builder.Offset); int messagePaddingLength = CalculatePadding(_options.SizeOfIpcLength + messageData.Length); await WriteIpcMessageLengthAsync(messageData.Length + messagePaddingLength, cancellationToken) .ConfigureAwait(false); await BaseStream.WriteAsync(messageData, cancellationToken).ConfigureAwait(false); await WritePaddingAsync(messagePaddingLength).ConfigureAwait(false); checked { return _options.SizeOfIpcLength + messageData.Length + messagePaddingLength; } } private protected void WriteFlatBuffer() { ReadOnlyMemory<byte> segment = Builder.DataBuffer.ToReadOnlyMemory(Builder.DataBuffer.Position, Builder.Offset); BaseStream.Write(segment); } private protected async ValueTask WriteFlatBufferAsync(CancellationToken cancellationToken = default) { ReadOnlyMemory<byte> segment = Builder.DataBuffer.ToReadOnlyMemory(Builder.DataBuffer.Position, Builder.Offset); await BaseStream.WriteAsync(segment, cancellationToken).ConfigureAwait(false); } private void WriteIpcMessageLength(int length) { Buffers.RentReturn(_options.SizeOfIpcLength, (buffer) => { Memory<byte> currentBufferPosition = buffer; if (!_options.WriteLegacyIpcFormat) { BinaryPrimitives.WriteInt32LittleEndian( currentBufferPosition.Span, MessageSerializer.IpcContinuationToken); currentBufferPosition = currentBufferPosition.Slice(sizeof(int)); } BinaryPrimitives.WriteInt32LittleEndian(currentBufferPosition.Span, length); BaseStream.Write(buffer); }); } private async ValueTask WriteIpcMessageLengthAsync(int length, CancellationToken cancellationToken) { await Buffers.RentReturnAsync(_options.SizeOfIpcLength, async (buffer) => { Memory<byte> currentBufferPosition = buffer; if (!_options.WriteLegacyIpcFormat) { BinaryPrimitives.WriteInt32LittleEndian( currentBufferPosition.Span, MessageSerializer.IpcContinuationToken); currentBufferPosition = currentBufferPosition.Slice(sizeof(int)); } BinaryPrimitives.WriteInt32LittleEndian(currentBufferPosition.Span, length); await BaseStream.WriteAsync(buffer, cancellationToken).ConfigureAwait(false); }).ConfigureAwait(false); } protected int CalculatePadding(long offset, int alignment = 8) { long result = BitUtility.RoundUpToMultiplePowerOfTwo(offset, alignment) - offset; checked { return (int)result; } } private protected void WritePadding(int length) { if (length > 0) { BaseStream.Write(s_padding.AsMemory(0, Math.Min(s_padding.Length, length))); } } private protected ValueTask WritePaddingAsync(int length) { if (length > 0) { return BaseStream.WriteAsync(s_padding.AsMemory(0, Math.Min(s_padding.Length, length))); } return default; } public virtual void Dispose() { if (!_leaveOpen) { BaseStream.Dispose(); } } } internal static class DictionaryCollector { internal static void Collect(RecordBatch recordBatch, ref DictionaryMemo dictionaryMemo) { Schema schema = recordBatch.Schema; for (int i = 0; i < schema.Fields.Count; i++) { Field field = schema.GetFieldByIndex(i); IArrowArray array = recordBatch.Column(i); CollectDictionary(field, array.Data, ref dictionaryMemo); } } private static void CollectDictionary(Field field, ArrayData arrayData, ref DictionaryMemo dictionaryMemo) { if (field.DataType is DictionaryType dictionaryType) { if (arrayData.Dictionary == null) { throw new ArgumentException($"{nameof(arrayData.Dictionary)} must not be null"); } arrayData.Dictionary.EnsureDataType(dictionaryType.ValueType.TypeId); IArrowArray dictionary = ArrowArrayFactory.BuildArray(arrayData.Dictionary); dictionaryMemo ??= new DictionaryMemo(); long id = dictionaryMemo.GetOrAssignId(field); dictionaryMemo.AddOrReplaceDictionary(id, dictionary); WalkChildren(dictionary.Data, ref dictionaryMemo); } else { WalkChildren(arrayData, ref dictionaryMemo); } } private static void WalkChildren(ArrayData arrayData, ref DictionaryMemo dictionaryMemo) { ArrayData[] children = arrayData.Children; if (children == null) { return; } if (arrayData.DataType is NestedType nestedType) { for (int i = 0; i < nestedType.Fields.Count; i++) { Field childField = nestedType.Fields[i]; ArrayData child = children[i]; CollectDictionary(childField, child, ref dictionaryMemo); } } } } }
{'content_hash': 'f1596ba40ee22d7aff741e54866e7431', 'timestamp': '', 'source': 'github', 'line_count': 982, 'max_line_length': 176, 'avg_line_length': 37.68533604887984, 'alnum_prop': 0.6074526440943605, 'repo_name': 'laurentgo/arrow', 'id': 'ec1ad31f3ac00be8b04fb0d3fbde6d00c7c5d2a6', 'size': '37009', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'csharp/src/Apache.Arrow/Ipc/ArrowStreamWriter.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '73655'}, {'name': 'Awk', 'bytes': '3683'}, {'name': 'Batchfile', 'bytes': '32252'}, {'name': 'C', 'bytes': '328114'}, {'name': 'C#', 'bytes': '419434'}, {'name': 'C++', 'bytes': '7254875'}, {'name': 'CMake', 'bytes': '401649'}, {'name': 'CSS', 'bytes': '3946'}, {'name': 'Dockerfile', 'bytes': '42193'}, {'name': 'FreeMarker', 'bytes': '2274'}, {'name': 'Go', 'bytes': '364102'}, {'name': 'HTML', 'bytes': '23047'}, {'name': 'Java', 'bytes': '2296962'}, {'name': 'JavaScript', 'bytes': '84850'}, {'name': 'Lua', 'bytes': '8741'}, {'name': 'M4', 'bytes': '8713'}, {'name': 'MATLAB', 'bytes': '9068'}, {'name': 'Makefile', 'bytes': '44853'}, {'name': 'Meson', 'bytes': '36931'}, {'name': 'Objective-C', 'bytes': '7559'}, {'name': 'PLpgSQL', 'bytes': '56995'}, {'name': 'Perl', 'bytes': '3799'}, {'name': 'Python', 'bytes': '1548489'}, {'name': 'R', 'bytes': '155922'}, {'name': 'Ruby', 'bytes': '682150'}, {'name': 'Rust', 'bytes': '1609482'}, {'name': 'Shell', 'bytes': '251436'}, {'name': 'Thrift', 'bytes': '137291'}, {'name': 'TypeScript', 'bytes': '932690'}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (version 1.7.0_11) on Wed Sep 24 18:59:52 CEST 2014 --> <title>Class Hierarchy</title> <meta name="date" content="2014-09-24"> <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="Class Hierarchy"; } //--> </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>Package</li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-files/index-1.html">Index</a></li> <li><a href="help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?overview-tree.html" target="_top">Frames</a></li> <li><a href="overview-tree.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> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 class="title">Hierarchy For All Packages</h1> <span class="strong">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="adaptableLearningRates/package-tree.html">adaptableLearningRates</a>, </li> <li><a href="agentIO/package-tree.html">agentIO</a>, </li> <li><a href="c4/package-tree.html">c4</a>, </li> <li><a href="competition/package-tree.html">competition</a>, </li> <li><a href="gui/package-tree.html">gui</a>, </li> <li><a href="guiOptions/package-tree.html">guiOptions</a>, </li> <li><a href="mcts/package-tree.html">mcts</a>, </li> <li><a href="miscellaneous/package-tree.html">miscellaneous</a>, </li> <li><a href="nTupleTD/package-tree.html">nTupleTD</a>, </li> <li><a href="openingBook/package-tree.html">openingBook</a></li> </ul> </div> <div class="contentContainer"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li type="circle">java.lang.Object <ul> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/ActivationFunction.html" title="class in adaptableLearningRates"><span class="strong">ActivationFunction</span></a></li> <li type="circle">junit.framework.Assert <ul> <li type="circle">junit.framework.TestCase (implements junit.framework.Test) <ul> <li type="circle">c4.<a href="c4/AlphaBetaAgentTest.html" title="class in c4"><span class="strong">AlphaBetaAgentTest</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/ValueFuncC4Test.html" title="class in nTupleTD"><span class="strong">ValueFuncC4Test</span></a></li> </ul> </li> </ul> </li> <li type="circle">openingBook.<a href="openingBook/Book.html" title="class in openingBook"><span class="strong">Book</span></a></li> <li type="circle">openingBook.<a href="openingBook/BookSum.html" title="class in openingBook"><span class="strong">BookSum</span></a></li> <li type="circle">openingBook.<a href="openingBook/BookTest.html" title="class in openingBook"><span class="strong">BookTest</span></a></li> <li type="circle">competition.<a href="competition/Competition.html" title="class in competition"><span class="strong">Competition</span></a> (implements competition.<a href="competition/Progress.html" title="interface in competition">Progress</a>)</li> <li type="circle">java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) <ul> <li type="circle">java.awt.Container <ul> <li type="circle">javax.swing.JComponent (implements java.io.Serializable) <ul> <li type="circle">javax.swing.JFileChooser (implements javax.accessibility.Accessible) <ul> <li type="circle">agentIO.<a href="agentIO/JFileChooserApprove.html" title="class in agentIO"><span class="strong">JFileChooserApprove</span></a></li> </ul> </li> <li type="circle">javax.swing.JMenuBar (implements javax.accessibility.Accessible, javax.swing.MenuElement) <ul> <li type="circle">gui.<a href="gui/C4Menu.html" title="class in gui"><span class="strong">C4Menu</span></a></li> </ul> </li> <li type="circle">javax.swing.JPanel (implements javax.accessibility.Accessible) <ul> <li type="circle">gui.<a href="gui/C4Buttons.html" title="class in gui"><span class="strong">C4Buttons</span></a></li> <li type="circle">gui.<a href="gui/C4Game.html" title="class in gui"><span class="strong">C4Game</span></a> (implements gui.<a href="gui/ListOperation.html" title="interface in gui">ListOperation</a>, java.lang.Runnable)</li> <li type="circle">gui.<a href="gui/ImgShowComponent.html" title="class in gui"><span class="strong">ImgShowComponent</span></a></li> </ul> </li> <li type="circle">javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable) <ul> <li type="circle">javax.swing.JTextArea <ul> <li type="circle">gui.<a href="gui/C4Buttons.StatusBar.html" title="class in gui"><span class="strong">C4Buttons.StatusBar</span></a></li> </ul> </li> </ul> </li> </ul> </li> <li type="circle">java.awt.Window (implements javax.accessibility.Accessible) <ul> <li type="circle">java.awt.Dialog <ul> <li type="circle">javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants) <ul> <li type="circle">guiOptions.<a href="guiOptions/OptionsIntervals.html" title="class in guiOptions"><span class="strong">OptionsIntervals</span></a></li> </ul> </li> <li type="circle">gui.<a href="gui/LUTShow.html" title="class in gui"><span class="strong">LUTShow</span></a> (implements gui.<a href="gui/ListOperation.html" title="interface in gui">ListOperation</a>)</li> <li type="circle">gui.<a href="gui/ShowTupleList.html" title="class in gui"><span class="strong">ShowTupleList</span></a></li> </ul> </li> <li type="circle">java.awt.Frame (implements java.awt.MenuContainer) <ul> <li type="circle">javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants) <ul> <li type="circle">gui.<a href="gui/C4Frame_v2_14.html" title="class in gui"><span class="strong">C4Frame_v2_14</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/OptionsMCTS.html" title="class in guiOptions"><span class="strong">OptionsMCTS</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/OptionsMinimax.html" title="class in guiOptions"><span class="strong">OptionsMinimax</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/OptionsTD.html" title="class in guiOptions"><span class="strong">OptionsTD</span></a></li> </ul> </li> <li type="circle">gui.<a href="gui/MessageBox.html" title="class in gui"><span class="strong">MessageBox</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/OptionsComp.html" title="class in guiOptions"><span class="strong">OptionsComp</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/OptionsMultiTrain.html" title="class in guiOptions"><span class="strong">OptionsMultiTrain</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/OptionsValueFunc.html" title="class in guiOptions"><span class="strong">OptionsValueFunc</span></a></li> <li type="circle">gui.<a href="gui/ResultOverview.html" title="class in gui"><span class="strong">ResultOverview</span></a></li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> <li type="circle">c4.<a href="c4/ConnectFour.html" title="class in c4"><span class="strong">ConnectFour</span></a> <ul> <li type="circle">c4.<a href="c4/AlphaBetaAgent.html" title="class in c4"><span class="strong">AlphaBetaAgent</span></a> (implements c4.<a href="c4/Agent.html" title="interface in c4">Agent</a>, java.io.Serializable) <ul> <li type="circle">c4.<a href="c4/AlphaBetaTDSAgent.html" title="class in c4"><span class="strong">AlphaBetaTDSAgent</span></a></li> </ul> </li> <li type="circle">miscellaneous.<a href="miscellaneous/CountPositionsC4.html" title="class in miscellaneous"><span class="strong">CountPositionsC4</span></a></li> <li type="circle">mcts.<a href="mcts/GameState.html" title="class in mcts"><span class="strong">GameState</span></a></li> <li type="circle">miscellaneous.<a href="miscellaneous/GenerateSource.html" title="class in miscellaneous"><span class="strong">GenerateSource</span></a></li> <li type="circle">miscellaneous.<a href="miscellaneous/NumFourRows.html" title="class in miscellaneous"><span class="strong">NumFourRows</span></a></li> <li type="circle">c4.<a href="c4/RandomAgent.html" title="class in c4"><span class="strong">RandomAgent</span></a> (implements c4.<a href="c4/Agent.html" title="interface in c4">Agent</a>)</li> <li type="circle">nTupleTD.<a href="nTupleTD/TDSAgent.html" title="class in nTupleTD"><span class="strong">TDSAgent</span></a> (implements c4.<a href="c4/Agent.html" title="interface in c4">Agent</a>, competition.<a href="competition/Progress.html" title="interface in competition">Progress</a>, java.io.Serializable)</li> </ul> </li> <li type="circle">gui.<a href="gui/ConsoleTraining_v2_14.html" title="class in gui"><span class="strong">ConsoleTraining_v2_14</span></a></li> <li type="circle">miscellaneous.<a href="miscellaneous/CountRealizableStates.html" title="class in miscellaneous"><span class="strong">CountRealizableStates</span></a></li> <li type="circle">miscellaneous.<a href="miscellaneous/CSVFileWriter.html" title="class in miscellaneous"><span class="strong">CSVFileWriter</span></a></li> <li type="circle">competition.<a href="competition/Evaluate.html" title="class in competition"><span class="strong">Evaluate</span></a> (implements competition.<a href="competition/Progress.html" title="interface in competition">Progress</a>)</li> <li type="circle">javax.swing.filechooser.FileFilter <ul> <li type="circle">agentIO.<a href="agentIO/AgentFilter.html" title="class in agentIO"><span class="strong">AgentFilter</span></a></li> <li type="circle">guiOptions.<a href="guiOptions/ParamFilter.html" title="class in guiOptions"><span class="strong">ParamFilter</span></a></li> </ul> </li> <li type="circle">java.awt.GridLayout (implements java.awt.LayoutManager, java.io.Serializable) <ul> <li type="circle">gui.<a href="gui/GridLayout2.html" title="class in gui"><span class="strong">GridLayout2</span></a></li> </ul> </li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/IDBDwk.IDBDwkCommon.html" title="class in adaptableLearningRates"><span class="strong">IDBDwk.IDBDwkCommon</span></a> (implements adaptableLearningRates.<a href="adaptableLearningRates/LearningRates.LRCommon.html" title="interface in adaptableLearningRates">LearningRates.LRCommon</a>)</li> <li type="circle">java.io.InputStream (implements java.io.Closeable) <ul> <li type="circle">java.io.ObjectInputStream (implements java.io.ObjectInput, java.io.ObjectStreamConstants) <ul> <li type="circle">agentIO.<a href="agentIO/ProgressTackingInputStream.html" title="class in agentIO"><span class="strong">ProgressTackingInputStream</span></a> (implements agentIO.<a href="agentIO/IGetProgress.html" title="interface in agentIO">IGetProgress</a>)</li> </ul> </li> </ul> </li> <li type="circle">agentIO.<a href="agentIO/IOProgress.html" title="class in agentIO"><span class="strong">IOProgress</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/IRprop.IRpropCommon.html" title="class in adaptableLearningRates"><span class="strong">IRprop.IRpropCommon</span></a> (implements adaptableLearningRates.<a href="adaptableLearningRates/LearningRates.LRCommon.html" title="interface in adaptableLearningRates">LearningRates.LRCommon</a>)</li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/LearningRates.html" title="class in adaptableLearningRates"><span class="strong">LearningRates</span></a> (implements java.io.Serializable) <ul> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/AlphaBound.html" title="class in adaptableLearningRates"><span class="strong">AlphaBound</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/AutoStep.html" title="class in adaptableLearningRates"><span class="strong">AutoStep</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/ELK1.html" title="class in adaptableLearningRates"><span class="strong">ELK1</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/IDBD.html" title="class in adaptableLearningRates"><span class="strong">IDBD</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/IDBDwk.html" title="class in adaptableLearningRates"><span class="strong">IDBDwk</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/IRprop.html" title="class in adaptableLearningRates"><span class="strong">IRprop</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/STDLearningRate.html" title="class in adaptableLearningRates"><span class="strong">STDLearningRate</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/TemporalCoherence.html" title="class in adaptableLearningRates"><span class="strong">TemporalCoherence</span></a></li> </ul> </li> <li type="circle">agentIO.<a href="agentIO/LoadSaveTD.html" title="class in agentIO"><span class="strong">LoadSaveTD</span></a></li> <li type="circle">mcts.<a href="mcts/MCTSParams.html" title="class in mcts"><span class="strong">MCTSParams</span></a></li> <li type="circle">mcts.<a href="mcts/MCTSPlayer.html" title="class in mcts"><span class="strong">MCTSPlayer</span></a> (implements c4.<a href="c4/Agent.html" title="interface in c4">Agent</a>)</li> <li type="circle">c4.<a href="c4/MoveList.html" title="class in c4"><span class="strong">MoveList</span></a></li> <li type="circle">miscellaneous.<a href="miscellaneous/MyTanh.html" title="class in miscellaneous"><span class="strong">MyTanh</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/NTupleFactory.html" title="class in nTupleTD"><span class="strong">NTupleFactory</span></a></li> <li type="circle">java.io.OutputStream (implements java.io.Closeable, java.io.Flushable) <ul> <li type="circle">java.io.ObjectOutputStream (implements java.io.ObjectOutput, java.io.ObjectStreamConstants) <ul> <li type="circle">agentIO.<a href="agentIO/ProgressTrackingOutputStream.html" title="class in agentIO"><span class="strong">ProgressTrackingOutputStream</span></a> (implements agentIO.<a href="agentIO/IGetProgress.html" title="interface in agentIO">IGetProgress</a>)</li> </ul> </li> </ul> </li> <li type="circle">competition.<a href="competition/ResultBestMoveMulti.html" title="class in competition"><span class="strong">ResultBestMoveMulti</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">competition.<a href="competition/ResultBestMoveSingle.html" title="class in competition"><span class="strong">ResultBestMoveSingle</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">competition.<a href="competition/ResultCompMulti.html" title="class in competition"><span class="strong">ResultCompMulti</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">competition.<a href="competition/ResultCompSingle.html" title="class in competition"><span class="strong">ResultCompSingle</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">competition.<a href="competition/ResultTrainMulti.html" title="class in competition"><span class="strong">ResultTrainMulti</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">competition.<a href="competition/ResultValueFuncMulti.html" title="class in competition"><span class="strong">ResultValueFuncMulti</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">competition.<a href="competition/ResultValueFuncSingle.html" title="class in competition"><span class="strong">ResultValueFuncSingle</span></a> (implements competition.<a href="competition/Result.html" title="interface in competition">Result</a>)</li> <li type="circle">gui.<a href="gui/ShowBrowser.html" title="class in gui"><span class="strong">ShowBrowser</span></a></li> <li type="circle">gui.<a href="gui/ShowValueList.html" title="class in gui"><span class="strong">ShowValueList</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/TDParams.html" title="class in nTupleTD"><span class="strong">TDParams</span></a> (implements java.lang.Cloneable, java.io.Serializable)</li> <li type="circle">nTupleTD.<a href="nTupleTD/TDParams.GameInterval.html" title="class in nTupleTD"><span class="strong">TDParams.GameInterval</span></a> (implements java.lang.Cloneable, java.io.Serializable)</li> <li type="circle">competition.<a href="competition/TDSMultiTrain.html" title="class in competition"><span class="strong">TDSMultiTrain</span></a> (implements competition.<a href="competition/Progress.html" title="interface in competition">Progress</a>)</li> <li type="circle">miscellaneous.<a href="miscellaneous/Tools.html" title="class in miscellaneous"><span class="strong">Tools</span></a></li> <li type="circle">mcts.<a href="mcts/TreeNode.html" title="class in mcts"><span class="strong">TreeNode</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/UpdateParams.html" title="class in nTupleTD"><span class="strong">UpdateParams</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/ValueFuncC4.html" title="class in nTupleTD"><span class="strong">ValueFuncC4</span></a> (implements java.io.Serializable)</li> <li type="circle">competition.<a href="competition/ValueFuncTest.html" title="class in competition"><span class="strong">ValueFuncTest</span></a> (implements competition.<a href="competition/Progress.html" title="interface in competition">Progress</a>)</li> <li type="circle">gui.<a href="gui/ValueList.html" title="class in gui"><span class="strong">ValueList</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/WeightSubSet.html" title="class in nTupleTD"><span class="strong">WeightSubSet</span></a> (implements java.io.Serializable) <ul> <li type="circle">nTupleTD.<a href="nTupleTD/NTupleC4.html" title="class in nTupleTD"><span class="strong">NTupleC4</span></a> (implements java.io.Serializable)</li> </ul> </li> </ul> </li> </ul> <h2 title="Interface Hierarchy">Interface Hierarchy</h2> <ul> <li type="circle">c4.<a href="c4/Agent.html" title="interface in c4"><span class="strong">Agent</span></a></li> <li type="circle">agentIO.<a href="agentIO/IGetProgress.html" title="interface in agentIO"><span class="strong">IGetProgress</span></a></li> <li type="circle">adaptableLearningRates.<a href="adaptableLearningRates/LearningRates.LRCommon.html" title="interface in adaptableLearningRates"><span class="strong">LearningRates.LRCommon</span></a></li> <li type="circle">gui.<a href="gui/ListOperation.html" title="interface in gui"><span class="strong">ListOperation</span></a></li> <li type="circle">competition.<a href="competition/Progress.html" title="interface in competition"><span class="strong">Progress</span></a></li> <li type="circle">competition.<a href="competition/Result.html" title="interface in competition"><span class="strong">Result</span></a></li> </ul> <h2 title="Enum Hierarchy">Enum Hierarchy</h2> <ul> <li type="circle">java.lang.Object <ul> <li type="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.io.Serializable) <ul> <li type="circle">mcts.<a href="mcts/MCTSParams.ConstraintType.html" title="enum in mcts"><span class="strong">MCTSParams.ConstraintType</span></a></li> <li type="circle">mcts.<a href="mcts/MCTSParams.ActionSelection.html" title="enum in mcts"><span class="strong">MCTSParams.ActionSelection</span></a></li> <li type="circle">c4.<a href="c4/Agent.AgentState.html" title="enum in c4"><span class="strong">Agent.AgentState</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/TDParams.UpdateMethod.html" title="enum in nTupleTD"><span class="strong">TDParams.UpdateMethod</span></a></li> <li type="circle">nTupleTD.<a href="nTupleTD/TDParams.Activation.html" title="enum in nTupleTD"><span class="strong">TDParams.Activation</span></a></li> <li type="circle">gui.<a href="gui/LUTShow.Mode.html" title="enum in gui"><span class="strong">LUTShow.Mode</span></a></li> <li type="circle">gui.<a href="gui/ListOperation.Player.html" title="enum in gui"><span class="strong">ListOperation.Player</span></a></li> <li type="circle">gui.<a href="gui/C4Game.State.html" title="enum in gui"><span class="strong">C4Game.State</span></a></li> <li type="circle">gui.<a href="gui/C4Game.Action.html" title="enum in gui"><span class="strong">C4Game.Action</span></a></li> </ul> </li> </ul> </li> </ul> </div> <!-- ======= 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>Package</li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-files/index-1.html">Index</a></li> <li><a href="help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?overview-tree.html" target="_top">Frames</a></li> <li><a href="overview-tree.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> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{'content_hash': '734b468a810464ad128f9e133b728c65', 'timestamp': '', 'source': 'github', 'line_count': 342, 'max_line_length': 363, 'avg_line_length': 68.73099415204679, 'alnum_prop': 0.7164128307666128, 'repo_name': 'MarkusThill/Connect-Four', 'id': '769235abe4deed0fd482becba7de0e6ba53d2d62', 'size': '23506', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'CFour/doc/overview-tree.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C++', 'bytes': '67966'}, {'name': 'CSS', 'bytes': '11613'}, {'name': 'HTML', 'bytes': '3300830'}, {'name': 'Java', 'bytes': '798460'}, {'name': 'Pascal', 'bytes': '1579'}]}
#include <cstring> #include <sbml/Model.h> #include <sbml/Rule.h> #include <sbml/Reaction.h> #include <sbml/Species.h> #include "UniqueSpeciesTypesInCompartment.h" #include <sbml/util/IdList.h> /** @cond doxygenIgnored */ using namespace std; /** @endcond */ LIBSBML_CPP_NAMESPACE_BEGIN /* * Creates a new Constraint with the given constraint id. */ UniqueSpeciesTypesInCompartment::UniqueSpeciesTypesInCompartment (unsigned int id, Validator& v) : TConstraint<Model>(id, v) { } /* * Destroys this Constraint. */ UniqueSpeciesTypesInCompartment::~UniqueSpeciesTypesInCompartment () { } /* * Checks that any species with boundary condition false * is not set by reaction and rules */ void UniqueSpeciesTypesInCompartment::check_ (const Model& m, const Model& object) { unsigned int n, ns; /* speciesType only occurs in l2v2 and higher */ if (m.getLevel() == 1 || (m.getLevel()== 2 && m.getVersion() == 1)) return; for (n = 0; n < m.getNumCompartments(); n++) { const string & id = m.getCompartment(n)->getId(); /* create List of species in this compartment */ for (ns = 0; ns < m.getNumSpecies(); ns++) { if (!strcmp(m.getSpecies(ns)->getCompartment().c_str(), id.c_str())) { mSpecies.append(m.getSpecies(ns)->getId()); } } /* loop thru the list of Species in the compartment and check that no speciesTypes are same */ for (IdList::const_iterator the_iterator = mSpecies.begin(); the_iterator != mSpecies.end(); the_iterator++) { if (m.getSpecies(*the_iterator)->isSetSpeciesType()) { const string & type = m.getSpecies(*the_iterator)->getSpeciesType(); if (mSpeciesTypes.contains(type)) { logConflict(*m.getSpecies(*the_iterator), *m.getCompartment(n)); } else { mSpeciesTypes.append(type); } } } mSpecies.clear(); mSpeciesTypes.clear(); } } /* * Logs a message about species with boundary condition false * being set by reaction and rules */ void UniqueSpeciesTypesInCompartment::logConflict (const Species& s, const Compartment& c) { msg = //"There cannot be more than one species of a given <speciesType> in the " //"same compartment of a model. More formally, for any given compartment, " //"there cannot be more than one <species> definition in which both of the " //"following hold simultaneously: (i) the <species>' 'compartment' value " //"is set to that compartment's identifier and (ii) the <species>' " //"'speciesType' is set the same value as the 'speciesType' of another " //"<species> that also sets its 'compartment' to that compartment " //"identifier. (References: L2V2 Section 4.8.2; L2V3 Section 4.8.2)" "The compartment '"; msg += c.getId(); msg += "' contains more than one species with species type '"; msg += s.getSpeciesType(); msg += "'."; logFailure(s); } LIBSBML_CPP_NAMESPACE_END /** @endcond */
{'content_hash': 'a9d9b6c4bdb4961005f414461b8dfd48', 'timestamp': '', 'source': 'github', 'line_count': 120, 'max_line_length': 98, 'avg_line_length': 25.125, 'alnum_prop': 0.6480928689883914, 'repo_name': 'TheCoSMoCompany/biopredyn', 'id': '694534baf4114bb337d6d59efcdab2813a31721b', 'size': '4640', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Prototype/src/libsbml-5.10.0/src/sbml/validator/constraints/UniqueSpeciesTypesInCompartment.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '3535918'}, {'name': 'C++', 'bytes': '26120778'}, {'name': 'CMake', 'bytes': '455400'}, {'name': 'CSS', 'bytes': '49020'}, {'name': 'Gnuplot', 'bytes': '206'}, {'name': 'HTML', 'bytes': '193068'}, {'name': 'Java', 'bytes': '66517'}, {'name': 'JavaScript', 'bytes': '3847'}, {'name': 'Makefile', 'bytes': '30905'}, {'name': 'Perl', 'bytes': '3018'}, {'name': 'Python', 'bytes': '7891301'}, {'name': 'Shell', 'bytes': '247654'}, {'name': 'TeX', 'bytes': '22566'}, {'name': 'XSLT', 'bytes': '55564'}]}
/* WARNING: A collection of messages is a potential memory hog! Never retain console messages, and also never retain references to error objects, preventing garbage collection. Also, using console.log to log object details is a known memory leak, since logged objects cannot be garbage collected. */ pi = (typeof(pi) != "undefined") ? pi : {}; pi.console = pi.observable([]); pi.log = function(message, type, category) { try { if (typeof(message) != "object") message = { message: message, category : category, type: type } else if (message.toJSON) // Simplify observable objects message = message.toJSON(); if (message.type == undefined) message.type = type || ""; if (message.category == undefined) message.category = category || ""; if (message.modal && modal.alert) modal.alert(message.title||message.event||message.category||"",message.message,(message.type=="error")?"sad":"happy"); // Concatenate all details for console.log if (message.message) switch (message.type.toLowerCase()) { case "error": case "e": message.message="[ERROR] "+message.message; break; case "info": case "i": message.message="[INFO] "+message.message; break; case "warning": case "w": message.message="[WARNING] "+message.message; break; case "debug": case "d": message.message="[DEBUG] "+message.message; break; } if (message.category.length) message.message = message.category.toUpperCase() + ": " + message.message; if (pi.console) pi.console.push(message); else if (typeof(window.console) != "undefined") // For IE 8 and below! window.console.log(message.message); } catch(e) { if (pi.console) pi.console.push(e); else if (typeof(window.console) != "undefined") window.console.log(e.message); } } pi.console.bind("change", function(e) { switch (e.action) { case "add": for (var i=0, message; i<e.items.length; i++) { try { if (typeof(e.items[i]) != "object") { this.splice(e.index+i,1,{ message: e.items[i].toString() }); continue; } else if (e.items[i] instanceof Error) { // CAUTION: JSON.stringify can't convert and error object, so we must build our own! this.splice(e.index+i,1,{ type : "Error", name : e.items[i].name || "", event : e.items[i].event || "", message : e.items[i].xhr ? JSON.parse(e.xhr.responseText).message : e.items[i].message || "", description : e.items[i].description || "", keys : Object.keys ? Object.keys(e.items[i]) : "", stack : e.items[i].stack || "" }); // CAUTION: If you change an observable to plain object, the ObservableArray just makes it an observable again! /* } else if(e.items[i].toJSON) { this.splice(e.index+i,1,e.items[i].toJSON()); */ } else if (e.items[i].xhr) { var xhr = e.items[i].xhr, response = JSON.parse(xhr.responseText); response.status = xhr.status; response.statusText = xhr.statusText; response.readyState = xhr.readyState; if (e.items[i].name) response.name = e.items[i].name; if (e.items[i].event) response.event = e.items[i].event; this.splice(e.index+i,1,response); } else { e.items[i].type = (e.items[i].type != undefined)?e.items[i].type:""; switch (e.items[i].type.toLowerCase()) { case "error": case "e": e.items[i].type = "Error"; console.log( JSON.stringify(e.items[i]) ); break; case "debug": case "d": e.items[i].type = "Debug"; console.log( JSON.stringify(e.items[i]) ); break; case "warning": case "w": e.items[i].type = "Warning"; console.log( e.items[i].message ); break; case "info": case "i": default: e.items[i].type = "Info"; console.log( e.items[i].message ); break; } } } catch(e) { console.log( ({ message : e.message, stack : typeof(e.stack) != "undefined" ? e.stack.toString() : "" }).toString() ); } } break; } });
{'content_hash': '24bba30108f0899e4ebb876900be9fca', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 130, 'avg_line_length': 35.25396825396825, 'alnum_prop': 0.5520036019810896, 'repo_name': 'atsid/catnip', 'id': 'a6f6a0f2d7e9d32f9572ea3907da8fdf53b1c0d9', 'size': '4442', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Catnip/MillionMunkeys/KendoMunkey_1_2/Log.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '324270'}, {'name': 'HTML', 'bytes': '34181'}, {'name': 'JavaScript', 'bytes': '12676618'}]}
<?php include 'header.php';?> <?php include 'banner.html';?> <script type="text/javascript" src="js/opentype.min.js"></script> <link rel="stylesheet" href="site.css"> <script type="text/javascript" src="js/jquery.elevatezoom.js"></script> <link href="css/easelshared.css" rel="stylesheet" type="text/css"/> <link href="css/easelexamples.css" rel="stylesheet" type="text/css"/> <script src="js/easelexamples.js"></script> <script src="js/easeljs-NEXT.min.js"></script> <script src="js/Slider.js"></script> <script type="text/javascript"> var tr = $.tr.translator(); opentype.load('http://192.168.1.31/fonts/FiraSansMedium.woff', function(err, font) { if (err) { alert('Font could not be loaded: ' + err); } else { var ctx = document.getElementById('canvas').getContext('2d'); var path = font.getPath(tr('bikerental'), 0, 50, 36); path.draw(ctx); } }); </script> <div id="information" class="spacer reserve-info" > <div class="container"> <div class="row"> <canvas id="canvas" width="500" height="75" class="text"></canvas> </div> <!-- row --> <div class="row"> <img id="zoom_01" src='images/small/fietsverhuur.png' data-zoom-image="images/large/fietsverhuur.jpg"/> </div> <!-- row --> <div class="row"> <header class="EaselJS"> </header> <button id="nl_buttonbikerental" onclick="nl_init();">Click me</button> <button id="fr_buttonbikerental" onclick="fr_init();">Click me</button> <button id="en_buttonbikerental" onclick="en_init();">Click me</button> <button id="de_buttonbikerental" onclick="de_init();">Click me</button> <div> <canvas id="nl_Canvas" width="445" height="190"></canvas> </div> <div> <canvas id="fr_Canvas" width="445" height="190"></canvas> </div> <div> <canvas id="en_Canvas" width="445" height="190"></canvas> </div> <div> <canvas id="de_Canvas" width="445" height="190"></canvas> </div> </div> <!-- row --> <div class="row" id="de_bikerental"> <br> <br> <p>Entre campagne et lac d'Ijssel Zwischen Polderlandschaft und IJsselmeer <code>Westwoud</code> ist ein wesfriesisches Dorf in einer wunderschönen Polderlandschaft mit Haubergen, Weideland und Wassergraben. Die Umgebung ist super geeignet zum Spazieren gehen oder Fahrrad fahren. In der Umgebung ist ein Golfplatz. Museumliebhaber können Museen in den Nachbarsorten besuchen. <code>Westwoud</code> liegt zwischen Hoorn (7 kilometer), Enkhuizen (12 kilometer) und Medemblik (12 kilometer): drei schöne Hafenstädte am IJsselmeer.</p> </div> <!-- row --> </div> <!-- container --> </div> <!-- information --> <script> $('#zoom_01').elevateZoom({ zoomType: "inner", cursor: "crosshair", zoomWindowFadeIn: 500, zoomWindowFadeOut: 750 }); </script> <script id="editable"> var stage; var isDrawing; var drawingCanvas; var oldPt; var oldMidPt; var displayCanvas; var image; var bitmap; var maskFilter; var cursor; var text; var blur; var img; var bmp; var angle; var canvas; var range; var speed; var star; var scale; var sliceContainer; var sliceWidth; var degToRad = Math.PI / 180; function nl_init() { examples.showDistractor(); image = new Image(); image.onload = handleComplete; image.src = "images/large/fietsverhuur.jpg"; stage = new createjs.Stage("nl_Canvas"); text = new createjs.Text("Loading...", "20px Arial", "#FFF"); text.set({x: stage.canvas.width / 2, y: stage.canvas.height - 40}); text.textAlign = "center"; } function fr_init() { angle = 0; range = 30; speed = 0.02; img = new Image(); img.onload = fr_handleImageLoad; img.src = "images/large/fietsverhuur.jpg"; } function en_init() { examples.showDistractor(); img = new Image(); img.onload = en_handleImageLoad; img.src = "images/large/fietsverhuur.jpg"; angle = 0; } function de_init() { examples.showDistractor(); stage = new createjs.Stage("de_Canvas"); stage.enableMouseOver(); createjs.Touch.enable(stage); stage.mouseMoveOutside = true; var img = new Image(); img.onload = de_handleImageLoad; img.src = "images/large/fietsverhuur.jpg"; } function handleComplete() { examples.hideDistractor(); createjs.Touch.enable(stage); stage.enableMouseOver(); stage.addEventListener("stagemousedown", handleMouseDown); stage.addEventListener("stagemouseup", handleMouseUp); stage.addEventListener("stagemousemove", handleMouseMove); drawingCanvas = new createjs.Shape(); bitmap = new createjs.Bitmap(image); blur = new createjs.Bitmap(image); blur.filters = [new createjs.BlurFilter(24, 24, 2), new createjs.ColorMatrixFilter(new createjs.ColorMatrix(60))]; blur.cache(0, 0, 960, 400); text.text = "Click and Drag to Reveal the Image."; stage.addChild(blur, text, bitmap); updateCacheImage(false); cursor = new createjs.Shape(new createjs.Graphics().beginFill("#FFFFFF").drawCircle(0, 0, 25)); cursor.cursor = "pointer"; stage.addChild(cursor); } function handleMouseDown(event) { oldPt = new createjs.Point(stage.mouseX, stage.mouseY); oldMidPt = oldPt; isDrawing = true; } function handleMouseMove(event) { cursor.x = stage.mouseX; cursor.y = stage.mouseY; if (!isDrawing) { stage.update(); return; } var midPoint = new createjs.Point(oldPt.x + stage.mouseX >> 1, oldPt.y + stage.mouseY >> 1); drawingCanvas.graphics.setStrokeStyle(40, "round", "round") .beginStroke("rgba(0,0,0,0.2)") .moveTo(midPoint.x, midPoint.y) .curveTo(oldPt.x, oldPt.y, oldMidPt.x, oldMidPt.y); oldPt.x = stage.mouseX; oldPt.y = stage.mouseY; oldMidPt.x = midPoint.x; oldMidPt.y = midPoint.y; updateCacheImage(true); } function handleMouseUp(event) { updateCacheImage(true); isDrawing = false; } function updateCacheImage(update) { if (update) { drawingCanvas.updateCache(); } else { drawingCanvas.cache(0, 0, image.width, image.height); } maskFilter = new createjs.AlphaMaskFilter(drawingCanvas.cacheCanvas); bitmap.filters = [maskFilter]; if (update) { bitmap.updateCache(0, 0, image.width, image.height); } else { bitmap.cache(0, 0, image.width, image.height); } stage.update(); } function fr_handleImageLoad() { canvas = document.getElementById("fr_Canvas"); stage = new createjs.Stage(canvas); bmp = new createjs.Bitmap(img).set({y: (canvas.height - img.height) / 2}); bmp.cache(0, 0, img.width, img.height); stage.addChild(bmp); createjs.Ticker.addEventListener("tick", fr_tick); } function fr_tick(event) { angle += speed; var value = (Math.sin(angle) + 1) / 2 * range; bmp.updateCache(); bmp.filters = [new createjs.BlurFilter(value, value, 2)]; stage.update(event); } function en_handleImageLoad() { examples.hideDistractor(); var canvas = document.getElementById("en_Canvas"); stage = new createjs.Stage(canvas); star = new createjs.Shape(); star.x = img.width / 2; star.y = img.height / 2; star.graphics.beginStroke("#FF0").setStrokeStyle(5).drawPolyStar(0, 0, img.height / 2 - 15, 5, 0.6).closePath(); var bg = new createjs.Bitmap(img); bg.filters = [new createjs.BlurFilter(2, 2, 2), new createjs.ColorMatrixFilter(new createjs.ColorMatrix(0, 0, -100, 0))]; bg.cache(0, 0, img.width, img.height); stage.addChild(bg); var bmp = new createjs.Bitmap(img); stage.addChild(bmp); bmp.mask = star; stage.addChild(star); createjs.Ticker.addEventListener("tick", en_tick); } function en_tick(event) { star.rotation += 5; star.scaleX = star.scaleY = 1.5 + Math.sin(angle) * 3; stage.update(event); angle += 0.025; } function de_handleImageLoad(evt) { examples.hideDistractor(); var img = evt.target, imgWidth = img.width, imgHeight = img.height, sliceCount = 6; sliceWidth = imgWidth / sliceCount; sliceContainer = new createjs.Container(); sliceContainer.x = stage.canvas.width / 2; for (var i = 0; i < sliceCount; i++) { var slice = new createjs.Bitmap(img); slice.sourceRect = new createjs.Rectangle(sliceWidth * i, 0, sliceWidth, imgHeight); slice.cache(0, 0, sliceWidth, imgHeight); slice.filters = [new createjs.ColorMatrixFilter(new createjs.ColorMatrix())]; sliceContainer.addChild(slice); } var slider = new Slider(0, 50, 80, 20).set({x: 0, y: 0, value: 25}); slider.on("change", handleSliderChange, this); stage.addChild(sliceContainer, slider); updateEffect(slider.value); } function handleSliderChange(evt) { updateEffect(evt.target.value); } function updateEffect(value) { var l = sliceContainer.getNumChildren(); for (var i = 0; i < l; i++) { var slice = sliceContainer.getChildAt(i); slice.y = Math.sin(value * degToRad) * -sliceWidth / 2; if (i % 2) { slice.skewY = value; } else { slice.skewY = -value; slice.y -= sliceWidth * Math.sin(slice.skewY * degToRad); } slice.x = sliceWidth * (i - l / 2) * Math.cos(slice.skewY * degToRad); slice.filters[0].matrix.setColor(Math.sin(slice.skewY * degToRad) * -80); slice.updateCache(); } stage.update(); } </script> <?php include 'footer.php';?>
{'content_hash': 'c6dd78be617a4a0bee7019a9cc1a30d6', 'timestamp': '', 'source': 'github', 'line_count': 311, 'max_line_length': 457, 'avg_line_length': 29.15112540192926, 'alnum_prop': 0.6743878226340172, 'repo_name': 'jan438/BedAndBreakfast', 'id': 'a514d8242509d6630d80c52f68417d3fef7c058a', 'size': '9070', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'bikerental.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '28'}, {'name': 'CSS', 'bytes': '553822'}, {'name': 'HTML', 'bytes': '5329'}, {'name': 'JavaScript', 'bytes': '461582'}, {'name': 'PHP', 'bytes': '466982'}]}
package io.tracee.contextlogger.contextprovider.api; /** * Annotation to mark methods annotated by {@link io.tracee.contextlogger.contextprovider.api.TraceeContextProviderMethod} * with return value of type {@link io.tracee.contextlogger.data.subdata.NameStringValuePair} * to be printed inline. * Used for dynamic context informations. * Created by Tobias Gindler, holisticon AG on 17.03.14. */ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(value = {ElementType.METHOD }) public @interface Flatten { }
{'content_hash': 'be3bcfc5ee45bcc495f7f8a9f92e8f8a', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 122, 'avg_line_length': 35.31578947368421, 'alnum_prop': 0.7988077496274217, 'repo_name': 'tracee/contextlogger', 'id': '001d6f0b6436e268ef470229d09b656c8a228b3b', 'size': '671', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'contextprovider/api/src/main/java/io/tracee/contextlogger/contextprovider/api/Flatten.java', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Java', 'bytes': '667029'}]}
struct ImDrawChannel; // Temporary storage for outputting drawing commands out of order, used by ImDrawList::ChannelsSplit() struct ImDrawCmd; // A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call) struct ImDrawData; // All draw command lists required to render the frame struct ImDrawList; // A single draw command list (generally one per window) struct ImDrawVert; // A single vertex (20 bytes by default, override layout with IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT) struct ImFont; // Runtime data for a single font within a parent ImFontAtlas struct ImFontAtlas; // Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF/OTF font loader struct ImFontConfig; // Configuration data when adding a font or merging fonts struct ImColor; // Helper functions to create a color that can be converted to either u32 or float4 struct ImGuiIO; // Main configuration and I/O between your application and ImGui struct ImGuiOnceUponAFrame; // Simple helper for running a block of code not more than once a frame, used by IMGUI_ONCE_UPON_A_FRAME macro struct ImGuiStorage; // Simple custom key value storage struct ImGuiStyle; // Runtime data for styling/colors struct ImGuiTextFilter; // Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" struct ImGuiTextBuffer; // Text buffer for logging/accumulating text struct ImGuiTextEditCallbackData; // Shared state of ImGui::InputText() when using custom ImGuiTextEditCallback (rare/advanced use) struct ImGuiSizeConstraintCallbackData;// Structure used to constraint window size in custom ways when using custom ImGuiSizeConstraintCallback (rare/advanced use) struct ImGuiListClipper; // Helper to manually clip large list of items struct ImGuiContext; // ImGui context (opaque) // Typedefs and Enumerations (declared as int for compatibility and to not pollute the top of this file) typedef unsigned int ImU32; // 32-bit unsigned integer (typically used to store packed colors) typedef unsigned int ImGuiID; // unique ID used by widgets (typically hashed from a stack of string) typedef unsigned short ImWchar; // character for keyboard input/display typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp) typedef int ImGuiCol; // a color identifier for styling // enum ImGuiCol_ typedef int ImGuiStyleVar; // a variable identifier for styling // enum ImGuiStyleVar_ typedef int ImGuiKey; // a key identifier (ImGui-side enum) // enum ImGuiKey_ typedef int ImGuiColorEditFlags; // color edit flags for Color*() // enum ImGuiColorEditFlags_ typedef int ImGuiMouseCursor; // a mouse cursor identifier // enum ImGuiMouseCursor_ typedef int ImGuiWindowFlags; // window flags for Begin*() // enum ImGuiWindowFlags_ typedef int ImGuiCond; // condition flags for Set*() // enum ImGuiCond_ typedef int ImGuiColumnsFlags; // flags for *Columns*() // enum ImGuiColumnsFlags_ typedef int ImGuiInputTextFlags; // flags for InputText*() // enum ImGuiInputTextFlags_ typedef int ImGuiSelectableFlags; // flags for Selectable() // enum ImGuiSelectableFlags_ typedef int ImGuiTreeNodeFlags; // flags for TreeNode*(), Collapsing*() // enum ImGuiTreeNodeFlags_ typedef int (*ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data); typedef void (*ImGuiSizeConstraintCallback)(ImGuiSizeConstraintCallbackData* data); #ifdef _MSC_VER typedef unsigned __int64 ImU64; // 64-bit unsigned integer #else typedef unsigned long long ImU64; // 64-bit unsigned integer #endif // Others helpers at bottom of the file: // class ImVector<> // Lightweight std::vector like class. // IMGUI_ONCE_UPON_A_FRAME // Execute a block of code once per frame only (convenient for creating UI within deep-nested code that runs multiple times) struct ImVec2 { float x, y; ImVec2() { x = y = 0.0f; } ImVec2(float _x, float _y) { x = _x; y = _y; } #ifdef IM_VEC2_CLASS_EXTRA // Define constructor and implicit cast operators in imconfig.h to convert back<>forth from your math types and ImVec2. IM_VEC2_CLASS_EXTRA #endif }; struct ImVec4 { float x, y, z, w; ImVec4() { x = y = z = w = 0.0f; } ImVec4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; } #ifdef IM_VEC4_CLASS_EXTRA // Define constructor and implicit cast operators in imconfig.h to convert back<>forth from your math types and ImVec4. IM_VEC4_CLASS_EXTRA #endif }; // ImGui end-user API // In a namespace so that user can add extra functions in a separate file (e.g. Value() helpers for your vector or common types) namespace ImGui { // Main IMGUI_API ImGuiIO& GetIO(); IMGUI_API ImGuiStyle& GetStyle(); IMGUI_API ImDrawData* GetDrawData(); // same value as passed to your io.RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame() IMGUI_API void NewFrame(); // start a new ImGui frame, you can submit any command from this point until NewFrame()/Render(). IMGUI_API void Render(); // ends the ImGui frame, finalize rendering data, then call your io.RenderDrawListsFn() function if set. IMGUI_API void Shutdown(); // Demo/Debug/Info IMGUI_API void ShowTestWindow(bool* p_open = NULL); // create demo/test window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application! IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // create metrics window. display ImGui internals: browse window list, draw commands, individual vertices, basic internal state, etc. IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style) IMGUI_API void ShowUserGuide(); // add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls). // Window IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // push window to the stack and start appending to it. see .cpp for details. return false when window is collapsed, so you can early out in your code. 'bool* p_open' creates a widget on the upper-right to close the window (which sets your bool to false). IMGUI_API bool Begin(const char* name, bool* p_open, const ImVec2& size_on_first_use, float bg_alpha = -1.0f, ImGuiWindowFlags flags = 0); // OBSOLETE. this is the older/longer API. the extra parameters aren't very relevant. call SetNextWindowSize() instead if you want to set a window size. For regular windows, 'size_on_first_use' only applies to the first time EVER the window is created and probably not what you want! might obsolete this API eventually. IMGUI_API void End(); // finish appending to current window, pop it off the window stack. IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // begin a scrolling region. size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). size>0.0f: fixed size. each axis can use a different mode, e.g. ImVec2(0,400). IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // " IMGUI_API void EndChild(); IMGUI_API ImVec2 GetContentRegionMax(); // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates IMGUI_API ImVec2 GetContentRegionAvail(); // == GetContentRegionMax() - GetCursorPos() IMGUI_API float GetContentRegionAvailWidth(); // IMGUI_API ImVec2 GetWindowContentRegionMin(); // content boundaries min (roughly (0,0)-Scroll), in window coordinates IMGUI_API ImVec2 GetWindowContentRegionMax(); // content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates IMGUI_API float GetWindowContentRegionWidth(); // IMGUI_API ImDrawList* GetWindowDrawList(); // get rendering command-list if you want to append your own draw primitives IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (useful if you want to do your own drawing via the DrawList api) IMGUI_API ImVec2 GetWindowSize(); // get current window size IMGUI_API float GetWindowWidth(); IMGUI_API float GetWindowHeight(); IMGUI_API bool IsWindowCollapsed(); IMGUI_API bool IsWindowAppearing(); IMGUI_API void SetWindowFontScale(float scale); // per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0); // set next window position. call before Begin() IMGUI_API void SetNextWindowPosCenter(ImGuiCond cond = 0); // set next window position to be centered on screen. call before Begin() IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0); // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeConstraintCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints. IMGUI_API void SetNextWindowContentSize(const ImVec2& size); // set next window content size (enforce the range of scrollbars). set axis to 0.0f to leave it automatic. call before Begin() IMGUI_API void SetNextWindowContentWidth(float width); // set next window content width (enforce the range of horizontal scrollbar). call before Begin() IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0); // set next window collapsed state. call before Begin() IMGUI_API void SetNextWindowFocus(); // set next window to be focused / front-most. call before Begin() IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0); // (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects. IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiCond cond = 0); // (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0,0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects. IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0); // (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed(). IMGUI_API void SetWindowFocus(); // (not recommended) set current window to be focused / front-most. prefer using SetNextWindowFocus(). IMGUI_API void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0); // set named window position. IMGUI_API void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0); // set named window size. set axis to 0.0f to force an auto-fit on this axis. IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0); // set named window collapsed state IMGUI_API void SetWindowFocus(const char* name); // set named window to be focused / front-most. use NULL to remove focus. IMGUI_API float GetScrollX(); // get scrolling amount [0..GetScrollMaxX()] IMGUI_API float GetScrollY(); // get scrolling amount [0..GetScrollMaxY()] IMGUI_API float GetScrollMaxX(); // get maximum scrolling amount ~~ ContentSize.X - WindowSize.X IMGUI_API float GetScrollMaxY(); // get maximum scrolling amount ~~ ContentSize.Y - WindowSize.Y IMGUI_API void SetScrollX(float scroll_x); // set scrolling amount [0..GetScrollMaxX()] IMGUI_API void SetScrollY(float scroll_y); // set scrolling amount [0..GetScrollMaxY()] IMGUI_API void SetScrollHere(float center_y_ratio = 0.5f); // adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. IMGUI_API void SetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f); // adjust scrolling amount to make given position valid. use GetCursorPos() or GetCursorStartPos()+offset to get valid positions. IMGUI_API void SetKeyboardFocusHere(int offset = 0); // focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use negative 'offset' to access previous widgets. IMGUI_API void SetStateStorage(ImGuiStorage* tree); // replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it) IMGUI_API ImGuiStorage* GetStateStorage(); // Parameters stacks (shared) IMGUI_API void PushFont(ImFont* font); // use NULL as a shortcut to push default font IMGUI_API void PopFont(); IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col); IMGUI_API void PushStyleColor(ImGuiCol idx, const ImVec4& col); IMGUI_API void PopStyleColor(int count = 1); IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val); IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val); IMGUI_API void PopStyleVar(int count = 1); IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx); // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwhise use GetColorU32() to get style color + style alpha. IMGUI_API ImFont* GetFont(); // get current font IMGUI_API float GetFontSize(); // get current font size (= height in pixels) of current font with current scale applied IMGUI_API ImVec2 GetFontTexUvWhitePixel(); // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f); // retrieve given style color with style alpha applied and optional extra alpha multiplier IMGUI_API ImU32 GetColorU32(const ImVec4& col); // retrieve given color with style alpha applied IMGUI_API ImU32 GetColorU32(ImU32 col); // retrieve given color with style alpha applied // Parameters stacks (current window) IMGUI_API void PushItemWidth(float item_width); // width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side) IMGUI_API void PopItemWidth(); IMGUI_API float CalcItemWidth(); // width of item given pushed settings and current cursor position IMGUI_API void PushTextWrapPos(float wrap_pos_x = 0.0f); // word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space IMGUI_API void PopTextWrapPos(); IMGUI_API void PushAllowKeyboardFocus(bool allow_keyboard_focus); // allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets IMGUI_API void PopAllowKeyboardFocus(); IMGUI_API void PushButtonRepeat(bool repeat); // in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame. IMGUI_API void PopButtonRepeat(); // Cursor / Layout IMGUI_API void Separator(); // horizontal line IMGUI_API void SameLine(float pos_x = 0.0f, float spacing_w = -1.0f); // call between widgets or groups to layout them horizontally IMGUI_API void NewLine(); // undo a SameLine() IMGUI_API void Spacing(); // add vertical spacing IMGUI_API void Dummy(const ImVec2& size); // add a dummy item of given size IMGUI_API void Indent(float indent_w = 0.0f); // move content position toward the right, by style.IndentSpacing or indent_w if >0 IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by style.IndentSpacing or indent_w if >0 IMGUI_API void BeginGroup(); // lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) IMGUI_API void EndGroup(); IMGUI_API ImVec2 GetCursorPos(); // cursor position is relative to window position IMGUI_API float GetCursorPosX(); // " IMGUI_API float GetCursorPosY(); // " IMGUI_API void SetCursorPos(const ImVec2& local_pos); // " IMGUI_API void SetCursorPosX(float x); // " IMGUI_API void SetCursorPosY(float y); // " IMGUI_API ImVec2 GetCursorStartPos(); // initial cursor position IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API) IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute screen coordinates [0..io.DisplaySize] IMGUI_API void AlignFirstTextHeightToWidgets(); // call once if the first item on the line is a Text() item and you want to vertically lower it to match subsequent (bigger) widgets IMGUI_API float GetTextLineHeight(); // height of font == GetWindowFontSize() IMGUI_API float GetTextLineHeightWithSpacing(); // distance (in pixels) between 2 consecutive lines of text == GetWindowFontSize() + GetStyle().ItemSpacing.y IMGUI_API float GetItemsLineHeightWithSpacing(); // distance (in pixels) between 2 consecutive lines of standard height widgets == GetWindowFontSize() + GetStyle().FramePadding.y*2 + GetStyle().ItemSpacing.y // Columns // You can also use SameLine(pos_x) for simplified columns. The columns API is still work-in-progress and rather lacking. IMGUI_API void Columns(int count = 1, const char* id = NULL, bool border = true); IMGUI_API void NextColumn(); // next column, defaults to current row or next row if the current row is finished IMGUI_API int GetColumnIndex(); // get current column index IMGUI_API float GetColumnWidth(int column_index = -1); // get column width (in pixels). pass -1 to use current column IMGUI_API void SetColumnWidth(int column_index, float width); // set column width (in pixels). pass -1 to use current column IMGUI_API float GetColumnOffset(int column_index = -1); // get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f IMGUI_API void SetColumnOffset(int column_index, float offset_x); // set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column IMGUI_API int GetColumnsCount(); // ID scopes // If you are creating widgets in a loop you most likely want to push a unique identifier (e.g. object pointer, loop index) so ImGui can differentiate them. // You can also use the "##foobar" syntax within widget label to distinguish them from each others. Read "A primer on the use of labels/IDs" in the FAQ for more details. IMGUI_API void PushID(const char* str_id); // push identifier into the ID stack. IDs are hash of the entire stack! IMGUI_API void PushID(const char* str_id_begin, const char* str_id_end); IMGUI_API void PushID(const void* ptr_id); IMGUI_API void PushID(int int_id); IMGUI_API void PopID(); IMGUI_API ImGuiID GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself IMGUI_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end); IMGUI_API ImGuiID GetID(const void* ptr_id); // Widgets: Text IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // doesn't require null terminated string if 'text_end' is specified. no copy done, no limits, recommended for long chunks of text IMGUI_API void Text(const char* fmt, ...) IM_FMTARGS(1); // simple formatted text IMGUI_API void TextV(const char* fmt, va_list args) IM_FMTLIST(1); IMGUI_API void TextColored(const ImVec4& col, const char* fmt, ...) IM_FMTARGS(2); // shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor(); IMGUI_API void TextColoredV(const ImVec4& col, const char* fmt, va_list args) IM_FMTLIST(2); IMGUI_API void TextDisabled(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor(); IMGUI_API void TextDisabledV(const char* fmt, va_list args) IM_FMTLIST(1); IMGUI_API void TextWrapped(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize(). IMGUI_API void TextWrappedV(const char* fmt, va_list args) IM_FMTLIST(1); IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2); // display text+label aligned the same way as value+label widgets IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args) IM_FMTLIST(2); IMGUI_API void BulletText(const char* fmt, ...) IM_FMTARGS(1); // shortcut for Bullet()+Text() IMGUI_API void BulletTextV(const char* fmt, va_list args) IM_FMTLIST(1); IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses // Widgets: Main IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0,0)); // button IMGUI_API bool SmallButton(const char* label); // button with FramePadding=(0,0) to easily embed within text IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size); IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), const ImVec4& tint_col = ImVec4(1,1,1,1), const ImVec4& border_col = ImVec4(0,0,0,0)); IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0,0,0,0), const ImVec4& tint_col = ImVec4(1,1,1,1)); // <0 frame_padding uses default frame padding settings. 0 for no padding IMGUI_API bool Checkbox(const char* label, bool* v); IMGUI_API bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value); IMGUI_API bool RadioButton(const char* label, bool active); IMGUI_API bool RadioButton(const char* label, int* v, int v_button); IMGUI_API bool Combo(const char* label, int* current_item, const char* const* items, int items_count, int height_in_items = -1); IMGUI_API bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items = -1); // separate items with \0, end item-list with \0\0 IMGUI_API bool Combo(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1); IMGUI_API void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0), int stride = sizeof(float)); IMGUI_API void PlotLines(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0)); IMGUI_API void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0), int stride = sizeof(float)); IMGUI_API void PlotHistogram(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0)); IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-1,0), const char* overlay = NULL); // Widgets: Drags (tip: ctrl+click on a drag box to input with keyboard. manually input values aren't clamped, can go off-bounds) // For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x IMGUI_API bool DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); // If v_min >= v_max we have no bound IMGUI_API bool DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool DragFloat4(const char* label, float v[4], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", const char* display_format_max = NULL, float power = 1.0f); IMGUI_API bool DragInt(const char* label, int* v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f"); // If v_min >= v_max we have no bound IMGUI_API bool DragInt2(const char* label, int v[2], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f"); IMGUI_API bool DragInt3(const char* label, int v[3], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f"); IMGUI_API bool DragInt4(const char* label, int v[4], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f"); IMGUI_API bool DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f", const char* display_format_max = NULL); // Widgets: Input with Keyboard IMGUI_API bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiTextEditCallback callback = NULL, void* user_data = NULL); IMGUI_API bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2(0,0), ImGuiInputTextFlags flags = 0, ImGuiTextEditCallback callback = NULL, void* user_data = NULL); IMGUI_API bool InputFloat(const char* label, float* v, float step = 0.0f, float step_fast = 0.0f, int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputFloat2(const char* label, float v[2], int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputFloat3(const char* label, float v[3], int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputFloat4(const char* label, float v[4], int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputInt2(const char* label, int v[2], ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputInt3(const char* label, int v[3], ImGuiInputTextFlags extra_flags = 0); IMGUI_API bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags extra_flags = 0); // Widgets: Sliders (tip: ctrl+click on a slider to input with keyboard. manually input values aren't clamped, can go off-bounds) IMGUI_API bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); // adjust display_format to decorate the value with a prefix or a suffix for in-slider labels or unit display. Use power!=1.0 for logarithmic sliders IMGUI_API bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool SliderAngle(const char* label, float* v_rad, float v_degrees_min = -360.0f, float v_degrees_max = +360.0f); IMGUI_API bool SliderInt(const char* label, int* v, int v_min, int v_max, const char* display_format = "%.0f"); IMGUI_API bool SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* display_format = "%.0f"); IMGUI_API bool SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* display_format = "%.0f"); IMGUI_API bool SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* display_format = "%.0f"); IMGUI_API bool VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* display_format = "%.0f"); // Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.) // Note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can the pass the address of a first float element out of a contiguous structure, e.g. &myvector.x IMGUI_API bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0); IMGUI_API bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0); IMGUI_API bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0); IMGUI_API bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL); IMGUI_API bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0)); // display a colored square/button, hover for details, return true when pressed. IMGUI_API void SetColorEditOptions(ImGuiColorEditFlags flags); // initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls. // Widgets: Trees IMGUI_API bool TreeNode(const char* label); // if returning 'true' the node is open and the tree id is pushed into the id stack. user is responsible for calling TreePop(). IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2); // read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet(). IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2); // " IMGUI_API bool TreeNodeV(const char* str_id, const char* fmt, va_list args) IM_FMTLIST(2); IMGUI_API bool TreeNodeV(const void* ptr_id, const char* fmt, va_list args) IM_FMTLIST(2); IMGUI_API bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0); IMGUI_API bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3); IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3); IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3); IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3); IMGUI_API void TreePush(const char* str_id = NULL); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call Push/Pop yourself for layout purpose IMGUI_API void TreePush(const void* ptr_id = NULL); // " IMGUI_API void TreePop(); // ~ Unindent()+PopId() IMGUI_API void TreeAdvanceToLabelPos(); // advance cursor x position by GetTreeNodeToLabelSpacing() IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode IMGUI_API void SetNextTreeNodeOpen(bool is_open, ImGuiCond cond = 0); // set next TreeNode/CollapsingHeader open state. IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop(). IMGUI_API bool CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags = 0); // when 'p_open' isn't NULL, display an additional small close button on upper right of the header // Widgets: Selectable / Lists IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); IMGUI_API bool ListBox(const char* label, int* current_item, const char* const* items, int items_count, int height_in_items = -1); IMGUI_API bool ListBox(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1); IMGUI_API bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0,0)); // use if you want to reimplement ListBox() will custom data or interactions. make sure to call ListBoxFooter() afterwards. IMGUI_API bool ListBoxHeader(const char* label, int items_count, int height_in_items = -1); // " IMGUI_API void ListBoxFooter(); // terminate the scrolling region // Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) IMGUI_API void Value(const char* prefix, bool b); IMGUI_API void Value(const char* prefix, int v); IMGUI_API void Value(const char* prefix, unsigned int v); IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL); // Tooltips IMGUI_API void SetTooltip(const char* fmt, ...) IM_FMTARGS(1); // set text tooltip under mouse-cursor, typically use with ImGui::IsItemHovered(). overidde any previous call to SetTooltip(). IMGUI_API void SetTooltipV(const char* fmt, va_list args) IM_FMTLIST(1); IMGUI_API void BeginTooltip(); // begin/append a tooltip window. to create full-featured tooltip (with any kind of contents). IMGUI_API void EndTooltip(); // Menus IMGUI_API bool BeginMainMenuBar(); // create and append to a full screen menu-bar. only call EndMainMenuBar() if this returns true! IMGUI_API void EndMainMenuBar(); IMGUI_API bool BeginMenuBar(); // append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set). only call EndMenuBar() if this returns true! IMGUI_API void EndMenuBar(); IMGUI_API bool BeginMenu(const char* label, bool enabled = true); // create a sub-menu entry. only call EndMenu() if this returns true! IMGUI_API void EndMenu(); IMGUI_API bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true); // return true when activated. shortcuts are displayed for convenience but not processed by ImGui at the moment IMGUI_API bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true); // return true when activated + toggle (*p_selected) if p_selected != NULL // Popups IMGUI_API void OpenPopup(const char* str_id); // call to mark popup as open (don't call every frame!). popups are closed when user click outside, or if CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. By default, Selectable()/MenuItem() are calling CloseCurrentPopup(). Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). IMGUI_API bool BeginPopup(const char* str_id); // return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returned true! IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags extra_flags = 0); // modal dialog (block interactions behind the modal window, can't close the modal window by clicking outside) IMGUI_API bool BeginPopupContextItem(const char* str_id, int mouse_button = 1); // helper to open and begin popup when clicked on last item. read comments in .cpp! IMGUI_API bool BeginPopupContextWindow(const char* str_id = NULL, int mouse_button = 1, bool also_over_items = true); // helper to open and begin popup when clicked on current window. IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked in void (no window). IMGUI_API void EndPopup(); IMGUI_API bool IsPopupOpen(const char* str_id); // return true if the popup is open IMGUI_API void CloseCurrentPopup(); // close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup. // Logging: all text output from interface is redirected to tty/file/clipboard. By default, tree nodes are automatically opened during logging. IMGUI_API void LogToTTY(int max_depth = -1); // start logging to tty IMGUI_API void LogToFile(int max_depth = -1, const char* filename = NULL); // start logging to file IMGUI_API void LogToClipboard(int max_depth = -1); // start logging to OS clipboard IMGUI_API void LogFinish(); // stop logging (close file, etc.) IMGUI_API void LogButtons(); // helper to display buttons for logging to tty/file/clipboard IMGUI_API void LogText(const char* fmt, ...) IM_FMTARGS(1); // pass text data straight to log (without being displayed) // Clipping IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect); IMGUI_API void PopClipRect(); // Utilities IMGUI_API bool IsItemHovered(); // is the last item hovered by mouse (and usable)? IMGUI_API bool IsItemRectHovered(); // is the last item hovered by mouse? even if another item is active or window is blocked by popup while we are hovering this IMGUI_API bool IsItemActive(); // is the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false) IMGUI_API bool IsItemClicked(int mouse_button = 0); // is the last item clicked? (e.g. button/node just clicked on) IMGUI_API bool IsItemVisible(); // is the last item visible? (aka not out of sight due to clipping/scrolling.) IMGUI_API bool IsAnyItemHovered(); IMGUI_API bool IsAnyItemActive(); IMGUI_API ImVec2 GetItemRectMin(); // get bounding rect of last item in screen space IMGUI_API ImVec2 GetItemRectMax(); // " IMGUI_API ImVec2 GetItemRectSize(); // " IMGUI_API void SetItemAllowOverlap(); // allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area. IMGUI_API bool IsWindowFocused(); // is current window focused IMGUI_API bool IsWindowHovered(); // is current window hovered and hoverable (not blocked by a popup) (differentiate child windows from each others) IMGUI_API bool IsWindowRectHovered(); // is current window rectangle hovered, disregarding of any consideration of being blocked by a popup. (unlike IsWindowHovered() this will return true even if the window is blocked because of a popup) IMGUI_API bool IsRootWindowFocused(); // is current root window focused (root = top-most parent of a child, otherwise self) IMGUI_API bool IsRootWindowOrAnyChildFocused(); // is current root window or any of its child (including current window) focused IMGUI_API bool IsRootWindowOrAnyChildHovered(); // is current root window or any of its child (including current window) hovered and hoverable (not blocked by a popup) IMGUI_API bool IsAnyWindowHovered(); // is mouse hovering any visible window IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle (of given size, starting from cursor position) is visible / not clipped. IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side. IMGUI_API float GetTime(); IMGUI_API int GetFrameCount(); IMGUI_API const char* GetStyleColorName(ImGuiCol idx); IMGUI_API ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool on_edge = false, float outward = +0.0f); // utility to find the closest point the last item bounding rectangle edge. useful to visually link items IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can. IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags extra_flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame IMGUI_API void EndChildFrame(); IMGUI_API ImVec4 ColorConvertU32ToFloat4(ImU32 in); IMGUI_API ImU32 ColorConvertFloat4ToU32(const ImVec4& in); IMGUI_API void ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v); IMGUI_API void ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b); // Inputs IMGUI_API int GetKeyIndex(ImGuiKey imgui_key); // map ImGuiKey_* values into user's key index. == io.KeyMap[key] IMGUI_API bool IsKeyDown(int user_key_index); // is key being held. == io.KeysDown[user_key_index]. note that imgui doesn't know the semantic of each entry of io.KeyDown[]. Use your own indices/enums according to how your backend/engine stored them into KeyDown[]! IMGUI_API bool IsKeyPressed(int user_key_index, bool repeat = true); // was key pressed (went from !Down to Down). if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate IMGUI_API bool IsKeyReleased(int user_key_index); // was key released (went from Down to !Down).. IMGUI_API int GetKeyPressedAmount(int key_index, float repeat_delay, float rate); // uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate IMGUI_API bool IsMouseDown(int button); // is mouse button held IMGUI_API bool IsMouseClicked(int button, bool repeat = false); // did mouse button clicked (went from !Down to Down) IMGUI_API bool IsMouseDoubleClicked(int button); // did mouse button double-clicked. a double-click returns false in IsMouseClicked(). uses io.MouseDoubleClickTime. IMGUI_API bool IsMouseReleased(int button); // did mouse button released (went from Down to !Down) IMGUI_API bool IsMouseDragging(int button = 0, float lock_threshold = -1.0f); // is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true); // is mouse hovering given bounding rect (in screen space). clipped by current clipping settings. disregarding of consideration of focus/window ordering/blocked by a popup. IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL); // IMGUI_API ImVec2 GetMousePos(); // shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls IMGUI_API ImVec2 GetMousePosOnOpeningCurrentPopup(); // retrieve backup of mouse positioning at the time of opening popup we have BeginPopup() into IMGUI_API ImVec2 GetMouseDragDelta(int button = 0, float lock_threshold = -1.0f); // dragging amount since clicking. if lock_threshold < -1.0f uses io.MouseDraggingThreshold IMGUI_API void ResetMouseDragDelta(int button = 0); // IMGUI_API ImGuiMouseCursor GetMouseCursor(); // get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you IMGUI_API void SetMouseCursor(ImGuiMouseCursor type); // set desired cursor type IMGUI_API void CaptureKeyboardFromApp(bool capture = true); // manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application handle). e.g. force capture keyboard when your widget is being hovered. IMGUI_API void CaptureMouseFromApp(bool capture = true); // manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application handle). // Helpers functions to access functions pointers in ImGui::GetIO() IMGUI_API void* MemAlloc(size_t sz); IMGUI_API void MemFree(void* ptr); IMGUI_API const char* GetClipboardText(); IMGUI_API void SetClipboardText(const char* text); // Internal context access - if you want to use multiple context, share context between modules (e.g. DLL). There is a default context created and active by default. // All contexts share a same ImFontAtlas by default. If you want different font atlas, you can new() them and overwrite the GetIO().Fonts variable of an ImGui context. IMGUI_API const char* GetVersion(); IMGUI_API ImGuiContext* CreateContext(void* (*malloc_fn)(size_t) = NULL, void (*free_fn)(void*) = NULL); IMGUI_API void DestroyContext(ImGuiContext* ctx); IMGUI_API ImGuiContext* GetCurrentContext(); IMGUI_API void SetCurrentContext(ImGuiContext* ctx); // Obsolete functions (Will be removed! Also see 'API BREAKING CHANGES' section in imgui.cpp) #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS static inline bool IsItemHoveredRect() { return IsItemRectHovered(); } // OBSOLETE 1.51+ static inline bool IsPosHoveringAnyWindow(const ImVec2&) { IM_ASSERT(0); return false; } // OBSOLETE 1.51+. This was partly broken. You probably wanted to use ImGui::GetIO().WantCaptureMouse instead. static inline bool IsMouseHoveringAnyWindow() { return IsAnyWindowHovered(); } // OBSOLETE 1.51+ static inline bool IsMouseHoveringWindow() { return IsWindowRectHovered(); } // OBSOLETE 1.51+ static inline bool CollapsingHeader(const char* label, const char* str_id, bool framed = true, bool default_open = false) { (void)str_id; (void)framed; ImGuiTreeNodeFlags default_open_flags = 1<<5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } // OBSOLETE 1.49+ static inline ImFont* GetWindowFont() { return GetFont(); } // OBSOLETE 1.48+ static inline float GetWindowFontSize() { return GetFontSize(); } // OBSOLETE 1.48+ static inline void SetScrollPosHere() { SetScrollHere(); } // OBSOLETE 1.42+ #endif } // namespace ImGui // Flags for ImGui::Begin() enum ImGuiWindowFlags_ { // Default: 0 ImGuiWindowFlags_NoTitleBar = 1 << 0, // Disable title-bar ImGuiWindowFlags_NoResize = 1 << 1, // Disable user resizing with the lower-right grip ImGuiWindowFlags_NoMove = 1 << 2, // Disable user moving the window ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbars (window can still scroll with mouse or programatically) ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame ImGuiWindowFlags_ShowBorders = 1 << 7, // Show borders around windows and items ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file ImGuiWindowFlags_NoInputs = 1 << 9, // Disable catching mouse or keyboard inputs ImGuiWindowFlags_MenuBar = 1 << 10, // Has a menu-bar ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, // Disable taking focus when transitioning from hidden to visible state ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, // Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus) ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y) ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x) ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) // [Internal] ImGuiWindowFlags_ChildWindow = 1 << 22, // Don't use! For internal use by BeginChild() ImGuiWindowFlags_ComboBox = 1 << 23, // Don't use! For internal use by ComboBox() ImGuiWindowFlags_Tooltip = 1 << 24, // Don't use! For internal use by BeginTooltip() ImGuiWindowFlags_Popup = 1 << 25, // Don't use! For internal use by BeginPopup() ImGuiWindowFlags_Modal = 1 << 26, // Don't use! For internal use by BeginPopupModal() ImGuiWindowFlags_ChildMenu = 1 << 27 // Don't use! For internal use by BeginMenu() }; // Flags for ImGui::InputText() enum ImGuiInputTextFlags_ { // Default: 0 ImGuiInputTextFlags_CharsDecimal = 1 << 0, // Allow 0123456789.+-*/ ImGuiInputTextFlags_CharsHexadecimal = 1 << 1, // Allow 0123456789ABCDEFabcdef ImGuiInputTextFlags_CharsUppercase = 1 << 2, // Turn a..z into A..Z ImGuiInputTextFlags_CharsNoBlank = 1 << 3, // Filter out spaces, tabs ImGuiInputTextFlags_AutoSelectAll = 1 << 4, // Select entire text when first taking mouse focus ImGuiInputTextFlags_EnterReturnsTrue = 1 << 5, // Return 'true' when Enter is pressed (as opposed to when the value was modified) ImGuiInputTextFlags_CallbackCompletion = 1 << 6, // Call user function on pressing TAB (for completion handling) ImGuiInputTextFlags_CallbackHistory = 1 << 7, // Call user function on pressing Up/Down arrows (for history handling) ImGuiInputTextFlags_CallbackAlways = 1 << 8, // Call user function every time. User code may query cursor position, modify text buffer. ImGuiInputTextFlags_CallbackCharFilter = 1 << 9, // Call user function to filter character. Modify data->EventChar to replace/filter input, or return 1 to discard character. ImGuiInputTextFlags_AllowTabInput = 1 << 10, // Pressing TAB input a '\t' character into the text field ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11, // In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12, // Disable following the cursor horizontally ImGuiInputTextFlags_AlwaysInsertMode = 1 << 13, // Insert mode ImGuiInputTextFlags_ReadOnly = 1 << 14, // Read-only mode ImGuiInputTextFlags_Password = 1 << 15, // Password mode, display all characters as '*' // [Internal] ImGuiInputTextFlags_Multiline = 1 << 20 // For internal use by InputTextMultiline() }; // Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*() enum ImGuiTreeNodeFlags_ { ImGuiTreeNodeFlags_Selected = 1 << 0, // Draw as selected ImGuiTreeNodeFlags_Framed = 1 << 1, // Full colored frame (e.g. for CollapsingHeader) ImGuiTreeNodeFlags_AllowOverlapMode = 1 << 2, // Hit testing to allow subsequent widgets to overlap this one ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3, // Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4, // Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) ImGuiTreeNodeFlags_DefaultOpen = 1 << 5, // Default node to be open ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6, // Need double-click to open node ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7, // Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. ImGuiTreeNodeFlags_Leaf = 1 << 8, // No collapsing, no arrow (use as a convenience for leaf nodes). ImGuiTreeNodeFlags_Bullet = 1 << 9, // Display a bullet instead of arrow //ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 10, // FIXME: TODO: Extend hit box horizontally even if not framed //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 11, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog }; // Flags for ImGui::Selectable() enum ImGuiSelectableFlags_ { // Default: 0 ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this don't close parent popup window ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Selectable frame can span all columns (text will still fit in current column) ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 // Generate press events on double clicks too }; // User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array enum ImGuiKey_ { ImGuiKey_Tab, // for tabbing through fields ImGuiKey_LeftArrow, // for text edit ImGuiKey_RightArrow,// for text edit ImGuiKey_UpArrow, // for text edit ImGuiKey_DownArrow, // for text edit ImGuiKey_PageUp, ImGuiKey_PageDown, ImGuiKey_Home, // for text edit ImGuiKey_End, // for text edit ImGuiKey_Delete, // for text edit ImGuiKey_Backspace, // for text edit ImGuiKey_Enter, // for text edit ImGuiKey_Escape, // for text edit ImGuiKey_A, // for text edit CTRL+A: select all ImGuiKey_C, // for text edit CTRL+C: copy ImGuiKey_V, // for text edit CTRL+V: paste ImGuiKey_X, // for text edit CTRL+X: cut ImGuiKey_Y, // for text edit CTRL+Y: redo ImGuiKey_Z, // for text edit CTRL+Z: undo ImGuiKey_COUNT }; // Enumeration for PushStyleColor() / PopStyleColor() enum ImGuiCol_ { ImGuiCol_Text, ImGuiCol_TextDisabled, ImGuiCol_WindowBg, // Background of normal windows ImGuiCol_ChildWindowBg, // Background of child windows ImGuiCol_PopupBg, // Background of popups, menus, tooltips windows ImGuiCol_Border, ImGuiCol_BorderShadow, ImGuiCol_FrameBg, // Background of checkbox, radio button, plot, slider, text input ImGuiCol_FrameBgHovered, ImGuiCol_FrameBgActive, ImGuiCol_TitleBg, ImGuiCol_TitleBgCollapsed, ImGuiCol_TitleBgActive, ImGuiCol_MenuBarBg, ImGuiCol_ScrollbarBg, ImGuiCol_ScrollbarGrab, ImGuiCol_ScrollbarGrabHovered, ImGuiCol_ScrollbarGrabActive, ImGuiCol_ComboBg, ImGuiCol_CheckMark, ImGuiCol_SliderGrab, ImGuiCol_SliderGrabActive, ImGuiCol_Button, ImGuiCol_ButtonHovered, ImGuiCol_ButtonActive, ImGuiCol_Header, ImGuiCol_HeaderHovered, ImGuiCol_HeaderActive, ImGuiCol_Separator, ImGuiCol_SeparatorHovered, ImGuiCol_SeparatorActive, ImGuiCol_ResizeGrip, ImGuiCol_ResizeGripHovered, ImGuiCol_ResizeGripActive, ImGuiCol_CloseButton, ImGuiCol_CloseButtonHovered, ImGuiCol_CloseButtonActive, ImGuiCol_PlotLines, ImGuiCol_PlotLinesHovered, ImGuiCol_PlotHistogram, ImGuiCol_PlotHistogramHovered, ImGuiCol_TextSelectedBg, ImGuiCol_ModalWindowDarkening, // darken entire screen when a modal window is active ImGuiCol_COUNT // Obsolete names (will be removed) #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS , ImGuiCol_Column = ImGuiCol_Separator, ImGuiCol_ColumnHovered = ImGuiCol_SeparatorHovered, ImGuiCol_ColumnActive = ImGuiCol_SeparatorActive #endif }; // Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure. // NB: the enum only refers to fields of ImGuiStyle which makes sense to be pushed/poped inside UI code. During initialization, feel free to just poke into ImGuiStyle directly. // NB: if changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type. enum ImGuiStyleVar_ { // Enum name ......................// Member in ImGuiStyle structure (see ImGuiStyle for descriptions) ImGuiStyleVar_Alpha, // float Alpha ImGuiStyleVar_WindowPadding, // ImVec2 WindowPadding ImGuiStyleVar_WindowRounding, // float WindowRounding ImGuiStyleVar_WindowMinSize, // ImVec2 WindowMinSize ImGuiStyleVar_ChildWindowRounding, // float ChildWindowRounding ImGuiStyleVar_FramePadding, // ImVec2 FramePadding ImGuiStyleVar_FrameRounding, // float FrameRounding ImGuiStyleVar_ItemSpacing, // ImVec2 ItemSpacing ImGuiStyleVar_ItemInnerSpacing, // ImVec2 ItemInnerSpacing ImGuiStyleVar_IndentSpacing, // float IndentSpacing ImGuiStyleVar_GrabMinSize, // float GrabMinSize ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign ImGuiStyleVar_Count_ }; // Enumeration for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() enum ImGuiColorEditFlags_ { ImGuiColorEditFlags_NoAlpha = 1 << 1, // // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (read 3 components from the input pointer). ImGuiColorEditFlags_NoPicker = 1 << 2, // // ColorEdit: disable picker when clicking on colored square. ImGuiColorEditFlags_NoOptions = 1 << 3, // // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview. ImGuiColorEditFlags_NoSmallPreview = 1 << 4, // // ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs) ImGuiColorEditFlags_NoInputs = 1 << 5, // // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square). ImGuiColorEditFlags_NoTooltip = 1 << 6, // // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview. ImGuiColorEditFlags_NoLabel = 1 << 7, // // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker). ImGuiColorEditFlags_NoSidePreview = 1 << 8, // // ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead. // User Options (right-click on widget to change some of them). You can set application defaults using SetColorEditOptions(). The idea is that you probably don't want to override them in most of your calls, let the user choose and/or call SetColorEditOptions() during startup. ImGuiColorEditFlags_AlphaBar = 1 << 9, // // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker. ImGuiColorEditFlags_AlphaPreview = 1 << 10, // // ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque. ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 11, // // ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque. ImGuiColorEditFlags_HDR = 1 << 12, // // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well). ImGuiColorEditFlags_RGB = 1 << 13, // [Inputs] // ColorEdit: choose one among RGB/HSV/HEX. ColorPicker: choose any combination using RGB/HSV/HEX. ImGuiColorEditFlags_HSV = 1 << 14, // [Inputs] // " ImGuiColorEditFlags_HEX = 1 << 15, // [Inputs] // " ImGuiColorEditFlags_Uint8 = 1 << 16, // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255. ImGuiColorEditFlags_Float = 1 << 17, // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers. ImGuiColorEditFlags_PickerHueBar = 1 << 18, // [PickerMode] // ColorPicker: bar for Hue, rectangle for Sat/Value. ImGuiColorEditFlags_PickerHueWheel = 1 << 19, // [PickerMode] // ColorPicker: wheel for Hue, triangle for Sat/Value. // Internals/Masks ImGuiColorEditFlags__InputsMask = ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_HSV|ImGuiColorEditFlags_HEX, ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float, ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar, ImGuiColorEditFlags__OptionsDefault = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_PickerHueBar // Change application default using SetColorEditOptions() }; // Enumeration for GetMouseCursor() enum ImGuiMouseCursor_ { ImGuiMouseCursor_None = -1, ImGuiMouseCursor_Arrow = 0, ImGuiMouseCursor_TextInput, // When hovering over InputText, etc. ImGuiMouseCursor_Move, // Unused ImGuiMouseCursor_ResizeNS, // Unused ImGuiMouseCursor_ResizeEW, // When hovering over a column ImGuiMouseCursor_ResizeNESW, // Unused ImGuiMouseCursor_ResizeNWSE, // When hovering over the bottom-right corner of a window ImGuiMouseCursor_Count_ }; // Condition flags for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions // All those functions treat 0 as a shortcut to ImGuiCond_Always enum ImGuiCond_ { ImGuiCond_Always = 1 << 0, // Set the variable ImGuiCond_Once = 1 << 1, // Set the variable once per runtime session (only the first call with succeed) ImGuiCond_FirstUseEver = 1 << 2, // Set the variable if the window has no saved data (if doesn't exist in the .ini file) ImGuiCond_Appearing = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time) // Obsolete names (will be removed) #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS , ImGuiSetCond_Always = ImGuiCond_Always, ImGuiSetCond_Once = ImGuiCond_Once, ImGuiSetCond_FirstUseEver = ImGuiCond_FirstUseEver, ImGuiSetCond_Appearing = ImGuiCond_Appearing #endif }; struct ImGuiStyle { float Alpha; // Global alpha applies to everything in ImGui ImVec2 WindowPadding; // Padding within a window ImVec2 WindowMinSize; // Minimum window size float WindowRounding; // Radius of window corners rounding. Set to 0.0f to have rectangular windows ImVec2 WindowTitleAlign; // Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered. float ChildWindowRounding; // Radius of child window corners rounding. Set to 0.0f to have rectangular windows ImVec2 FramePadding; // Padding within a framed rectangle (used by most widgets) float FrameRounding; // Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). ImVec2 ItemSpacing; // Horizontal and vertical spacing between widgets/lines ImVec2 ItemInnerSpacing; // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label) ImVec2 TouchExtraPadding; // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! float IndentSpacing; // Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2). float ColumnsMinSpacing; // Minimum horizontal spacing between two columns float ScrollbarSize; // Width of the vertical scrollbar, Height of the horizontal scrollbar float ScrollbarRounding; // Radius of grab corners for scrollbar float GrabMinSize; // Minimum width/height of a grab box for slider/scrollbar. float GrabRounding; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. ImVec2 ButtonTextAlign; // Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered. ImVec2 DisplayWindowPadding; // Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows. ImVec2 DisplaySafeAreaPadding; // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows. bool AntiAliasedLines; // Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU. bool AntiAliasedShapes; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) float CurveTessellationTol; // Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. ImVec4 Colors[ImGuiCol_COUNT]; IMGUI_API ImGuiStyle(); }; // This is where your app communicate with ImGui. Access via ImGui::GetIO(). // Read 'Programmer guide' section in .cpp file for general usage. struct ImGuiIO { //------------------------------------------------------------------ // Settings (fill once) // Default value: //------------------------------------------------------------------ ImVec2 DisplaySize; // <unset> // Display size, in pixels. For clamping windows positions. float DeltaTime; // = 1.0f/60.0f // Time elapsed since last frame, in seconds. float IniSavingRate; // = 5.0f // Maximum time between saving positions/sizes to .ini file, in seconds. const char* IniFilename; // = "imgui.ini" // Path to .ini file. NULL to disable .ini saving. const char* LogFilename; // = "imgui_log.txt" // Path to .log file (default parameter to ImGui::LogToFile when no file is specified). float MouseDoubleClickTime; // = 0.30f // Time for a double-click, in seconds. float MouseDoubleClickMaxDist; // = 6.0f // Distance threshold to stay in to validate a double-click, in pixels. float MouseDragThreshold; // = 6.0f // Distance threshold before considering we are dragging int KeyMap[ImGuiKey_COUNT]; // <unset> // Map of indices into the KeysDown[512] entries array float KeyRepeatDelay; // = 0.250f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.). float KeyRepeatRate; // = 0.050f // When holding a key/button, rate at which it repeats, in seconds. void* UserData; // = NULL // Store your own data for retrieval by callbacks. ImFontAtlas* Fonts; // <auto> // Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array. float FontGlobalScale; // = 1.0f // Global scale all fonts bool FontAllowUserScaling; // = false // Allow user scaling text of individual window with CTRL+Wheel. ImFont* FontDefault; // = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0]. ImVec2 DisplayFramebufferScale; // = (1.0f,1.0f) // For retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui. ImVec2 DisplayVisibleMin; // <unset> (0.0f,0.0f) // If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area. ImVec2 DisplayVisibleMax; // <unset> (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize // Advanced/subtle behaviors bool OSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl //------------------------------------------------------------------ // Settings (User Functions) //------------------------------------------------------------------ // Rendering function, will be called in Render(). // Alternatively you can keep this to NULL and call GetDrawData() after Render() to get the same pointer. // See example applications if you are unsure of how to implement this. void (*RenderDrawListsFn)(ImDrawData* data); // Optional: access OS clipboard // (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) const char* (*GetClipboardTextFn)(void* user_data); void (*SetClipboardTextFn)(void* user_data, const char* text); void* ClipboardUserData; // Optional: override memory allocations. MemFreeFn() may be called with a NULL pointer. // (default to posix malloc/free) void* (*MemAllocFn)(size_t sz); void (*MemFreeFn)(void* ptr); // Optional: notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME in Windows) // (default to use native imm32 api on Windows) void (*ImeSetInputScreenPosFn)(int x, int y); void* ImeWindowHandle; // (Windows) Set this to your HWND to get automatic IME cursor positioning. //------------------------------------------------------------------ // Input - Fill before calling NewFrame() //------------------------------------------------------------------ ImVec2 MousePos; // Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.) bool MouseDown[5]; // Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. float MouseWheel; // Mouse wheel: 1 unit scrolls about 5 lines text. bool MouseDrawCursor; // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). bool KeyCtrl; // Keyboard modifier pressed: Control bool KeyShift; // Keyboard modifier pressed: Shift bool KeyAlt; // Keyboard modifier pressed: Alt bool KeySuper; // Keyboard modifier pressed: Cmd/Super/Windows bool KeysDown[512]; // Keyboard keys that are pressed (in whatever storage order you naturally have access to keyboard data) ImWchar InputCharacters[16+1]; // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper. // Functions IMGUI_API void AddInputCharacter(ImWchar c); // Add new character into InputCharacters[] IMGUI_API void AddInputCharactersUTF8(const char* utf8_chars); // Add new characters into InputCharacters[] from an UTF-8 string inline void ClearInputCharacters() { InputCharacters[0] = 0; } // Clear the text input buffer manually //------------------------------------------------------------------ // Output - Retrieve after calling NewFrame() //------------------------------------------------------------------ bool WantCaptureMouse; // Mouse is hovering a window or widget is active (= ImGui will use your mouse input). Use to hide mouse from the rest of your application bool WantCaptureKeyboard; // Widget is active (= ImGui will use your keyboard input). Use to hide keyboard from the rest of your application bool WantTextInput; // Some text input widget is active, which will read input characters from the InputCharacters array. Use to activate on screen keyboard if your system needs one float Framerate; // Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames int MetricsAllocs; // Number of active memory allocations int MetricsRenderVertices; // Vertices output during last call to Render() int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3 int MetricsActiveWindows; // Number of visible root windows (exclude child windows) ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are negative, so a disappearing/reappearing mouse won't have a huge delta for one frame. //------------------------------------------------------------------ // [Private] ImGui will maintain those fields. Forward compatibility not guaranteed! //------------------------------------------------------------------ ImVec2 MousePosPrev; // Previous mouse position temporary storage (nb: not for public use, set to MousePos in NewFrame()) bool MouseClicked[5]; // Mouse button went from !Down to Down ImVec2 MouseClickedPos[5]; // Position at time of clicking float MouseClickedTime[5]; // Time of last click (used to figure out double-click) bool MouseDoubleClicked[5]; // Has mouse button been double-clicked? bool MouseReleased[5]; // Mouse button went from Down to !Down bool MouseDownOwned[5]; // Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds. float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked) float MouseDownDurationPrev[5]; // Previous time the mouse button has been down float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the click point float KeysDownDuration[512]; // Duration the keyboard key has been down (0.0f == just pressed) float KeysDownDurationPrev[512]; // Previous duration the key has been down IMGUI_API ImGuiIO(); }; //----------------------------------------------------------------------------- // Helpers //----------------------------------------------------------------------------- // Lightweight std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug). // Our implementation does NOT call c++ constructors because we don't use them in ImGui. Don't use this class as a straight std::vector replacement in your code! template<typename T> class ImVector { public: int Size; int Capacity; T* Data; typedef T value_type; typedef value_type* iterator; typedef const value_type* const_iterator; ImVector() { Size = Capacity = 0; Data = NULL; } ~ImVector() { if (Data) ImGui::MemFree(Data); } inline bool empty() const { return Size == 0; } inline int size() const { return Size; } inline int capacity() const { return Capacity; } inline value_type& operator[](int i) { IM_ASSERT(i < Size); return Data[i]; } inline const value_type& operator[](int i) const { IM_ASSERT(i < Size); return Data[i]; } inline void clear() { if (Data) { Size = Capacity = 0; ImGui::MemFree(Data); Data = NULL; } } inline iterator begin() { return Data; } inline const_iterator begin() const { return Data; } inline iterator end() { return Data + Size; } inline const_iterator end() const { return Data + Size; } inline value_type& front() { IM_ASSERT(Size > 0); return Data[0]; } inline const value_type& front() const { IM_ASSERT(Size > 0); return Data[0]; } inline value_type& back() { IM_ASSERT(Size > 0); return Data[Size-1]; } inline const value_type& back() const { IM_ASSERT(Size > 0); return Data[Size-1]; } inline void swap(ImVector<T>& rhs) { int rhs_size = rhs.Size; rhs.Size = Size; Size = rhs_size; int rhs_cap = rhs.Capacity; rhs.Capacity = Capacity; Capacity = rhs_cap; value_type* rhs_data = rhs.Data; rhs.Data = Data; Data = rhs_data; } inline int _grow_capacity(int size) const { int new_capacity = Capacity ? (Capacity + Capacity/2) : 8; return new_capacity > size ? new_capacity : size; } inline void resize(int new_size) { if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; } inline void reserve(int new_capacity) { if (new_capacity <= Capacity) return; T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(value_type)); if (Data) memcpy(new_data, Data, (size_t)Size * sizeof(value_type)); ImGui::MemFree(Data); Data = new_data; Capacity = new_capacity; } inline void push_back(const value_type& v) { if (Size == Capacity) reserve(_grow_capacity(Size+1)); Data[Size++] = v; } inline void pop_back() { IM_ASSERT(Size > 0); Size--; } inline iterator erase(const_iterator it) { IM_ASSERT(it >= Data && it < Data+Size); const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((size_t)Size - (size_t)off - 1) * sizeof(value_type)); Size--; return Data + off; } inline iterator insert(const_iterator it, const value_type& v) { IM_ASSERT(it >= Data && it <= Data+Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(Capacity ? Capacity * 2 : 4); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(value_type)); Data[off] = v; Size++; return Data + off; } }; // Helper: execute a block of code at maximum once a frame. Convenient if you want to quickly create an UI within deep-nested code that runs multiple times every frame. // Usage: // static ImGuiOnceUponAFrame oaf; // if (oaf) // ImGui::Text("This will be called only once per frame"); struct ImGuiOnceUponAFrame { ImGuiOnceUponAFrame() { RefFrame = -1; } mutable int RefFrame; operator bool() const { int current_frame = ImGui::GetFrameCount(); if (RefFrame == current_frame) return false; RefFrame = current_frame; return true; } }; // Helper macro for ImGuiOnceUponAFrame. Attention: The macro expands into 2 statement so make sure you don't use it within e.g. an if() statement without curly braces. #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS // Will obsolete #define IMGUI_ONCE_UPON_A_FRAME static ImGuiOnceUponAFrame imgui_oaf; if (imgui_oaf) #endif // Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" struct ImGuiTextFilter { struct TextRange { const char* b; const char* e; TextRange() { b = e = NULL; } TextRange(const char* _b, const char* _e) { b = _b; e = _e; } const char* begin() const { return b; } const char* end() const { return e; } bool empty() const { return b == e; } char front() const { return *b; } static bool is_blank(char c) { return c == ' ' || c == '\t'; } void trim_blanks() { while (b < e && is_blank(*b)) b++; while (e > b && is_blank(*(e-1))) e--; } IMGUI_API void split(char separator, ImVector<TextRange>& out); }; char InputBuf[256]; ImVector<TextRange> Filters; int CountGrep; IMGUI_API ImGuiTextFilter(const char* default_filter = ""); ~ImGuiTextFilter() {} void Clear() { InputBuf[0] = 0; Build(); } IMGUI_API bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); // Helper calling InputText+Build IMGUI_API bool PassFilter(const char* text, const char* text_end = NULL) const; bool IsActive() const { return !Filters.empty(); } IMGUI_API void Build(); }; // Helper: Text buffer for logging/accumulating text struct ImGuiTextBuffer { ImVector<char> Buf; ImGuiTextBuffer() { Buf.push_back(0); } inline char operator[](int i) { return Buf.Data[i]; } const char* begin() const { return &Buf.front(); } const char* end() const { return &Buf.back(); } // Buf is zero-terminated, so end() will point on the zero-terminator int size() const { return Buf.Size - 1; } bool empty() { return Buf.Size <= 1; } void clear() { Buf.clear(); Buf.push_back(0); } const char* c_str() const { return Buf.Data; } IMGUI_API void append(const char* fmt, ...) IM_FMTARGS(2); IMGUI_API void appendv(const char* fmt, va_list args) IM_FMTLIST(2); }; // Helper: Simple Key->value storage // Typically you don't have to worry about this since a storage is held within each Window. // We use it to e.g. store collapse state for a tree (Int 0/1), store color edit options. // This is optimized for efficient reading (dichotomy into a contiguous buffer), rare writing (typically tied to user interactions) // You can use it as custom user storage for temporary values. Declare your own storage if, for example: // - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state). // - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient) // Types are NOT stored, so it is up to you to make sure your Key don't collide with different types. struct ImGuiStorage { struct Pair { ImGuiID key; union { int val_i; float val_f; void* val_p; }; Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; } Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; } Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; } }; ImVector<Pair> Data; // - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) // - Set***() functions find pair, insertion on demand if missing. // - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. IMGUI_API void Clear(); IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const; IMGUI_API void SetInt(ImGuiID key, int val); IMGUI_API bool GetBool(ImGuiID key, bool default_val = false) const; IMGUI_API void SetBool(ImGuiID key, bool val); IMGUI_API float GetFloat(ImGuiID key, float default_val = 0.0f) const; IMGUI_API void SetFloat(ImGuiID key, float val); IMGUI_API void* GetVoidPtr(ImGuiID key) const; // default_val is NULL IMGUI_API void SetVoidPtr(ImGuiID key, void* val); // - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. // - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. // - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct) // float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; IMGUI_API int* GetIntRef(ImGuiID key, int default_val = 0); IMGUI_API bool* GetBoolRef(ImGuiID key, bool default_val = false); IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0.0f); IMGUI_API void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL); // Use on your own storage if you know only integer are being stored (open/close all tree nodes) IMGUI_API void SetAllInt(int val); }; // Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used and the corresponding callback is triggered. struct ImGuiTextEditCallbackData { ImGuiInputTextFlags EventFlag; // One of ImGuiInputTextFlags_Callback* // Read-only ImGuiInputTextFlags Flags; // What user passed to InputText() // Read-only void* UserData; // What user passed to InputText() // Read-only bool ReadOnly; // Read-only mode // Read-only // CharFilter event: ImWchar EventChar; // Character input // Read-write (replace character or set to zero) // Completion,History,Always events: // If you modify the buffer contents make sure you update 'BufTextLen' and set 'BufDirty' to true. ImGuiKey EventKey; // Key pressed (Up/Down/TAB) // Read-only char* Buf; // Current text buffer // Read-write (pointed data only, can't replace the actual pointer) int BufTextLen; // Current text length in bytes // Read-write int BufSize; // Maximum text length in bytes // Read-only bool BufDirty; // Set if you modify Buf/BufTextLen!! // Write int CursorPos; // // Read-write int SelectionStart; // // Read-write (== to SelectionEnd when no selection) int SelectionEnd; // // Read-write // NB: Helper functions for text manipulation. Calling those function loses selection. IMGUI_API void DeleteChars(int pos, int bytes_count); IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL); bool HasSelection() const { return SelectionStart != SelectionEnd; } }; // Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). // NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. struct ImGuiSizeConstraintCallbackData { void* UserData; // Read-only. What user passed to SetNextWindowSizeConstraints() ImVec2 Pos; // Read-only. Window position, for reference. ImVec2 CurrentSize; // Read-only. Current window size. ImVec2 DesiredSize; // Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. }; // Helpers macros to generate 32-bits encoded colors #ifdef IMGUI_USE_BGRA_PACKED_COLOR #define IM_COL32_R_SHIFT 16 #define IM_COL32_G_SHIFT 8 #define IM_COL32_B_SHIFT 0 #define IM_COL32_A_SHIFT 24 #define IM_COL32_A_MASK 0xFF000000 #else #define IM_COL32_R_SHIFT 0 #define IM_COL32_G_SHIFT 8 #define IM_COL32_B_SHIFT 16 #define IM_COL32_A_SHIFT 24 #define IM_COL32_A_MASK 0xFF000000 #endif #define IM_COL32(R,G,B,A) (((ImU32)(A)<<IM_COL32_A_SHIFT) | ((ImU32)(B)<<IM_COL32_B_SHIFT) | ((ImU32)(G)<<IM_COL32_G_SHIFT) | ((ImU32)(R)<<IM_COL32_R_SHIFT)) #define IM_COL32_WHITE IM_COL32(255,255,255,255) // Opaque white = 0xFFFFFFFF #define IM_COL32_BLACK IM_COL32(0,0,0,255) // Opaque black #define IM_COL32_BLACK_TRANS IM_COL32(0,0,0,0) // Transparent black = 0x00000000 // ImColor() helper to implicity converts colors to either ImU32 (packed 4x1 byte) or ImVec4 (4x1 float) // Prefer using IM_COL32() macros if you want a guaranteed compile-time ImU32 for usage with ImDrawList API. // **Avoid storing ImColor! Store either u32 of ImVec4. This is not a full-featured color class. MAY OBSOLETE. // **None of the ImGui API are using ImColor directly but you can use it as a convenience to pass colors in either ImU32 or ImVec4 formats. Explicitly cast to ImU32 or ImVec4 if needed. struct ImColor { ImVec4 Value; ImColor() { Value.x = Value.y = Value.z = Value.w = 0.0f; } ImColor(int r, int g, int b, int a = 255) { float sc = 1.0f/255.0f; Value.x = (float)r * sc; Value.y = (float)g * sc; Value.z = (float)b * sc; Value.w = (float)a * sc; } ImColor(ImU32 rgba) { float sc = 1.0f/255.0f; Value.x = (float)((rgba>>IM_COL32_R_SHIFT)&0xFF) * sc; Value.y = (float)((rgba>>IM_COL32_G_SHIFT)&0xFF) * sc; Value.z = (float)((rgba>>IM_COL32_B_SHIFT)&0xFF) * sc; Value.w = (float)((rgba>>IM_COL32_A_SHIFT)&0xFF) * sc; } ImColor(float r, float g, float b, float a = 1.0f) { Value.x = r; Value.y = g; Value.z = b; Value.w = a; } ImColor(const ImVec4& col) { Value = col; } inline operator ImU32() const { return ImGui::ColorConvertFloat4ToU32(Value); } inline operator ImVec4() const { return Value; } // FIXME-OBSOLETE: May need to obsolete/cleanup those helpers. inline void SetHSV(float h, float s, float v, float a = 1.0f){ ImGui::ColorConvertHSVtoRGB(h, s, v, Value.x, Value.y, Value.z); Value.w = a; } static ImColor HSV(float h, float s, float v, float a = 1.0f) { float r,g,b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b); return ImColor(r,g,b,a); } }; // Helper: Manually clip large list of items. // If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse clipping based on visibility to save yourself from processing those items at all. // The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. // ImGui already clip items based on their bounds but it needs to measure text size to do so. Coarse clipping before submission makes this cost and your own data fetching/submission cost null. // Usage: // ImGuiListClipper clipper(1000); // we have 1000 elements, evenly spaced. // while (clipper.Step()) // for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) // ImGui::Text("line number %d", i); // - Step 0: the clipper let you process the first element, regardless of it being visible or not, so we can measure the element height (step skipped if we passed a known height as second arg to constructor). // - Step 1: the clipper infer height from first element, calculate the actual range of elements to display, and position the cursor before the first element. // - (Step 2: dummy step only required if an explicit items_height was passed to constructor or Begin() and user call Step(). Does nothing and switch to Step 3.) // - Step 3: the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd), advance the cursor to the end of the list and then returns 'false' to end the loop. struct ImGuiListClipper { float StartPosY; float ItemsHeight; int ItemsCount, StepNo, DisplayStart, DisplayEnd; // items_count: Use -1 to ignore (you can call Begin later). Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step). // items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetItemsLineHeightWithSpacing(). // If you don't specify an items_height, you NEED to call Step(). If you specify items_height you may call the old Begin()/End() api directly, but prefer calling Step(). ImGuiListClipper(int items_count = -1, float items_height = -1.0f) { Begin(items_count, items_height); } // NB: Begin() initialize every fields (as we allow user to call Begin/End multiple times on a same instance if they want). ~ImGuiListClipper() { IM_ASSERT(ItemsCount == -1); } // Assert if user forgot to call End() or Step() until false. IMGUI_API bool Step(); // Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items. IMGUI_API void Begin(int items_count, float items_height = -1.0f); // Automatically called by constructor if you passed 'items_count' or by Step() in Step 1. IMGUI_API void End(); // Automatically called on the last call of Step() that returns false. }; //----------------------------------------------------------------------------- // Draw List // Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList. //----------------------------------------------------------------------------- // Draw callbacks for advanced uses. // NB- You most likely do NOT need to use draw callbacks just to create your own widget or customized UI rendering (you can poke into the draw list for that) // Draw callback may be useful for example, A) Change your GPU render state, B) render a complex 3D scene inside a UI element (without an intermediate texture/render target), etc. // The expected behavior from your rendering function is 'if (cmd.UserCallback != NULL) cmd.UserCallback(parent_list, cmd); else RenderTriangles()' typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd); // Typically, 1 command = 1 gpu draw call (unless command is a callback) struct ImDrawCmd { unsigned int ElemCount; // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[]. ImVec4 ClipRect; // Clipping rectangle (x1, y1, x2, y2) ImTextureID TextureId; // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas. ImDrawCallback UserCallback; // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally. void* UserCallbackData; // The draw callback code can access this. ImDrawCmd() { ElemCount = 0; ClipRect.x = ClipRect.y = -8192.0f; ClipRect.z = ClipRect.w = +8192.0f; TextureId = NULL; UserCallback = NULL; UserCallbackData = NULL; } }; // Vertex index (override with '#define ImDrawIdx unsigned int' inside in imconfig.h) #ifndef ImDrawIdx typedef unsigned short ImDrawIdx; #endif // Vertex layout #ifndef IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT struct ImDrawVert { ImVec2 pos; ImVec2 uv; ImU32 col; }; #else // You can override the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h // The code expect ImVec2 pos (8 bytes), ImVec2 uv (8 bytes), ImU32 col (4 bytes), but you can re-order them or add other fields as needed to simplify integration in your engine. // The type has to be described within the macro (you can either declare the struct or use a typedef) // NOTE: IMGUI DOESN'T CLEAR THE STRUCTURE AND DOESN'T CALL A CONSTRUCTOR SO ANY CUSTOM FIELD WILL BE UNINITIALIZED. IF YOU ADD EXTRA FIELDS (SUCH AS A 'Z' COORDINATES) YOU WILL NEED TO CLEAR THEM DURING RENDER OR TO IGNORE THEM. IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT; #endif // Draw channels are used by the Columns API to "split" the render list into different channels while building, so items of each column can be batched together. // You can also use them to simulate drawing layers and submit primitives in a different order than how they will be rendered. struct ImDrawChannel { ImVector<ImDrawCmd> CmdBuffer; ImVector<ImDrawIdx> IdxBuffer; }; // Draw command list // This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering. // At the moment, each ImGui window contains its own ImDrawList but they could potentially be merged in the future. // If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives. // You can interleave normal ImGui:: calls and adding primitives to the current draw list. // All positions are generally in pixel coordinates (top-left at (0,0), bottom-right at io.DisplaySize), however you are totally free to apply whatever transformation matrix to want to the data (if you apply such transformation you'll want to apply it to ClipRect as well) // Primitives are always added to the list and not culled (culling is done at higher-level by ImGui:: functions). struct ImDrawList { // This is what you have to render ImVector<ImDrawCmd> CmdBuffer; // Commands. Typically 1 command = 1 GPU draw call. ImVector<ImDrawIdx> IdxBuffer; // Index buffer. Each command consume ImDrawCmd::ElemCount of those ImVector<ImDrawVert> VtxBuffer; // Vertex buffer. // [Internal, used while building lists] const char* _OwnerName; // Pointer to owner window's name for debugging unsigned int _VtxCurrentIdx; // [Internal] == VtxBuffer.Size ImDrawVert* _VtxWritePtr; // [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much) ImDrawIdx* _IdxWritePtr; // [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much) ImVector<ImVec4> _ClipRectStack; // [Internal] ImVector<ImTextureID> _TextureIdStack; // [Internal] ImVector<ImVec2> _Path; // [Internal] current path building int _ChannelsCurrent; // [Internal] current channel number (0) int _ChannelsCount; // [Internal] number of active channels (1+) ImVector<ImDrawChannel> _Channels; // [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size) ImDrawList() { _OwnerName = NULL; Clear(); } ~ImDrawList() { ClearFreeMemory(); } IMGUI_API void PushClipRect(ImVec2 clip_rect_min, ImVec2 clip_rect_max, bool intersect_with_current_clip_rect = false); // Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling) IMGUI_API void PushClipRectFullScreen(); IMGUI_API void PopClipRect(); IMGUI_API void PushTextureID(const ImTextureID& texture_id); IMGUI_API void PopTextureID(); inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.x, cr.y); } inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.z, cr.w); } // Primitives IMGUI_API void AddLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f); IMGUI_API void AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ~0, float thickness = 1.0f); // a: upper-left, b: lower-right, rounding_corners_flags: 4-bits corresponding to which corner to round IMGUI_API void AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ~0); // a: upper-left, b: lower-right IMGUI_API void AddRectFilledMultiColor(const ImVec2& a, const ImVec2& b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left); IMGUI_API void AddQuad(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, ImU32 col, float thickness = 1.0f); IMGUI_API void AddQuadFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, ImU32 col); IMGUI_API void AddTriangle(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col, float thickness = 1.0f); IMGUI_API void AddTriangleFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col); IMGUI_API void AddCircle(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12, float thickness = 1.0f); IMGUI_API void AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12); IMGUI_API void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL); IMGUI_API void AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL); IMGUI_API void AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a = ImVec2(0,0), const ImVec2& uv_b = ImVec2(1,1), ImU32 col = 0xFFFFFFFF); IMGUI_API void AddImageQuad(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a = ImVec2(0,0), const ImVec2& uv_b = ImVec2(1,0), const ImVec2& uv_c = ImVec2(1,1), const ImVec2& uv_d = ImVec2(0,1), ImU32 col = 0xFFFFFFFF); IMGUI_API void AddPolyline(const ImVec2* points, const int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased); IMGUI_API void AddConvexPolyFilled(const ImVec2* points, const int num_points, ImU32 col, bool anti_aliased); IMGUI_API void AddBezierCurve(const ImVec2& pos0, const ImVec2& cp0, const ImVec2& cp1, const ImVec2& pos1, ImU32 col, float thickness, int num_segments = 0); // Stateful path API, add points then finish with PathFill() or PathStroke() inline void PathClear() { _Path.resize(0); } inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); } inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || memcmp(&_Path[_Path.Size-1], &pos, 8) != 0) _Path.push_back(pos); } inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col, true); PathClear(); } inline void PathStroke(ImU32 col, bool closed, float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, closed, thickness, true); PathClear(); } IMGUI_API void PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments = 10); IMGUI_API void PathArcToFast(const ImVec2& centre, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle IMGUI_API void PathBezierCurveTo(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, int num_segments = 0); IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, int rounding_corners_flags = ~0); // rounding_corners_flags: 4-bits corresponding to which corner to round // Channels // - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives) // - Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end) IMGUI_API void ChannelsSplit(int channels_count); IMGUI_API void ChannelsMerge(); IMGUI_API void ChannelsSetCurrent(int channel_index); // Advanced IMGUI_API void AddCallback(ImDrawCallback callback, void* callback_data); // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles. IMGUI_API void AddDrawCmd(); // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible // Internal helpers // NB: all primitives needs to be reserved via PrimReserve() beforehand! IMGUI_API void Clear(); IMGUI_API void ClearFreeMemory(); IMGUI_API void PrimReserve(int idx_count, int vtx_count); IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col); // Axis aligned rectangle (composed of two triangles) IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col); IMGUI_API void PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col); inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col){ _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; } inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; } inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); } IMGUI_API void UpdateClipRect(); IMGUI_API void UpdateTextureID(); }; // All draw data to render an ImGui frame struct ImDrawData { bool Valid; // Only valid after Render() is called and before the next NewFrame() is called. ImDrawList** CmdLists; int CmdListsCount; int TotalVtxCount; // For convenience, sum of all cmd_lists vtx_buffer.Size int TotalIdxCount; // For convenience, sum of all cmd_lists idx_buffer.Size // Functions ImDrawData() { Valid = false; CmdLists = NULL; CmdListsCount = TotalVtxCount = TotalIdxCount = 0; } IMGUI_API void DeIndexAllBuffers(); // For backward compatibility or convenience: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering! IMGUI_API void ScaleClipRects(const ImVec2& sc); // Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution. }; struct ImFontConfig { void* FontData; // // TTF/OTF data int FontDataSize; // // TTF/OTF data size bool FontDataOwnedByAtlas; // true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself). int FontNo; // 0 // Index of font within TTF/OTF file float SizePixels; // // Size in pixels for rasterizer. int OversampleH, OversampleV; // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis. bool PixelSnapH; // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now. ImVec2 GlyphOffset; // 0, 0 // Offset all glyphs from this font input. const ImWchar* GlyphRanges; // NULL // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights. unsigned int RasterizerFlags; // 0x00 // Settings for custom font rasterizer (e.g. ImGuiFreeType). Leave as zero if you aren't using one. float RasterizerMultiply; // 1.0f // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. // [Internal] char Name[32]; // Name (strictly to ease debugging) ImFont* DstFont; IMGUI_API ImFontConfig(); }; // Load and rasterize multiple TTF/OTF fonts into a same texture. // Sharing a texture for multiple fonts allows us to reduce the number of draw calls during rendering. // We also add custom graphic data into the texture that serves for ImGui. // 1. (Optional) Call AddFont*** functions. If you don't call any, the default font will be loaded for you. // 2. Call GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. // 3. Upload the pixels data into a texture within your graphics system. // 4. Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture. This value will be passed back to you during rendering to identify the texture. // IMPORTANT: If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the ImFont is build (when calling GetTextData*** or Build()). We only copy the pointer, not the data. struct ImFontAtlas { IMGUI_API ImFontAtlas(); IMGUI_API ~ImFontAtlas(); IMGUI_API ImFont* AddFont(const ImFontConfig* font_cfg); IMGUI_API ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL); IMGUI_API ImFont* AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); IMGUI_API ImFont* AddFontFromMemoryTTF(void* font_data, int font_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // Transfer ownership of 'ttf_data' to ImFontAtlas, will be deleted after Build() IMGUI_API ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp IMGUI_API ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 paramaeter IMGUI_API void ClearTexData(); // Clear the CPU-side texture data. Saves RAM once the texture has been copied to graphics memory. IMGUI_API void ClearInputData(); // Clear the input TTF data (inc sizes, glyph ranges) IMGUI_API void ClearFonts(); // Clear the ImGui-side font data (glyphs storage, UV coordinates) IMGUI_API void Clear(); // Clear all // Retrieve texture data // User is in charge of copying the pixels into graphics memory, then call SetTextureUserID() // After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images) // RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted. // Pitch = Width * BytesPerPixels IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 1 byte per-pixel IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 4 bytes-per-pixel void SetTexID(ImTextureID id) { TexID = id; } // Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list) // NB: Make sure that your string are UTF-8 and NOT in your local code page. In C++11, you can create UTF-8 string literal using the u8"Hello world" syntax. See FAQ for details. IMGUI_API const ImWchar* GetGlyphRangesDefault(); // Basic Latin, Extended Latin IMGUI_API const ImWchar* GetGlyphRangesKorean(); // Default + Korean characters IMGUI_API const ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs IMGUI_API const ImWchar* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters IMGUI_API const ImWchar* GetGlyphRangesThai(); // Default + Thai characters // Helpers to build glyph ranges from text data. Feed all your application strings/characters to it then call BuildRanges(). struct GlyphRangesBuilder { ImVector<unsigned char> UsedChars; // Store 1-bit per Unicode code point (0=unused, 1=used) GlyphRangesBuilder() { UsedChars.resize(0x10000 / 8); memset(UsedChars.Data, 0, 0x10000 / 8); } bool GetBit(int n) { return (UsedChars[n >> 3] & (1 << (n & 7))) != 0; } void SetBit(int n) { UsedChars[n >> 3] |= 1 << (n & 7); } // Set bit 'c' in the array void AddChar(ImWchar c) { SetBit(c); } // Add character IMGUI_API void AddText(const char* text, const char* text_end = NULL); // Add string (each character of the UTF-8 string are added) IMGUI_API void AddRanges(const ImWchar* ranges); // Add ranges, e.g. builder.AddRanges(ImFontAtlas::GetGlyphRangesDefault) to force add all of ASCII/Latin+Ext IMGUI_API void BuildRanges(ImVector<ImWchar>* out_ranges); // Output new ranges }; // Members // (Access texture data via GetTexData*() calls which will setup a default font for you.) ImTextureID TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure. unsigned char* TexPixelsAlpha8; // 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight unsigned int* TexPixelsRGBA32; // 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4 int TexWidth; // Texture width calculated during Build(). int TexHeight; // Texture height calculated during Build(). int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height. int TexGlyphPadding; // Padding between glyphs within texture in pixels. Defaults to 1. ImVec2 TexUvWhitePixel; // Texture coordinates to a white pixel ImVector<ImFont*> Fonts; // Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font. // [Private] User rectangle for packing custom texture data into the atlas. struct CustomRect { unsigned int ID; // Input // User ID. <0x10000 for font mapped data (WIP/UNSUPPORTED), >=0x10000 for other texture data unsigned short Width, Height; // Input // Desired rectangle dimension unsigned short X, Y; // Output // Packed position in Atlas CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y = 0xFFFF; } bool IsPacked() const { return X != 0xFFFF; } }; // [Private] Members ImVector<CustomRect> CustomRects; // Rectangles for packing custom texture data into the atlas. ImVector<ImFontConfig> ConfigData; // Internal data IMGUI_API bool Build(); // Build pixels data. This is automatically for you by the GetTexData*** functions. IMGUI_API int CustomRectRegister(unsigned int id, int width, int height); IMGUI_API void CustomRectCalcUV(const CustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max); }; // Font runtime data and rendering // ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32(). struct ImFont { struct Glyph { ImWchar Codepoint; float XAdvance; float X0, Y0, X1, Y1; float U0, V0, U1, V1; // Texture coordinates }; // Members: Hot ~62/78 bytes float FontSize; // <user set> // Height of characters, set during loading (don't change after loading) float Scale; // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale() ImVec2 DisplayOffset; // = (0.f,1.f) // Offset font rendering by xx pixels ImVector<Glyph> Glyphs; // // All glyphs. ImVector<float> IndexXAdvance; // // Sparse. Glyphs->XAdvance in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI). ImVector<unsigned short> IndexLookup; // // Sparse. Index glyphs by Unicode code-point. const Glyph* FallbackGlyph; // == FindGlyph(FontFallbackChar) float FallbackXAdvance; // == FallbackGlyph->XAdvance ImWchar FallbackChar; // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar() // Members: Cold ~18/26 bytes short ConfigDataCount; // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont. ImFontConfig* ConfigData; // // Pointer within ContainerAtlas->ConfigData ImFontAtlas* ContainerAtlas; // // What we has been loaded into float Ascent, Descent; // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] int MetricsTotalSurface;// // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs) // Methods IMGUI_API ImFont(); IMGUI_API ~ImFont(); IMGUI_API void Clear(); IMGUI_API void BuildLookupTable(); IMGUI_API const Glyph* FindGlyph(ImWchar c) const; IMGUI_API void SetFallbackChar(ImWchar c); float GetCharAdvance(ImWchar c) const { return ((int)c < IndexXAdvance.Size) ? IndexXAdvance[(int)c] : FallbackXAdvance; } bool IsLoaded() const { return ContainerAtlas != NULL; } // 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. // 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. IMGUI_API ImVec2 CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end = NULL, const char** remaining = NULL) const; // utf8 IMGUI_API const char* CalcWordWrapPositionA(float scale, const char* text, const char* text_end, float wrap_width) const; IMGUI_API void RenderChar(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, unsigned short c) const; IMGUI_API void RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, bool cpu_fine_clip = false) const; // Private IMGUI_API void GrowIndex(int new_size); IMGUI_API void AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst = true); // Makes 'dst' character/glyph points to 'src' character/glyph. Currently needs to be called AFTER fonts have been built. }; #if defined(__clang__) #pragma clang diagnostic pop #endif // Include imgui_user.h at the end of imgui.h (convenient for user to only explicitly include vanilla imgui.h) #ifdef IMGUI_INCLUDE_IMGUI_USER_H #include "imgui_user.h" #endif
{'content_hash': '0fd0747ffb6c8706e1c5b636f4d4f95d', 'timestamp': '', 'source': 'github', 'line_count': 1441, 'max_line_length': 471, 'avg_line_length': 93.38029146426094, 'alnum_prop': 0.6337497491843848, 'repo_name': 'rogerta97/3D_Motor', 'id': 'ca1972d6a41caac1c8e0336b14668a8be0584dd8', 'size': '136035', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Source/imgui.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '3787621'}, {'name': 'C++', 'bytes': '5034447'}, {'name': 'CSS', 'bytes': '2855'}, {'name': 'HTML', 'bytes': '247893'}, {'name': 'JavaScript', 'bytes': '2933'}, {'name': 'Objective-C', 'bytes': '10522'}, {'name': 'Shell', 'bytes': '496'}]}
<!-- ~ Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. ~ ~ WSO2 Inc. 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>org.wso2.carbon.registry</groupId> <artifactId>activities-feature</artifactId> <version>4.4.4-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>org.wso2.carbon.registry.activities.ui.feature</artifactId> <packaging>pom</packaging> <name>WSO2 Carbon - Registry Activities UI Feature</name> <url>http://wso2.org</url> <description>This feature contains the bundles required for Front-end Registry Activities functionality </description> <dependencies> <dependency> <groupId>org.wso2.carbon.registry</groupId> <artifactId>org.wso2.carbon.registry.activities.ui</artifactId> </dependency> <dependency> <groupId>org.wso2.carbon.registry</groupId> <artifactId>org.wso2.carbon.registry.activities.stub</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.wso2.maven</groupId> <artifactId>carbon-p2-plugin</artifactId> <version>${carbon.p2.plugin.version}</version> <executions> <execution> <id>4-p2-feature-generation</id> <phase>package</phase> <goals> <goal>p2-feature-gen</goal> </goals> <configuration> <id>org.wso2.carbon.registry.activities.ui</id> <propertiesFile>../../etc/feature.properties</propertiesFile> <adviceFile> <properties> <propertyDef>org.wso2.carbon.p2.category.type:console</propertyDef> <propertyDef>org.eclipse.equinox.p2.type.group:false</propertyDef> </properties> </adviceFile> <bundles> <bundleDef>org.wso2.carbon.registry:org.wso2.carbon.registry.activities.ui</bundleDef> <bundleDef>org.wso2.carbon.registry:org.wso2.carbon.registry.activities.stub</bundleDef> </bundles> <importFeatures> <importFeatureDef>org.wso2.carbon.registry.core.ui:${carbon.registry.version}</importFeatureDef> </importFeatures> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
{'content_hash': '927bd61cd4be3e2c121386ae343960f6', 'timestamp': '', 'source': 'github', 'line_count': 82, 'max_line_length': 201, 'avg_line_length': 44.73170731707317, 'alnum_prop': 0.5640676117775354, 'repo_name': 'pulasthi/carbon-registry', 'id': 'e40e7b40dba9070dbf2b13d191305b52db5b9758', 'size': '3668', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'features/activities/org.wso2.carbon.registry.activities.ui.feature/pom.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '55076'}, {'name': 'CSS', 'bytes': '41227'}, {'name': 'HTML', 'bytes': '44327'}, {'name': 'Java', 'bytes': '5227991'}, {'name': 'JavaScript', 'bytes': '302871'}, {'name': 'PLSQL', 'bytes': '182616'}, {'name': 'Shell', 'bytes': '70140'}, {'name': 'XSLT', 'bytes': '76117'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': 'c93563b45434fd37736c508a6878625d', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'ccca3cf01cbf5eb7e4243c3d122b8e2a1e9287cf', 'size': '179', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Asparagaceae/Hosta/Hosta sieboldiana/ Syn. Funkia ovata marginata/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
<div class="commune_descr limited"> <p> Mainsat est un village situé dans le département de Creuse en Limousin. Elle comptait 643 habitants en 2008.</p> <p>Si vous envisagez de venir habiter à Mainsat, vous pourrez aisément trouver une maison à acheter. </p> <p>À coté de Mainsat sont situées les communes de <a href="{{VLROOT}}/immobilier/reterre_23160/">Reterre</a> à 8&nbsp;km, 307 habitants, <a href="{{VLROOT}}/immobilier/lupersat_23113/">Lupersat</a> située à 8&nbsp;km, 334 habitants, <a href="{{VLROOT}}/immobilier/champagnat_23048/">Champagnat</a> située à 8&nbsp;km, 407 habitants, <a href="{{VLROOT}}/immobilier/saint-priest_23234/">Saint-Priest</a> située à 5&nbsp;km, 177 habitants, <a href="{{VLROOT}}/immobilier/saint-domet_23190/">Saint-Domet</a> à 6&nbsp;km, 172 habitants, <a href="{{VLROOT}}/immobilier/serre-bussiere-vieille_23172/">La&nbsp;Serre-Bussière-Vieille</a> localisée à 5&nbsp;km, 124 habitants, entre autres. De plus, Mainsat est située à seulement 20&nbsp;km de <a href="{{VLROOT}}/immobilier/aubusson_23008/">Aubusson</a>.</p> <p>Le parc de logements, à Mainsat, était réparti en 2011 en 15 appartements et 474 maisons soit un marché plutôt équilibré.</p> <p>La ville compte de multiples équipements sportifs, elle propose entre autres un terrain de tennis, un centre d'équitation, un terrain de sport et une boucle de randonnée.</p> <p>À Mainsat, le prix moyen à la vente d'un appartement s'évalue à zero &euro; du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 650 &euro; du m². À la location la valeur moyenne se situe à 4,42 &euro; du m² par mois.</p> </div>
{'content_hash': '40f90460b0da68d2811fd523c48a9b93', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 239, 'avg_line_length': 85.94736842105263, 'alnum_prop': 0.7348438456827924, 'repo_name': 'donaldinou/frontend', 'id': '0d06410886fa131ff2dc4e63cf4ab37dc982c760', 'size': '1675', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Viteloge/CoreBundle/Resources/descriptions/23116.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '3073'}, {'name': 'CSS', 'bytes': '111338'}, {'name': 'HTML', 'bytes': '58634405'}, {'name': 'JavaScript', 'bytes': '88564'}, {'name': 'PHP', 'bytes': '841919'}]}
package com.web.AbhinavJava; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Iterator; /** * Created by surap on 7/5/2017. */ public class BankAppCollections { static BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); private static ArrayList<Account> arrl = new ArrayList<Account>(); public static void main(String[] args) throws IOException, ClassNotFoundException { int option = 0; do { System.out.println("1. Create Account"); System.out.println("2. Find Balance"); System.out.println("3. Deposit"); System.out.println("4. Withdraw"); System.out.println("5. Delete Account"); System.out.println("0. Exit"); System.out.println("please enter your option"); option = Integer.parseInt(bufferedReader.readLine()); switch (option) { case 1: createNewAccount(); break; case 2: findBalance(); break; case 3: deposit(); break; case 4: withdraw(); break; case 5: deleteAccount(); break; } } while (option != 0); } public static void createNewAccount() throws IOException { Account newAccount = new Account(); arrl.add(newAccount); System.out.println("Please enter name"); newAccount.setName(bufferedReader.readLine()); System.out.println("Please enter your ssn"); newAccount.setSsn(Long.valueOf(bufferedReader.readLine())); System.out.println("Please enter deposit balance"); newAccount.setBalance(Double.valueOf(bufferedReader.readLine())); newAccount.setAccountId((int) (Math.random() * 10000)); System.out.println("Account Number:" + newAccount.getAccountId()); System.out.println(arrl); } public static void findBalance() throws IOException { System.out.println("Please enter your account number"); int accountNumber = Integer.parseInt(bufferedReader.readLine()); Iterator<Account> itr = arrl.iterator(); while (itr.hasNext()){ Account check = itr.next(); if(check.getAccountId() == accountNumber) { System.out.println("Your current Balance:" + check.getBalance()); } } } public static void deleteAccount() throws IOException{ System.out.println("Please enter your account number"); int accountNumber = Integer.parseInt(bufferedReader.readLine()); Iterator<Account> itr = arrl.iterator(); while (itr.hasNext()){ Account check = itr.next(); if(check.getAccountId() == accountNumber) { itr.remove(); System.out.println("account deleted successfully"); break; } } } public static void deposit() throws IOException{ System.out.println("Please enter your account number"); int accountNumber = Integer.parseInt(bufferedReader.readLine()); System.out.println("Please enter deposit amount"); int depositAmount = Integer.parseInt(bufferedReader.readLine()); Iterator<Account> itr = arrl.iterator(); while (itr.hasNext()){ Account check = itr.next(); if(check.getAccountId() == accountNumber) { check.setBalance( check.getBalance() + depositAmount); System.out.println("New balance "+ check.getBalance()); } } } public static void withdraw() throws IOException{ System.out.println("Please enter your account number"); int accountNumber = Integer.parseInt(bufferedReader.readLine()); System.out.println("Please enter withdraw amount"); int withdrawAmount = Integer.parseInt(bufferedReader.readLine()); Iterator<Account> itr = arrl.iterator(); while (itr.hasNext()){ Account check = itr.next(); if(check.getAccountId() == accountNumber) { check.setBalance( check.getBalance() - withdrawAmount); System.out.println("New balance "+ check.getBalance()); } } } }
{'content_hash': '44bf907201b45aa0bda12becbfcace9f', 'timestamp': '', 'source': 'github', 'line_count': 116, 'max_line_length': 96, 'avg_line_length': 39.71551724137931, 'alnum_prop': 0.5719557195571956, 'repo_name': 'srinikandula/takewebsh', 'id': '9ae0eee98b404703e77cf69898b9be7f96c6fe4a', 'size': '4607', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/com/web/AbhinavJava/BankAppCollections.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '38923'}, {'name': 'CSS', 'bytes': '22776'}, {'name': 'HTML', 'bytes': '202611'}, {'name': 'Java', 'bytes': '249082'}, {'name': 'JavaScript', 'bytes': '102410'}, {'name': 'Shell', 'bytes': '48275'}]}
import 'dummy'; function endWithLoop() { var i = 0; while (i < 10) { if (Math.random() * 10 < i) { return true; } ++i; } // Can fall over end } function useLoop() { let x = endWithLoop(); // can be true or undefined } function endWithShortIf() { if (something() < 10) { return true; } } function useShortIf() { let x = endWithShortIf(); // true or undefined }
{'content_hash': '4f8ad5c2c0fc6645ecc8fedc6b19f72b', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 54, 'avg_line_length': 16.923076923076923, 'alnum_prop': 0.5204545454545455, 'repo_name': 'github/codeql', 'id': 'faaea733d0972c52ed02e1a86ea572bc1ca21e39', 'size': '440', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'javascript/ql/test/library-tests/Flow/implicit-returns.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP.NET', 'bytes': '3739'}, {'name': 'Batchfile', 'bytes': '3534'}, {'name': 'C', 'bytes': '410440'}, {'name': 'C#', 'bytes': '21146000'}, {'name': 'C++', 'bytes': '1352639'}, {'name': 'CMake', 'bytes': '1809'}, {'name': 'CodeQL', 'bytes': '32583145'}, {'name': 'Dockerfile', 'bytes': '496'}, {'name': 'EJS', 'bytes': '1478'}, {'name': 'Emacs Lisp', 'bytes': '3445'}, {'name': 'Go', 'bytes': '697562'}, {'name': 'HTML', 'bytes': '58008'}, {'name': 'Handlebars', 'bytes': '1000'}, {'name': 'Java', 'bytes': '5417683'}, {'name': 'JavaScript', 'bytes': '2432320'}, {'name': 'Kotlin', 'bytes': '12163740'}, {'name': 'Lua', 'bytes': '13113'}, {'name': 'Makefile', 'bytes': '8631'}, {'name': 'Mustache', 'bytes': '17025'}, {'name': 'Nunjucks', 'bytes': '923'}, {'name': 'Perl', 'bytes': '1941'}, {'name': 'PowerShell', 'bytes': '1295'}, {'name': 'Python', 'bytes': '1649035'}, {'name': 'RAML', 'bytes': '2825'}, {'name': 'Ruby', 'bytes': '299268'}, {'name': 'Rust', 'bytes': '234024'}, {'name': 'Shell', 'bytes': '23973'}, {'name': 'Smalltalk', 'bytes': '23'}, {'name': 'Starlark', 'bytes': '27062'}, {'name': 'Swift', 'bytes': '204309'}, {'name': 'Thrift', 'bytes': '3020'}, {'name': 'TypeScript', 'bytes': '219623'}, {'name': 'Vim Script', 'bytes': '1949'}, {'name': 'Vue', 'bytes': '2881'}]}
<?php class Uri extends Application { private $string = ''; private $segments = array(); /** * Loads the request URI, prepares it and loads it into $segments * * @return void * @author Claudiu Tașcă */ public function __construct() { $this -> string = $this -> get_uri_string(); $this -> set_array(); } public function __get($what='') { if($what == 'string') return $this->string; } /** * Get uri string * * @return string * @author Claudiu Tașcă */ public function get_uri_string() { $uri = $_SERVER['REQUEST_URI']; $uri = str_replace($_SERVER['SCRIPT_NAME'] . '/', '', $uri); $uri = str_replace($_SERVER['SCRIPT_NAME'] . '', '', $uri); return $uri; } /** * Set uri array * * @return void * @author Claudiu Tașcă */ private function set_array() { $this -> segments = explode('/', parse_url($this -> string, PHP_URL_PATH)); if((!isset($this -> segments[1]) || empty($this -> segments[1])) || (!isset($this -> segments[0]) || $this -> segments[0]) == '') $this -> segments[1] = 'index'; if(!isset($this -> segments[0]) || $this -> segments[0] == '') $this -> segments[0] = DEFAULT_CONTROLLER; } /** * Reveals real path * * @return array * @author Claudiu Tașcă */ public function route($uri_string = '', $routes = array()) { if(array_key_exists($uri_string, $routes)) return array('Controller'=>$routes[$uri_string]['Controller'], 'Action'=>$routes[$uri_string]['Action'], array()); else return array('Controller' => $this -> segment(0), 'Action' => $this -> segment(1), array()); } /** * Returns segment array * * @return array * @author Claudiu Tașcă */ public function segments() { if(empty($this -> segments)) return array(); return $this -> segments; } /** * Returns segment * * @return string * @param $id (Segment ID) * @example uri::segments(0) = CONTROLLER * @author Claudiu Tașcă */ public function segment($id = 0) { return $this -> segments[$id]; } /** * Returns URI string * * @return string * @author Claudiu Tașcă */ public function uri_string() { return $this -> string; } } ?>
{'content_hash': 'f2d71a28ef420bc859458c46ba8940bb', 'timestamp': '', 'source': 'github', 'line_count': 98, 'max_line_length': 162, 'avg_line_length': 21.96938775510204, 'alnum_prop': 0.5838365071992568, 'repo_name': 'Claudiu/Moongrace', 'id': '5508fcbaa98b25da0499c2cb73873aaf1e8644b0', 'size': '2265', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Moongrace/Lib/uri.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '6296'}]}
package net.viperfish.bookManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.session.SessionRegistry; import org.springframework.security.core.session.SessionRegistryImpl; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import net.viperfish.bookManager.core.UserService; @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(jsr250Enabled = true, securedEnabled = true, prePostEnabled = true, order = 0, mode = AdviceMode.PROXY, proxyTargetClass = true) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Autowired private UserService auth; public SecurityConfiguration() { // TODO Auto-generated constructor stub } @Bean @Override public AuthenticationManager authenticationManagerBean() throws Exception { // TODO Auto-generated method stub return super.authenticationManagerBean(); } @Bean protected SessionRegistry sessionRegistryImpl() { return new SessionRegistryImpl(); } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(this.auth).passwordEncoder(new BCryptPasswordEncoder()).and().eraseCredentials(true); } @Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/resources/**"); } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers("/register").permitAll().anyRequest().authenticated() .antMatchers("/user", "/user/**").hasAnyAuthority("admin").and().formLogin().loginPage("/login") .failureUrl("/login?error").defaultSuccessUrl("/book").usernameParameter("username") .passwordParameter("password").permitAll().and().logout().logoutUrl("/logout") .logoutSuccessUrl("/login").invalidateHttpSession(true).deleteCookies("JSESSIONID").permitAll().and() .sessionManagement().sessionFixation().migrateSession().maximumSessions(3) .maxSessionsPreventsLogin(false).sessionRegistry(this.sessionRegistryImpl()); } }
{'content_hash': '87bccc7fa72a884b8d4cf5c353444f7e', 'timestamp': '', 'source': 'github', 'line_count': 65, 'max_line_length': 156, 'avg_line_length': 44.261538461538464, 'alnum_prop': 0.8175182481751825, 'repo_name': 'shilongdai/bookManager', 'id': '195c3ebf5530d178251804cfa5209187ff1e3a85', 'size': '2877', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/net/viperfish/bookManager/SecurityConfiguration.java', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '6188'}, {'name': 'Java', 'bytes': '125015'}, {'name': 'JavaScript', 'bytes': '6143'}]}
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved. Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features. ## Using the issue tracker The issue tracker is the preferred channel for [bug reports](#bugs), [features requests](#features) and [submitting pull requests](#pull-requests), but please respect the following restrictions: * Please **do not** use the issue tracker for personal support requests. * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others. <a name="bugs"></a> ## Bug reports A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you! Guidelines for bug reports: 1. **Use the issue search** &mdash; check if the issue has already been reported. 2. **Check if the issue has been fixed** &mdash; try to reproduce it using the latest `master` or development branch in the repository. 3. **Isolate the problem** – create a live example of a [reduced test case](http://css-tricks.com/6263-reduced-test-cases/). A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs. Example: > Short and descriptive example bug report title > > A summary of the issue and the browser/OS environment in which it occurs. If > suitable, include the steps required to reproduce the bug. > > 1. This is the first step > 2. This is the second step > 3. Further steps, etc. > > `<url>` - a link to the reduced test case > > Any other information you want to share that is relevant to the issue being > reported. This might include the lines of code that you have identified as > causing the bug, and potential solutions (and your opinions on their > merits). <a name="features"></a> ## Feature requests Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible. <a name="pull-requests"></a> ## Pull requests Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits. **Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Adhering to the following this process is the best way to get your work included in the project: 1. If you do not have permissions to push to the upstream remote origin, [fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: ```bash # Clone your fork of the repo into the current directory git clone <git-forked-repo-url> # Navigate to the newly cloned directory cd <repo-name> # Assign the original repo to a remote called "upstream" git remote add upstream <git-upstream-repo-url> ``` 2. If you cloned a while ago, get the latest changes from upstream: ```bash git checkout <dev-branch> git pull upstream <dev-branch> ``` 3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: ```bash git checkout -b <topic-branch-name> ``` 4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. 5. Locally merge (or rebase) the upstream development branch into your topic branch: ```bash git pull [--rebase] upstream <dev-branch> ``` 6. Push your topic branch up to your fork: ```bash git push origin <topic-branch-name> ``` 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project.
{'content_hash': 'aab41f5a318ddb39c94aca095ff9a7a4', 'timestamp': '', 'source': 'github', 'line_count': 140, 'max_line_length': 92, 'avg_line_length': 36.07142857142857, 'alnum_prop': 0.7512871287128713, 'repo_name': 'angus-c/waldojs', 'id': '100784af594fa3df7e183b8a0710a392894b6f5a', 'size': '5079', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'CONTRIBUTING.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '10959'}, {'name': 'Makefile', 'bytes': '46'}]}
var Scene = klass.create(); _.extend(Scene.prototype, { initialize: function(canvas) { this.canvas = canvas; this.width = canvas.width; this.height = canvas.height; this.graphics = canvas.getContext('2d'); this.chart = new PiChart([this.width/2, this.height/2], 100); }, render: function() { var g = this.graphics; g.clearRect(0, 0, this.width, this.height); g.save(); this.chart.render(g); g.restore(); } }); var Application = klass.create(); _.extend(Application.prototype, { initialize: function() { this.element = $('#application'); this.canvas = $('#canvas'); this.scene = new Scene(this.canvas.get(0)); this.tasklet = new Tasklet(_.bind(this.onEnterFrame, this), 20); this.bindEvents(); }, bindEvents: function() { this.canvas.on('click', _.bind(this.onCanvasClick, this)); $(window).on('keypress', _.bind(this.onKeyPress, this)); }, run: function() { this.tasklet.run(); }, onKeyPress: function() { }, onEnterFrame: function() { this.scene.render(); }, onCanvasClick: function(evt) { // var scenePos = this.translateScenePosition(evt); // this.newActor(scenePos); } }); $(document).ready(function () { window.application = new Application(); window.application.run(); }); // vim: set sts=4 sw=4 expandtab:
{'content_hash': '314dc88c137614be37505254a01bf35e', 'timestamp': '', 'source': 'github', 'line_count': 56, 'max_line_length': 72, 'avg_line_length': 26.089285714285715, 'alnum_prop': 0.5728952772073922, 'repo_name': 'WalterCReel3/siege', 'id': '4ba4ce1d0b6742763e141c793056efb6d8f03bfb', 'size': '1461', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'server/siege/static/js/rings.js', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Arduino', 'bytes': '8760'}, {'name': 'C++', 'bytes': '40377'}, {'name': 'CSS', 'bytes': '628'}, {'name': 'JavaScript', 'bytes': '35647'}, {'name': 'Python', 'bytes': '48334'}, {'name': 'Shell', 'bytes': '942'}]}
from __future__ import print_function import json import struct import re import base64 import httplib import sys settings = {} class SupcoinRPC: def __init__(self, host, port, username, password): authpair = "%s:%s" % (username, password) self.authhdr = "Basic %s" % (base64.b64encode(authpair)) self.conn = httplib.HTTPConnection(host, port, False, 30) def execute(self, obj): self.conn.request('POST', '/', json.dumps(obj), { 'Authorization' : self.authhdr, 'Content-type' : 'application/json' }) resp = self.conn.getresponse() if resp is None: print("JSON-RPC: no response", file=sys.stderr) return None body = resp.read() resp_obj = json.loads(body) return resp_obj @staticmethod def build_request(idx, method, params): obj = { 'version' : '1.1', 'method' : method, 'id' : idx } if params is None: obj['params'] = [] else: obj['params'] = params return obj @staticmethod def response_is_error(resp_obj): return 'error' in resp_obj and resp_obj['error'] is not None def get_block_hashes(settings, max_blocks_per_call=10000): rpc = SupcoinRPC(settings['host'], settings['port'], settings['rpcuser'], settings['rpcpassword']) height = settings['min_height'] while height < settings['max_height']+1: num_blocks = min(settings['max_height']+1-height, max_blocks_per_call) batch = [] for x in range(num_blocks): batch.append(rpc.build_request(x, 'getblockhash', [height + x])) reply = rpc.execute(batch) for x,resp_obj in enumerate(reply): if rpc.response_is_error(resp_obj): print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr) exit(1) assert(resp_obj['id'] == x) # assume replies are in-sequence print(resp_obj['result']) height += num_blocks if __name__ == '__main__': if len(sys.argv) != 2: print("Usage: linearize-hashes.py CONFIG-FILE") sys.exit(1) f = open(sys.argv[1]) for line in f: # skip comment lines m = re.search('^\s*#', line) if m: continue # parse key=value lines m = re.search('^(\w+)\s*=\s*(\S.*)$', line) if m is None: continue settings[m.group(1)] = m.group(2) f.close() if 'host' not in settings: settings['host'] = '127.0.0.1' if 'port' not in settings: settings['port'] = 4412 if 'min_height' not in settings: settings['min_height'] = 0 if 'max_height' not in settings: settings['max_height'] = 313000 if 'rpcuser' not in settings or 'rpcpassword' not in settings: print("Missing username and/or password in cfg file", file=stderr) sys.exit(1) settings['port'] = int(settings['port']) settings['min_height'] = int(settings['min_height']) settings['max_height'] = int(settings['max_height']) get_block_hashes(settings)
{'content_hash': '14704637e8ff23c47626ac8711afa05f', 'timestamp': '', 'source': 'github', 'line_count': 104, 'max_line_length': 90, 'avg_line_length': 26.365384615384617, 'alnum_prop': 0.6542669584245077, 'repo_name': 'supcoin/supcoin', 'id': '90a1b40a3d401d79f75d821d9c77f572ae569c94', 'size': '3036', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'contrib/linearize/linearize-hashes.py', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '7353'}, {'name': 'Assembly', 'bytes': '7639'}, {'name': 'C', 'bytes': '338028'}, {'name': 'C++', 'bytes': '3507316'}, {'name': 'CSS', 'bytes': '1127'}, {'name': 'HTML', 'bytes': '50621'}, {'name': 'Java', 'bytes': '2100'}, {'name': 'Makefile', 'bytes': '66797'}, {'name': 'Objective-C', 'bytes': '3103'}, {'name': 'Objective-C++', 'bytes': '7182'}, {'name': 'Protocol Buffer', 'bytes': '2308'}, {'name': 'Python', 'bytes': '207593'}, {'name': 'Shell', 'bytes': '40956'}]}
namespace WFA_psychometric_chart { partial class comfort_zone { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(comfort_zone)); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label7 = new System.Windows.Forms.Label(); this.textBox4 = new System.Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.btn_ok = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.label8 = new System.Windows.Forms.Label(); this.checkBox1 = new System.Windows.Forms.CheckBox(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.btn_color = new System.Windows.Forms.Button(); this.label17 = new System.Windows.Forms.Label(); this.tb_name = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); this.btn_delete = new System.Windows.Forms.Button(); this.btn_update = new System.Windows.Forms.Button(); this.btn_add = new System.Windows.Forms.Button(); this.comboBox2 = new System.Windows.Forms.ComboBox(); this.label9 = new System.Windows.Forms.Label(); this.tb_maxhum = new System.Windows.Forms.TextBox(); this.tb_minhum = new System.Windows.Forms.TextBox(); this.tb_maxtemp = new System.Windows.Forms.TextBox(); this.tb_mintemp = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label7); this.groupBox1.Controls.Add(this.textBox4); this.groupBox1.Controls.Add(this.textBox3); this.groupBox1.Controls.Add(this.textBox2); this.groupBox1.Controls.Add(this.textBox1); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label6); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); resources.ApplyResources(this.groupBox1, "groupBox1"); this.groupBox1.Name = "groupBox1"; this.groupBox1.TabStop = false; // // comboBox1 // this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; resources.ApplyResources(this.comboBox1, "comboBox1"); this.comboBox1.Name = "comboBox1"; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // label7 // resources.ApplyResources(this.label7, "label7"); this.label7.Name = "label7"; // // textBox4 // resources.ApplyResources(this.textBox4, "textBox4"); this.textBox4.Name = "textBox4"; this.textBox4.ReadOnly = true; this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged); // // textBox3 // resources.ApplyResources(this.textBox3, "textBox3"); this.textBox3.Name = "textBox3"; this.textBox3.ReadOnly = true; this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged); // // textBox2 // resources.ApplyResources(this.textBox2, "textBox2"); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged); // // textBox1 // resources.ApplyResources(this.textBox1, "textBox1"); this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // label4 // resources.ApplyResources(this.label4, "label4"); this.label4.Name = "label4"; // // label5 // resources.ApplyResources(this.label5, "label5"); this.label5.Name = "label5"; // // label6 // resources.ApplyResources(this.label6, "label6"); this.label6.Name = "label6"; // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.Name = "label3"; // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // // btn_ok // resources.ApplyResources(this.btn_ok, "btn_ok"); this.btn_ok.Name = "btn_ok"; this.btn_ok.UseVisualStyleBackColor = true; this.btn_ok.Click += new System.EventHandler(this.button1_Click); // // button2 // resources.ApplyResources(this.button2, "button2"); this.button2.Name = "button2"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // label8 // resources.ApplyResources(this.label8, "label8"); this.label8.Name = "label8"; // // checkBox1 // resources.ApplyResources(this.checkBox1, "checkBox1"); this.checkBox1.Name = "checkBox1"; this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // groupBox2 // this.groupBox2.Controls.Add(this.btn_color); this.groupBox2.Controls.Add(this.label17); this.groupBox2.Controls.Add(this.tb_name); this.groupBox2.Controls.Add(this.label16); this.groupBox2.Controls.Add(this.btn_delete); this.groupBox2.Controls.Add(this.btn_update); this.groupBox2.Controls.Add(this.btn_add); this.groupBox2.Controls.Add(this.comboBox2); this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.tb_maxhum); this.groupBox2.Controls.Add(this.tb_minhum); this.groupBox2.Controls.Add(this.tb_maxtemp); this.groupBox2.Controls.Add(this.tb_mintemp); this.groupBox2.Controls.Add(this.label10); this.groupBox2.Controls.Add(this.label11); this.groupBox2.Controls.Add(this.label12); this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label14); this.groupBox2.Controls.Add(this.label15); resources.ApplyResources(this.groupBox2, "groupBox2"); this.groupBox2.Name = "groupBox2"; this.groupBox2.TabStop = false; // // btn_color // resources.ApplyResources(this.btn_color, "btn_color"); this.btn_color.Name = "btn_color"; this.btn_color.UseVisualStyleBackColor = true; this.btn_color.Click += new System.EventHandler(this.btn_color_Click); // // label17 // resources.ApplyResources(this.label17, "label17"); this.label17.Name = "label17"; // // tb_name // resources.ApplyResources(this.tb_name, "tb_name"); this.tb_name.Name = "tb_name"; // // label16 // resources.ApplyResources(this.label16, "label16"); this.label16.Name = "label16"; // // btn_delete // resources.ApplyResources(this.btn_delete, "btn_delete"); this.btn_delete.Name = "btn_delete"; this.btn_delete.UseVisualStyleBackColor = true; this.btn_delete.Click += new System.EventHandler(this.btn_delete_Cl); // // btn_update // resources.ApplyResources(this.btn_update, "btn_update"); this.btn_update.Name = "btn_update"; this.btn_update.UseVisualStyleBackColor = true; this.btn_update.Click += new System.EventHandler(this.btn_update_Click); // // btn_add // resources.ApplyResources(this.btn_add, "btn_add"); this.btn_add.Name = "btn_add"; this.btn_add.UseVisualStyleBackColor = true; this.btn_add.Click += new System.EventHandler(this.btn_add_Click); // // comboBox2 // this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox2.FormattingEnabled = true; this.comboBox2.Items.AddRange(new object[] { resources.GetString("comboBox2.Items"), resources.GetString("comboBox2.Items1"), resources.GetString("comboBox2.Items2"), resources.GetString("comboBox2.Items3"), resources.GetString("comboBox2.Items4"), resources.GetString("comboBox2.Items5"), resources.GetString("comboBox2.Items6"), resources.GetString("comboBox2.Items7"), resources.GetString("comboBox2.Items8")}); resources.ApplyResources(this.comboBox2, "comboBox2"); this.comboBox2.Name = "comboBox2"; this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged); // // label9 // resources.ApplyResources(this.label9, "label9"); this.label9.Name = "label9"; // // tb_maxhum // resources.ApplyResources(this.tb_maxhum, "tb_maxhum"); this.tb_maxhum.Name = "tb_maxhum"; this.tb_maxhum.TextChanged += new System.EventHandler(this.tb_maxhum_TextChanged); // // tb_minhum // resources.ApplyResources(this.tb_minhum, "tb_minhum"); this.tb_minhum.Name = "tb_minhum"; this.tb_minhum.TextChanged += new System.EventHandler(this.tb_minhum_TextChanged); // // tb_maxtemp // resources.ApplyResources(this.tb_maxtemp, "tb_maxtemp"); this.tb_maxtemp.Name = "tb_maxtemp"; this.tb_maxtemp.TextChanged += new System.EventHandler(this.tb_maxtemp_TextChanged); // // tb_mintemp // resources.ApplyResources(this.tb_mintemp, "tb_mintemp"); this.tb_mintemp.Name = "tb_mintemp"; this.tb_mintemp.TextChanged += new System.EventHandler(this.tb_mintemp_TextChanged); // // label10 // resources.ApplyResources(this.label10, "label10"); this.label10.Name = "label10"; // // label11 // resources.ApplyResources(this.label11, "label11"); this.label11.Name = "label11"; // // label12 // resources.ApplyResources(this.label12, "label12"); this.label12.Name = "label12"; // // label13 // resources.ApplyResources(this.label13, "label13"); this.label13.Name = "label13"; // // label14 // resources.ApplyResources(this.label14, "label14"); this.label14.Name = "label14"; // // label15 // resources.ApplyResources(this.label15, "label15"); this.label15.Name = "label15"; // // comfort_zone // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBox2); this.Controls.Add(this.checkBox1); this.Controls.Add(this.label8); this.Controls.Add(this.button2); this.Controls.Add(this.btn_ok); this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "comfort_zone"; this.Load += new System.EventHandler(this.comfort_zone_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Label label7; private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button btn_ok; private System.Windows.Forms.Button button2; private System.Windows.Forms.Label label8; private System.Windows.Forms.CheckBox checkBox1; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.Label label9; private System.Windows.Forms.TextBox tb_maxhum; private System.Windows.Forms.TextBox tb_minhum; private System.Windows.Forms.TextBox tb_maxtemp; private System.Windows.Forms.TextBox tb_mintemp; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label15; private System.Windows.Forms.Button btn_delete; private System.Windows.Forms.Button btn_update; private System.Windows.Forms.Button btn_add; private System.Windows.Forms.TextBox tb_name; private System.Windows.Forms.Label label16; private System.Windows.Forms.Button btn_color; private System.Windows.Forms.Label label17; } }
{'content_hash': '74d74244aae668ae081bbb6c9d9f2847', 'timestamp': '', 'source': 'github', 'line_count': 397, 'max_line_length': 144, 'avg_line_length': 43.80352644836272, 'alnum_prop': 0.5716503737780334, 'repo_name': 'temcocontrols/T3000_Building_Automation_System', 'id': 'dd014c8c591c2cb66342a9c78545d61cd307bd29', 'size': '17392', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Psychrometric Tool/Psychro Tool/WFA_psychometric_chart/WFA_psychometric_chart/comfort_zone.Designer.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '555'}, {'name': 'C', 'bytes': '4704332'}, {'name': 'C#', 'bytes': '9337521'}, {'name': 'C++', 'bytes': '15665753'}, {'name': 'CMake', 'bytes': '169395'}, {'name': 'CSS', 'bytes': '111688'}, {'name': 'Dockerfile', 'bytes': '210'}, {'name': 'HTML', 'bytes': '125316'}, {'name': 'Inno Setup', 'bytes': '5879'}, {'name': 'JavaScript', 'bytes': '1789138'}, {'name': 'Makefile', 'bytes': '6851'}, {'name': 'Meson', 'bytes': '7623'}, {'name': 'NASL', 'bytes': '14427'}, {'name': 'Objective-C', 'bytes': '7094'}, {'name': 'Perl', 'bytes': '40922'}, {'name': 'PowerShell', 'bytes': '4726'}, {'name': 'Python', 'bytes': '1992'}, {'name': 'Shell', 'bytes': '143'}]}
describe("Session", function() { beforeEach(function(){ spyOn(Date, "now").and.returnValue(1404810612883); }); describe("initialSet", function() { beforeEach(function() { spyOn(localStorage, "setItem").and.callThrough(); localStorage.setItem.calls.reset() Session.initialSet() }); it("sets an EntryTime", function() { expect(localStorage.setItem).toHaveBeenCalledWith("EntryTime", Date.now()) }); it("sets a Username", function() { expect(localStorage.setItem.calls.mostRecent().args[0]).toEqual("Username"); }); }); describe("checkTime", function() { beforeEach(function() { spyOn(Window, "clearChat"); spyOn(Window, "redirectTo"); spyOn(Window, "appendSystemMessage"); }); describe("at 10mins", function() { beforeEach(function(){ Session.initialSet() localStorage.setItem("EntryTime", Date.now() - 600001) Session.checkTime(); }); it("redirects to splash page", function() { expect(Window.redirectTo).toHaveBeenCalled(); }); }); describe("at 9 minutes", function() { beforeEach(function(){ localStorage.setItem("EntryTime", Date.now() - 540001) Session.checkTime(); }) it("doesn't redirect to splash page", function() { expect(Window.redirectTo).not.toHaveBeenCalled(); }); it("appends a warning message", function() { expect(Window.appendSystemMessage).toHaveBeenCalled(); }); }); describe("before 9 minutes", function() { beforeEach(function() { localStorage.setItem("EntryTime", Date.now() - 539999) Session.checkTime(); }); it("doesn't redirect to splash page", function() { expect(Window.redirectTo).not.toHaveBeenCalled(); }); it("doesn't append a warning message", function() { expect(Window.appendSystemMessage).not.toHaveBeenCalled(); }); }); }); });
{'content_hash': '99103623d47660497ae5a0c0917a7637', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 79, 'avg_line_length': 25.788732394366196, 'alnum_prop': 0.6564718732932824, 'repo_name': 'genevievebelle/Scrawler-UI', 'id': '6643018c414f5a86dcfe65b5e129d3d46812d99b', 'size': '1831', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'spec/javascripts/SessionSpec.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '8586'}, {'name': 'JavaScript', 'bytes': '226109'}, {'name': 'Ruby', 'bytes': '968'}]}
layout: post title: Jadavpur University Staff posts last date 11th March-2016 date: 2016-03-01 04:35 comments: true tags: Assistant Helper Kolkata Librarian Mechanic Peon Store-Keeper Technical Typist University archive: false --- The Jadavpur University invites application from Indian Nationals in the prescribed form for the following  posts  : - Junior Mechanic : 63 posts - Junior Assistant cum-Typist : 62 posts - Assistant Librarian Gr.-II : 08 posts - Technical Assistant Gr.-II : 15 posts - Store-Keeper : 02 posts - Peon : 02 posts - Helper : 19 posts Application Forms : The application in prescribed format (1 original and 7 photo copies) to be submitted preferably by regitered post to the "Registrar, Jadavpur University, Post Box No. 12026, Cossipore Post Office,  Kolkata - 700002" on or before 11/03/2016.  Please visit <http://www.jaduniv.edu.in/templates/newpages/recruitment.html>  for complete details and application format.
{'content_hash': '0d7b281ec7019e591217c776b68c57fa', 'timestamp': '', 'source': 'github', 'line_count': 22, 'max_line_length': 261, 'avg_line_length': 43.59090909090909, 'alnum_prop': 0.7737226277372263, 'repo_name': 'anchalrani/getopportunity', 'id': '6c174e02e587aea956fe5775f7e5b8858ab7105b', 'size': '969', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/2016-03-01-jadavpur-university-staff-posts.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '132450'}, {'name': 'HTML', 'bytes': '19402'}, {'name': 'JavaScript', 'bytes': '10482'}, {'name': 'Ruby', 'bytes': '6139'}]}
using System; /* Problem 8. Prime Number Check Write an expression that checks if given positive integer number n (n ≤ 100) is prime (i.e. it is divisible without remainder only to itself and 1). Note: You should check if the number is positive */ class PrimeNumberCheck { static void Main() { int n = int.Parse(Console.ReadLine()); string result; int b = 0; for (int i = 2; i < n; i++) { bool isPrimeOrNot = n % i == 0; result = isPrimeOrNot.ToString().ToLower(); if (result == "true") { Console.WriteLine("false"); break; } b++; } if (b == n - 2) { Console.WriteLine("true"); } if (n <= 1) { Console.WriteLine("false"); } } }
{'content_hash': '825b2e94d15acc3cf93934c28028d20a', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 86, 'avg_line_length': 24.083333333333332, 'alnum_prop': 0.48327566320645904, 'repo_name': 'iliyaST/TelerikAcademy', 'id': '52292f5f0655667c307c9de474b2d33caf7e38af', 'size': '871', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'C#1/03-Operators-and-Expressions/08.PrimeNumberCheck/Program.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '303'}, {'name': 'C#', 'bytes': '2931171'}, {'name': 'CSS', 'bytes': '169885'}, {'name': 'CoffeeScript', 'bytes': '1076'}, {'name': 'HTML', 'bytes': '8977397'}, {'name': 'JavaScript', 'bytes': '1658788'}, {'name': 'PLSQL', 'bytes': '4342'}]}
package dataStructures.goods; import dataStructures.building.Building; import dataStructures.city.City; import dataStructures.exceptions.CapacityOverflowException; import dataStructures.person.Person; public class DemandFactory { public static Demand calculateDemandDailyForPerson(Person person) { Demand demand = new Demand(); try { demand.getGoodDemand().addGood(Good.Fish, 0.5); demand.getGoodDemand().addGood(Good.Potato, 0.5); demand.getGoodDemand().addGood(Good.Corn, 0.5); demand.getGoodDemand().addGood(Good.Wood, 0.25); } catch (CapacityOverflowException e) { e.printStackTrace(); } return demand; } public static Demand calculateDemandDailyForBuilding(Building building) { Demand demand = new Demand(); if (building.getPersonsInvolved() != null) for (Person p : building.getPersonsInvolved()) { Demand d = building.predictDemandDaily(p); for (Good good : d.getGoodDemand().getStock().keySet()) try { demand.getGoodDemand().addGood(good, demand.getGoodDemand().getStock(good) + d.getGoodDemand().getStock(good)); } catch (CapacityOverflowException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return demand; } public static Demand calculateDemandDailyForCity(City city) { Demand demand = new Demand(); for (Person p : city.getPersons()) { Demand d = calculateDemandDailyForPerson(p); for (Good good : d.getGoodDemand().getStock().keySet()) try { demand.getGoodDemand().addGood(good, demand.getGoodDemand().getStock(good) + d.getGoodDemand().getStock(good)); } catch (CapacityOverflowException e) { e.printStackTrace(); } } for (Building b : city.getBuildings()) { Demand d = calculateDemandDailyForBuilding(b); for (Good good : d.getGoodDemand().getStock().keySet()) try { demand.getGoodDemand().addGood(good, demand.getGoodDemand().getStock(good) + d.getGoodDemand().getStock(good)); } catch (CapacityOverflowException e) { e.printStackTrace(); } } return demand; } }
{'content_hash': '6ca5e6afd6f9a5d5eaad8ba50d308182', 'timestamp': '', 'source': 'github', 'line_count': 68, 'max_line_length': 117, 'avg_line_length': 31.323529411764707, 'alnum_prop': 0.6849765258215963, 'repo_name': 'TKnudsen/economicSimulation', 'id': 'ce3b729dedf129a1ad97f6508f5f33377c8d768a', 'size': '2130', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/dataStructures/goods/DemandFactory.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '176974'}]}
require 'console.rb'
{'content_hash': '2b93ed848bcea47296f09da16f83b105', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 20, 'avg_line_length': 21.0, 'alnum_prop': 0.7619047619047619, 'repo_name': 'steved/sdl_console', 'id': '335e1c710613487a78fa5b43ac0bcb37e17229be', 'size': '21', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/sdl_console.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '11983'}]}
package org.apache.activemq.store.kahadb; import java.io.File; import java.io.IOException; import java.security.ProtectionDomain; import javax.jms.Connection; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; import javax.jms.Topic; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.util.IOHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author chirino */ public class KahaDBVersionTest extends TestCase { static String basedir; static { try { ProtectionDomain protectionDomain = KahaDBVersionTest.class.getProtectionDomain(); basedir = new File(new File(protectionDomain.getCodeSource().getLocation().getPath()), "../..").getCanonicalPath(); } catch (IOException e) { basedir = "."; } } static final Logger LOG = LoggerFactory.getLogger(KahaDBVersionTest.class); final static File VERSION_1_DB = new File(basedir + "/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion1"); final static File VERSION_2_DB = new File(basedir + "/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion2"); final static File VERSION_3_DB = new File(basedir + "/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion3"); final static File VERSION_4_DB = new File(basedir + "/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion4"); final static File VERSION_5_DB = new File(basedir + "/src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion5"); BrokerService broker = null; protected BrokerService createBroker(KahaDBPersistenceAdapter kaha) throws Exception { broker = new BrokerService(); broker.setUseJmx(false); broker.setPersistenceAdapter(kaha); broker.start(); return broker; } @Override protected void tearDown() throws Exception { if (broker != null) { broker.stop(); } } public void XtestCreateStore() throws Exception { KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter(); File dir = new File("src/test/resources/org/apache/activemq/store/kahadb/KahaDBVersion5"); IOHelper.deleteFile(dir); kaha.setDirectory(dir); kaha.setJournalMaxFileLength(1024 * 1024); BrokerService broker = createBroker(kaha); ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost"); Connection connection = cf.createConnection(); connection.setClientID("test"); connection.start(); producerSomeMessages(connection, 1000); connection.close(); broker.stop(); } private void producerSomeMessages(Connection connection, int numToSend) throws Exception { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Topic topic = session.createTopic("test.topic"); Queue queue = session.createQueue("test.queue"); MessageConsumer consumer = session.createDurableSubscriber(topic, "test"); consumer.close(); MessageProducer producer = session.createProducer(topic); producer.setPriority(9); for (int i = 0; i < numToSend; i++) { Message msg = session.createTextMessage("test message:" + i); producer.send(msg); } LOG.info("sent " + numToSend + " to topic"); producer = session.createProducer(queue); for (int i = 0; i < numToSend; i++) { Message msg = session.createTextMessage("test message:" + i); producer.send(msg); } LOG.info("sent " + numToSend + " to queue"); } public void testVersion1Conversion() throws Exception { doConvertRestartCycle(VERSION_1_DB); } public void testVersion2Conversion() throws Exception { doConvertRestartCycle(VERSION_2_DB); } public void testVersion3Conversion() throws Exception { doConvertRestartCycle(VERSION_3_DB); } public void testVersion4Conversion() throws Exception { doConvertRestartCycle(VERSION_4_DB); } public void testVersion5Conversion() throws Exception { doConvertRestartCycle(VERSION_5_DB); } public void doConvertRestartCycle(File existingStore) throws Exception { File testDir = new File("target/activemq-data/kahadb/versionDB"); IOHelper.deleteFile(testDir); IOHelper.copyFile(existingStore, testDir); final int numToSend = 1000; // on repeat store will be upgraded for (int repeats = 0; repeats < 3; repeats++) { KahaDBPersistenceAdapter kaha = new KahaDBPersistenceAdapter(); kaha.setDirectory(testDir); kaha.setJournalMaxFileLength(1024 * 1024); BrokerService broker = createBroker(kaha); ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost"); Connection connection = cf.createConnection(); connection.setClientID("test"); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Topic topic = session.createTopic("test.topic"); Queue queue = session.createQueue("test.queue"); if (repeats > 0) { // upgraded store will be empty so generated some more messages producerSomeMessages(connection, numToSend); } MessageConsumer queueConsumer = session.createConsumer(queue); int count = 0; for (int i = 0; i < (repeats == 0 ? 1000 : numToSend); i++) { TextMessage msg = (TextMessage) queueConsumer.receive(10000); count++; // System.err.println(msg.getText()); assertNotNull(msg); } LOG.info("Consumed " + count + " from queue"); count = 0; MessageConsumer topicConsumer = session.createDurableSubscriber(topic, "test"); for (int i = 0; i < (repeats == 0 ? 1000 : numToSend); i++) { TextMessage msg = (TextMessage) topicConsumer.receive(10000); count++; // System.err.println(msg.getText()); assertNotNull("" + count, msg); } LOG.info("Consumed " + count + " from topic"); connection.close(); broker.stop(); } } }
{'content_hash': '527bb8d78cdf1ff722306e800fdb217d', 'timestamp': '', 'source': 'github', 'line_count': 170, 'max_line_length': 127, 'avg_line_length': 39.17058823529412, 'alnum_prop': 0.6475446763778345, 'repo_name': 'chirino/activemq', 'id': '0b643b962fbff2e5975ba4ec56a50398af89fd54', 'size': '7462', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'activemq-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBVersionTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '17712'}, {'name': 'C#', 'bytes': '27536'}, {'name': 'C++', 'bytes': '17404'}, {'name': 'CSS', 'bytes': '34997'}, {'name': 'HTML', 'bytes': '158883'}, {'name': 'Java', 'bytes': '25304453'}, {'name': 'JavaScript', 'bytes': '438641'}, {'name': 'PHP', 'bytes': '3665'}, {'name': 'Perl', 'bytes': '4128'}, {'name': 'Protocol Buffer', 'bytes': '13867'}, {'name': 'Python', 'bytes': '14547'}, {'name': 'Ruby', 'bytes': '6594'}, {'name': 'Scala', 'bytes': '302023'}, {'name': 'Shell', 'bytes': '87001'}]}
import i18next from '../utils/translation'; export default function (date) { if(!date) { return 'unknown'; } if(!(date instanceof Date)) { date = new Date(date); } return new Intl.DateTimeFormat(i18next.language).format(date); }
{'content_hash': '91c550a0195f45031a294d2bc7bdc588', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 66, 'avg_line_length': 24.181818181818183, 'alnum_prop': 0.6165413533834586, 'repo_name': 'allurefw/allure-report', 'id': 'cf368c6bf73af6b473d5d28932dff8e57dd7f042', 'size': '266', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'allure-generator/src/main/javascript/helpers/date.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '2530'}, {'name': 'CSS', 'bytes': '25359'}, {'name': 'FreeMarker', 'bytes': '485'}, {'name': 'Groovy', 'bytes': '3927'}, {'name': 'HTML', 'bytes': '20178'}, {'name': 'Java', 'bytes': '188718'}, {'name': 'JavaScript', 'bytes': '98390'}, {'name': 'Shell', 'bytes': '1652'}]}
 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Matlab.Recognizer { internal enum IndexOperator { None = 0, Parenthesis = 1, CurlyBrace = 2 } }
{'content_hash': '557976200221132c088fd4f20cc79cdf', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 33, 'avg_line_length': 15.411764705882353, 'alnum_prop': 0.6603053435114504, 'repo_name': 'samuel-suffos/matlab-parser', 'id': '90105aa26a03048dc33feda36f6417365e4e84ac', 'size': '1899', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Matlab.Recognizer/02 Extra/03 Parser/IndexOperator.cs', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C#', 'bytes': '1580592'}]}
FROM frolvlad/alpine-python3 WORKDIR /opt/workbench COPY "./workbench" "./workbench" COPY "./requirements.txt" "./" COPY "./setup.py" "./" RUN apk add --no-cache --virtual=build_dependencies musl-dev gcc python3-dev libffi-dev && \ apk add --no-cache curl && \ cd /opt/workbench && \ touch README.md && \ pip install -r requirements.txt && \ pip install -e . && \ rm -rf ~/.cache/pip && \ apk del build_dependencies WORKDIR /www RUN chown -R nobody "." USER nobody VOLUME /www EXPOSE 5000 ENTRYPOINT ["workbench"]
{'content_hash': 'bc60c8c56bd68d112df9b4297177ed09', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 92, 'avg_line_length': 19.03448275862069, 'alnum_prop': 0.6413043478260869, 'repo_name': 'khorolets/workbench', 'id': '1fa312e6a26a942e3d082de4bf77f118d5326523', 'size': '552', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Dockerfile', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Dockerfile', 'bytes': '552'}, {'name': 'Python', 'bytes': '9494'}]}
package archimulator.uncore.coherence.msi.controller; import archimulator.common.report.ReportNode; import archimulator.common.report.Reportable; import archimulator.uncore.MemoryHierarchy; import archimulator.uncore.cache.CacheGeometry; import archimulator.uncore.cache.EvictableCache; import archimulator.uncore.cache.MemoryDeviceType; import archimulator.util.fsm.FiniteStateMachineFactory; import java.io.Serializable; /** * General cache controller. * * @param <StateT> state * @author Min Cai */ public abstract class GeneralCacheController<StateT extends Serializable, ConditionT> extends Controller implements Reportable { private long numDownwardReadHits; private long numDownwardReadMisses; private long numDownwardWriteHits; private long numDownwardWriteMisses; private long numEvictions; /** * Create a general cache controller. * * @param memoryHierarchy the memory hierarchy * @param name the name * @param type the type */ public GeneralCacheController(MemoryHierarchy memoryHierarchy, String name, MemoryDeviceType type) { super(memoryHierarchy, name, type); } /** * Get the owned evictable cache. * * @return the owned evictable cache */ public abstract EvictableCache<StateT> getCache(); /** * Update statistics. * * @param read a value indicating whether the access involved is a read or not * @param hitInCache a value indicating whether the access involved hits in the cache or not */ public void updateStats(boolean read, boolean hitInCache) { if (read) { if (hitInCache) { numDownwardReadHits++; } else { numDownwardReadMisses++; } } else { if (hitInCache) { numDownwardWriteHits++; } else { numDownwardWriteMisses++; } } } @Override public void dumpStats(ReportNode reportNode) { reportNode.getChildren().add(new ReportNode(reportNode, getName()) {{ getChildren().add(new ReportNode(this, "hitRatio", getHitRatio() + "")); getChildren().add(new ReportNode(this, "numDownwardAccesses", getNumDownwardAccesses() + "")); getChildren().add(new ReportNode(this, "numDownwardHits", getNumDownwardHits() + "")); getChildren().add(new ReportNode(this, "numDownwardMisses", getNumDownwardMisses() + "")); getChildren().add(new ReportNode(this, "numDownwardReadHits", getNumDownwardReadHits() + "")); getChildren().add(new ReportNode(this, "numDownwardReadMisses", getNumDownwardReadMisses() + "")); getChildren().add(new ReportNode(this, "numDownwardWriteHits", getNumDownwardWriteHits() + "")); getChildren().add(new ReportNode(this, "numDownwardWriteMisses", getNumDownwardWriteMisses() + "")); getChildren().add(new ReportNode(this, "numEvictions", getNumEvictions() + "")); getChildren().add(new ReportNode(this, "occupancyRatio", getOccupancyRatio() + "")); }}); } /** * Increment the number of evictions. */ public void incrementNumEvictions() { this.numEvictions++; } /** * Get the hit ratio. * * @return the hit ratio */ public double getHitRatio() { return getNumDownwardAccesses() > 0 ? (double) getNumDownwardHits() / (getNumDownwardAccesses()) : 0.0; } /** * Get the number of downward hits. * * @return the number of downward hits */ public long getNumDownwardHits() { return numDownwardReadHits + numDownwardWriteHits; } /** * Get the number of downward misses. * * @return the number of downward misses */ public long getNumDownwardMisses() { return numDownwardReadMisses + numDownwardWriteMisses; } /** * Get the number of downward accesses. * * @return the number of downward accesses */ public long getNumDownwardAccesses() { return getNumDownwardHits() + getNumDownwardMisses(); } /** * Get the number of downward read hits. * * @return the number of downward read hits */ public long getNumDownwardReadHits() { return numDownwardReadHits; } /** * Get the number of downward read misses. * * @return the number of downward read misses */ public long getNumDownwardReadMisses() { return numDownwardReadMisses; } /** * Get the number of downward write hits. * * @return the number of downward write hits */ public long getNumDownwardWriteHits() { return numDownwardWriteHits; } /** * Get the number of write misses. * * @return the number of write misses */ public long getNumDownwardWriteMisses() { return numDownwardWriteMisses; } /** * Get the number of evictions. * * @return the number of evictions */ public long getNumEvictions() { return numEvictions; } /** * Get the occupancy ratio. * * @return the occupancy ratio */ public double getOccupancyRatio() { return getCache().getOccupancyRatio(); } /** * Get the geometry of the owned evictable cache. * * @return the geometry of the owned evictable cache */ public abstract CacheGeometry getGeometry(); /** * Get the finite state machine factory. * * @return the finite state machine factory */ public abstract FiniteStateMachineFactory<StateT, ConditionT, ?> getFsmFactory(); }
{'content_hash': '669751d828ce287bbdb813af199b5d58', 'timestamp': '', 'source': 'github', 'line_count': 197, 'max_line_length': 128, 'avg_line_length': 29.21319796954315, 'alnum_prop': 0.6317984361424848, 'repo_name': 'aglne/Archimulator', 'id': '3d70c733debe0f698aa3d5765e54dbd0d8025e32', 'size': '6730', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/archimulator/uncore/coherence/msi/controller/GeneralCacheController.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '1353922'}, {'name': 'C++', 'bytes': '21065'}, {'name': 'Forth', 'bytes': '4632'}, {'name': 'Java', 'bytes': '1631465'}, {'name': 'Makefile', 'bytes': '9130'}, {'name': 'Shell', 'bytes': '1213'}]}
Here is the list of properties that can be configured via `MarkwonTheme.Builder` class. :::tip Starting with <Badge text="3.0.0" /> there is no need to manually construct a `MarkwonTheme`. Instead a `Plugin` should be used: ```java final Markwon markwon = Markwon.builder(context) .usePlugin(new AbstractMarkwonPlugin() { @Override public void configureTheme(@NonNull MarkwonTheme.Builder builder) { builder .codeTextColor(Color.BLACK) .codeBackgroundColor(Color.GREEN); } }) .build(); ``` ::: ## Link color Controls the color of a [link](#) <ThemeProperty name="linkColor" type="@ColorInt int" defaults="Default link color of a context where markdown is displayed <sup>*</sup>" /> <sup>*</sup> `TextPaint#linkColor` will be used to determine linkColor of a context ## Link underline <Badge text="4.5.0" /> <ThemeProperty name="isLinkUnderlined" type="Boolean" defaults="true" /> ## Block margin Starting margin before text content for the: * lists * blockquotes * task lists <ThemeProperty name="blockMargin" type="@Px int" defaults="24dp" /> ## Block quote Customizations for the `blockquote` stripe > Quote ### Stripe width Width of a blockquote stripe <ThemeProperty name="blockQuoteWidth" type="@Px int" defaults="1/4 of the <a href='#block-margin'>block margin</a>" /> ### Stripe color Color of a blockquote stripe <ThemeProperty name="blockQuoteColor" type="@ColorInt int" defaults="textColor with <code>25</code> (0-255) alpha value" /> ## List ### List item color Controls the color of a list item. For ordered list: leading number, for unordered list: bullet. * UL 1. OL <ThemeProperty name="listItemColor" type="@ColorInt int" defaults="Text color" /> ### Bullet item stroke width Border width of a bullet list item (level 2) * First * * Second * * * Third <ThemeProperty name="bulletListItemStrokeWidth" type="@Px int" defaults="Stroke width of TextPaint" /> ### Bullet width The width of the bullet item * First * Second * Third <ThemeProperty name="bulletWidth" type="@Px int" defaults="min(<a href='#block-margin'>blockMargin</a>, lineHeight) / 2" /> ## Code ### Inline code text color The color of the `code` content <ThemeProperty name="codeTextColor" type="@ColorInt int" defaults="Content text color" /> ### Inline code background color The color of `background` of a code content <ThemeProperty name="codeBackgroundColor" type="@ColorInt int" defaults="<a href='#inline-code-text-color'>inline code text color</a> with 25 (0-255) alpha" /> ### Block code text color ``` The color of code block text ``` <ThemeProperty name="codeBlockTextColor" type="@ColorInt int" defaults="<a href='#inline-code-text-color'>inline code text color</a>" /> ### Block code background color ``` The color of background of code block text ``` <ThemeProperty name="codeBlockBackgroundColor" type="@ColorInt int" defaults="<a href='#inline-code-background-color'>inline code background color</a>" /> ### Block code leading margin Leading margin for the block code content <ThemeProperty name="codeMultilineMargin" type="@Px int" defaults="8dip" /> ### Code typeface Typeface of code content <ThemeProperty name="codeTypeface" type="android.graphics.Typeface" defaults="Typeface.MONOSPACE" /> ### Block code typeface <Badge text="3.0.0" /> Typeface of block code content <ThemeProperty name="codeBlockTypeface" type="android.graphics.Typeface" defaults="<code>codeTypeface</code> if set or Typeface.MONOSPACE" /> ### Code text size Text size of code content <ThemeProperty name="codeTextSize" type="@Px int" defaults="(Content text size) * 0.87 if no custom <a href='#code-typeface'>Typeface</a> was set, otherwise (content text size)" /> ### Block code text size <Badge text="3.0.0" /> Text size of block code content <ThemeProperty name="codeBlockTextSize" type="@Px int" defaults="<code>codeTextSize</code> if set or (content text size) * 0.87 if no custom <a href='#code-typeface'>Typeface</a> was set, otherwise (content text size)" /> ## Heading ### Break height The height of a brake under H1 &amp; H2 <ThemeProperty name="headingBreakHeight" type="@Px int" defaults="Stroke width of context TextPaint" /> ### Break color The color of a brake under H1 &amp; H2 <ThemeProperty name="headingBreakColor" type="@ColorInt int" defaults="(text color) with 75 (0-255) alpha" /> ### Typeface <Badge text="1.1.0" /> The typeface of heading elements <ThemeProperty name="headingTypeface" type="android.graphics.Typeface" defaults="default text Typeface" /> ### Text size <Badge text="1.1.0" /> Array of heading text sizes _ratio_ that is applied to text size <ThemeProperty name="headingTextSizeMultipliers" type="float[]" defaults="<code>{2.F, 1.5F, 1.17F, 1.F, .83F, .67F}</code> (HTML spec)" /> ## Thematic break ### Color Color of a thematic break <ThemeProperty name="thematicBreakColor" type="@ColorInt int" defaults="(text color) with 25 (0-255) alpha" /> ### Height Height of a thematic break <ThemeProperty name="thematicBreakHeight" type="@Px int" defaults="Stroke width of context TextPaint" />
{'content_hash': '547de84d249b2fdb1b711b3b2331988e', 'timestamp': '', 'source': 'github', 'line_count': 189, 'max_line_length': 221, 'avg_line_length': 27.571428571428573, 'alnum_prop': 0.708501247361351, 'repo_name': 'noties/Markwon', 'id': '2d7161ba41ee3e5ddb74f22fe842a67eb78e80d8', 'size': '5220', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/docs/v4/core/theme.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1113630'}]}
/* -*- C++ -*- */ /******************************************************************** Copyright (c) 2010-2015, Regents of the University of Colorado All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************/ #ifndef _SATSweep_ #define _SATSweep_ /** @file SATSweep.h */ #include <list> #include <vector> #include "Model.h" #include "options.h" #include "AIGAttachment.h" #include "CombAttachment.h" namespace Opt { //Maximum SAT solver timeout in SAT sweeping in seconds #define MAX_SATSOLVER_TIMEOUT 10.0 struct Stats { Stats() : sweepTime(0.0), numMerges(0), numSatQueries(0), numSatSatQueries(0), numUnsatSatQueries(0), numIgnoredEquivs(0), complete(false), timeout(-1), totalTime(-1) { } double sweepTime; int numMerges; int initialNodes; int finalNodes; int numSatQueries; int numSatSatQueries; int numUnsatSatQueries; int numIgnoredEquivs; bool complete; int64_t timeout; int64_t startTime; int64_t totalTime; }; /** * Performs SAT sweeping on the model. */ void satSweep(Model& model, Stats& stats); } //namespace Opt namespace Action { /** * An action to perform AIG-based SAT sweeping */ class SATSweepAction : public Model::Action { public: SATSweepAction(Model& model) : Model::Action(model) { CombAttachment::Factory combFactory; AIGAttachment::Factory aigFactory; requires(Key::COMB, &combFactory); requires(Key::AIG, &aigFactory); } virtual void exec(); private: static ActionRegistrar action; }; } //namespace Action #endif // _SATSweep_
{'content_hash': '44392cd7c675870fe34af36e7bcbb559', 'timestamp': '', 'source': 'github', 'line_count': 101, 'max_line_length': 80, 'avg_line_length': 29.633663366336634, 'alnum_prop': 0.7266956231206148, 'repo_name': 'mgudemann/iimc', 'id': '4de6b1254560b1a91e379bc2144f059cd408b8b3', 'size': '2993', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/copt/SATSweep.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '2505636'}, {'name': 'C++', 'bytes': '2413007'}, {'name': 'M4', 'bytes': '54837'}, {'name': 'Makefile', 'bytes': '240765'}, {'name': 'Roff', 'bytes': '389862'}, {'name': 'Shell', 'bytes': '306625'}]}
void SCXMLEstado::entrar() { estaCorriendo=true; //printf("Entrando en entrar estado\n"); if (onentry) for (SCXMLEjecutable **p=onentry;*p;p++) (*p)->ejecutar(datos); } void SCXMLEstado::termina() { if (!estaCorriendo) return; if (onexit) for (SCXMLEjecutable **p=onexit;*p;p++) (*p)->ejecutar(datos); estaCorriendo=false; } SCXMLEstado *SCXMLEstado::crearEstado(const NodoXML *n,SCXMLEstado *p,SCXMLDataModel *dat,list<const char *> *lI,list<EventoExterno *> *lE,Rutinas *r) { if (!strcmp(n->nombre,"final")) return new SCXMLEstadoFinal(n,p); if (!strcmp(n->nombre,"parallel")) return new SCXMLEstadoParalelo(n,p,dat,lI,lE,r); if (strcmp(n->nombre,"state")) throw runtime_error("El nodo no se corresponde con un estado"); for (int i=0;i<n->cuantos;i++) { if (!strcmp(n->hijos[i].nombre,"state")||!strcmp(n->hijos[i].nombre,"parallel")||!strcmp(n->hijos[i].nombre,"final")) return new SCXMLEstadoCompuesto(n,p,dat,lI,lE,r); if (!strcmp(n->hijos[i].nombre,"invoke")) return NULL; //¿TODO: crear estado Invoke? } //printf("Creating state %s with %d\n",n->nombre,n->cuantos); return new SCXMLEstadoSimple(n,p,dat,lI,lE,r); } const char *SCXMLEstado::getNombre() const { return nombre; }
{'content_hash': '14693718938ec0393774dbf4ac02d505', 'timestamp': '', 'source': 'github', 'line_count': 27, 'max_line_length': 169, 'avg_line_length': 44.629629629629626, 'alnum_prop': 0.6946058091286307, 'repo_name': 'OpenMORA/uma-nav-slam-pkg', 'id': '2940d599e4c520018bdf4bf67a08bab945e84954', 'size': '1359', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'StateCharts/SCXMLEstado.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '382712'}, {'name': 'C++', 'bytes': '469372'}, {'name': 'CMake', 'bytes': '5831'}]}
package com.amazonaws.services.cloudwatchrum.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.cloudwatchrum.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import static com.fasterxml.jackson.core.JsonToken.*; /** * UntagResourceResult JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UntagResourceResultJsonUnmarshaller implements Unmarshaller<UntagResourceResult, JsonUnmarshallerContext> { public UntagResourceResult unmarshall(JsonUnmarshallerContext context) throws Exception { UntagResourceResult untagResourceResult = new UntagResourceResult(); return untagResourceResult; } private static UntagResourceResultJsonUnmarshaller instance; public static UntagResourceResultJsonUnmarshaller getInstance() { if (instance == null) instance = new UntagResourceResultJsonUnmarshaller(); return instance; } }
{'content_hash': '673c71bf42be2cc6d033d2991d3219ff', 'timestamp': '', 'source': 'github', 'line_count': 33, 'max_line_length': 120, 'avg_line_length': 31.303030303030305, 'alnum_prop': 0.7831558567279767, 'repo_name': 'aws/aws-sdk-java', 'id': 'e89cd36f09ae2f6efa06ee23421bb88deed79a7a', 'size': '1613', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'aws-java-sdk-cloudwatchrum/src/main/java/com/amazonaws/services/cloudwatchrum/model/transform/UntagResourceResultJsonUnmarshaller.java', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
FROM gettyimages/spark ENV LD_LIBRARY_PATH $HADOOP_HOME/lib/native/:$LD_LIBRARY_PATH ENV SRC_ROOT /usr/src/app ENV SCALA_VERSION 2.11.1 ENV SBT_VERSION 0.13.13 RUN mkdir -p $SRC_ROOT RUN apt-get update RUN apt-get install -y wget # Install Java RUN echo deb http://http.debian.net/debian jessie-backports main >> /etc/apt/sources.list RUN apt-get update RUN apt-get -t jessie-backports install -y openjdk-8-jre RUN apt-get -t jessie-backports install -y openjdk-8-jdk-headless RUN apt-get install -y openjdk-8-jdk RUN update-alternatives --config java # Install Scala RUN wget www.scala-lang.org/files/archive/scala-$SCALA_VERSION.deb RUN dpkg -i scala-$SCALA_VERSION.deb RUN apt-get install -y scala # Install sbt RUN echo 'deb http://dl.bintray.com/sbt/debian /' > /etc/apt/sources.list.d/sbt.list &&\ apt-get update && \ apt-get install -y --force-yes sbt=$SBT_VERSION && \ apt-get clean autoremove -y && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Preload sbt COPY build.sbt $SRC_ROOT/build.sbt COPY project/build.properties $SRC_ROOT/project/build.properties COPY project/plugins.sbt $SRC_ROOT/project/plugins.sbt RUN cd $SRC_ROOT; sbt # Package app COPY src $SRC_ROOT/src RUN cd $SRC_ROOT; sbt universal:packageBin # Put packaged app in dist folder RUN mkdir $SRC_ROOT/dist RUN mv $SRC_ROOT/target/universal/deploy.zip $SRC_ROOT/dist/deploy.zip RUN unzip $SRC_ROOT/dist/deploy.zip -d $SRC_ROOT/dist && rm $SRC_ROOT/dist/deploy.zip # WORKDIR kept at bottom because it's breaking Docker cache. WORKDIR $SRC_ROOT RUN chmod +x dist/bin/streaming-user-segmentation CMD /bin/bash dist/bin/streaming-user-segmentation
{'content_hash': '0a00c3c230b497f058b822d6f232f0ed', 'timestamp': '', 'source': 'github', 'line_count': 51, 'max_line_length': 89, 'avg_line_length': 32.372549019607845, 'alnum_prop': 0.744397334948516, 'repo_name': 'crystal-project-inc/streaming_user_segmentation', 'id': 'fdcdbc7fae40623b521215607ee120c43835a2e4', 'size': '1651', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Dockerfile', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Scala', 'bytes': '22231'}, {'name': 'Shell', 'bytes': '500'}]}
import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { Location } from '@angular/common'; import { AuthService } from '../services/auth.service'; @Component({ selector: 'app-signin', templateUrl: './signin.component.html', styleUrls: ['./signin.component.css'], providers: [AuthService] }) export class SigninComponent implements OnInit { signinForm: FormGroup; message: string; error: string; constructor(private fb: FormBuilder, private authService: AuthService, private router: Router, private location: Location ) { } ngOnInit() { this.signinForm = this.fb.group({ username: [null, Validators.compose([Validators.required, Validators.minLength(5)])], password: [null, Validators.compose([Validators.required, Validators.minLength(8)])] }); } signin(formValue: any, event: Event) { let username = formValue.controls['username'].value; let password = formValue.controls['password'].value; this.authService.attemptLogin(username, password) .subscribe(result => { if (result == true) { this.router.navigate(['posts']); this.location.go('posts'); this.error = null; } else { this.error = 'Username or Password invalid.'; } }, (error) => { if (error.status == 401) { let res = JSON.parse(error._body); this.error = res.message; } }); } }
{'content_hash': '01f76c4fa221784464b78b4a6977bcfa', 'timestamp': '', 'source': 'github', 'line_count': 53, 'max_line_length': 91, 'avg_line_length': 29.9811320754717, 'alnum_prop': 0.6179987413467589, 'repo_name': 'UNarqui17i-A/Picstory', 'id': '0177c4ca94d3d2b09703b0470b9796b12d4eb70b', 'size': '1589', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'frontend/picstory/src/app/auth/signin/signin.component.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '8923'}, {'name': 'HTML', 'bytes': '109752'}, {'name': 'JavaScript', 'bytes': '252621'}, {'name': 'Python', 'bytes': '2224'}, {'name': 'Ruby', 'bytes': '30720'}, {'name': 'Shell', 'bytes': '2690'}, {'name': 'TypeScript', 'bytes': '51038'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="Asciidoctor 1.5.2"> <title>Artifacts</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> <style> /* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ /* Remove the comments around the @import statement below when using this as a custom stylesheet */ /*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} audio,canvas,video{display:inline-block} audio:not([controls]){display:none;height:0} [hidden],template{display:none} script{display:none!important} html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} body{margin:0} a{background:transparent} a:focus{outline:thin dotted} a:active,a:hover{outline:0} h1{font-size:2em;margin:.67em 0} abbr[title]{border-bottom:1px dotted} b,strong{font-weight:bold} dfn{font-style:italic} hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} mark{background:#ff0;color:#000} code,kbd,pre,samp{font-family:monospace;font-size:1em} pre{white-space:pre-wrap} q{quotes:"\201C" "\201D" "\2018" "\2019"} small{font-size:80%} sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} sup{top:-.5em} sub{bottom:-.25em} img{border:0} svg:not(:root){overflow:hidden} figure{margin:0} fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} legend{border:0;padding:0} button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} button,input{line-height:normal} button,select{text-transform:none} button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} button[disabled],html input[disabled]{cursor:default} input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} textarea{overflow:auto;vertical-align:top} table{border-collapse:collapse;border-spacing:0} *,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} html,body{font-size:100%} body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} a:hover{cursor:pointer} img,object,embed{max-width:100%;height:auto} object,embed{height:100%} img{-ms-interpolation-mode:bicubic} #map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} .left{float:left!important} .right{float:right!important} .text-left{text-align:left!important} .text-right{text-align:right!important} .text-center{text-align:center!important} .text-justify{text-align:justify!important} .hide{display:none} .antialiased,body{-webkit-font-smoothing:antialiased} img{display:inline-block;vertical-align:middle} textarea{height:auto;min-height:50px} select{width:100%} p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} a{color:#2156a5;text-decoration:underline;line-height:inherit} a:hover,a:focus{color:#1d4b8f} a img{border:none} p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} p aside{font-size:.875em;line-height:1.35;font-style:italic} h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} h1{font-size:2.125em} h2{font-size:1.6875em} h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} h4,h5{font-size:1.125em} h6{font-size:1em} hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} em,i{font-style:italic;line-height:inherit} strong,b{font-weight:bold;line-height:inherit} small{font-size:60%;line-height:inherit} code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} ul.square{list-style-type:square} ul.circle{list-style-type:circle} ul.disc{list-style-type:disc} ul.no-bullet{list-style:none} ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} dl dt{margin-bottom:.3125em;font-weight:bold} dl dd{margin-bottom:1.25em} abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} abbr{text-transform:none} blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} blockquote cite:before{content:"\2014 \0020"} blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} @media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} h1{font-size:2.75em} h2{font-size:2.3125em} h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} table thead,table tfoot{background:#f7f8f7;font-weight:bold} table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} .clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} .clearfix:after,.float-group:after{clear:both} *:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} .keyseq{color:rgba(51,51,51,.8)} kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} .keyseq kbd:first-child{margin-left:0} .keyseq kbd:last-child{margin-right:0} .menuseq,.menu{color:rgba(0,0,0,.8)} b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} b.button:before{content:"[";padding:0 3px 0 2px} b.button:after{content:"]";padding:0 2px 0 3px} p a>code:hover{color:rgba(0,0,0,.9)} #header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} #header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} #header:after,#content:after,#footnotes:after,#footer:after{clear:both} #content{margin-top:1.25em} #content:before{content:none} #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} #header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} #header .details span:first-child{margin-left:-.125em} #header .details span.email a{color:rgba(0,0,0,.85)} #header .details br{display:none} #header .details br+span:before{content:"\00a0\2013\00a0"} #header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} #header .details br+span#revremark:before{content:"\00a0|\00a0"} #header #revnumber{text-transform:capitalize} #header #revnumber:after{content:"\00a0"} #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} #toc{border-bottom:1px solid #efefed;padding-bottom:.5em} #toc>ul{margin-left:.125em} #toc ul.sectlevel0>li>a{font-style:italic} #toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} #toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} #toc a{text-decoration:none} #toc a:active{text-decoration:underline} #toctitle{color:#7a2518;font-size:1.2em} @media only screen and (min-width:768px){#toctitle{font-size:1.375em} body.toc2{padding-left:15em;padding-right:0} #toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} #toc.toc2 #toctitle{margin-top:0;font-size:1.2em} #toc.toc2>ul{font-size:.9em;margin-bottom:0} #toc.toc2 ul ul{margin-left:0;padding-left:1em} #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} body.toc2.toc-right{padding-left:0;padding-right:15em} body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} #toc.toc2{width:20em} #toc.toc2 #toctitle{font-size:1.375em} #toc.toc2>ul{font-size:.95em} #toc.toc2 ul ul{padding-left:1.25em} body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} #content #toc>:first-child{margin-top:0} #content #toc>:last-child{margin-bottom:0} #footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} #footer-text{color:rgba(255,255,255,.8);line-height:1.44} .sect1{padding-bottom:.625em} @media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} #content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} .audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} .paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} .admonitionblock>table td.icon{text-align:center;width:80px} .admonitionblock>table td.icon img{max-width:none} .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} .exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} .exampleblock>.content>:first-child{margin-top:0} .exampleblock>.content>:last-child{margin-bottom:0} .sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} .sidebarblock>:first-child{margin-top:0} .sidebarblock>:last-child{margin-bottom:0} .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} .exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} .literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} .sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} .literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} .literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} @media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} .listingblock pre.highlightjs{padding:0} .listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} .listingblock pre.prettyprint{border-width:0} .listingblock>.content{position:relative} .listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} .listingblock:hover code[data-lang]:before{display:block} .listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} .listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} table.pyhltable td.code{padding-left:.75em;padding-right:0} pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} pre.pygments .lineno{display:inline-block;margin-right:.25em} table.pyhltable .linenodiv{background:none!important;padding-right:0!important} .quoteblock{margin:0 1em 1.25em 1.5em;display:table} .quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} .quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} .quoteblock blockquote{margin:0;padding:0;border:0} .quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} .quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} .quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} .quoteblock .quoteblock blockquote{padding:0 0 0 .75em} .quoteblock .quoteblock blockquote:before{display:none} .verseblock{margin:0 1em 1.25em 1em} .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} .verseblock pre strong{font-weight:400} .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} .quoteblock .attribution br,.verseblock .attribution br{display:none} .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} .quoteblock.abstract{margin:0 0 1.25em 0;display:block} .quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} .quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} table.tableblock{max-width:100%;border-collapse:separate} table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} table.spread{width:100%} table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} table.frame-all{border-width:1px} table.frame-sides{border-width:0 1px} table.frame-topbot{border-width:1px 0} th.halign-left,td.halign-left{text-align:left} th.halign-right,td.halign-right{text-align:right} th.halign-center,td.halign-center{text-align:center} th.valign-top,td.valign-top{vertical-align:top} th.valign-bottom,td.valign-bottom{vertical-align:bottom} th.valign-middle,td.valign-middle{vertical-align:middle} table thead th,table tfoot th{font-weight:bold} tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} p.tableblock>code:only-child{background:none;padding:0} p.tableblock{font-size:1em} td>div.verse{white-space:pre} ol{margin-left:1.75em} ul li ol{margin-left:1.5em} dl dd{margin-left:1.125em} dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} ul.inline>li>*{display:block} .unstyled dl dt{font-weight:400;font-style:normal} ol.arabic{list-style-type:decimal} ol.decimal{list-style-type:decimal-leading-zero} ol.loweralpha{list-style-type:lower-alpha} ol.upperalpha{list-style-type:upper-alpha} ol.lowerroman{list-style-type:lower-roman} ol.upperroman{list-style-type:upper-roman} ol.lowergreek{list-style-type:lower-greek} .hdlist>table,.colist>table{border:0;background:none} .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} td.hdlist1{padding-right:.75em;font-weight:bold} td.hdlist1,td.hdlist2{vertical-align:top} .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} .colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} .colist>table tr>td:last-of-type{padding:.25em 0} .thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} .imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} .imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} .imageblock>.title{margin-bottom:0} .imageblock.thumb,.imageblock.th{border-width:6px} .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} .image.left{margin-right:.625em} .image.right{margin-left:.625em} a.image{text-decoration:none} span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} span.footnote a,span.footnoteref a{text-decoration:none} span.footnote a:active,span.footnoteref a:active{text-decoration:underline} #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} #footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} #footnotes .footnote:last-of-type{margin-bottom:0} #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} .gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} .gist .file-data>table td.line-data{width:99%} div.unbreakable{page-break-inside:avoid} .big{font-size:larger} .small{font-size:smaller} .underline{text-decoration:underline} .overline{text-decoration:overline} .line-through{text-decoration:line-through} .aqua{color:#00bfbf} .aqua-background{background-color:#00fafa} .black{color:#000} .black-background{background-color:#000} .blue{color:#0000bf} .blue-background{background-color:#0000fa} .fuchsia{color:#bf00bf} .fuchsia-background{background-color:#fa00fa} .gray{color:#606060} .gray-background{background-color:#7d7d7d} .green{color:#006000} .green-background{background-color:#007d00} .lime{color:#00bf00} .lime-background{background-color:#00fa00} .maroon{color:#600000} .maroon-background{background-color:#7d0000} .navy{color:#000060} .navy-background{background-color:#00007d} .olive{color:#606000} .olive-background{background-color:#7d7d00} .purple{color:#600060} .purple-background{background-color:#7d007d} .red{color:#bf0000} .red-background{background-color:#fa0000} .silver{color:#909090} .silver-background{background-color:#bcbcbc} .teal{color:#006060} .teal-background{background-color:#007d7d} .white{color:#bfbfbf} .white-background{background-color:#fafafa} .yellow{color:#bfbf00} .yellow-background{background-color:#fafa00} span.icon>.fa{cursor:default} .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} .admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} .admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} .admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} .admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} .admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} .conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} .conum[data-value] *{color:#fff!important} .conum[data-value]+b{display:none} .conum[data-value]:after{content:attr(data-value)} pre .conum[data-value]{position:relative;top:-.125em} b.conum *{color:inherit!important} .conum:not([data-value]):empty{display:none} h1,h2{letter-spacing:-.01em} dt,th.tableblock,td.content{text-rendering:optimizeLegibility} p,td.content{letter-spacing:-.01em} p strong,td.content strong{letter-spacing:-.005em} p,blockquote,dt,td.content{font-size:1.0625rem} p{margin-bottom:1.25rem} .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} .exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} .print-only{display:none!important} @media print{@page{margin:1.25cm .75cm} *{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} a{color:inherit!important;text-decoration:underline!important} a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} abbr[title]:after{content:" (" attr(title) ")"} pre,blockquote,tr,img{page-break-inside:avoid} thead{display:table-header-group} img{max-width:100%!important} p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} #toc,.sidebarblock,.exampleblock>.content{background:none!important} #toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} .sect1{padding-bottom:0!important} .sect1+.sect1{border:0!important} #header>h1:first-child{margin-top:1.25rem} body.book #header{text-align:center} body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} body.book #header .details{border:0!important;display:block;padding:0!important} body.book #header .details span:first-child{margin-left:0!important} body.book #header .details br{display:block} body.book #header .details br+span:before{content:none!important} body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} .listingblock code[data-lang]:before{display:block} #footer{background:none!important;padding:0 .9375em} #footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} .hide-on-print{display:none!important} .print-only{display:block!important} .hide-for-print{display:none!important} .show-for-print{display:inherit!important}} </style> <style> /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */ /*pre.CodeRay {background-color:#f7f7f8;}*/ .CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em} .CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)} .CodeRay .line-numbers strong{font-weight: normal} table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none} table.CodeRay td{vertical-align: top} table.CodeRay td.line-numbers{text-align:right} table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)} table.CodeRay td.code{padding:0 0 0 .5em} table.CodeRay td.code>pre{padding:0} .CodeRay .debug{color:#fff !important;background:#000080 !important} .CodeRay .annotation{color:#007} .CodeRay .attribute-name{color:#000080} .CodeRay .attribute-value{color:#700} .CodeRay .binary{color:#509} .CodeRay .comment{color:#998;font-style:italic} .CodeRay .char{color:#04d} .CodeRay .char .content{color:#04d} .CodeRay .char .delimiter{color:#039} .CodeRay .class{color:#458;font-weight:bold} .CodeRay .complex{color:#a08} .CodeRay .constant,.CodeRay .predefined-constant{color:#008080} .CodeRay .color{color:#099} .CodeRay .class-variable{color:#369} .CodeRay .decorator{color:#b0b} .CodeRay .definition{color:#099} .CodeRay .delimiter{color:#000} .CodeRay .doc{color:#970} .CodeRay .doctype{color:#34b} .CodeRay .doc-string{color:#d42} .CodeRay .escape{color:#666} .CodeRay .entity{color:#800} .CodeRay .error{color:#808} .CodeRay .exception{color:inherit} .CodeRay .filename{color:#099} .CodeRay .function{color:#900;font-weight:bold} .CodeRay .global-variable{color:#008080} .CodeRay .hex{color:#058} .CodeRay .integer,.CodeRay .float{color:#099} .CodeRay .include{color:#555} .CodeRay .inline{color:#00} .CodeRay .inline .inline{background:#ccc} .CodeRay .inline .inline .inline{background:#bbb} .CodeRay .inline .inline-delimiter{color:#d14} .CodeRay .inline-delimiter{color:#d14} .CodeRay .important{color:#555;font-weight:bold} .CodeRay .interpreted{color:#b2b} .CodeRay .instance-variable{color:#008080} .CodeRay .label{color:#970} .CodeRay .local-variable{color:#963} .CodeRay .octal{color:#40e} .CodeRay .predefined{color:#369} .CodeRay .preprocessor{color:#579} .CodeRay .pseudo-class{color:#555} .CodeRay .directive{font-weight:bold} .CodeRay .type{font-weight:bold} .CodeRay .predefined-type{color:inherit} .CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold} .CodeRay .key{color:#808} .CodeRay .key .delimiter{color:#606} .CodeRay .key .char{color:#80f} .CodeRay .value{color:#088} .CodeRay .regexp .delimiter{color:#808} .CodeRay .regexp .content{color:#808} .CodeRay .regexp .modifier{color:#808} .CodeRay .regexp .char{color:#d14} .CodeRay .regexp .function{color:#404;font-weight:bold} .CodeRay .string{color:#d20} .CodeRay .string .string .string{background:#ffd0d0} .CodeRay .string .content{color:#d14} .CodeRay .string .char{color:#d14} .CodeRay .string .delimiter{color:#d14} .CodeRay .shell{color:#d14} .CodeRay .shell .delimiter{color:#d14} .CodeRay .symbol{color:#990073} .CodeRay .symbol .content{color:#a60} .CodeRay .symbol .delimiter{color:#630} .CodeRay .tag{color:#008080} .CodeRay .tag-special{color:#d70} .CodeRay .variable{color:#036} .CodeRay .insert{background:#afa} .CodeRay .delete{background:#faa} .CodeRay .change{color:#aaf;background:#007} .CodeRay .head{color:#f8f;background:#505} .CodeRay .insert .insert{color:#080} .CodeRay .delete .delete{color:#800} .CodeRay .change .change{color:#66f} .CodeRay .head .head{color:#f4f} </style> </head> <body class="article"> <div id="header"> <h1>Artifacts</h1> <div id="toc" class="toc"> <div id="toctitle">Table of Contents</div> <ul class="sectlevel1"> <li><a href="#Artifacts-pax-web-api">pax-web-api</a></li> <li><a href="#Artifacts-pax-web-spi">pax-web-spi</a></li> <li><a href="#Artifacts-pax-web-runtime">pax-web-runtime</a></li> <li><a href="#Artifacts-pax-web-jsp">pax-web-jsp</a></li> <li><a href="#Artifacts-pax-web-jetty">pax-web-jetty</a></li> <li><a href="#Artifacts-pax-web-jetty-bundle">pax-web-jetty-bundle</a></li> <li><a href="#Artifacts-pax-web-extender-war">pax-web-extender-war</a></li> <li><a href="#Artifacts-pax-web-extender-whiteboard">pax-web-extender-whiteboard</a></li> </ul> </div> </div> <div id="content"> <div class="sect1"> <h2 id="Artifacts-pax-web-api">pax-web-api</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact contains Pax Web API which are the classes that are added in extension to standard HTTP Service. This is the only artifact you should depend, at compile time, if you are in need of Pax Web extensions.</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-spi">pax-web-spi</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact contains the interfaces that should be implemented by a service provider wishing to provide an alternative implementation that is not Jetty based. The Jetty artifact implements this SPI in order to be used by Pax Web Runtime.</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-runtime">pax-web-runtime</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact is the core of Pax Web (the engine if you like so). It implements the API and will make use of an SPI, such as Jetty in order to fulfill is job.</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-jsp">pax-web-jsp</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact contains Pax Web JSP support based on Jasper. It is an optional component that will be used by runtime if present. If you do not use JSPs in your project you can leave this artifact out of your deployment setup.</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-jetty">pax-web-jetty</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact is the Jetty based implementation of SPI. This artifact <strong>does not include</strong> Jetty, so you will have to deploy Jetty along by yourself. The reason behind not including Jetty is to allow you to make your choice about the version of Jetty to be used, as for example, in case that a new version of Jetty is available and you are in need to use it.</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-jetty-bundle">pax-web-jetty-bundle</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact is a convenience artifact that bundles together most of the artifacts above plus a version of jetty. This in order to make your deployment easier. It includes the following: pax-web-api, pax-web-spi, pax-web-runtime, pax-web-jetty and necessary jetty bundles. Basically, if you deploy this bundle you are good to go without any additional bundles (beside the jsp or extenders that you should deploy as you need).</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-extender-war">pax-web-extender-war</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact is the implementation of Pax Web WAR Extender and should be included in case that you want to deploy WAR files into the OSGi framework.</p> </div> </div> </div> <div class="sect1"> <h2 id="Artifacts-pax-web-extender-whiteboard">pax-web-extender-whiteboard</h2> <div class="sectionbody"> <div class="paragraph"> <p>This artifact is the implementation of Pax Web Whiteboard Extender and should be included if you wish to publish your web elements simply by registering them as a service.</p> </div> </div> </div> </div> <div id="footer"> <div id="footer-text"> Last updated 2016-12-12 11:42:58 +01:00 </div> </div> </body> </html>
{'content_hash': '8544a529de58306834b901f074f88f51', 'timestamp': '', 'source': 'github', 'line_count': 626, 'max_line_length': 471, 'avg_line_length': 60.022364217252395, 'alnum_prop': 0.7724756480545057, 'repo_name': 'ops4j/ops4j.github.io', 'id': 'b3d1ed3e39d881bb691df713c477881e7a143f5b', 'size': '37574', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pax/web/4.x/Artifacts.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '9112'}, {'name': 'HTML', 'bytes': '11004398'}, {'name': 'JavaScript', 'bytes': '148179'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>coalgebras: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1 / coalgebras - 8.8.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> coalgebras <small> 8.8.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-11-06 06:03:53 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-11-06 06:03:53 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.7.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.5 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/coq-contribs/coalgebras&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Coalgebras&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: coalgebra&quot; &quot;keyword: bisimulation&quot; &quot;keyword: weakly final&quot; &quot;keyword: coiteration&quot; &quot;keyword: co-inductive types&quot; &quot;category: Mathematics/Category Theory&quot; &quot;date: 2008-10&quot; ] authors: [ &quot;Milad Niqui &lt;[email protected]&gt; [http://www.cwi.nl/~milad]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/coalgebras/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/coalgebras.git&quot; synopsis: &quot;Coalgebras, bisimulation and lambda-coiteration&quot; description: &quot;This contribution contains a formalisation of coalgebras, bisimulation on coalgebras, weakly final coalgebras, lambda-coiteration definition scheme (including primitive corecursion) and a version of lambda-bisimulation. The formalisation is modular. The implementation of the module types for streams and potentially infinite Peano numbers are provided using the coinductive types.&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/coalgebras/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=203f9bfcfcbddf4b5a4bf7392c9f2bd8&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-coalgebras.8.8.0 coq.8.7.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1). The following dependencies couldn&#39;t be met: - coq-coalgebras -&gt; coq &gt;= 8.8 -&gt; ocaml &gt;= 4.09.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-coalgebras.8.8.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{'content_hash': '149f8631f0b137db118722a090d67be9', 'timestamp': '', 'source': 'github', 'line_count': 173, 'max_line_length': 395, 'avg_line_length': 42.554913294797686, 'alnum_prop': 0.5574572127139364, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': '8020f88353d940673bb642f17e9087a01b7a3cbd', 'size': '7387', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.07.1-2.0.6/released/8.7.1/coalgebras/8.8.0.html', 'mode': '33188', 'license': 'mit', 'language': []}
using namespace std; typedef bool (*Metric)(double, double, int, int, double); typedef double (*Func)(double x); class Function { int num; static int count; static double eps; Func func; public: static double y; static Metric metric; Function(Func func) : func(func) { num = count++; } double calc_func(double x) const { return func(x); } bool operator< (const Function& f) const { return metric(func(y), f.func(y), num, f.num, eps); } }; bool metric1(double x, double y, int n, int m, double eps) { if (x < y) return true; if (fabs(x - y) < eps && n < m) return true; return false; } bool metric2(double x, double y, int n, int m, double eps) { if (fabs(x) < fabs(y)) return true; if (fabs(x - y) < eps && n > m) return true; return false; } double sqr(double x) { return x * x; } double mysqrt(double x) { return sqrt(42 + x * x); } double cube(double x) { return x * x * x; } double mycos(double x) { return cos(x + M_PI / 3); } double mysin(double x) { return sin(x - M_PI / 42); } double mylog(double x) { return log(2 + x * x); } double Function::y; double Function::eps = 1e-8; Metric Function::metric; int Function::count = 1; int main() { int k; double z; cin >> k >> Function::y >> z; if (k == 1) Function::metric = metric1; else if (k == 2) Function::metric = metric2; vector<Function> arr; arr.push_back(Function(sin)); arr.push_back(Function(cos)); arr.push_back(Function(sqr)); arr.push_back(Function(fabs)); arr.push_back(Function(exp)); arr.push_back(Function(mysqrt)); arr.push_back(Function(cube)); arr.push_back(Function(mycos)); arr.push_back(Function(mysin)); arr.push_back(Function(mylog)); sort(arr.begin(), arr.end()); for (int i = arr.size() - 1; i >= 0; i--) { z = arr[i].calc_func(z); } cout << setprecision(10) << z << endl; return 0; }
{'content_hash': '03dff7a0cfd577327c90ec6b722b1ded', 'timestamp': '', 'source': 'github', 'line_count': 110, 'max_line_length': 60, 'avg_line_length': 18.645454545454545, 'alnum_prop': 0.5655777669429547, 'repo_name': 'kondra/CPP-Training', 'id': 'd7a757c6f763165cbb14b1e4cdffdd69947634d2', 'size': '2147', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'sort/sort.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C++', 'bytes': '166827'}, {'name': 'Prolog', 'bytes': '844'}]}
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About WildBeastBitcoin</source> <translation>A prop de WildBeastBitcoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;WildBeastBitcoin&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The WildBeastBitcoin developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Llibreta d&apos;adreçes</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copia la selecció actual al porta-retalls del sistema</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your WildBeastBitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a WildBeastBitcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified WildBeastBitcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your WildBeastBitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>(no label)</source> <translation type="unfinished"/> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR RONPAULCOINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-56"/> <source>WildBeastBitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your wildbeastbitcoins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation type="unfinished"/> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Show information about WildBeastBitcoin</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a WildBeastBitcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Modify configuration options for WildBeastBitcoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-165"/> <location line="+530"/> <source>WildBeastBitcoin</source> <translation type="unfinished"/> </message> <message> <location line="-530"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About WildBeastBitcoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your WildBeastBitcoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified WildBeastBitcoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>WildBeastBitcoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to WildBeastBitcoin network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid WildBeastBitcoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. WildBeastBitcoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>New sending address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid WildBeastBitcoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"/> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>WildBeastBitcoin-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start WildBeastBitcoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start WildBeastBitcoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the WildBeastBitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the WildBeastBitcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting WildBeastBitcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show WildBeastBitcoin addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting WildBeastBitcoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the WildBeastBitcoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-124"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+107"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start wildbeastbitcoin: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the WildBeastBitcoin-Qt help message to get a list with possible WildBeastBitcoin command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>WildBeastBitcoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>WildBeastBitcoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the WildBeastBitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the WildBeastBitcoin RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"/> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a WildBeastBitcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this WildBeastBitcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified WildBeastBitcoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a WildBeastBitcoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter WildBeastBitcoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The WildBeastBitcoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>WildBeastBitcoin version</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Send command to -server or wildbeastbitcoind</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Specify configuration file (default: wildbeastbitcoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Specify pid file (default: wildbeastbitcoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 9333 or testnet: 19333)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9332 or testnet: 19332)</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=wildbeastbitcoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;WildBeastBitcoin Alert&quot; [email protected] </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. WildBeastBitcoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong WildBeastBitcoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>SSL options: (see the WildBeastBitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+165"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of WildBeastBitcoin</source> <translation type="unfinished"/> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart WildBeastBitcoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. WildBeastBitcoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="-57"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
{'content_hash': '9a2f2429188aa37b7d8dfe0d6c006fae', 'timestamp': '', 'source': 'github', 'line_count': 2917, 'max_line_length': 395, 'avg_line_length': 33.24854302365444, 'alnum_prop': 0.5872703276761595, 'repo_name': 'coinkeeper/2015-06-22_19-14_wildbeastbitcoin', 'id': 'f6dddab08e7064b2b0dc75727a7e1f34f548b57f', 'size': '96988', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/qt/locale/bitcoin_ca.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '31317'}, {'name': 'C++', 'bytes': '2629236'}, {'name': 'CSS', 'bytes': '1127'}, {'name': 'Groff', 'bytes': '18284'}, {'name': 'HTML', 'bytes': '50615'}, {'name': 'Makefile', 'bytes': '13327'}, {'name': 'NSIS', 'bytes': '6146'}, {'name': 'Objective-C', 'bytes': '858'}, {'name': 'Objective-C++', 'bytes': '5864'}, {'name': 'Python', 'bytes': '69717'}, {'name': 'QMake', 'bytes': '14800'}, {'name': 'Shell', 'bytes': '9702'}]}
``` 使用方法参考 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd" > <!--连接池定义--> <bean id="baseDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"> <!--maxActive: 最大连接数量--> <property name="maxTotal" value="15"/> <!--minIdle: 最小空闲连接--> <property name="minIdle" value="2"/> <!--maxIdle: 最大空闲连接--> <property name="maxIdle" value="5"/> <!--initialSize: 初始化连接--> <property name="initialSize" value="1"/> <!-- 连接被泄露时是否打印 --> <property name="logAbandoned" value="true"/> <!--removeAbandoned: 是否自动回收超时连接--> <property name="removeAbandonedOnBorrow" value="true"/> <!--removeAbandonedTimeout: 超时时间(以秒数为单位)--> <property name="removeAbandonedTimeout" value="10"/> <!--maxWait: 超时等待时间以毫秒为单位 1000等于1秒--> <property name="maxWaitMillis" value="60000"/> <!-- 在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位. --> <property name="timeBetweenEvictionRunsMillis" value="10000"/> <!-- 在每次空闲连接回收器线程(如果有)运行时检查的连接数量 --> <property name="numTestsPerEvictionRun" value="10"/> <!-- 1000 * 60 * 30 连接在池中保持空闲而不被空闲连接回收器线程--> <property name="minEvictableIdleTimeMillis" value="10000"/> <property name="validationQuery" value="SELECT NOW() FROM DUAL"/> </bean> <!-- 数据源配置,可配置多数据源 --> <bean id="shopDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${shopDbUrl}"/> <property name="username" value="${shopDbUser}"/> <property name="password" value="${shopDbPassword}"/> </bean> <bean id="shopTqbaseDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${shopTqbaseDbUrl}"/> <property name="username" value="${shopTqbaseDbUser}"/> <property name="password" value="${shopTqbaseDbPassword}"/> </bean> <bean id="saintDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${saintDbUrl}"/> <property name="username" value="${saintDbUser}"/> <property name="password" value="${saintDbPassword}"/> </bean> <bean id="ucenterDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${ucDbUrl}"/> <property name="username" value="${ucDbUser}"/> <property name="password" value="${ucDbPassword}"/> </bean> <bean id="windDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${windDbUrl}"/> <property name="username" value="${windDbUser}"/> <property name="password" value="${windDbPassword}"/> </bean> <bean id="legendDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${legendDbUrl}"/> <property name="username" value="${legendDbUser}"/> <property name="password" value="${legendDbPassword}"/> </bean> <bean id="otterDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${otterDbUrl}"/> <property name="username" value="${otterDbUser}"/> <property name="password" value="${otterDbPassword}"/> </bean> <bean id="cloudEpcDataSource" parent="baseDataSource"> <property name="driverClassName" value="${esJdbcDriver}"/> <property name="url" value="${cloudEpcDbUrl}"/> <property name="username" value="${cloudEpcDbUser}"/> <property name="password" value="${cloudEpcDbPassword}"/> </bean> <!-此处为Dao定义,sql调用请在其它类中调用dao去调用,dao只处理查询及返回--> <bean id="shopDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="shopDataSource"/> </bean> <bean id="legendDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="legendDataSource"/> </bean> <bean id="saintDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="saintDataSource"/> </bean> <bean id="ucenterDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="ucenterDataSource"/> </bean> <bean id="otterDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="otterDataSource"/> </bean> <bean id="windDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="windDataSource"/> </bean> <bean id="shopTqbaseDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="shopTqbaseDataSource"/> </bean> <bean id="cloudEpcDao" class="com.tqmall.search.dal.dao.BaseDao"> <constructor-arg name="dataSource" ref="cloudEpcDataSource"/> </bean> </beans> ```
{'content_hash': 'c00a3740c2f16d9ce3ac8f66c8611065', 'timestamp': '', 'source': 'github', 'line_count': 128, 'max_line_length': 73, 'avg_line_length': 42.140625, 'alnum_prop': 0.6338524286243975, 'repo_name': 'wxingyl/search-commons', 'id': '5dcfaa45c2158668c5873c645a674c13e03d1d8f', 'size': '5772', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'commons-db/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '615467'}]}
//--------------------------------------------------------------------------- // a_collect.h // // Various utilities for dealing with templated collections. // There is no matching .cpp file. // // Copyright (C) 2008 Neil Butterworth //--------------------------------------------------------------------------- #ifndef INC_A_COLLECT_H #define INC_A_COLLECT_H #include <algorithm> #include <iostream> #include <vector> #include <iterator> #include <map> //---------------------------------------------------------------------------- namespace CXW { //--------------------------------------------------------------------------- // see if container contains value //--------------------------------------------------------------------------- template <class C, class T> bool Contains( const C & cntr, const T & val ) { return std::find( cntr.begin(), cntr.end(), val ) != cntr.end(); } //--------------------------------------------------------------------------- // Get index of value in container. Intended for use with vectors but should // work (possibly inefficiently) with other collections. //--------------------------------------------------------------------------- template <class C, class T> int IndexOf( const C & cntr, const T & val ) { typename C::const_iterator it = std::find( cntr.begin(), cntr.end(), val ); if ( it == cntr.end() ) { return -1; } else { return std::distance( cntr.begin(), it ); } } //--------------------------------------------------------------------------- // Free all pointers in a collection by deleting them. The pointers must // obviously have been created with op new. //--------------------------------------------------------------------------- template <class C> void FreePtrs( C & cntr ) { for ( typename C::iterator it = cntr.begin(); it != cntr.end(); ++it ) { delete * it; } } //---------------------------------------------------------------------------- // As above, but also clear collection //---------------------------------------------------------------------------- template <class C> void FreeClear( C & cntr ) { for ( typename C::iterator it = cntr.begin(); it != cntr.end(); ++it ) { delete * it; } cntr.clear(); } //--------------------------------------------------------------------------- // Clear any kind of collection by assiging empty collection. Should work // with non-collection types too. //--------------------------------------------------------------------------- template <class C> void Clear( C & c ) { c = C(); } //---------------------------------------------------------------------------- // Get last item from a vector, or throw. //---------------------------------------------------------------------------- template <class T> const T & Last( const std::vector <T> & v ) { return v.at( v.size() - 1 ); } //---------------------------------------------------------------------------- // Dump map on stream //---------------------------------------------------------------------------- template <typename K, typename V> void Dump( std::ostream & os, const std::map <K,V> & m ) { typename std::map<K,V>::const_iterator it = m.begin(); while( it != m.end() ) { os << "[" << it->first << "] = [" << it->second << "]\n"; it++; } } //--------------------------------------------------------------------------- // Dump non-associative collection on stream //--------------------------------------------------------------------------- template <class C> void Dump( std::ostream & os, const C & c, const std::string & nl = "\n" ) { typename C::const_iterator it = c.begin(); while( it != c.end() ) { os << "[" << *it << "]" << nl; it++; } } //--------------------------------------------------------------------------- // Class to automatically free all pointers in vector when the manager // goes out of scope. // ??? probably get rid of this ??? //--------------------------------------------------------------------------- template <class T> class VecMan { //CANNOT_COPY( VecMan ); private: VecMan( const VecMan & ); void operator=( const VecMan & ); public: VecMan( std::vector <T> & v ) : mVec( v ) {} ~VecMan() { for ( unsigned int i = 0; i < mVec.size(); i++ ) { delete mVec[i]; } mVec.clear(); } private: std::vector <T> & mVec; }; //--------------------------------------------------------------------------- // Some operators that vector should support but doesn't. //--------------------------------------------------------------------------- template <class T> std::vector<T> & operator += ( std::vector<T> & v1, const std::vector <T> & v2 ) { v1.insert( v1.end(), v2.begin(), v2.end() ); return v1; } template <class T> std::vector<T> & Append( std::vector<T> & v1, const std::vector <T> & v2 ) { v1.insert( v1.end(), v2.begin(), v2.end() ); return v1; } template <class T> std::vector<T> operator + ( const std::vector<T> & v1, const std::vector <T> v2 ) { std::vector <T> v( v1 ); return v += v2; } //---------------------------------------------------------------------------- } // end namespace #endif
{'content_hash': 'e17dffd46df85f269f1e4b58084deff9', 'timestamp': '', 'source': 'github', 'line_count': 180, 'max_line_length': 78, 'avg_line_length': 28.58888888888889, 'alnum_prop': 0.3863194714341236, 'repo_name': 'codeworkscn/learn-cpp', 'id': 'b982bc8de4a47f7275ae35175f83e7b35dfe582f', 'size': '5148', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'SimpleLearn/26.INIFile/a_collect.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '58'}, {'name': 'C', 'bytes': '9377'}, {'name': 'C++', 'bytes': '771300'}, {'name': 'Objective-C', 'bytes': '218'}]}
<flex-config> <compiler> <accessible>true</accessible> <locale/> <library-path/> <!--<source-path> <path-element>createjs/createjs</path-element> </source-path>--> <warn-no-constructor>false</warn-no-constructor> </compiler> <external-externs> <path-element>${js.externs}/../missing.js</path-element> <path-element>${js.externs}/es3.js</path-element> <path-element>${js.externs}/es5.js</path-element> <path-element>${js.externs}/es6.js</path-element> <path-element>${js.externs}/w3c_anim_timing.js</path-element> <path-element>${js.externs}/w3c_audio.js</path-element> <path-element>${js.externs}/w3c_batterystatus.js</path-element> <path-element>${js.externs}/w3c_css.js</path-element> <path-element>${js.externs}/w3c_css3d.js</path-element> <path-element>${js.externs}/w3c_device_sensor_event.js</path-element> <path-element>${js.externs}/w3c_dom1.js</path-element> <path-element>${js.externs}/w3c_dom2.js</path-element> <path-element>${js.externs}/w3c_dom3.js</path-element> <path-element>${js.externs}/w3c_elementtraversal.js</path-element> <path-element>${js.externs}/w3c_encoding.js</path-element> <path-element>${js.externs}/w3c_event.js</path-element> <path-element>${js.externs}/w3c_event3.js</path-element> <path-element>${js.externs}/w3c_geolocation.js</path-element> <path-element>${js.externs}/w3c_indexeddb.js</path-element> <path-element>${js.externs}/w3c_navigation_timing.js</path-element> <path-element>${js.externs}/w3c_range.js</path-element> <path-element>${js.externs}/w3c_rtc.js</path-element> <path-element>${js.externs}/w3c_selectors.js</path-element> <!-- path-element>externs/w3c_serviceworker.js</path-element> --> <!-- path-element>externs/w3c_webcrypto.js</path-element> --> <path-element>${js.externs}/w3c_xml.js</path-element> <!-- path-element>externs/fetchapi</path-element> --> <path-element>${js.externs}/window.js</path-element> <path-element>${js.externs}/ie_dom.js</path-element> <path-element>${js.externs}/gecko_dom.js</path-element> <path-element>${js.externs}/webkit_css.js</path-element> <path-element>${js.externs}/webkit_dom.js</path-element> <path-element>${js.externs}/webkit_event.js</path-element> <!-- path-element>externs/webkit_notifications.js</path-element> --> <path-element>${js.externs}/iphone.js</path-element> <path-element>${js.externs}/chrome.js</path-element> <path-element>${js.externs}/flash.js</path-element> <path-element>${js.externs}/page_visibility.js</path-element> <path-element>${js.externs}/fileapi.js</path-element> <path-element>${js.externs}/html5.js</path-element> <path-element>${js.externs}/webgl.js</path-element> <path-element>${js.externs}/webstorage.js</path-element> <path-element>${js.externs}/svg.js</path-element> </external-externs> <external> <path-element>createjs/createjs-event-externs.js</path-element> <path-element>createjs/createjs-eventdispatcher-externs.js</path-element> <path-element>createjs/createjs-externs.js</path-element> <path-element>createjs/easeljs-alphamapfilter-externs.js</path-element> <path-element>createjs/easeljs-alphamaskfilter-externs.js</path-element> <path-element>createjs/easeljs-bitmap-externs.js</path-element> <path-element>createjs/easeljs-bitmapanimation-externs.js</path-element> <path-element>createjs/easeljs-bitmaptext-externs.js</path-element> <path-element>createjs/easeljs-blurfilter-externs.js</path-element> <path-element>createjs/easeljs-buttonhelper-externs.js</path-element> <path-element>createjs/easeljs-colorfilter-externs.js</path-element> <path-element>createjs/easeljs-colormatrix-externs.js</path-element> <path-element>createjs/easeljs-colormatrixfilter-externs.js</path-element> <path-element>createjs/easeljs-command-externs.js</path-element> <path-element>createjs/easeljs-container-externs.js</path-element> <path-element>createjs/easeljs-displayobject-externs.js</path-element> <path-element>createjs/easeljs-domelement-externs.js</path-element> <path-element>createjs/easeljs-externs.js</path-element> <path-element>createjs/easeljs-filter-externs.js</path-element> <path-element>createjs/easeljs-graphics-externs.js</path-element> <path-element>createjs/easeljs-matrix2d-externs.js</path-element> <path-element>createjs/easeljs-mouseevent-externs.js</path-element> <path-element>createjs/easeljs-movieclip-externs.js</path-element> <path-element>createjs/easeljs-movieclipplugin-externs.js</path-element> <path-element>createjs/easeljs-point-externs.js</path-element> <path-element>createjs/easeljs-rectangle-externs.js</path-element> <path-element>createjs/easeljs-shadow-externs.js</path-element> <path-element>createjs/easeljs-shape-externs.js</path-element> <path-element>createjs/easeljs-sprite-externs.js</path-element> <path-element>createjs/easeljs-spritesheet-externs.js</path-element> <path-element>createjs/easeljs-spritesheetbuilder-externs.js</path-element> <path-element>createjs/easeljs-spritesheetutils-externs.js</path-element> <path-element>createjs/easeljs-stage-externs.js</path-element> <path-element>createjs/easeljs-text-externs.js</path-element> <path-element>createjs/easeljs-ticker-externs.js</path-element> <path-element>createjs/easeljs-touch-externs.js</path-element> <path-element>createjs/easeljs-uid-externs.js</path-element> <path-element>createjs/preloadjs-abstractloader-externs.js</path-element> <path-element>createjs/preloadjs-externs.js</path-element> <path-element>createjs/preloadjs-loadqueue-externs.js</path-element> <path-element>createjs/preloadjs-tagloader-externs.js</path-element> <path-element>createjs/preloadjs-xhrloader-externs.js</path-element> <path-element>createjs/soundjs-externs.js</path-element> <path-element>createjs/soundjs-flashplugin-externs.js</path-element> <path-element>createjs/soundjs-htmlaudioplugin-externs.js</path-element> <path-element>createjs/soundjs-sound-externs.js</path-element> <path-element>createjs/soundjs-soundinstance-externs.js</path-element> <path-element>createjs/soundjs-webaudioplugin-externs.js</path-element> <path-element>createjs/tweenjs-cssplugin-externs.js</path-element> <path-element>createjs/tweenjs-ease-externs.js</path-element> <path-element>createjs/tweenjs-externs.js</path-element> <path-element>createjs/tweenjs-motionguideplugin-externs.js</path-element> <path-element>createjs/tweenjs-sampleplugin-externs.js</path-element> <path-element>createjs/tweenjs-timeline-externs.js</path-element> <path-element>createjs/tweenjs-tween-externs.js</path-element> </external> <as-root>generated</as-root> <!--<field-exclude> <class>Window</class> <field>focus</field> </field-exclude>--> <class-exclude> <class>Event</class> </class-exclude> <exclude> <class>createjs.ButtonHelper</class> <name>toString</name> </exclude> <exclude> <class>createjs.Event</class> <name>toString</name> </exclude> <exclude> <class>createjs.EventDispatcher</class> <name>toString</name> </exclude> <exclude> <class>createjs.Filter</class> <name>toString</name> </exclude> <exclude> <class>createjs.Graphics</class> <name>toString</name> </exclude> <exclude> <class>createjs.Matrix2D</class> <name>toString</name> </exclude> <exclude> <class>createjs.Rectangle</class> <name>toString</name> </exclude> <exclude> <class>createjs.Shadow</class> <name>toString</name> </exclude> </flex-config>
{'content_hash': '07c546c173f982882775ffc748c1ff9b', 'timestamp': '', 'source': 'github', 'line_count': 179, 'max_line_length': 77, 'avg_line_length': 43.98882681564246, 'alnum_prop': 0.7143764287528575, 'repo_name': 'joshtynjala/feathers-createjs', 'id': 'd7fe638893840a6db52149baaa504756707f3c77', 'size': '7874', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'externs/createjs-js-config.xml', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ActionScript', 'bytes': '80563'}, {'name': 'JavaScript', 'bytes': '87751'}]}
class CreateGlysellinPackages < ActiveRecord::Migration def change create_table :glysellin_parcels do |t| t.string :name t.integer :sendable_id t.string :sendable_type t.timestamps end end end
{'content_hash': 'a6818846dd6734dc2c74f6bf9be974b9', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 55, 'avg_line_length': 20.90909090909091, 'alnum_prop': 0.6782608695652174, 'repo_name': 'glysellin/glysellin', 'id': '91374bf460dedc97d55fb39332ee2ce5de6dab41', 'size': '230', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'db/migrate/20140410180101_create_glysellin_packages.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1091'}, {'name': 'CoffeeScript', 'bytes': '8912'}, {'name': 'HTML', 'bytes': '25230'}, {'name': 'JavaScript', 'bytes': '742'}, {'name': 'Ruby', 'bytes': '274207'}]}
module LiveQuery class OperationBuilder def self.build(hash) new(hash).build end def initialize(hash) @hash = hash end def build case operation when 'INSERT' Operation::Insert.new(table_name, new_row) when 'UPDATE' Operation::Update.new(table_name, old_row, new_row) when 'DELETE' Operation::Delete.new(table_name, old_row) else raise 'Invalid operation' end end private def operation @hash['operation'] end def table_name @hash['table_name'] end def old_row hstore_field('old_row') end def new_row hstore_field('new_row') end def hstore_field(field) symbolize_keys(PgHstore.load(@hash[field])) end def symbolize_keys(hash) Hash[hash.map {|k, v| [k.to_sym, v] }] end end end
{'content_hash': 'd9e1d426bb2cb1116bea9ae1b294b9c0', 'timestamp': '', 'source': 'github', 'line_count': 52, 'max_line_length': 61, 'avg_line_length': 17.21153846153846, 'alnum_prop': 0.5675977653631284, 'repo_name': 'cameron-martin/live_query', 'id': '2e783796206909a1c7c2c3c66cf3f2acbb19e05c', 'size': '895', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/live_query/operation_builder.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '14337'}]}
package mendel.network; import java.util.ArrayList; import java.util.List; /** * Maintains information for all nodes within the Mendel cluster. * @author ctolooee * */ public class NetworkInfo { private List<GroupInfo> groups = new ArrayList<>(); public void addGroup(GroupInfo group) { groups.add(group); } public List<GroupInfo> getGroups() { return groups; } public List<NodeInfo> getAllNodes() { List<NodeInfo> nodeList = new ArrayList<>(); for (GroupInfo group : groups) { List<NodeInfo> groupNodes = group.getAllNodes(); nodeList.addAll(groupNodes); } return nodeList; } @Override public String toString() { String str = "Network Information:" + System.lineSeparator(); for (GroupInfo group : groups) { str += group; } return str; } }
{'content_hash': '821587dfff1d2cd345933648acba3542', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 69, 'avg_line_length': 20.727272727272727, 'alnum_prop': 0.6008771929824561, 'repo_name': 'CameronTolooee/Mendel', 'id': 'be3e8847f0c19789b58ee0c7d6ff4b2bc6a320da', 'size': '2287', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/mendel/network/NetworkInfo.java', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Java', 'bytes': '478853'}, {'name': 'Shell', 'bytes': '9560'}]}
module Facts module Rhel class Lsbdistcodename FACT_NAME = 'lsbdistcodename' TYPE = :legacy def call_the_resolver fact_value = Facter::Resolvers::LsbRelease.resolve(:codename) Facter::ResolvedFact.new(FACT_NAME, fact_value, :legacy) end end end end
{'content_hash': '9c7276e686299d6225083753bcf7241c', 'timestamp': '', 'source': 'github', 'line_count': 14, 'max_line_length': 69, 'avg_line_length': 21.642857142857142, 'alnum_prop': 0.6501650165016502, 'repo_name': 'puppetlabs/facter', 'id': 'b88385cad0027bdc372392e298fb11973158c62f', 'size': '334', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'lib/facter/facts/rhel/lsbdistcodename.rb', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '3940'}, {'name': 'Ruby', 'bytes': '2565509'}, {'name': 'Shell', 'bytes': '1467'}]}
from src.Piloto import Piloto from src.Escuderia import Escuderia from src.Circuito import Circuito from src.CampeonatoMundial import CampeonatoMundial from datetime import date class Formula1(object): """ Modela una liga de formula 1 :author: Francisco Lopez Baena :version: 1 """ campeonatos_mundiales = {} circuitos = {} escuderias = {} pilotos = {} def __init__(self): """ descripcion breve: constructor descripcion detallada: inicializador de la clase formula1 :return: no devuelve nada """ self.campeonatos_mundiales = {} self.circuitos = {} self.escuderias = {} self.pilotos = {} def crear_campeonato_mundial(self, edicion, escuderias=None): """ descripcion breve: crear campeonato descripcion detallada: metodo para crear un campeonato mundial :param edicion: anno del mundial :param escuderias: escuderias que participan en el mundial :return: campeonato_mundial """ if escuderias is None: escuderias = self.escuderias campeonato_mundial = CampeonatoMundial(edicion, escuderias) self.agregar_campeonato_mundial(campeonato_mundial) return campeonato_mundial def agregar_campeonato_mundial(self, campeonato_mundial): """ descripcion breve: agregar campeonato descripcion detallada: metodo para agregar un campeonato mundial :param campeonato_mundial: lista de campeonatos en un mundial :return: no devuelve nada """ if isinstance(campeonato_mundial, CampeonatoMundial) and \ (campeonato_mundial.edicion not in self.campeonatos_mundiales): self.campeonatos_mundiales[campeonato_mundial.edicion] = campeonato_mundial return True else: print("Error al agregar el Campeonato Mundial edicion " + str(campeonato_mundial.edicion) + ".") return False def eliminar_campeonato_mundial(self, campeonato_mundial): """ descripcion breve: eliminar campeonato descripcion detallada: metodo para eliminar un campeonato mundial :param campeonato_mundial: lista de campeonatos en un mundial :return: no devuelva nada """ if isinstance(campeonato_mundial, CampeonatoMundial) and \ (campeonato_mundial.edicion in self.campeonatos_mundiales): del self.campeonatos_mundiales[campeonato_mundial.edicion] return True else: print("Error al eliminar el Campeonato Mundial edicion " + str(campeonato_mundial.edicion) + ".") return False def crear_escuderia(self, nombre, sede=None, chasis=None, motor=None, neumaticos=None, primera_temp=True, fecha_crea=date.today()): """ descripcion breve: crear escuderia descripcion detallada: metodo para crear una escuderia :param nombre: nombre escuderia :param sede: sede de la escuderia :param chasis: chasis de la escuderia :param motor: motor de la escuderia :param neumaticos: neumaticos de la escuderia :param primera_temp: primera temporada de la escuderia :param fecha_crea: fecha de creacion de la escuderia :return: escuderia """ escuderia = Escuderia(nombre, sede, chasis, motor, neumaticos, primera_temp, fecha_crea) self.agregar_escuderia(escuderia) return escuderia def agregar_escuderia(self, escuderia): """ descripcion breve: agregar escuderia descripcion detallada: metodo para agregar escuderias :param escuderia: escuderia :return: no devuelve nada """ if isinstance(escuderia, Escuderia) and (escuderia.nombre not in self.escuderias): self.escuderias[escuderia.nombre] = escuderia else: print("Error al agregar la escuderia " + escuderia.nombre + ".") def eliminar_escuderia(self, escuderia): """ descripcion breve: eliminar escuderia descripcion detallada: metodo para eliminar escuderias :param escuderia: escuderia :return: no devuelve nada """ if isinstance(escuderia, Escuderia) and (escuderia.edicion in self.escuderias): del self.escuderias[escuderia.nombre] else: print("Error al eliminar la escuderia " + escuderia.nombre + ".") def crear_piloto(self, id_pil, nombre=None, apellidos=None, equipo=None, equipo_anterior=None, nacionalidad=None, fecha_nac=None): """ descripcion breve: crear piloto descripcion detallada: metodo para crear pilotos :param id_pil: identificacion del piloto :param nombre: nombre del piloto :param apellidos: apellidos del piloto :param equipo: equipo al que pertenece el piloto :param equipo_anterior: equipo al que pertenecio el piloto anteriormente :param nacionalidad: nacionalidad del piloto :param fecha_nac: fecha de nacimiento del piloto :return: piloto """ piloto = Piloto(id_pil, nombre, apellidos, equipo, equipo_anterior, nacionalidad, fecha_nac) self.agregar_piloto(piloto) if equipo and self.escuderias[equipo]: self.escuderias[equipo].agregar_piloto(piloto) return piloto def agregar_piloto(self, piloto): """ descripcion breve: agregar piloto descripcion detallada: metodo para agregar pilotos :param piloto: piloto :return: no devuelve nada """ if isinstance(piloto, Piloto) and (piloto.idPiloto not in self.pilotos): self.pilotos[piloto.idPiloto] = piloto else: print("Error al agregar al piloto " + piloto.nombre + " " + piloto.apellidos + ".") def eliminar_piloto(self, piloto): """ descripcion breve: eliminar piloto descripcion detallada: metodo para eliminar piloto :param piloto: piloto :return: no devuelve nada """ if isinstance(piloto, Piloto) and (piloto.idPiloto in self.pilotos): del self.pilotos[piloto.idPiloto] else: print("Error al eliminar al piloto " + piloto.nombre + " " + piloto.apellidos + ".") def crear_circuito(self, nombre, ubicacion=None, longitud=None, num_vueltas=None): """ descripcion breve: crear circuito descripcion detallada: metodo para crear circuito :param nombre: nombre del circuito :param ubicacion: pais donde se ubica el circuito :param longitud: longitud del circuito :param num_vueltas: numeros de vueltas que se dan al circuito :return: """ circuito = Circuito(nombre, ubicacion, longitud, num_vueltas) self.agregar_circuito(circuito) return circuito def agregar_circuito(self, circuito): """ descripcion breve: agregar circuito descripcion detallada: metodo para agregar circuitos :param circuito: circuito :return: no devuelve nada """ if isinstance(circuito, Circuito) and (circuito.nombre not in self.circuitos): self.circuitos[circuito.nombre] = circuito else: print("Error al agregar el circuito " + circuito.nombre + ".") def eliminar_circuito(self, circuito): """ descripcion breve: eliminar circuito descripcion detallada: metodo para eliminar circuitos :param circuito: circuito :return: no devuelve nada """ if isinstance(circuito, Circuito) and (circuito.nombre in self.circuitos): del self.circuitos[circuito.nombre] else: print("Error al eliminar el circuito " + circuito.nombre + ".") def print_pilotos(self): """ descripcion breve: imprimir pilotos descripcion detallada: metodo para imprimir los pilotos :return: no devuelve nada """ for piloto in self.pilotos.values(): print(piloto) def print_escuderias(self): """ descripcion breve: imprimir escuderia descripcion detallada: metodo para imprimir escuderias :return: no devuelve nada """ for escuderia in self.escuderias.values(): print(escuderia) def print_circuitos(self): """ descripcion breve: imprimir circuitos descripcion detallada: metodo para imprimir circuitos :return: no devuelve nada """ for circuito in self.circuitos.values(): print(circuito) def print_campeonatos_mundiales(self): """ descripcion breve: imprimir campeonatos descripcion detallada: metodo para imprimir campeonatos mundiales :return: no devuelve nada """ for gp in self.campeonatos_mundiales.values(): print(gp) def demo(self): """ descripcion breve: probar descripcion detallada: metodo para probar los metodos anteriores :return: no devuelve nada """ #Creacion de escuderias e1 = self.crear_escuderia("Ferrari", "Maranello") e2 = self.crear_escuderia("Red Bull") e3 = self.crear_escuderia("Mercedes",chasis="Mercedes F1 W05", motor="Mercedes PU106A Hybrid V6", neumaticos="Pirelli") #Creacion de pilotos p1 = self.crear_piloto("ALO", "Fernando", "Alonso", "Ferrari", "Mercedes", "Espaniola", "29/7/81") p2 = self.crear_piloto("RAI", "Kimi", "Raikkonen", "Ferrari") p3 = self.crear_piloto("RIC", "Daniel", "Ricciardo", "Red Bull") p4 = self.crear_piloto("VET", "Sebastian", "Vettel", "Red Bull") p5 = self.crear_piloto("SCH", "Michael", "Schumacher", "Ferrari") p7 = self.crear_piloto("HAM", "Lewis", "Hamilton", "Mercedes") p8 = self.crear_piloto("ROS", "Nico", "Rosberg", "Mercedes") #imprimiendo pilotos y escuderias self.print_pilotos() self.print_escuderias() #Creando circuitos c1 = self.crear_circuito("Red Bull Ring", "Spielberg", 4326) c2 = self.crear_circuito("Circuito de Sochi", "Sochi") c3 = self.crear_circuito("Internacional de Corea", "Yeongam") #imprimiendo circuitos self.print_circuitos() #creando campeonato mundial cm1 = self.crear_campeonato_mundial(2014) #imprimiendo campeonato mundial self.print_campeonatos_mundiales() #creando grandes premios del campeonato mundial gp1 = cm1.crear_gran_premio("Gran Premio de Austria", c1) gp2 = cm1.crear_gran_premio("Gran Premio de Rusia", c2) self.print_campeonatos_mundiales() #Simulando grandes premios cm1.simular_gran_premio(gp1) cm1.simular_gran_premio(gp2) #Simulando accidente y cambio de piloto p6 = self.crear_piloto("AUX", "Piloto", "Auxiliar de Prueba") print("El piloto " + p2.nombre + " " + p2.apellidos + " ha sufrido un accidente. Se sustituira por el piloto " + p6.nombre + " " + p6.apellidos + "\n") e1.sustituir_piloto(p2, p6) gp3 = cm1.crear_gran_premio("Gran Premio de Corea del Sur", c3) cm1.simular_gran_premio(gp3) cm1.print_grandes_premios() self.print_campeonatos_mundiales()
{'content_hash': 'c55cb6a01d2ec2e53854f7a86681df3b', 'timestamp': '', 'source': 'github', 'line_count': 330, 'max_line_length': 127, 'avg_line_length': 34.878787878787875, 'alnum_prop': 0.6309296264118158, 'repo_name': 'globber-torpes/formula1', 'id': '3d3d27d2a3a9d84a299450a37933512bf14647d2', 'size': '11510', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Formula1.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '29023'}, {'name': 'JavaScript', 'bytes': '54587'}, {'name': 'Makefile', 'bytes': '6779'}, {'name': 'Python', 'bytes': '72535'}, {'name': 'Shell', 'bytes': '6472'}]}
package filodb.core.store import com.typesafe.scalalogging.slf4j.StrictLogging import java.nio.ByteBuffer import org.velvia.filo.RowReader import org.velvia.filo.RowReader.TypedFieldExtractor import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration._ import filodb.core._ import filodb.core.metadata.{Column, Projection, RichProjection} case class SegmentIndex[P, S](binPartition: Types.BinaryPartition, segmentId: Types.SegmentId, partition: P, segment: S, chunkMap: BinaryChunkRowMap) /** * Encapsulates the reading and scanning logic of the ColumnStore. * We are careful to separate out ExecutionContext for reading only. */ trait ColumnStoreScanner extends StrictLogging { import filodb.core.Types._ import filodb.core.Iterators._ // Use a separate ExecutionContext for reading. This is important to prevent deadlocks. // Also, we do not make this implicit so that this trait can be mixed in elsewhere. def readEc: ExecutionContext /** * Reads back all the chunks from multiple columns of a keyRange at once. Note that no paging * is performed - so don't ask for too large of a range. Recommendation is to read the ChunkRowMaps * first and use the info there to determine how much to read. * @param dataset the name of the dataset to read chunks from * @param columns the columns to read back chunks from * @param keyRange the binary range of segments to read from. Note endExclusive flag. * @param version the version to read back * @return a sequence of ChunkedData, each triple is (segmentId, chunkId, bytes) for each chunk * must be sorted in order of increasing segmentId */ def readChunks(dataset: TableName, columns: Set[ColumnId], keyRange: BinaryKeyRange, version: Int)(implicit ec: ExecutionContext): Future[Seq[ChunkedData]] type ChunkMapInfo = (BinaryPartition, SegmentId, BinaryChunkRowMap) /** * Scans over ChunkRowMaps according to the method. * @return an iterator over SegmentIndex. */ def scanChunkRowMaps(projection: RichProjection, version: Int, method: ScanMethod) (implicit ec: ExecutionContext): Future[Iterator[SegmentIndex[projection.PK, projection.SK]]] def toSegIndex(projection: RichProjection, chunkMapInfo: ChunkMapInfo): SegmentIndex[projection.PK, projection.SK] = { SegmentIndex(chunkMapInfo._1, chunkMapInfo._2, projection.partitionType.fromBytes(chunkMapInfo._1), projection.segmentType.fromBytes(chunkMapInfo._2), chunkMapInfo._3) } // NOTE: this is more or less a single-threaded implementation. Reads of chunks for multiple columns // happen in parallel, but we still block to wait for all of them to come back. def scanSegments(projection: RichProjection, columns: Seq[Column], version: Int, method: ScanMethod): Future[Iterator[Segment]] = { implicit val ec = readEc val segmentGroupSize = 3 for { segmentIndexIt <- scanChunkRowMaps(projection, version, method) } yield (for { // Group by partition key first (part, partChunkMaps) <- segmentIndexIt .sortedGroupBy { case SegmentIndex(part, _, _, _, _) => part } // Subdivide chunk row maps in each partition so we don't read more than we can chew // TODO: make a custom grouping function based on # of rows accumulated groupChunkMaps <- partChunkMaps.grouped(segmentGroupSize) } yield { val chunkMaps = groupChunkMaps.toSeq val binKeyRange = BinaryKeyRange(part, chunkMaps.head.segmentId, chunkMaps.last.segmentId, endExclusive = false) val chunks = Await.result(readChunks(projection.datasetName, columns.map(_.name).toSet, binKeyRange, version), 5.minutes) buildSegments(projection, chunkMaps, chunks, columns).toIterator }).flatten } import scala.util.control.Breaks._ private def buildSegments[P, S](projection: RichProjection, rowMaps: Seq[SegmentIndex[P, S]], chunks: Seq[ChunkedData], schema: Seq[Column]): Seq[Segment] = { val segments = rowMaps.map { case SegmentIndex(_, _, partition, segStart, rowMap) => val segInfo = SegmentInfo(partition, segStart) new RowReaderSegment(projection, segInfo, rowMap, schema) } chunks.foreach { case ChunkedData(columnName, chunkTriples) => var segIndex = 0 breakable { chunkTriples.foreach { case (segmentId, chunkId, chunkBytes) => // Rely on the fact that chunks are sorted by segmentId, in the same order as the rowMaps while (segmentId != rowMaps(segIndex).segmentId) { segIndex += 1 if (segIndex >= segments.length) { logger.warn(s"Chunks with segmentId=$segmentId (part ${rowMaps.head.partition})" + " with no rowmap; corruption?") break } } segments(segIndex).addChunk(chunkId, columnName, chunkBytes) } } } segments } }
{'content_hash': 'f85b26847c83c3f57639d47eb7af465d', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 103, 'avg_line_length': 44.25396825396825, 'alnum_prop': 0.6310975609756098, 'repo_name': 'adeandrade/FiloDB', 'id': '10cb0a012ab0121efb2a2ec6eb13fbcead6bef0a', 'size': '5576', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'core/src/main/scala/filodb.core/store/ColumnStoreScanner.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Scala', 'bytes': '345506'}, {'name': 'Shell', 'bytes': '905'}]}
function reloadTableSecurityMap(selector, uuid) { // console.log('rendering diagram for uuid = ' + uuid); FireSpinner(); $.ajax({ url: '/table_security_map?uuid=' + uuid, type: 'GET', beforeSend: function(xhr) { xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content')); }, }). then(drawTableSecurityMap.bind(this, selector)); } function drawTableSecurityMap(selector, ajaxdata) { // console.log(JSON.stringify(data)); // create a network resetSecurity(); StopSpinner(); data = ajaxdata; loadTableSecurityGraph(true); }; function loadTableSecurityGraph() { console.log('loading graph...'); data.nodes.forEach(function (node) { var component; if (node.tabletype == "org") { component = new OrgSecComponent({ propsData: { header: node.label, code: node.code, uuid: node.uuid, has_soc: node.has_soc } }).$mount(); } if (node.tabletype == "table" || node.tabletype == "fact" || node.tabletype == "bridge") { component = new TableSecComponent({ propsData: { header: node.label, uuid: node.und_uuid, tabletype: node.tabletype, description: node.description, securityLevel: node.securityLevel, securityColumn: node.securityColumn, soc_code: node.soc_code, has_soc: node.has_soc, access_type: node.access_type, soc_rows_only: node.soc_rows_only, columns: node.columns } }).$mount(); $("#column-overlay-content").addClass("in"); Colcomponent = new ColumnDocComponent({ propsData: { header: node.label, columns: node.columns, securityColumn: node.securityColumn, securityLevel: node.securityLevel, access_type: node.access_type, soc_rows_only: node.soc_rows_only, uuid: node.und_uuid, soc_code: node.soc_code, has_soc: node.has_soc, description: node.description, } }).$mount(); $("#documentation-content").html(Colcomponent.$el) } g.setNode((node.id), { labelType: "html", label: component.$el, padding: 0, margin: 0, shape: "rect" }); }); data.edges.forEach(function (edge) { g.setEdge(edge.from,edge.to, {class: edge.class, label:edge.label,labelpos:"C", arrowhead: 'normal'}) }); g.edges().forEach(function (e) { var edge = g.edge(e.v, e.w); edge.lineInterpolate = 'basis'; edge.x = 0; }); $('#column-overlay-content').css({ 'height': $("#erdiagram").height() -20 + "px" }); render(d3.select("svg g"), g); //FIX: sometimes the table inside the node has a different width after rendering. The fix is temporary. g.nodes().forEach(function (n) { var adjustedWidth = g.node(n).elem.firstChild.width.baseVal.value; $("#" + n).width(adjustedWidth); }); svg.selectAll("g.node").on("click", function (id) { d3.event.preventDefault(); var _node = g.node(id); goToSelected(_node); }); svg.selectAll("g.edgePath").on("click", function (id) { d3.event.preventDefault(); var _edge = g.edge(id); highlightRelationship(_edge); }); svg.attr("width", $("#erdiagram").width()); svg.attr("height", $("#erdiagram").height()); d3.behavior.zoom().on("zoom", function () { interpolateZoom(d3.event.translate, d3.event.scale); }); d3.select("svg").on("dblclick.zoom", null); //disable wheel scrolling d3.select("svg").on("wheel.zoom", null); setInitialPositionAndZoom(); initDragCapabilities(g, svg); $('#erdiagram').on('mousedown', function (event) { mouseDownX = event.clientX; mouseDownY = event.clientY; }); function goToSelected(d) { reset(); requestAnimationFrame(function () { //zoomToSelected(d); }); setSelected(d); } }
{'content_hash': '436a5f6b222f5496c94142050c1551f5', 'timestamp': '', 'source': 'github', 'line_count': 165, 'max_line_length': 105, 'avg_line_length': 23.963636363636365, 'alnum_prop': 0.5935761254425898, 'repo_name': 'ndoit/fenrir', 'id': '8c9e437e7c6db2a7f357c0c394ea646f7757ba90', 'size': '3955', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/assets/javascripts/site_utils/table_security.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1088535'}, {'name': 'HTML', 'bytes': '648517'}, {'name': 'JavaScript', 'bytes': '740188'}, {'name': 'Ruby', 'bytes': '1247518'}, {'name': 'Shell', 'bytes': '7942'}]}
layout: post title: "Detect Magic" date: 2014-08-24 sources: [PHB.231, SRD.134] tags: [artificer, bard, cleric, druid, paladin, ranger, sorcerer, wizard, level1, action, concentration, ritual, divination] --- **1st-level divination (ritual)** **Casting Time**: 1 action **Range**: Self **Components**: V, S **Duration**: Concentration, up to 10 minutes For the duration, you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic, and you learn its school of magic, if any. The spell can penetrate most barriers, but it is blocked by 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt.
{'content_hash': '6df1cd42fa96acf6f73327afa47741ff', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 259, 'avg_line_length': 38.65, 'alnum_prop': 0.7309184993531694, 'repo_name': 'thebombzen/grimoire', 'id': '689de6b93662867454d9212544f56eb834b22bff', 'size': '777', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/2014-08-24-detect-magic.markdown', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '3544'}, {'name': 'HTML', 'bytes': '11133'}, {'name': 'JavaScript', 'bytes': '2102'}, {'name': 'Python', 'bytes': '5521'}, {'name': 'Ruby', 'bytes': '2584'}, {'name': 'SCSS', 'bytes': '14204'}]}
package org.elasticsearch.common.settings; import org.elasticsearch.action.admin.indices.close.TransportCloseIndexAction; import org.elasticsearch.action.search.TransportSearchAction; import org.elasticsearch.action.support.AutoCreateIndex; import org.elasticsearch.action.support.DestructiveOperations; import org.elasticsearch.action.support.master.TransportMasterNodeReadAction; import org.elasticsearch.bootstrap.BootstrapSettings; import org.elasticsearch.client.Client; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.cluster.ClusterModule; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.InternalClusterInfoService; import org.elasticsearch.cluster.NodeConnectionsService; import org.elasticsearch.cluster.action.index.MappingUpdatedAction; import org.elasticsearch.cluster.metadata.IndexGraveyard; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.routing.OperationRouting; import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings; import org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; import org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider; import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.logging.ServerLoggers; import org.elasticsearch.common.network.NetworkModule; import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.util.PageCacheRecycler; import org.elasticsearch.common.util.concurrent.EsExecutors; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.discovery.DiscoveryModule; import org.elasticsearch.discovery.DiscoverySettings; import org.elasticsearch.discovery.zen.ElectMasterService; import org.elasticsearch.discovery.zen.FaultDetection; import org.elasticsearch.discovery.zen.UnicastZenPing; import org.elasticsearch.discovery.zen.ZenDiscovery; import org.elasticsearch.env.Environment; import org.elasticsearch.env.NodeEnvironment; import org.elasticsearch.gateway.GatewayService; import org.elasticsearch.http.HttpTransportSettings; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.indices.IndexingMemoryController; import org.elasticsearch.indices.IndicesQueryCache; import org.elasticsearch.indices.IndicesRequestCache; import org.elasticsearch.indices.IndicesService; import org.elasticsearch.indices.analysis.HunspellService; import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache; import org.elasticsearch.indices.recovery.RecoverySettings; import org.elasticsearch.indices.store.IndicesStore; import org.elasticsearch.monitor.fs.FsService; import org.elasticsearch.monitor.jvm.JvmGcMonitorService; import org.elasticsearch.monitor.jvm.JvmService; import org.elasticsearch.monitor.os.OsService; import org.elasticsearch.monitor.process.ProcessService; import org.elasticsearch.node.Node; import org.elasticsearch.plugins.PluginsService; import org.elasticsearch.repositories.fs.FsRepository; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.script.ScriptService; import org.elasticsearch.search.SearchModule; import org.elasticsearch.search.SearchService; import org.elasticsearch.search.aggregations.MultiBucketConsumerService; import org.elasticsearch.search.fetch.subphase.highlight.FastVectorHighlighter; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.RemoteClusterAware; import org.elasticsearch.transport.RemoteClusterService; import org.elasticsearch.transport.TcpTransport; import org.elasticsearch.transport.Transport; import org.elasticsearch.transport.TransportService; import org.elasticsearch.watcher.ResourceWatcherService; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.function.Predicate; /** * Encapsulates all valid cluster level settings. */ public final class ClusterSettings extends AbstractScopedSettings { public ClusterSettings(Settings nodeSettings, Set<Setting<?>> settingsSet) { super(nodeSettings, settingsSet, Property.NodeScope); addSettingsUpdater(new LoggingSettingUpdater(nodeSettings)); } private static final class LoggingSettingUpdater implements SettingUpdater<Settings> { final Predicate<String> loggerPredicate = ServerLoggers.LOG_LEVEL_SETTING::match; private final Settings settings; LoggingSettingUpdater(Settings settings) { this.settings = settings; } @Override public boolean hasChanged(Settings current, Settings previous) { return current.filter(loggerPredicate).equals(previous.filter(loggerPredicate)) == false; } @Override public Settings getValue(Settings current, Settings previous) { Settings.Builder builder = Settings.builder(); builder.put(current.filter(loggerPredicate)); for (String key : previous.keySet()) { if (loggerPredicate.test(key) && builder.keys().contains(key) == false) { if (ServerLoggers.LOG_LEVEL_SETTING.getConcreteSetting(key).exists(settings) == false) { builder.putNull(key); } else { builder.put(key, ServerLoggers.LOG_LEVEL_SETTING.getConcreteSetting(key).get(settings).toString()); } } } return builder.build(); } @Override public void apply(Settings value, Settings current, Settings previous) { for (String key : value.keySet()) { assert loggerPredicate.test(key); String component = key.substring("logger.".length()); if ("level".equals(component)) { continue; } if ("_root".equals(component)) { final String rootLevel = value.get(key); if (rootLevel == null) { ServerLoggers.setLevel(ESLoggerFactory.getRootLogger(), ServerLoggers.LOG_DEFAULT_LEVEL_SETTING.get(settings)); } else { ServerLoggers.setLevel(ESLoggerFactory.getRootLogger(), rootLevel); } } else { ServerLoggers.setLevel(ESLoggerFactory.getLogger(component), value.get(key)); } } } } public static Set<Setting<?>> BUILT_IN_CLUSTER_SETTINGS = Collections.unmodifiableSet(new HashSet<>( Arrays.asList(AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_ATTRIBUTE_SETTING, TransportClient.CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL, // TODO these transport client settings are kind // of odd here and should only be valid if we are a transport client TransportClient.CLIENT_TRANSPORT_PING_TIMEOUT, TransportClient.CLIENT_TRANSPORT_IGNORE_CLUSTER_NAME, TransportClient.CLIENT_TRANSPORT_SNIFF, AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_FORCE_GROUP_SETTING, BalancedShardsAllocator.INDEX_BALANCE_FACTOR_SETTING, BalancedShardsAllocator.SHARD_BALANCE_FACTOR_SETTING, BalancedShardsAllocator.THRESHOLD_SETTING, ClusterRebalanceAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING, ConcurrentRebalanceAllocationDecider.CLUSTER_ROUTING_ALLOCATION_CLUSTER_CONCURRENT_REBALANCE_SETTING, EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING, EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING, FilterAllocationDecider.CLUSTER_ROUTING_INCLUDE_GROUP_SETTING, FilterAllocationDecider.CLUSTER_ROUTING_EXCLUDE_GROUP_SETTING, FilterAllocationDecider.CLUSTER_ROUTING_REQUIRE_GROUP_SETTING, FsRepository.REPOSITORIES_CHUNK_SIZE_SETTING, FsRepository.REPOSITORIES_COMPRESS_SETTING, FsRepository.REPOSITORIES_LOCATION_SETTING, IndicesQueryCache.INDICES_CACHE_QUERY_SIZE_SETTING, IndicesQueryCache.INDICES_CACHE_QUERY_COUNT_SETTING, IndicesQueryCache.INDICES_QUERIES_CACHE_ALL_SEGMENTS_SETTING, MappingUpdatedAction.INDICES_MAPPING_DYNAMIC_TIMEOUT_SETTING, MetaData.SETTING_READ_ONLY_SETTING, MetaData.SETTING_READ_ONLY_ALLOW_DELETE_SETTING, RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING, RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING, RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_NETWORK_SETTING, RecoverySettings.INDICES_RECOVERY_ACTIVITY_TIMEOUT_SETTING, RecoverySettings.INDICES_RECOVERY_INTERNAL_ACTION_TIMEOUT_SETTING, RecoverySettings.INDICES_RECOVERY_INTERNAL_LONG_ACTION_TIMEOUT_SETTING, ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING, ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING, ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING, ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING, DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING, DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING, DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING, DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING, DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING, DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING, SameShardAllocationDecider.CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING, InternalClusterInfoService.INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL_SETTING, InternalClusterInfoService.INTERNAL_CLUSTER_INFO_TIMEOUT_SETTING, DestructiveOperations.REQUIRES_NAME_SETTING, DiscoverySettings.PUBLISH_TIMEOUT_SETTING, DiscoverySettings.PUBLISH_DIFF_ENABLE_SETTING, DiscoverySettings.COMMIT_TIMEOUT_SETTING, DiscoverySettings.NO_MASTER_BLOCK_SETTING, GatewayService.EXPECTED_DATA_NODES_SETTING, GatewayService.EXPECTED_MASTER_NODES_SETTING, GatewayService.EXPECTED_NODES_SETTING, GatewayService.RECOVER_AFTER_DATA_NODES_SETTING, GatewayService.RECOVER_AFTER_MASTER_NODES_SETTING, GatewayService.RECOVER_AFTER_NODES_SETTING, GatewayService.RECOVER_AFTER_TIME_SETTING, NetworkModule.HTTP_ENABLED, NetworkModule.HTTP_DEFAULT_TYPE_SETTING, NetworkModule.TRANSPORT_DEFAULT_TYPE_SETTING, NetworkModule.HTTP_TYPE_SETTING, NetworkModule.TRANSPORT_TYPE_SETTING, HttpTransportSettings.SETTING_CORS_ALLOW_CREDENTIALS, HttpTransportSettings.SETTING_CORS_ENABLED, HttpTransportSettings.SETTING_CORS_MAX_AGE, HttpTransportSettings.SETTING_HTTP_DETAILED_ERRORS_ENABLED, HttpTransportSettings.SETTING_PIPELINING, HttpTransportSettings.SETTING_CORS_ALLOW_ORIGIN, HttpTransportSettings.SETTING_HTTP_HOST, HttpTransportSettings.SETTING_HTTP_PUBLISH_HOST, HttpTransportSettings.SETTING_HTTP_BIND_HOST, HttpTransportSettings.SETTING_HTTP_PORT, HttpTransportSettings.SETTING_HTTP_PUBLISH_PORT, HttpTransportSettings.SETTING_PIPELINING_MAX_EVENTS, HttpTransportSettings.SETTING_HTTP_COMPRESSION, HttpTransportSettings.SETTING_HTTP_COMPRESSION_LEVEL, HttpTransportSettings.SETTING_CORS_ALLOW_METHODS, HttpTransportSettings.SETTING_CORS_ALLOW_HEADERS, HttpTransportSettings.SETTING_HTTP_DETAILED_ERRORS_ENABLED, HttpTransportSettings.SETTING_HTTP_CONTENT_TYPE_REQUIRED, HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH, HttpTransportSettings.SETTING_HTTP_MAX_CHUNK_SIZE, HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE, HttpTransportSettings.SETTING_HTTP_MAX_INITIAL_LINE_LENGTH, HttpTransportSettings.SETTING_HTTP_READ_TIMEOUT, HttpTransportSettings.SETTING_HTTP_RESET_COOKIES, HttpTransportSettings.SETTING_HTTP_TCP_NO_DELAY, HttpTransportSettings.SETTING_HTTP_TCP_KEEP_ALIVE, HttpTransportSettings.SETTING_HTTP_TCP_REUSE_ADDRESS, HttpTransportSettings.SETTING_HTTP_TCP_SEND_BUFFER_SIZE, HttpTransportSettings.SETTING_HTTP_TCP_RECEIVE_BUFFER_SIZE, HierarchyCircuitBreakerService.TOTAL_CIRCUIT_BREAKER_LIMIT_SETTING, HierarchyCircuitBreakerService.FIELDDATA_CIRCUIT_BREAKER_LIMIT_SETTING, HierarchyCircuitBreakerService.FIELDDATA_CIRCUIT_BREAKER_OVERHEAD_SETTING, HierarchyCircuitBreakerService.IN_FLIGHT_REQUESTS_CIRCUIT_BREAKER_LIMIT_SETTING, HierarchyCircuitBreakerService.IN_FLIGHT_REQUESTS_CIRCUIT_BREAKER_OVERHEAD_SETTING, HierarchyCircuitBreakerService.REQUEST_CIRCUIT_BREAKER_LIMIT_SETTING, HierarchyCircuitBreakerService.REQUEST_CIRCUIT_BREAKER_OVERHEAD_SETTING, HierarchyCircuitBreakerService.ACCOUNTING_CIRCUIT_BREAKER_LIMIT_SETTING, HierarchyCircuitBreakerService.ACCOUNTING_CIRCUIT_BREAKER_OVERHEAD_SETTING, ClusterService.CLUSTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING, ClusterService.CLUSTER_MAPPING_UPDATE_TIMEOUT_SETTING, ClusterService.CLUSTER_SECONDARY_INDEX_CLASS_SETTING, ClusterService.CLUSTER_SEARCH_STRATEGY_CLASS_SETTING, ClusterService.CLUSTER_DROP_ON_DELETE_INDEX_SETTING, ClusterService.CLUSTER_VERSION_LESS_ENGINE_SETTING, ClusterService.CLUSTER_TOKEN_RANGES_BITSET_CACHE_SETTING, SearchService.DEFAULT_SEARCH_TIMEOUT_SETTING, ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING, TransportSearchAction.SHARD_COUNT_LIMIT_SETTING, RemoteClusterAware.REMOTE_CLUSTERS_SEEDS, RemoteClusterService.REMOTE_CLUSTER_SKIP_UNAVAILABLE, RemoteClusterService.REMOTE_CONNECTIONS_PER_CLUSTER, RemoteClusterService.REMOTE_INITIAL_CONNECTION_TIMEOUT_SETTING, RemoteClusterService.REMOTE_NODE_ATTRIBUTE, RemoteClusterService.ENABLE_REMOTE_CLUSTERS, TransportService.TRACE_LOG_EXCLUDE_SETTING, TransportService.TRACE_LOG_INCLUDE_SETTING, TransportCloseIndexAction.CLUSTER_INDICES_CLOSE_ENABLE_SETTING, ShardsLimitAllocationDecider.CLUSTER_TOTAL_SHARDS_PER_NODE_SETTING, NodeConnectionsService.CLUSTER_NODE_RECONNECT_INTERVAL_SETTING, HierarchyCircuitBreakerService.FIELDDATA_CIRCUIT_BREAKER_TYPE_SETTING, HierarchyCircuitBreakerService.REQUEST_CIRCUIT_BREAKER_TYPE_SETTING, Transport.TRANSPORT_TCP_COMPRESS, TcpTransport.HOST, TcpTransport.PUBLISH_HOST, TcpTransport.BIND_HOST, TcpTransport.PUBLISH_PORT, TcpTransport.PORT, TcpTransport.BIND_HOST_PROFILE, TcpTransport.PUBLISH_HOST_PROFILE, TcpTransport.PUBLISH_PORT_PROFILE, TcpTransport.PORT_PROFILE, TcpTransport.TCP_NO_DELAY_PROFILE, TcpTransport.TCP_KEEP_ALIVE_PROFILE, TcpTransport.TCP_REUSE_ADDRESS_PROFILE, TcpTransport.TCP_SEND_BUFFER_SIZE_PROFILE, TcpTransport.TCP_RECEIVE_BUFFER_SIZE_PROFILE, TcpTransport.CONNECTIONS_PER_NODE_RECOVERY, TcpTransport.CONNECTIONS_PER_NODE_BULK, TcpTransport.CONNECTIONS_PER_NODE_REG, TcpTransport.CONNECTIONS_PER_NODE_STATE, TcpTransport.CONNECTIONS_PER_NODE_PING, TcpTransport.PING_SCHEDULE, TcpTransport.TCP_CONNECT_TIMEOUT, NetworkService.NETWORK_SERVER, TcpTransport.TCP_NO_DELAY, TcpTransport.TCP_KEEP_ALIVE, TcpTransport.TCP_REUSE_ADDRESS, TcpTransport.TCP_SEND_BUFFER_SIZE, TcpTransport.TCP_RECEIVE_BUFFER_SIZE, NetworkService.GLOBAL_NETWORK_HOST_SETTING, NetworkService.GLOBAL_NETWORK_BINDHOST_SETTING, NetworkService.GLOBAL_NETWORK_PUBLISHHOST_SETTING, NetworkService.TCP_NO_DELAY, NetworkService.TCP_KEEP_ALIVE, NetworkService.TCP_REUSE_ADDRESS, NetworkService.TCP_SEND_BUFFER_SIZE, NetworkService.TCP_RECEIVE_BUFFER_SIZE, NetworkService.TCP_CONNECT_TIMEOUT, IndexSettings.QUERY_STRING_ANALYZE_WILDCARD, IndexSettings.QUERY_STRING_ALLOW_LEADING_WILDCARD, ScriptService.SCRIPT_CACHE_SIZE_SETTING, ScriptService.SCRIPT_CACHE_EXPIRE_SETTING, ScriptService.SCRIPT_MAX_SIZE_IN_BYTES, ScriptService.SCRIPT_MAX_COMPILATIONS_RATE, ScriptService.TYPES_ALLOWED_SETTING, ScriptService.CONTEXTS_ALLOWED_SETTING, IndicesService.INDICES_CACHE_CLEAN_INTERVAL_SETTING, IndicesFieldDataCache.INDICES_FIELDDATA_CACHE_SIZE_KEY, IndicesRequestCache.INDICES_CACHE_QUERY_SIZE, IndicesRequestCache.INDICES_CACHE_QUERY_EXPIRE, HunspellService.HUNSPELL_LAZY_LOAD, HunspellService.HUNSPELL_IGNORE_CASE, HunspellService.HUNSPELL_DICTIONARY_OPTIONS, IndicesStore.INDICES_STORE_DELETE_SHARD_TIMEOUT, Environment.PATH_DATA_SETTING, Environment.PATH_HOME_SETTING, Environment.PATH_LOGS_SETTING, Environment.PATH_REPO_SETTING, Environment.PATH_SHARED_DATA_SETTING, Environment.PIDFILE_SETTING, NodeEnvironment.NODE_ID_SEED_SETTING, DiscoverySettings.INITIAL_STATE_TIMEOUT_SETTING, DiscoveryModule.DISCOVERY_TYPE_SETTING, DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING, FaultDetection.PING_RETRIES_SETTING, FaultDetection.PING_TIMEOUT_SETTING, FaultDetection.REGISTER_CONNECTION_LISTENER_SETTING, FaultDetection.PING_INTERVAL_SETTING, FaultDetection.CONNECT_ON_NETWORK_DISCONNECT_SETTING, ZenDiscovery.PING_TIMEOUT_SETTING, ZenDiscovery.JOIN_TIMEOUT_SETTING, ZenDiscovery.JOIN_RETRY_ATTEMPTS_SETTING, ZenDiscovery.JOIN_RETRY_DELAY_SETTING, ZenDiscovery.MAX_PINGS_FROM_ANOTHER_MASTER_SETTING, ZenDiscovery.SEND_LEAVE_REQUEST_SETTING, ZenDiscovery.MASTER_ELECTION_WAIT_FOR_JOINS_TIMEOUT_SETTING, ZenDiscovery.MASTER_ELECTION_IGNORE_NON_MASTER_PINGS_SETTING, ZenDiscovery.MAX_PENDING_CLUSTER_STATES_SETTING, UnicastZenPing.DISCOVERY_ZEN_PING_UNICAST_HOSTS_SETTING, UnicastZenPing.DISCOVERY_ZEN_PING_UNICAST_CONCURRENT_CONNECTS_SETTING, UnicastZenPing.DISCOVERY_ZEN_PING_UNICAST_HOSTS_RESOLVE_TIMEOUT, SearchService.DEFAULT_KEEPALIVE_SETTING, SearchService.KEEPALIVE_INTERVAL_SETTING, SearchService.MAX_KEEPALIVE_SETTING, MultiBucketConsumerService.MAX_BUCKET_SETTING, SearchService.LOW_LEVEL_CANCELLATION_SETTING, Node.WRITE_PORTS_FILE_SETTING, Node.NODE_NAME_SETTING, Node.NODE_DATA_SETTING, Node.NODE_MASTER_SETTING, Node.NODE_INGEST_SETTING, Node.NODE_ATTRIBUTES, Node.NODE_LOCAL_STORAGE_SETTING, TransportMasterNodeReadAction.FORCE_LOCAL_SETTING, AutoCreateIndex.AUTO_CREATE_INDEX_SETTING, BaseRestHandler.MULTI_ALLOW_EXPLICIT_INDEX, ClusterName.CLUSTER_NAME_SETTING, Client.CLIENT_TYPE_SETTING_S, ClusterModule.SHARDS_ALLOCATOR_TYPE_SETTING, EsExecutors.PROCESSORS_SETTING, ThreadContext.DEFAULT_HEADERS_SETTING, ServerLoggers.LOG_DEFAULT_LEVEL_SETTING, ServerLoggers.LOG_LEVEL_SETTING, NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING, NodeEnvironment.ENABLE_LUCENE_SEGMENT_INFOS_TRACE_SETTING, OsService.REFRESH_INTERVAL_SETTING, ProcessService.REFRESH_INTERVAL_SETTING, JvmService.REFRESH_INTERVAL_SETTING, FsService.REFRESH_INTERVAL_SETTING, JvmGcMonitorService.ENABLED_SETTING, JvmGcMonitorService.REFRESH_INTERVAL_SETTING, JvmGcMonitorService.GC_SETTING, JvmGcMonitorService.GC_OVERHEAD_WARN_SETTING, JvmGcMonitorService.GC_OVERHEAD_INFO_SETTING, JvmGcMonitorService.GC_OVERHEAD_DEBUG_SETTING, PageCacheRecycler.LIMIT_HEAP_SETTING, PageCacheRecycler.WEIGHT_BYTES_SETTING, PageCacheRecycler.WEIGHT_INT_SETTING, PageCacheRecycler.WEIGHT_LONG_SETTING, PageCacheRecycler.WEIGHT_OBJECTS_SETTING, PageCacheRecycler.TYPE_SETTING, PluginsService.MANDATORY_SETTING, BootstrapSettings.SECURITY_FILTER_BAD_DEFAULTS_SETTING, BootstrapSettings.MEMORY_LOCK_SETTING, BootstrapSettings.SYSTEM_CALL_FILTER_SETTING, BootstrapSettings.CTRLHANDLER_SETTING, KeyStoreWrapper.SEED_SETTING, IndexingMemoryController.INDEX_BUFFER_SIZE_SETTING, IndexingMemoryController.MIN_INDEX_BUFFER_SIZE_SETTING, IndexingMemoryController.MAX_INDEX_BUFFER_SIZE_SETTING, IndexingMemoryController.SHARD_INACTIVE_TIME_SETTING, IndexingMemoryController.SHARD_MEMORY_INTERVAL_TIME_SETTING, ResourceWatcherService.ENABLED, ResourceWatcherService.RELOAD_INTERVAL_HIGH, ResourceWatcherService.RELOAD_INTERVAL_MEDIUM, ResourceWatcherService.RELOAD_INTERVAL_LOW, SearchModule.INDICES_MAX_CLAUSE_COUNT_SETTING, ThreadPool.ESTIMATED_TIME_INTERVAL_SETTING, FastVectorHighlighter.SETTING_TV_HIGHLIGHT_MULTI_VALUE, Node.BREAKER_TYPE_KEY, OperationRouting.USE_ADAPTIVE_REPLICA_SELECTION_SETTING, IndexGraveyard.SETTING_MAX_TOMBSTONES, ClusterService.SETTING_DATCENTER_GROUP, ClusterService.SETTING_DATACENTER_TAGS ))); }
{'content_hash': '6e41b5d151d85549675644ba662f0142', 'timestamp': '', 'source': 'github', 'line_count': 415, 'max_line_length': 135, 'avg_line_length': 62.043373493975906, 'alnum_prop': 0.6631583035575579, 'repo_name': 'vroyer/elasticassandra', 'id': '83ccde7c337c5722fd636d6a899f12c7294a9591', 'size': '26536', 'binary': False, 'copies': '1', 'ref': 'refs/heads/v6.2.3-strapdata', 'path': 'server/src/main/java/org/elasticsearch/common/settings/ClusterSettings.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '23801'}, {'name': 'Java', 'bytes': '16940777'}, {'name': 'PowerShell', 'bytes': '39789'}, {'name': 'Python', 'bytes': '105526'}, {'name': 'Shell', 'bytes': '62311'}]}
class NetTestSuite : public TestSuite { public: NetTestSuite(int argc, char** argv) : TestSuite(argc, argv) { } virtual void Initialize() { TestSuite::Initialize(); InitializeTestThread(); } // Called from within Initialize(), but separate so that derived classes // can initialize the NetTestSuite instance only and not // TestSuite::Initialize(). TestSuite::Initialize() performs some global // initialization that can only be done once. void InitializeTestThread() { host_resolver_proc_ = new net::RuleBasedHostResolverProc(NULL); scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); // In case any attempts are made to resolve host names, force them all to // be mapped to localhost. This prevents DNS queries from being sent in // the process of running these unit tests. host_resolver_proc_->AddRule("*", "127.0.0.1"); message_loop_.reset(new MessageLoopForIO()); } virtual void Shutdown() { // We want to destroy this here before the TestSuite continues to tear down // the environment. message_loop_.reset(); TestSuite::Shutdown(); } private: scoped_ptr<MessageLoop> message_loop_; scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_; net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; }; #endif // NET_BASE_NET_TEST_SUITE_H_
{'content_hash': '598df2cf4e7fbfc228314c9dd67313db', 'timestamp': '', 'source': 'github', 'line_count': 40, 'max_line_length': 79, 'avg_line_length': 34.025, 'alnum_prop': 0.7083027185892726, 'repo_name': 'rwatson/chromium-capsicum', 'id': 'af58ca72aecd295a3d639afbb5aeac6941801571', 'size': '1739', 'binary': False, 'copies': '1', 'ref': 'refs/heads/chromium-capsicum', 'path': 'net/base/net_test_suite.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Clonecoin</source> <translation>關於位元幣</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Clonecoin&lt;/b&gt; version</source> <translation>&lt;b&gt;位元幣&lt;/b&gt;版本</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation> 這是一套實驗性的軟體. 此軟體是依據 MIT/X11 軟體授權條款散布, 詳情請見附帶的 COPYING 檔案, 或是以下網站: http://www.opensource.org/licenses/mit-license.php. 此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit (http://www.openssl.org/) 軟體, 由 Eric Young ([email protected]) 撰寫的加解密軟體, 以及由 Thomas Bernard 所撰寫的 UPnP 軟體.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation>版權</translation> </message> <message> <location line="+0"/> <source>The Clonecoin developers</source> <translation>位元幣開發人員</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>位址簿</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>點兩下來修改位址或標記</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>產生新位址</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>複製目前選取的位址到系統剪貼簿</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>新增位址</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Clonecoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>這些是你用來收款的位元幣位址. 你可以提供不同的位址給不同的付款人, 來追蹤是誰支付給你.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>複製位址</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>顯示 &amp;QR 條碼</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Clonecoin address</source> <translation>簽署訊息是用來證明位元幣位址是你的</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>訊息簽署</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>從列表中刪除目前選取的位址</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>將目前分頁的資料匯出存成檔案</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation>匯出</translation> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Clonecoin address</source> <translation>驗證訊息是用來確認訊息是用指定的位元幣位址簽署的</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>訊息驗證</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>刪除</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Clonecoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation>這是你用來付款的位元幣位址. 在付錢之前, 務必要檢查金額和收款位址是否正確.</translation> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>複製標記</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>編輯</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation>付錢</translation> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>匯出位址簿資料</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>逗號區隔資料檔 (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>匯出失敗</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>無法寫入檔案 %1.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>標記</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>位址</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(沒有標記)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>密碼對話視窗</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>輸入密碼</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>新的密碼</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>重複新密碼</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>輸入錢包的新密碼.&lt;br/&gt;請用&lt;b&gt;10個以上的字元&lt;/b&gt;, 或是&lt;b&gt;8個以上的單字&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>錢包加密</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>這個動作需要用你的錢包密碼來解鎖</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>錢包解鎖</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>這個動作需要用你的錢包密碼來解密</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>錢包解密</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>變更密碼</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>輸入錢包的新舊密碼.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>錢包加密確認</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR CLONECOINS&lt;/b&gt;!</source> <translation>警告: 如果將錢包加密後忘記密碼, 你會&lt;b&gt;失去其中所有的位元幣&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>你確定要將錢包加密嗎?</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation>重要: 請改用新產生有加密的錢包檔, 來取代之前錢包檔的備份. 為了安全性的理由, 當你開始使用新的有加密的錢包時, 舊錢包的備份就不能再使用了.</translation> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>警告: 大寫字母鎖定作用中!</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>錢包已加密</translation> </message> <message> <location line="-56"/> <source>Clonecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your clonecoins from being stolen by malware infecting your computer.</source> <translation>位元幣現在要關閉以完成加密程序. 請記住, 加密錢包無法完全防止入侵電腦的惡意程式偷取你的位元幣.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>錢包加密失敗</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>錢包加密因程式內部錯誤而失敗. 你的錢包還是沒有加密.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>提供的密碼不符.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>錢包解鎖失敗</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>用來解密錢包的密碼輸入錯誤.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>錢包解密失敗</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>錢包密碼變更成功.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>訊息簽署...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>網路同步中...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>總覽</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>顯示錢包一般總覽</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>交易</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>瀏覽交易紀錄</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>編輯位址與標記的儲存列表</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>顯示收款位址的列表</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>結束</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>結束應用程式</translation> </message> <message> <location line="+4"/> <source>Show information about Clonecoin</source> <translation>顯示位元幣相關資訊</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>關於 &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>顯示有關於 Qt 的資訊</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>選項...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>錢包加密...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>錢包備份...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>密碼變更...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>從磁碟匯入區塊中...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation>重建磁碟區塊索引中...</translation> </message> <message> <location line="-347"/> <source>Send coins to a Clonecoin address</source> <translation>付錢到位元幣位址</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Clonecoin</source> <translation>修改位元幣的設定選項</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>將錢包備份到其它地方</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>變更錢包加密用的密碼</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>除錯視窗</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>開啓除錯與診斷主控台</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>驗證訊息...</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>Clonecoin</source> <translation>位元幣</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>錢包</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation>付出</translation> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation>收受</translation> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation>位址</translation> </message> <message> <location line="+22"/> <source>&amp;About Clonecoin</source> <translation>關於位元幣</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>顯示或隱藏</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation>顯示或隱藏主視窗</translation> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation>將屬於你的錢包的密鑰加密</translation> </message> <message> <location line="+7"/> <source>Sign messages with your Clonecoin addresses to prove you own them</source> <translation>用位元幣位址簽署訊息來證明那是你的</translation> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Clonecoin addresses</source> <translation>驗證訊息來確認是用指定的位元幣位址簽署的</translation> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>檔案</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>設定</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>求助</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>分頁工具列</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+47"/> <source>Clonecoin client</source> <translation>位元幣客戶端軟體</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Clonecoin network</source> <translation><numerusform>與位元幣網路有 %n 個連線在使用中</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation>目前沒有區塊來源...</translation> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation>已處理了估計全部 %2 個中的 %1 個區塊的交易紀錄.</translation> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation>已處理了 %1 個區塊的交易紀錄.</translation> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation><numerusform>%n 個小時</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n 天</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation><numerusform>%n 個星期</numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation>落後 %1</translation> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation>最近收到的區塊是在 %1 之前生產出來.</translation> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation>會看不見在這之後的交易.</translation> </message> <message> <location line="+22"/> <source>Error</source> <translation>錯誤</translation> </message> <message> <location line="+3"/> <source>Warning</source> <translation>警告</translation> </message> <message> <location line="+3"/> <source>Information</source> <translation>資訊</translation> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation>這筆交易的資料大小超過限制了. 你還是可以付出 %1 的費用來傳送, 這筆費用會付給處理你的交易的節點, 並幫助維持整個網路. 你願意支付這項費用嗎?</translation> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>最新狀態</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>進度追趕中...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>確認交易手續費</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>付款交易</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>收款交易</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>日期: %1 金額: %2 類別: %3 位址: %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>URI 處理</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Clonecoin address or malformed URI parameters.</source> <translation>無法解析 URI! 也許位元幣位址無效或 URI 參數有誤.</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>錢包&lt;b&gt;已加密&lt;/b&gt;並且正&lt;b&gt;解鎖中&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>錢包&lt;b&gt;已加密&lt;/b&gt;並且正&lt;b&gt;上鎖中&lt;/b&gt;</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. Clonecoin can no longer continue safely and will quit.</source> <translation>發生了致命的錯誤. 位元幣程式無法再繼續安全執行, 只好結束.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>網路警報</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>編輯位址</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>標記</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>與這個位址簿項目關聯的標記</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>位址</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>與這個位址簿項目關聯的位址. 付款位址才能被更改.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>新收款位址</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>新增付款位址</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>編輯收款位址</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>編輯付款位址</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>輸入的位址&quot;%1&quot;已存在於位址簿中.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Clonecoin address.</source> <translation>輸入的位址 &quot;%1&quot; 並不是有效的位元幣位址.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>無法將錢包解鎖.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>新密鑰產生失敗.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Clonecoin-Qt</source> <translation>位元幣-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>版本</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>用法:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>命令列選項</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>使用界面選項</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>設定語言, 比如說 &quot;de_DE&quot; (預設: 系統語系)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>啓動時最小化 </translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>顯示啓動畫面 (預設: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>選項</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>主要</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation>非必要的交易手續費, 以 kB 為計費單位, 且有助於縮短你的交易處理時間. 大部份交易資料的大小是 1 kB.</translation> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>付交易手續費</translation> </message> <message> <location line="+31"/> <source>Automatically start Clonecoin after logging in to the system.</source> <translation>在登入系統後自動啓動位元幣.</translation> </message> <message> <location line="+3"/> <source>&amp;Start Clonecoin on system login</source> <translation>系統登入時啟動位元幣</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation>回復所有客戶端軟體選項成預設值.</translation> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation>選項回復</translation> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>網路</translation> </message> <message> <location line="+6"/> <source>Automatically open the Clonecoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>自動在路由器上開啟 Clonecoin 的客戶端通訊埠. 只有在你的路由器支援 UPnP 且開啟時才有作用.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>用 &amp;UPnP 設定通訊埠對應</translation> </message> <message> <location line="+7"/> <source>Connect to the Clonecoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>透過 SOCKS 代理伺服器連線至位元幣網路 (比如說要透過 Tor 連線).</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>透過 SOCKS 代理伺服器連線:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>代理伺服器位址:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>代理伺服器的網際網路位址 (比如說 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>通訊埠:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>代理伺服器的通訊埠 (比如說 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS 協定版本:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>代理伺服器的 SOCKS 協定版本 (比如說 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>視窗</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>最小化視窗後只在通知區域顯示圖示</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>最小化至通知區域而非工作列</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>當視窗關閉時將其最小化, 而非結束應用程式. 當勾選這個選項時, 應用程式只能用選單中的結束來停止執行.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>關閉時最小化</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>顯示</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>使用界面語言</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Clonecoin.</source> <translation>可以在這裡設定使用者介面的語言. 這個設定在位元幣程式重啓後才會生效.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>金額顯示單位:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>選擇操作界面與付錢時預設顯示的細分單位.</translation> </message> <message> <location line="+9"/> <source>Whether to show Clonecoin addresses in the transaction list or not.</source> <translation>是否要在交易列表中顯示位元幣位址.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>在交易列表顯示位址</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>好</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>取消</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>套用</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>預設</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation>確認回復選項</translation> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation>有些設定可能需要重新啓動客戶端軟體才會生效.</translation> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation>你想要就做下去嗎?</translation> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>警告</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Clonecoin.</source> <translation>這個設定會在位元幣程式重啓後生效.</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>提供的代理伺服器位址無效</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>表單</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Clonecoin network after a connection is established, but this process has not completed yet.</source> <translation>顯示的資訊可能是過期的. 與位元幣網路的連線建立後, 你的錢包會自動和網路同步, 但這個步驟還沒完成.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>餘額:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>未確認額:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>錢包</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>未熟成</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>尚未熟成的開採金額</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;最近交易&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>目前餘額</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>尚未確認之交易的總額, 不包含在目前餘額中</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>沒同步</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start clonecoin: click-to-pay handler</source> <translation>無法啟動 clonecoin 隨按隨付處理器</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>QR 條碼對話視窗</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>付款單</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>金額:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>標記:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>訊息:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>儲存為...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>將 URI 編碼成 QR 條碼失敗</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>輸入的金額無效, 請檢查看看.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>造出的網址太長了,請把標籤或訊息的文字縮短再試看看.</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>儲存 QR 條碼</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>PNG 圖檔 (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>客戶端軟體名稱</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>無</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>客戶端軟體版本</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>資訊</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>使用 OpenSSL 版本</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>啓動時間</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>網路</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>連線數</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>位於測試網路</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>區塊鎖鏈</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>目前區塊數</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>估計總區塊數</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>最近區塊時間</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>開啓</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>命令列選項</translation> </message> <message> <location line="+7"/> <source>Show the Clonecoin-Qt help message to get a list with possible Clonecoin command-line options.</source> <translation>顯示位元幣-Qt的求助訊息, 來取得可用的命令列選項列表.</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>顯示</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>主控台</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>建置日期</translation> </message> <message> <location line="-104"/> <source>Clonecoin - Debug window</source> <translation>位元幣 - 除錯視窗</translation> </message> <message> <location line="+25"/> <source>Clonecoin Core</source> <translation>位元幣核心</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>除錯紀錄檔</translation> </message> <message> <location line="+7"/> <source>Open the Clonecoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>從目前的資料目錄下開啓位元幣的除錯紀錄檔. 當紀錄檔很大時可能要花好幾秒的時間.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>清主控台</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Clonecoin RPC console.</source> <translation>歡迎使用位元幣 RPC 主控台.</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>請用上下游標鍵來瀏覽歷史指令, 且可用 &lt;b&gt;Ctrl-L&lt;/b&gt; 來清理畫面.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>請打 &lt;b&gt;help&lt;/b&gt; 來看可用指令的簡介.</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>付錢</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>一次付給多個人</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>加收款人</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>移除所有交易欄位</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>全部清掉</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>餘額:</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 BTC</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>確認付款動作</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>付出</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; 給 %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>確認要付錢</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>確定要付出 %1 嗎?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>和</translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>無效的收款位址, 請再檢查看看.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>付款金額必須大於 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>金額超過餘額了.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>包含 %1 的交易手續費後, 總金額超過你的餘額了.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>發現有重複的位址. 每個付款動作中, 只能付給個別的位址一次.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation>錯誤: 交易產生失敗!</translation> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>錯誤: 交易被拒絕. 有時候會發生這種錯誤, 是因為你錢包中的一些錢已經被花掉了. 比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢, 你現在所用的原來的錢包中卻沒有該筆交易紀錄.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>表單</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>金額:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>付給:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>付款的目標位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>輸入一個標記給這個位址, 並加到位址簿中</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>標記:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>從位址簿中選一個位址</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>從剪貼簿貼上位址</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>去掉這個收款人</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Clonecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>輸入位元幣位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>簽章 - 簽署或驗證訊息</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>訊息簽署</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>你可以用自己的位址來簽署訊息, 以證明你對它的所有權. 但是請小心, 不要簽署語意含糊不清的內容, 因為釣魚式詐騙可能會用騙你簽署的手法來冒充是你. 只有在語句中的細節你都同意時才簽署.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>用來簽署訊息的位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>從位址簿選一個位址</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>從剪貼簿貼上位址</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>在這裡輸入你想簽署的訊息</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation>簽章</translation> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>複製目前的簽章到系統剪貼簿</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Clonecoin address</source> <translation>簽署訊息是用來證明這個位元幣位址是你的</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>訊息簽署</translation> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>重置所有訊息簽署欄位</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>全部清掉</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>訊息驗證</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>請在下面輸入簽署的位址, 訊息(請確認完整複製了所包含的換行, 空格, 跳位符號等等), 與簽章, 以驗證該訊息. 請小心, 除了訊息內容外, 不要對簽章本身過度解讀, 以避免被用&quot;中間人攻擊法&quot;詐騙.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>簽署該訊息的位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Clonecoin address</source> <translation>驗證訊息是用來確認訊息是用指定的位元幣位址簽署的</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation>訊息驗證</translation> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>重置所有訊息驗證欄位</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Clonecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>輸入位元幣位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>按&quot;訊息簽署&quot;來產生簽章</translation> </message> <message> <location line="+3"/> <source>Enter Clonecoin signature</source> <translation>輸入位元幣簽章</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>輸入的位址無效.</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>請檢查位址是否正確後再試一次.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>輸入的位址沒有指到任何密鑰.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>錢包解鎖已取消.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>沒有所輸入位址的密鑰.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>訊息簽署失敗.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>訊息已簽署.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>無法將這個簽章解碼.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>請檢查簽章是否正確後再試一次.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>這個簽章與訊息的數位摘要不符.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>訊息驗證失敗.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>訊息已驗證.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+25"/> <source>The Clonecoin developers</source> <translation>位元幣開發人員</translation> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>在 %1 前未定</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/離線中</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/未確認</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>經確認 %1 次</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>狀態</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, 已公告至 %n 個節點</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>日期</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>來源</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>生產出</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>來處</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>目的</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>自己的位址</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>標籤</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>入帳</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>將在 %n 個區塊產出後熟成</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>不被接受</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>出帳</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>交易手續費</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>淨額</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>訊息</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>附註</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>交易識別碼</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>生產出來的錢要再等 120 個區塊熟成之後, 才能夠花用. 當你產出區塊時, 它會被公布到網路上, 以被串連至區塊鎖鏈. 如果串連失敗了, 它的狀態就會變成&quot;不被接受&quot;, 且不能被花用. 當你產出區塊的幾秒鐘內, 也有其他節點產出區塊的話, 有時候就會發生這種情形.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>除錯資訊</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>交易</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>輸入</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>金額</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>是</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>否</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, 尚未成功公告出去</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation><numerusform>在接下來 %n 個區塊產出前未定</numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>未知</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>交易明細</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>此版面顯示交易的詳細說明</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>日期</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>種類</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>位址</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>金額</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation><numerusform>在接下來 %n 個區塊產出前未定</numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>在 %1 前未定</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>離線中 (經確認 %1 次)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>未確認 (經確認 %1 次, 應確認 %2 次)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>已確認 (經確認 %1 次)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation><numerusform>開採金額將可在 %n 個區塊熟成後可用</numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>沒有其他節點收到這個區塊, 也許它不被接受!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>生產出但不被接受</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>收受於</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>收受自</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>付出至</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>付給自己</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>開採所得</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(不適用)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>交易狀態. 移動游標至欄位上方來顯示確認次數.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>收到交易的日期與時間.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>交易的種類.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>交易的目標位址.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>減去或加入至餘額的金額</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>全部</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>今天</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>這週</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>這個月</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>上個月</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>今年</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>指定範圍...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>收受於</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>付出至</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>給自己</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>開採所得</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>其他</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>輸入位址或標記來搜尋</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>最小金額</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>複製位址</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>複製標記</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>複製金額</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>複製交易識別碼</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>編輯標記</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>顯示交易明細</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>匯出交易資料</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>逗號分隔資料檔 (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>已確認</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>日期</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>種類</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>標記</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>位址</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>金額</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>識別碼</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>匯出失敗</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>無法寫入至 %1 檔案.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>範圍:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>至</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>付錢</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation>匯出</translation> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>將目前分頁的資料匯出存成檔案</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation>錢包備份</translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>錢包資料檔 (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>備份失敗</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>儲存錢包資料到新的地方失敗</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation>備份成功</translation> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation>錢包的資料已經成功儲存到新的地方了.</translation> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>Clonecoin version</source> <translation>位元幣版本</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>用法:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or clonecoind</source> <translation>送指令給 -server 或 clonecoind </translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>列出指令 </translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>取得指令說明 </translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>選項: </translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: clonecoin.conf)</source> <translation>指定設定檔 (預設: clonecoin.conf) </translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: clonecoind.pid)</source> <translation>指定行程識別碼檔案 (預設: clonecoind.pid) </translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>指定資料目錄 </translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>設定資料庫快取大小為多少百萬位元組(MB, 預設: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 7921 or testnet: 17921)</source> <translation>在通訊埠 &lt;port&gt; 聽候連線 (預設: 7921, 或若為測試網路: 17921)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>維持與節點連線數的上限為 &lt;n&gt; 個 (預設: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>連線到某個節點以取得其它節點的位址, 然後斷線</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>指定自己公開的位址</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>與亂搞的節點斷線的臨界值 (預設: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>避免與亂搞的節點連線的秒數 (預設: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>在 IPv4 網路上以通訊埠 %u 聽取 RPC 連線時發生錯誤: %s</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 7920 or testnet: 17920)</source> <translation>在通訊埠 &lt;port&gt; 聽候 JSON-RPC 連線 (預設: 7920, 或若為測試網路: 17920)</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>接受命令列與 JSON-RPC 指令 </translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>以背景程式執行並接受指令</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>使用測試網路 </translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>是否接受外來連線 (預設: 當沒有 -proxy 或 -connect 時預設為 1)</translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=clonecoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Clonecoin Alert&quot; [email protected] </source> <translation>%s, 你必須要在以下設定檔中設定 RPC 密碼(rpcpassword): %s 建議你使用以下隨機產生的密碼: rpcuser=clonecoinrpc rpcpassword=%s (你不用記住這個密碼) 使用者名稱(rpcuser)和密碼(rpcpassword)不可以相同! 如果設定檔還不存在, 請在新增時, 設定檔案權限為&quot;只有主人才能讀取&quot;. 也建議你設定警示通知, 發生問題時你才會被通知到; 比如說設定為: alertnotify=echo %%s | mail -s &quot;Clonecoin Alert&quot; [email protected] </translation> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation>設定在 IPv6 網路的通訊埠 %u 上聽候 RPC 連線失敗, 退而改用 IPv4 網路: %s</translation> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation>和指定的位址繫結, 並總是在該位址聽候連線. IPv6 請用 &quot;[主機]:通訊埠&quot; 這種格式</translation> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Clonecoin is probably already running.</source> <translation>無法鎖定資料目錄 %s. 也許位元幣已經在執行了.</translation> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>錯誤: 交易被拒絕了! 有時候會發生這種錯誤, 是因為你錢包中的一些錢已經被花掉了. 比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢, 你現在所用的原來的錢包中卻沒有該筆交易紀錄.</translation> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation>錯誤: 這筆交易需要至少 %s 的手續費! 因為它的金額太大, 或複雜度太高, 或是使用了最近才剛收到的款項.</translation> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>當收到相關警示時所要執行的指令 (指令中的 %s 會被取代為警示訊息)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>當錢包有交易改變時所要執行的指令 (指令中的 %s 會被取代為交易識別碼)</translation> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>設定高優先權或低手續費的交易資料大小上限為多少位元組 (預設: 27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation>這是尚未發表的測試版本 - 使用請自負風險 - 請不要用於開採或商業應用</translation> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>警告: -paytxfee 設定了很高的金額! 這可是你交易付款所要付的手續費.</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>警告: 顯示的交易可能不正確! 你可能需要升級, 或者需要等其它的節點升級.</translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Clonecoin will not work properly.</source> <translation>警告: 請檢查電腦時間與日期是否正確! 位元幣無法在時鐘不準的情況下正常運作.</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>警告: 讀取錢包檔 wallet.dat 失敗了! 所有的密鑰都正確讀取了, 但是交易資料或位址簿資料可能會缺少或不正確.</translation> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation>警告: 錢包檔 wallet.dat 壞掉, 但資料被拯救回來了! 原來的 wallet.dat 會改儲存在 %s, 檔名為 wallet.{timestamp}.bak. 如果餘額或交易資料有誤, 你應該要用備份資料復原回來.</translation> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>嘗試從壞掉的錢包檔 wallet.dat 復原密鑰</translation> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>區塊產生選項:</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>只連線至指定節點(可多個)</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation>發現區塊資料庫壞掉了</translation> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>找出自己的網際網路位址 (預設: 當有聽候連線且沒有 -externalip 時為 1)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation>你要現在重建區塊資料庫嗎?</translation> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation>初始化區塊資料庫失敗</translation> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation>錢包資料庫環境 %s 初始化錯誤!</translation> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation>載入區塊資料庫失敗</translation> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation>打開區塊資料庫檔案失敗</translation> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation>錯誤: 磁碟空間很少!</translation> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation>錯誤: 錢包被上鎖了, 無法產生新的交易!</translation> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation>錯誤: 系統錯誤:</translation> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>在任意的通訊埠聽候失敗. 如果你想的話可以用 -listen=0.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation>讀取區塊資訊失敗</translation> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation>讀取區塊失敗</translation> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation>同步區塊索引失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation>寫入區塊索引失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation>寫入區塊資訊失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation>寫入區塊失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation>寫入檔案資訊失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation>寫入位元幣資料庫失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation>寫入交易索引失敗</translation> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation>寫入回復資料失敗</translation> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>是否允許在找節點時使用域名查詢 (預設: 當沒用 -connect 時為 1)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation>生產位元幣 (預設值: 0)</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation>啓動時檢查的區塊數 (預設: 288, 指定 0 表示全部)</translation> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation>區塊檢查的仔細程度 (0 至 4, 預設: 3)</translation> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation>檔案描述器不足.</translation> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation>從目前的區塊檔 blk000??.dat 重建鎖鏈索引</translation> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation>設定處理 RPC 服務請求的執行緒數目 (預設為 4)</translation> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation>驗證區塊資料中...</translation> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation>驗證錢包資料中...</translation> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation>從其它來源的 blk000??.dat 檔匯入區塊</translation> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation>設定指令碼驗證的執行緒數目 (最多為 16, 若為 0 表示程式自動決定, 小於 0 表示保留不用的處理器核心數目, 預設為 0)</translation> </message> <message> <location line="+77"/> <source>Information</source> <translation>資訊</translation> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>無效的 -tor 位址: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>設定 -minrelaytxfee=&lt;金額&gt; 的金額無效: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>設定 -mintxfee=&lt;amount&gt; 的金額無效: &apos;%s&apos;</translation> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation>維護全部交易的索引 (預設為 0)</translation> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>每個連線的接收緩衝區大小上限為 &lt;n&gt;*1000 個位元組 (預設: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>每個連線的傳送緩衝區大小上限為 &lt;n&gt;*1000 位元組 (預設: 1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation>只接受與內建的檢查段點吻合的區塊鎖鏈 (預設: 1)</translation> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>只和 &lt;net&gt; 網路上的節點連線 (IPv4, IPv6, 或 Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>輸出額外的除錯資訊. 包含了其它所有的 -debug* 選項</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>輸出額外的網路除錯資訊</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>在除錯輸出內容前附加時間</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the Clonecoin Wiki for SSL setup instructions)</source> <translation>SSL 選項: (SSL 設定程序請見 Clonecoin Wiki)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>選擇 SOCKS 代理伺服器的協定版本(4 或 5, 預設: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>在終端機顯示追蹤或除錯資訊, 而非寫到 debug.log 檔</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>輸出追蹤或除錯資訊給除錯器</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>設定區塊大小上限為多少位元組 (預設: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>設定區塊大小下限為多少位元組 (預設: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>客戶端軟體啓動時將 debug.log 檔縮小 (預設: 當沒有 -debug 時為 1)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation>簽署交易失敗</translation> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>指定連線在幾毫秒後逾時 (預設: 5000)</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation>系統錯誤:</translation> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation>交易金額太小</translation> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation>交易金額必須是正的</translation> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation>交易位元量太大</translation> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>是否使用通用即插即用(UPnP)協定來設定聽候連線的通訊埠 (預設: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>是否使用通用即插即用(UPnP)協定來設定聽候連線的通訊埠 (預設: 當有聽候連線為 1)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>透過代理伺服器來使用 Tor 隱藏服務 (預設: 同 -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>JSON-RPC 連線使用者名稱</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation>警告</translation> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>警告: 這個版本已經被淘汰掉了, 必須要升級!</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation>改變 -txindex 參數後, 必須要用 -reindex 參數來重建資料庫</translation> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation>錢包檔 weallet.dat 壞掉了, 拯救失敗</translation> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>JSON-RPC 連線密碼</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>只允許從指定網路位址來的 JSON-RPC 連線</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>送指令給在 &lt;ip&gt; 的節點 (預設: 127.0.0.1) </translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>當最新區塊改變時所要執行的指令 (指令中的 %s 會被取代為區塊的雜湊值)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>將錢包升級成最新的格式</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>設定密鑰池大小為 &lt;n&gt; (預設: 100) </translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>重新掃描區塊鎖鏈, 以尋找錢包所遺漏的交易.</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>於 JSON-RPC 連線使用 OpenSSL (https) </translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>伺服器憑證檔 (預設: server.cert) </translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>伺服器密鑰檔 (預設: server.pem) </translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>可以接受的加密法 (預設: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) </translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>此協助訊息 </translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>無法和這台電腦上的 %s 繫結 (繫結回傳錯誤 %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>透過 SOCKS 代理伺服器連線</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>允許對 -addnode, -seednode, -connect 的參數使用域名查詢 </translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>載入位址中...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>載入檔案 wallet.dat 失敗: 錢包壞掉了</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Clonecoin</source> <translation>載入檔案 wallet.dat 失敗: 此錢包需要新版的 Clonecoin</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Clonecoin to complete</source> <translation>錢包需要重寫: 請重啟位元幣來完成</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>載入檔案 wallet.dat 失敗</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>無效的 -proxy 位址: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>在 -onlynet 指定了不明的網路別: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>在 -socks 指定了不明的代理協定版本: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>無法解析 -bind 位址: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>無法解析 -externalip 位址: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>設定 -paytxfee=&lt;金額&gt; 的金額無效: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>無效的金額</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>累積金額不足</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>載入區塊索引中...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>加入一個要連線的節線, 並試著保持對它的連線暢通</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Clonecoin is probably already running.</source> <translation>無法和這台電腦上的 %s 繫結. 也許位元幣已經在執行了.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>交易付款時每 KB 的交易手續費</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>載入錢包中...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>無法將錢包格式降級</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>無法寫入預設位址</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>重新掃描中...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>載入完成</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>為了要使用 %s 選項</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>錯誤</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>你必須在下列設定檔中設定 RPC 密碼(rpcpassword=&lt;password&gt;): %s 如果這個檔案還不存在, 請在新增時, 設定檔案權限為&quot;只有主人才能讀取&quot;.</translation> </message> </context> </TS>
{'content_hash': '133ff466a299687598e2e35356822116', 'timestamp': '', 'source': 'github', 'line_count': 2955, 'max_line_length': 395, 'avg_line_length': 34.60507614213198, 'alnum_prop': 0.6044221479004088, 'repo_name': 'clonecoin/clonecoin', 'id': '16b91a16d4e72d2a89b8608f42fe9406e2f2b113', 'size': '113450', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/qt/locale/bitcoin_zh_TW.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '103230'}, {'name': 'C++', 'bytes': '12730721'}, {'name': 'CSS', 'bytes': '1127'}, {'name': 'IDL', 'bytes': '14184'}, {'name': 'Objective-C', 'bytes': '5711'}, {'name': 'Python', 'bytes': '69704'}, {'name': 'Shell', 'bytes': '14580'}, {'name': 'TypeScript', 'bytes': '5241724'}]}
<?php namespace Illuminate\Console; use Illuminate\Support\ServiceProvider; class ScheduleServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Register the service provider. * * @return void */ public function register() { $this->commands('Illuminate\Console\Scheduling\ScheduleRunCommand'); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ 'Illuminate\Console\Scheduling\ScheduleRunCommand', ]; } }
{'content_hash': '97eef92abef87ea304896f85f8cc2779', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 76, 'avg_line_length': 19.13888888888889, 'alnum_prop': 0.6008708272859217, 'repo_name': 'Amaire/filmy', 'id': '82f59393b2d56d3930266ffee9423fe3aac1cdd6', 'size': '689', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'vendor/laravel/framework/src/Illuminate/Console/ScheduleServiceProvider.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '356'}, {'name': 'JavaScript', 'bytes': '504'}, {'name': 'PHP', 'bytes': '105599'}]}
<?php class Resource { const PLUGIN = 1; const FIELDTYPE = 2; const HOOKS = 4; const TASKS = 8; const MODIFIER = 16; const API = 32; const CORE = 64; /** * Attempts to load a modifier * * @param string $name Name of modifier to load * @return Modifier * @throws Exception */ public static function loadModifier($name) { return self::loadAddonResource(self::MODIFIER, $name); } /** * Attempts to load a plugin * * @param string $name Name of plugin to load * @return Plugin * @throws Exception */ public static function loadPlugin($name) { return self::loadAddonResource(self::PLUGIN, $name); } /** * Attempts to load a fieldtype * * @param string $name Name of fieldtype to load * @return Plugin * @throws Exception */ public static function loadFieldtype($name) { return self::loadAddonResource(self::FIELDTYPE, $name); } /** * Attempts to load hooks * * @param string $name Name of hooks to load * @return Hooks * @throws Exception */ public static function loadHooks($name) { return self::loadAddonResource(self::HOOKS, $name); } /** * Attempts to load tasks * * @param string $name Name of tasks to load * @return Tasks * @throws Exception */ public static function loadTasks($name) { return self::loadAddonResource(self::TASKS, $name); } /** * Attempts to load core * * @param string $name Name of core to load * @return Core * @throws Exception */ public static function loadCore($name) { return self::loadAddonResource(self::CORE, $name); } /** * Attempts to load API * * @param string $name Name of API to load * @return Tasks * @throws Exception */ public static function loadAPI($name) { return self::loadAddonResource(self::API, $name); } /** * Attempts to load an add-on file * * @param integer $type Type of add-on file to load * @param string $addon Add-on to load * @return Addon * @throws Exception */ public static function loadAddonResource($type, $addon) { $folders = Config::getAddOnLocations(); $file = null; $type_map = array( self::PLUGIN => array( 'abbreviation' => 'pi', 'name' => 'plugin' ), self::FIELDTYPE => array( 'abbreviation' => 'ft', 'name' => 'fieldtype' ), self::HOOKS => array( 'abbreviation' => 'hooks', 'name' => 'hooks' ), self::TASKS => array( 'abbreviation' => 'tasks', 'name' => 'tasks' ), self::MODIFIER => array( 'abbreviation' => 'mod', 'name' => 'modifier' ), self::API => array( 'abbreviation' => 'api', 'name' => 'API' ), self::CORE => array( 'abbreviation' => 'core', 'name' => 'Core' ) ); if (!isset($type_map[$type])) { Log::error("Unknown add-on type.", "API", "Resource"); throw new Exception("Unknown add-on type."); } // grab the abbreviation and name $addon_details = $type_map[$type]; $abbr = $addon_details['abbreviation']; $name = $addon_details['name']; // loop through folders looking for addon foreach ($folders as $folder) { if (File::exists(BASE_PATH.'/'.$folder.$addon.'/'.$abbr.'.'.$addon.'.php')) { $file = $folder.$addon.'/'.$abbr.'.'.$addon.'.php'; break; } } if (!$file) { // Log::error("Could not find files to load the `{$addon}` {$name}.", "API", "Resource"); throw new ResourceNotFoundException("Could not find files to load the `{$addon}` {$name}."); } $class = ucwords($name) . "_" . $addon; if (!class_exists($class)) { throw new ResourceNotFoundException("Improperly formatted {$name} object."); } return new $class(); } }
{'content_hash': 'f594c2b42f4aaffbc1548316bdf0d56c', 'timestamp': '', 'source': 'github', 'line_count': 179, 'max_line_length': 104, 'avg_line_length': 25.910614525139664, 'alnum_prop': 0.4795170332039672, 'repo_name': 'kwanpt/blog', 'id': '561fc596ef368905a1d45a7289a367c1c52e2379', 'size': '4825', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_app/core/api/resource.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ApacheConf', 'bytes': '1826'}, {'name': 'CSS', 'bytes': '249264'}, {'name': 'HTML', 'bytes': '34230'}, {'name': 'JavaScript', 'bytes': '75006'}, {'name': 'PHP', 'bytes': '920764'}]}
from math import fabs from Src.BioAnalyzer.Analysis.GenePrioritization.Steps.DifferentialAnalysis.Measurers.LocalDifferentialMeasurerBase import \ LocalDifferentialMeasurerBase from Src.BioAnalyzer.CrossCutting.DTOs.GenePrioritization.DifferentialValueDto import DifferentialValueDto from Src.BioDataManagement.CrossCutting.DTOs.DnaMethylationLevelStatusDto import DnaMethylationLevelStatusDto class LocalBetaValueMeasurer(LocalDifferentialMeasurerBase[int, float]): """""" def __init__(self): super().__init__() self._fold_change_threshold = 0.2 def calculate(self, element_id:int, case_value:float, control_value:float)-> DifferentialValueDto: """ :param element_id: :param case_value: :param control_value: :return: """ is_highly_significant = False diff_value = case_value - control_value status = DnaMethylationLevelStatusDto.Hypermethylated if fabs(diff_value) >= 0.2 \ else DnaMethylationLevelStatusDto.Hypomethylation if (diff_value > 0 and fabs(diff_value) / control_value >= self._fold_change_threshold) or\ (diff_value < 0 and fabs(diff_value) / case_value >= self._fold_change_threshold): is_highly_significant = True return DifferentialValueDto[int, DnaMethylationLevelStatusDto](element_id=element_id, value=diff_value, status=status, is_highly_significant=is_highly_significant)
{'content_hash': '0958a1960fbecd35da06472f8c9803b5', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 124, 'avg_line_length': 46.72222222222222, 'alnum_prop': 0.6248513674197385, 'repo_name': 'cemarchi/biosphere', 'id': '704e6ecabb8c574700ba12644057090f9a3011c3', 'size': '1682', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Src/BioAnalyzer/Analysis/GenePrioritization/Steps/DifferentialAnalysis/Measurers/LocalBetaValueMeasurer.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Python', 'bytes': '822707'}]}
body { padding-top: 60px; padding-bottom: 40px; } .zf-green { color: #68b604; } .btn-success { background-color: #57a900; background-image: -moz-linear-gradient(top, #70d900, #57a900); background-image: -ms-linear-gradient(top, #70d900, #57a900); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#70d900), to(#57a900)); background-image: -webkit-linear-gradient(top, #70d900, #57a900); background-image: -o-linear-gradient(top, #70d900, #57a900); background-image: linear-gradient(top, #70d900, #57a900); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#70d900', endColorstr='#57a900', GradientType=0); } .btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { background-color: #57a900; } .btn-success:active, .btn-success.active { background-color: #57a900; } div.container a.brand { background: url("../img/home.png") no-repeat scroll 0 10px transparent; margin-left: 0; padding: 2px 20px 12px 40px; } .criteriadata { float: left; width: 200px; } .listdata { margin-left: 205px; } .listsettingsdata { float: left; width: 200px; } .settingsdata{ margin-left: 205px; } #error-form-message{ color:#ff0000; } #info-form-message{ color:#cccc00; } #valid-form-message{ color:#00cc00; } .div-info-form-message{ color:#cccc00; } .login-bar-default { color: #ffffff !important; background-color: transparent; font-size: 18px; float: left; padding: 15px 15px; line-height: 20px; margin-left: -15px; } .login-bar-default:hover { text-decoration: none; } .login-bar-default-bottom { color: #ffffff !important; background-color: transparent; font-size: 12px; float: left; padding: 15px 15px; line-height: 20px; margin-left: -15px; } .login-bar-default-bottom:hover { text-decoration: none; } .custom_form_errors { color: red; } .custom_form_info { color: limegreen; } .btn-default-size { width:120px; }
{'content_hash': '40342fe69dfb3ef906db03cdd4bbbcb5', 'timestamp': '', 'source': 'github', 'line_count': 107, 'max_line_length': 119, 'avg_line_length': 19.373831775700936, 'alnum_prop': 0.6603955619874577, 'repo_name': 'FlorenceColas/warehouse', 'id': '79a663d730d9f1f1a5e57bd70f3ffa4c84bb704a', 'size': '2073', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'public/css/style.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '452574'}, {'name': 'HTML', 'bytes': '223420'}, {'name': 'Hack', 'bytes': '1624'}, {'name': 'JavaScript', 'bytes': '365727'}, {'name': 'PHP', 'bytes': '759274'}]}
using System; using System.Text; class WordDictionary { static void Main() { string input = ".NET"; string dictionary = ".NET - platform for applications from Microsoft;CLR - managed execution environment for .NET;namespace - hierarchical organization of classes"; string[] dictionaryData = dictionary.Split(new char[] { ';', '-' }); input += " "; for (int i = 0; i < dictionaryData.Length; i++) { if (string.Compare(input, dictionaryData[i], true) == 0) { Console.WriteLine("{0}-{1}", input, dictionaryData[i + 1]); } } } }
{'content_hash': '875286acbf2ac85018c33146f31a7795', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 173, 'avg_line_length': 32.35, 'alnum_prop': 0.5595054095826894, 'repo_name': 'Etonchev/Telerik_CSharpPart2', 'id': '672159c3d8cea0f32d518a6b00aa50c4d65aed25', 'size': '649', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '06StringsAndTextProcessing/14_WordDictionary/WordDictionary.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '226063'}]}
module schema { export function createValidator1(schema: any): <T>(data: T) => T { return undefined; } } // Constructor types module schema { export function createValidator2(schema: any): new <T>(data: T) => T { return undefined; } } // union types module schema { export function createValidator3(schema: any): number | { new <T>(data: T): T; } { return undefined; } } // Array types module schema { export function createValidator4(schema: any): { new <T>(data: T): T; }[] { return undefined; } } // TypeLiterals module schema { export function createValidator5(schema: any): { new <T>(data: T): T } { return undefined; } } // Tuple types module schema { export function createValidator6(schema: any): [ new <T>(data: T) => T, number] { return undefined; } } // Paren Types module schema { export function createValidator7(schema: any): (new <T>(data: T)=>T )[] { return undefined; } } // Type reference module schema { export function createValidator8(schema: any): Array<{ <T>(data: T) : T}> { return undefined; } } module schema { export class T { get createValidator9(): <T>(data: T) => T { return undefined; } set createValidator10(v: <T>(data: T) => T) { } } }
{'content_hash': 'bd74d3bbf943cc1e2e07948132c1094f', 'timestamp': '', 'source': 'github', 'line_count': 67, 'max_line_length': 88, 'avg_line_length': 20.46268656716418, 'alnum_prop': 0.5784099197665937, 'repo_name': 'freedot/tstolua', 'id': 'f24efc4847d183e7ddc7e2db77125ef052ceac9e', 'size': '1428', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/cases/compiler/isDeclarationVisibleNodeKinds.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '1125'}, {'name': 'HTML', 'bytes': '4659'}, {'name': 'JavaScript', 'bytes': '85'}, {'name': 'Lua', 'bytes': '68588'}, {'name': 'PowerShell', 'bytes': '2780'}, {'name': 'TypeScript', 'bytes': '22883724'}]}
<?xml version="1.0" encoding="UTF-8"?> <!--suppress ALL --> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:property="http://www.springframework.org/schema/p" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <description> This file is only used in the integration tests to load all the configuration files when normally all the configuration files will be loaded by the web application configuration by scanning the starting/user directory for spring-*.xml files. </description> <context:property-placeholder location="classpath:*/**/spring.properties" properties-ref="ikube.toolkit.PropertyConfigurer" /> <bean id="ikube.toolkit.Logging" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" property:staticMethod="ikube.toolkit.LOGGING.configure" /> <!-- This bean will look through the classpath and load every Spring properties file it finds. --> <bean id="ikube.toolkit.PropertyConfigurer" class="ikube.toolkit.PropertyConfigurer" lazy-init="false" init-method="initialize" property:fileNamePattern="spring.properties" /> <!-- Turn on AspectJ @Configurable support --> <context:spring-configured /> <context:component-scan base-package="ikube" /> <import resource="**/spring-*.xml" /> </beans>
{'content_hash': 'e4cc163690d1581dc89590b66a74f02f', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 100, 'avg_line_length': 38.63636363636363, 'alnum_prop': 0.7147058823529412, 'repo_name': 'michaelcouck/ikube', 'id': '2f65145b41b688f533bb999ac490bdd737f35507', 'size': '1700', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'code/libs/src/main/resources/ikube/spring.xml', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '2494283'}, {'name': 'HTML', 'bytes': '993570'}, {'name': 'Hack', 'bytes': '14940'}, {'name': 'Java', 'bytes': '2903995'}, {'name': 'JavaScript', 'bytes': '19368513'}, {'name': 'PHP', 'bytes': '9287015'}, {'name': 'Scala', 'bytes': '99'}, {'name': 'Shell', 'bytes': '2675'}]}
#import <CoreGraphics/CoreGraphics.h> CGFloat distanceBetweenPoints (CGPoint first, CGPoint second); CGFloat angleBetweenPoints(CGPoint first, CGPoint second); CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);
{'content_hash': '9b3f25ac67ef13914515a9fee6ffcb89', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 101, 'avg_line_length': 43.833333333333336, 'alnum_prop': 0.8403041825095057, 'repo_name': 'topherwhite/aao-editor', 'id': '1003cbe1b8eac207bd24885db11b1f8221ab4e9b', 'size': '405', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/app/Classes/CGPointUtils.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '1117'}, {'name': 'CSS', 'bytes': '5281'}, {'name': 'JavaScript', 'bytes': '66153'}, {'name': 'Objective-C', 'bytes': '454091'}, {'name': 'PHP', 'bytes': '423210'}, {'name': 'SQLPL', 'bytes': '835'}, {'name': 'Shell', 'bytes': '193'}]}
using System; using Rothko.Interfaces.Commands; using Rothko.UI.Model; using Rothko.GUI.MonoGame.Interfaces.Services; using System.Linq; using Rothko.Model; using Rothko.GUI.MonoGame.Interfaces.Commands; namespace Rothko.GUI.MonoGame.Commands { public class PlayUnitStateSoundCommand : IPlayUnitStateSoundCommand { readonly ISoundService _SoundService; readonly RothkoUIBaseDatabase _UIBaseDatabase; readonly UIMap _UIMap; readonly bool _LoopSound; Unit _Unit; public Unit Unit { get { return _Unit; } set { _Unit = value; } } public bool LoopSound { get { return _LoopSound; } } public void Execute() { UIUnitType uiUnitType = _UIBaseDatabase .UIUnitTypes .FirstOrDefault(ut => ut.ID == _Unit .IDUnitType); if (uiUnitType == null) return; UIUnitTypeSound uiUnitTypeSound = uiUnitType .Sounds .FirstOrDefault (s => s.UnitState == _Unit.State); if (uiUnitTypeSound == null) return; _UIMap .UIUnits .First(u => u.IDUnit == _Unit.ID) .IDInstance_LastSoundPlayed = _SoundService.Play(uiUnitTypeSound.IDAsset, _LoopSound); } public PlayUnitStateSoundCommand ( ISoundService soundService, Unit unit, UIMap uiMap, RothkoUIBaseDatabase uiBaseDatabase, bool loopSound) { _SoundService = soundService; _Unit = unit; _UIMap = uiMap; _UIBaseDatabase = uiBaseDatabase; _LoopSound = loopSound; } } }
{'content_hash': '121bc0ee503284e77822dfd5a7042d3b', 'timestamp': '', 'source': 'github', 'line_count': 64, 'max_line_length': 80, 'avg_line_length': 25.1875, 'alnum_prop': 0.6203473945409429, 'repo_name': 't-recx/Rothko', 'id': '39a4fe7be650fcdec36f9a3e380433dfa1c02cff', 'size': '1612', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Rothko.GUI.MonoGame/Commands/PlayUnitStateSoundCommand.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '832326'}]}
using ::testing::ElementsAre; class EventEngineTimerTest : public EventEngineTest { public: void ScheduleCheckCB(absl::Time when, std::atomic<int>* call_count, std::atomic<int>* fail_count, int total_expected); protected: grpc_core::Mutex mu_; grpc_core::CondVar cv_; bool signaled_ ABSL_GUARDED_BY(mu_) = false; }; TEST_F(EventEngineTimerTest, ImmediateCallbackIsExecutedQuickly) { auto engine = this->NewEventEngine(); grpc_core::MutexLock lock(&mu_); engine->RunAt(absl::Now(), [this]() { grpc_core::MutexLock lock(&mu_); signaled_ = true; cv_.Signal(); }); cv_.WaitWithTimeout(&mu_, absl::Seconds(5)); ASSERT_TRUE(signaled_); } TEST_F(EventEngineTimerTest, SupportsCancellation) { auto engine = this->NewEventEngine(); auto handle = engine->RunAt(absl::InfiniteFuture(), []() {}); ASSERT_TRUE(engine->Cancel(handle)); } TEST_F(EventEngineTimerTest, CancelledCallbackIsNotExecuted) { { auto engine = this->NewEventEngine(); auto handle = engine->RunAt(absl::InfiniteFuture(), [this]() { grpc_core::MutexLock lock(&mu_); signaled_ = true; }); ASSERT_TRUE(engine->Cancel(handle)); } // The engine is deleted, and all closures should have been flushed grpc_core::MutexLock lock(&mu_); ASSERT_FALSE(signaled_); } TEST_F(EventEngineTimerTest, TimersRespectScheduleOrdering) { // Note: this is a brittle test if the first call to `RunAt` takes longer than // the second callback's wait time. std::vector<uint8_t> ordered; uint8_t count = 0; grpc_core::MutexLock lock(&mu_); { auto engine = this->NewEventEngine(); engine->RunAt(absl::Now() + absl::Seconds(1), [&]() { grpc_core::MutexLock lock(&mu_); ordered.push_back(2); ++count; cv_.Signal(); }); engine->RunAt(absl::Now(), [&]() { grpc_core::MutexLock lock(&mu_); ordered.push_back(1); ++count; cv_.Signal(); }); // Ensure both callbacks have run. Simpler than a mutex. while (count != 2) { cv_.WaitWithTimeout(&mu_, absl::Microseconds(100)); } } // The engine is deleted, and all closures should have been flushed beforehand ASSERT_THAT(ordered, ElementsAre(1, 2)); } TEST_F(EventEngineTimerTest, CancellingExecutedCallbackIsNoopAndReturnsFalse) { auto engine = this->NewEventEngine(); grpc_core::MutexLock lock(&mu_); auto handle = engine->RunAt(absl::Now(), [this]() { grpc_core::MutexLock lock(&mu_); signaled_ = true; cv_.Signal(); }); cv_.WaitWithTimeout(&mu_, absl::Seconds(10)); ASSERT_TRUE(signaled_); // The callback has run, and now we'll try to cancel it. ASSERT_FALSE(engine->Cancel(handle)); } void EventEngineTimerTest::ScheduleCheckCB(absl::Time when, std::atomic<int>* call_count, std::atomic<int>* fail_count, int total_expected) { // TODO(hork): make the EventEngine the time source of truth! libuv supports // millis, absl::Time reports in nanos. This generic test will be hard-coded // to the lowest common denominator until EventEngines can compare relative // times with supported resolution. int64_t now_millis = absl::ToUnixMillis(absl::Now()); int64_t when_millis = absl::ToUnixMillis(when); EXPECT_LE(when_millis, now_millis); if (when_millis > now_millis) ++(*fail_count); if (++(*call_count) == total_expected) { grpc_core::MutexLock lock(&mu_); signaled_ = true; cv_.Signal(); } } TEST_F(EventEngineTimerTest, StressTestTimersNotCalledBeforeScheduled) { auto engine = this->NewEventEngine(); constexpr int thread_count = 100; constexpr int call_count_per_thread = 100; constexpr float timeout_min_seconds = 1; constexpr float timeout_max_seconds = 10; std::atomic<int> call_count{0}; std::atomic<int> failed_call_count{0}; std::vector<std::thread> threads; threads.reserve(thread_count); for (int thread_n = 0; thread_n < thread_count; ++thread_n) { threads.emplace_back([&]() { std::random_device rd; std::mt19937 gen(rd()); std::uniform_real_distribution<> dis(timeout_min_seconds, timeout_max_seconds); for (int call_n = 0; call_n < call_count_per_thread; ++call_n) { absl::Time when = absl::Now() + absl::Seconds(dis(gen)); engine->RunAt( when, absl::bind_front(&EventEngineTimerTest::ScheduleCheckCB, this, when, &call_count, &failed_call_count, thread_count * call_count_per_thread)); } }); } for (auto& t : threads) { t.join(); } grpc_core::MutexLock lock(&mu_); // to protect against spurious wakeups. while (!signaled_) { cv_.Wait(&mu_); } gpr_log(GPR_DEBUG, "failed timer count: %d of %d", failed_call_count.load(), thread_count * call_count); ASSERT_EQ(0, failed_call_count.load()); }
{'content_hash': '3b2b6fa82f47c37bb7b4618606b71ee5', 'timestamp': '', 'source': 'github', 'line_count': 144, 'max_line_length': 80, 'avg_line_length': 34.826388888888886, 'alnum_prop': 0.6265204386839481, 'repo_name': 'nicolasnoble/grpc', 'id': '088dc2ce366993d019ce2e2ca096b0c330f06674', 'size': '5941', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/core/event_engine/test_suite/timer_test.cc', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Awk', 'bytes': '5444'}, {'name': 'Batchfile', 'bytes': '39116'}, {'name': 'C', 'bytes': '1414618'}, {'name': 'C#', 'bytes': '106367'}, {'name': 'C++', 'bytes': '15594341'}, {'name': 'CMake', 'bytes': '29182'}, {'name': 'CSS', 'bytes': '1519'}, {'name': 'Cython', 'bytes': '258757'}, {'name': 'DTrace', 'bytes': '147'}, {'name': 'Dockerfile', 'bytes': '182045'}, {'name': 'Go', 'bytes': '34794'}, {'name': 'HTML', 'bytes': '14'}, {'name': 'Java', 'bytes': '12924'}, {'name': 'JavaScript', 'bytes': '5572'}, {'name': 'Objective-C', 'bytes': '697418'}, {'name': 'Objective-C++', 'bytes': '80936'}, {'name': 'PHP', 'bytes': '486781'}, {'name': 'PowerShell', 'bytes': '4516'}, {'name': 'Python', 'bytes': '3757884'}, {'name': 'Ruby', 'bytes': '648695'}, {'name': 'Shell', 'bytes': '753887'}, {'name': 'Starlark', 'bytes': '727694'}, {'name': 'Swift', 'bytes': '7487'}, {'name': 'XSLT', 'bytes': '9846'}]}
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='pages/home.html'), name="home"), url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name="about"), # Django Admin, use {% url 'admin:index' %} url(settings.ADMIN_URL, include(admin.site.urls)), # User management url(r'^users/', include("locmaster.users.urls", namespace="users")), url(r'^accounts/', include('allauth.urls')), # Your stuff: custom urls includes go here url(r'^unlocode/', include('unlocode.urls', namespace="unlocode")), url(r'^mylocation/', include('mylocation.urls', namespace="mylocation")), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception("Bad Request!")}), url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception("Permissin Denied")}), url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception("Page not Found")}), url(r'^500/$', default_views.server_error), ]
{'content_hash': '4915de927b8b4c6bd36de8641e3c626e', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 109, 'avg_line_length': 41.05263157894737, 'alnum_prop': 0.6929487179487179, 'repo_name': 'chadgates/locmaster', 'id': '20b4dc7a0c996b57d2b50a3f2f7111c20156aaff', 'size': '1584', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'config/urls.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '1480'}, {'name': 'HTML', 'bytes': '35888'}, {'name': 'JavaScript', 'bytes': '3632'}, {'name': 'Nginx', 'bytes': '1095'}, {'name': 'Python', 'bytes': '124398'}, {'name': 'Shell', 'bytes': '4573'}]}
declare module slack { export interface Bot { id: string; app_id: string; deleted: boolean; name: string; icons: { image_36: string; image_48: string; image_72: string; }; } export interface Channel { id: string; name: string; is_channel: string; created: number; creator: string; is_archived: boolean; is_general: boolean; members: string[]; topic: { value: string; creator: string; last_set: number; }; purpose: { value: string; creator: string; last_set: number; }; is_member: boolean; last_read: string; latest: Message; unread_count: number; unread_count_display: number; } type FileType = 'auto' | 'text' | 'applescript' | 'boxnote' | 'c' | 'csharp' | 'cpp' | 'css' | 'csv' | 'clojure' | 'coffeescript' | 'cfm' | 'd' | 'dart' | 'diff' | 'dockerfile' | 'erlang' | 'fsharp' | 'fortran' | 'go' | 'groovy' | 'html' | 'handlebars' | 'haskell' | 'haxe' | 'java' | 'javascript' | 'kotlin' | 'latex' | 'lisp' | 'lua' | 'markdown' | 'matlab' | 'mumps' | 'ocaml' | 'objc' | 'php' | 'pascal' | 'perl' | 'pig' | 'post' | 'powershell' | 'puppet' | 'python' | 'r' | 'ruby' | 'rust' | 'sql' | 'sass' | 'scala' | 'scheme' | 'shell' | 'smalltalk' | 'swift' | 'tsv' | 'vb' | 'vbscript' | 'velocity' | 'verilog' | 'xml' | 'yaml'; type FileCategory = 'all' | 'spaces' | 'snippets' | 'images' | 'gdocs' | 'zips' | 'pdfs'; export interface File { id: string; created: number; timestamp: number; name: string; title: string; mimetype: string; filetype: FileType; pretty_type: string; user: string; mode: string; editable: boolean; is_external: boolean; external_type: string; username: string; size: number; url_private: string; url_private_download: string; thumb_64: string; thumb_80: string; thumb_360: string; thumb_360_gif: string; thumb_360_w: number; thumb_360_h: number; thumb_480: string; thumb_480_w: number; thumb_480_h: number; thumb_160: string; permalink: string; permalink_public: string; edit_link: string; preview: string; preview_highlight: string; lines: number; lines_more: number; is_public: boolean; public_url_shared: boolean; display_as_bot: boolean; channels: string[]; groups: string[]; ims: string[]; initial_comment: FileComment, num_stars: number; is_starred: boolean; pinned_to: string[]; reactions: Reaction[], comments_count: number; } export interface FileComment { id: string; timestamp: number; user: string; comment: string; channel?: string; reactions?: Reaction[]; } export interface Reaction { name: string; count: number; users: string[]; } export interface Group { id: string; name: string; is_group: string; created: number; creator: string; is_archived: boolean; is_mpim: boolean; members: string[]; topic: { value: string; creator: string; last_set: number; }; purpose: { value: string; creator: string; last_set: number; }; last_read: string; latest: Message; unread_count: number; unread_count_display: number; } export interface Im { id: string; is_im: boolean; user: string; created: number; is_user_deleted: boolean; } export interface Mpim { id: string; name: string; is_mpim: boolean; is_group: boolean; created: number; creator: string; members: string[]; last_read: string; latest: Message; unread_count: number; unread_count_display: number; } export interface User { id: string; name: string; deleted: boolean; color: string; profile: { avatar_hash: string; current_status: string; first_name: string; last_name: string; real_name: string; email: string; skype: string; phone: string; image_24: string; image_32: string; image_48: string; image_72: string; image_192: string; image_512: string; }; is_admin: boolean; is_owner: boolean; is_primary_owner: boolean; is_restricted: boolean; is_ultra_restricted: boolean; updated: number; has_2fa: boolean; two_factor_type?: 'app' | 'sms'; } export interface Usergroup { id: string; team_id: string; is_usergroup: boolean; name: string; description: string; handle: string; is_external: boolean; date_create: number; date_update: number; date_delete: number; auto_type: string; created_by: string; updated_by: string; deleted_by: string | null; prefs: { channels: Channel[]; groups: Group[]; }, users: string[]; user_count: string; } type MessageParseOptions = 'none' | 'full'; export interface Message { reactions?: Reaction[]; } export interface Attachment { fallback: string; color?: string; pretext?: string; author_name?: string; author_link?: string; author_icon?: string; title?: string; title_link?: string; text?: string; fields?: { title?: string; value?: string; short?: boolean; }[]; image_url?: string; thumb_url?: string; footer?: string; footer_icon?: string; ts?: number; } interface PinnedItemBase { created: number; created_by: string; } interface MessagePayload { type: 'message'; channel: string; message: Message; } interface MessagePayloadLight { type: 'message'; channel: string; ts: string; } interface FilePayload { type: 'file'; file: File; } interface FilePayloadLight { type: 'file'; file: string; } interface FileCommentPayload { type: 'file_comment'; file: File; comment: FileComment; } interface FileCommentPayloadLight { type: 'file_comment'; file: string; comment: string; } interface ChannelPayload { type: 'channel'; channel: string; } interface ImPayload { type: 'im'; channel: string; } interface GroupPayload { type: 'group'; channel: string; } interface LinkPayload { domain: string; url: string; } interface Paging { count: number; total: number; page: number; pages: number; } export interface Reminder { id: string; creator: string; user: string; text: string; recurring: boolean; time?: number; complete_ts?: number; } type Presence = 'active' | 'away'; export interface Profile { status_text: string; status_emoji: string; first_name: string; last_name: string; email: string; skype: string; image_24: string; image_32: string; image_48: string; image_72: string; image_192: string; image_512: string; image_1024: string; image_original: string; fields: { [id: string]: { value: string; alt: string; label: string; }; }; always_active?: boolean; } export namespace WebApi { export interface ParametersAuthRequired { token: string; } export interface Response { ok: boolean; error?: string; } // api export interface ApiTestParameters { [index: string]: string; error?: string; } export interface ApiTestResponse extends Response { args: { [index in keyof ApiTestParameters]: string; } } // auth export interface AuthRevokeParameters { token?: string; test?: boolean; } export interface AuthRevokeResponse extends Response { revoked: boolean; } export interface AuthTestParameters extends ParametersAuthRequired { } export interface AuthTestResponse extends Response { url: string; team: string; user: string; team_id: string; user_id: string; enterprise_id?: string; } // bots export interface BotsInfoParameters extends ParametersAuthRequired { bot: string; } export interface BotsInfoResponse extends Response { bot: Bot; } // channels export interface ChannelsArchiveParameters extends ParametersAuthRequired { channel: string; } export interface ChannelsArchiveResponse extends Response { } export interface ChannelsCreateParameters extends ParametersAuthRequired { name: string; validate?: boolean; } export interface ChannelsCreateResponse extends Response { channel: Channel; } export interface ChannelsHistoryParameters extends ParametersAuthRequired { channel: string; latest?: string; oldest?: string; inclusive?: boolean; count?: number; unreads?: boolean; } export interface ChannelsHistoryResponse extends Response { latest: string; messages: Message[]; has_more: boolean; } export interface ChannelsInfoParameters extends ParametersAuthRequired { channel: string; } export interface ChannelsInfoResponse extends Response { channel: Channel; } export interface ChannelsInviteParameters extends ParametersAuthRequired { channel: string; user: string; } export interface ChannelsInviteResponse extends Response { channel: Channel; } export interface ChannelsJoinParameters extends ParametersAuthRequired { name: string; validate?: boolean; } export interface ChannelsJoinResponse extends Response { channel: Channel; } export interface ChannelsKickParameters extends ParametersAuthRequired { channel: string; user: string; } export interface ChannelsKickResponse extends Response { } export interface ChannelsLeaveParameters extends ParametersAuthRequired { channel: string; } export interface ChannelsLeaveResponse extends Response { not_in_channel?: boolean; } export interface ChannelsListParameters extends ParametersAuthRequired { exclude_archived?: boolean; exclude_members?: boolean; } export interface ChannelsListResponse extends Response { channels: Channel[]; } export interface ChannelsMarkParameters extends ParametersAuthRequired { channel: string; ts: string; } export interface ChannelsMarkResponse extends Response { } export interface ChannelsRenameParameters extends ParametersAuthRequired { channel: string; name: string; validate?: boolean; } export interface ChannelsRenameResponse extends Response { channel: { id: string; is_channel: boolean; name: string; created: number; } } export interface ChannelsRepliesParameters extends ParametersAuthRequired { channel: string; thread_ts: string; } export interface ChannelsRepliesResponse extends Response { messages: Message[]; } export interface ChannelsSetPurposeParameters extends ParametersAuthRequired { channel: string; purpose: string; } export interface ChannelsSetPurposeResponse extends Response { purpose: string; } export interface ChannelsSetTopicParameters extends ParametersAuthRequired { channel: string; topic: string; } export interface ChannelsSetTopicResponse extends Response { topic: string; } export interface ChannelsUnarchiveParameters extends ParametersAuthRequired { channel: string; } export interface ChannelsUnarchiveResponse extends Response { } // chat export interface ChatDeleteParameters extends ParametersAuthRequired { ts: string; channel: string; as_user?: boolean; } export interface ChatDeleteResponse extends Response { channel: string; ts: string; } export interface ChatMeMessageParameters extends ParametersAuthRequired { channel: string; text: string; } export interface ChatMeMessageResponse extends Response { channel: string; ts: string; } export interface ChatPostMessageParameters extends ParametersAuthRequired { channel: string; text: string; parse?: MessageParseOptions; link_names?: boolean; attachments?: Attachment[]; unfurl_links?: boolean; unfurl_media?: boolean; username?: string; as_user?: boolean; icon_url?: string; icon_emoji?: string; thread_ts?: string; reply_broadcast?: boolean; } export interface ChatPostMessageResponse extends Response { ts: string; channel: string; message: Message; } export interface ChatUnfurlParameters extends ParametersAuthRequired { channel: string; ts: string; unfurls: string; user_auth_required?: boolean; } export interface ChatUnfurlResponse extends Response { } export interface ChatUpdateParameters extends ParametersAuthRequired { ts: string; channel: string; text: string; attachments?: Attachment[]; parse?: MessageParseOptions; link_names?: boolean; as_user?: boolean; } export interface ChatUpdateResponse extends Response { channel: string; ts: string; text: string; } // dnd export interface DndEndDndParameters extends ParametersAuthRequired { } export interface DndEndDndResponse extends Response { } export interface DndEndSnoozeParameters extends ParametersAuthRequired { } export interface DndEndSnoozeResponse extends Response { dnd_enabled: boolean; next_dnd_start_ts: number; next_dnd_end_ts: number; snooze_enabled: boolean; } export interface DndInfoParameters extends ParametersAuthRequired { user?: string; } export interface DndInfoResponse extends Response { dnd_enabled: boolean; next_dnd_start_ts: number; next_dnd_end_ts: number; snooze_enabled: boolean; snooze_endtime: number; snooze_remaining: number; } export interface DndSetSnoozeParameters extends ParametersAuthRequired { num_minutes: number; } export interface DndSetSnoozeResponse extends Response { snooze_enabled: boolean; snooze_endtime: number; snooze_remaining: number; } export interface DndTeamInfoParameters extends ParametersAuthRequired { users: string; } export interface DndTeamInfoResponse extends Response { users: { [user: string]: { dnd_enabled: boolean; next_dnd_start_ts: number; next_dnd_end_ts: number; } } } // emoji export interface EmojiListParameters extends ParametersAuthRequired { } export interface EmojiListResponse extends Response { emoji: { [name: string]: string; } } // files export interface FilesCommentsAddParameters extends ParametersAuthRequired { file: string; comment: string; } export interface FilesCommentsAddResponse extends Response { comment: FileComment; } export interface FilesCommentsDeleteParameters extends ParametersAuthRequired { file: string; id: string; } export interface FilesCommentsDeleteResponse extends Response { } export interface FilesCommentsEditParameters extends ParametersAuthRequired { file: string; id: string; comment: string; } export interface FilesCommentsEditResponse extends Response { comment: FileComment; } export interface FilesDeleteParameters extends ParametersAuthRequired { file: string; } export interface FilesDeleteResponse extends Response { } export interface FilesInfoParameters extends ParametersAuthRequired { file: string; count?: number; page?: number; } export interface FilesInfoResponse extends Response { file: File; comments: Comment[]; paging: Paging; } export interface FilesListParameters extends ParametersAuthRequired { user?: string; channel?: string; ts_from?: number; ts_to?: number; types?: FileCategory; count?: number; page?: number; } export interface FilesListResponse extends Response { files: File[]; paging: Paging; } export interface FilesRevokePublicUrlParameters extends ParametersAuthRequired { file: string; } export interface FilesRevokePublicUrlResponse extends Response { file: File; } export interface FilesSharedPublicUrlParameters extends ParametersAuthRequired { file: string; } export interface FilesSharedPublicUrlResponse extends Response { file: File; comments: Comment[]; paging: Paging; } export interface FilesUploadParameters extends ParametersAuthRequired { /* Should be a ReadStream, unsure how to import fs without jeopardizing the module structure */ file?: any; content?: string; filetype?: FileType; filename: string; title?: string; initial_comment?: string; channels?: string; } export interface FilesUploadResponse extends Response { file: File; } // groups export interface GroupsArchiveParameters extends ParametersAuthRequired { channel: string; } export interface GroupsArchiveResponse extends Response { } export interface GroupsCloseParameters extends ParametersAuthRequired { channel: string; } export interface GroupsCloseResponse extends Response { } export interface GroupsCreateParameters extends ParametersAuthRequired { name: string; validate?: boolean; } export interface GroupsCreateResponse extends Response { group: Group; } export interface GroupsCreateChildParameters extends ParametersAuthRequired { channel: string; } export interface GroupsCreateChildResponse extends Response { group: Group; } export interface GroupsHistoryParameters extends ParametersAuthRequired { channel: string; latest?: string; oldest?: string; inclusive?: boolean; count?: number; unreads?: boolean; } export interface GroupsHistoryResponse extends Response { latest: string; messages: Message[]; has_more: boolean; } export interface GroupsInfoParameters extends ParametersAuthRequired { channel: string; } export interface GroupsInfoResponse extends Response { group: Group; } export interface GroupsInviteParameters extends ParametersAuthRequired { channel: string; user: string; } export interface GroupsInviteResponse extends Response { already_in_group?: boolean; group: Group; } export interface GroupsKickParameters extends ParametersAuthRequired { channel: string; user: string; } export interface GroupsKickResponse extends Response { } export interface GroupsLeaveParameters extends ParametersAuthRequired { channel: string; } export interface GroupsLeaveResponse extends Response { } export interface GroupsListParameters extends ParametersAuthRequired { exclude_archived?: boolean; } export interface GroupsListResponse extends Response { groups: Group[]; } export interface GroupsMarkParameters extends ParametersAuthRequired { channel: string; ts: string; } export interface GroupsMarkResponse extends Response { } export interface GroupsOpenParameters extends ParametersAuthRequired { channel: string; } export interface GroupsOpenResponse extends Response { } export interface GroupsRenameParameters extends ParametersAuthRequired { channel: string; name: string; validate?: boolean; } export interface GroupsRenameResponse extends Response { channel: { id: string; is_group: boolean; name: string; created: number; }; } export interface GroupsRepliesParameters extends ParametersAuthRequired { channel: string; thread_ts: string; } export interface GroupsRepliesResponse extends Response { messages: Message[]; thread_info: { complete: boolean; count: number; }; } export interface GroupsSetPurposeParameters extends ParametersAuthRequired { channel: string; purpose: string; } export interface GroupsSetPurposeResponse extends Response { purpose: string; } export interface GroupsSetTopicParameters extends ParametersAuthRequired { channel: string; topic: string; } export interface GroupsSetTopicResponse extends Response { topic: string; } export interface GroupsUnarchiveParameters extends ParametersAuthRequired { channel: string; } export interface GroupsUnarchiveResponse extends Response { } // im export interface ImCloseParameters extends ParametersAuthRequired { channel: string; } export interface ImCloseResponse extends Response { } export interface ImHistoryParameters extends ParametersAuthRequired { channel: string; latest?: string; oldest?: string; inclusive?: boolean; count?: number; unreads?: boolean; } export interface ImHistoryResponse extends Response { latest: string; messages: Message[]; has_more: boolean; } export interface ImListParameters extends ParametersAuthRequired { } export interface ImListResponse extends Response { ims: Im[]; } export interface ImMarkParameters extends ParametersAuthRequired { channel: string; ts: string; } export interface ImMarkResponse extends Response { } export interface ImOpenParameters extends ParametersAuthRequired { user: string; return_im?: boolean; } export interface ImOpenResponse extends Response { channel: { id: string; } | Channel; no_op?: boolean; already_open?: boolean; } export interface ImRepliesParameters extends ParametersAuthRequired { channel: string; thread_ts: string; } export interface ImRepliesResponse extends Response { messages: Message[]; thread_info: { complete: boolean; count: number; }; } // mpim export interface MpimCloseParameters extends ParametersAuthRequired { channel: string; } export interface MpimCloseResponse extends Response { } export interface MpimHistoryParameters extends ParametersAuthRequired { channel: string; latest?: string; oldest?: string; inclusive?: boolean; count?: number; unreads?: boolean; } export interface MpimHistoryResponse extends Response { latest: string; messages: Message[]; has_more: boolean; } export interface MpimListParameters extends ParametersAuthRequired { } export interface MpimListResponse extends Response { groups: Group[]; } export interface MpimMarkParameters extends ParametersAuthRequired { channel: string; ts: string; } export interface MpimMarkResponse extends Response { } export interface MpimOpenParameters extends ParametersAuthRequired { users: string; } export interface MpimOpenResponse extends Response { group: Mpim; } export interface MpimRepliesParameters extends ParametersAuthRequired { channel: string; thread_ts: string; } export interface MpimRepliesResponse extends Response { messages: Message[]; thread_info: { complete: string; count: number; }; } // oauth export interface OauthAccessParameters { client_id: string; client_secret: string; code: string; redirect_uri?: string; } export interface OauthAccessResponse extends Response { access_token: string; scope: string; } // pins export interface PinsAddParameters extends ParametersAuthRequired { channel: string; file?: string; file_comment?: string; timestamp?: string; } export interface PinsAddResponse extends Response { } export interface PinsListParameters extends ParametersAuthRequired { channel: string; } export interface PinsListResponse extends Response { items: (PinnedItemBase & (MessagePayload | FilePayload | FileCommentPayload))[]; } export interface PinsRemoveParameters extends ParametersAuthRequired { channel: string; file?: string; file_comment?: string; timestamp?: string; } export interface PinsRemoveResponse extends Response { } // reactions export interface ReactionsAddParameters extends ParametersAuthRequired { name: string; file?: string; file_comment?: string; channel?: string; timestamp?: string; } export interface ReactionsAddResponse extends Response { } export interface ReactionsGetParameters extends ParametersAuthRequired { name: string; file?: string; file_comment?: string; channel?: string; timestamp?: string; full?: boolean; } export type ReactionsGetResponse = Response & (MessagePayload | FilePayload | FileCommentPayload); export interface ReactionsListParameters extends ParametersAuthRequired { } export interface ReactionsListResponse extends Response { items: (MessagePayload | FilePayload | FileCommentPayload)[]; paging: Paging; } export interface ReactionsRemoveParameters extends ParametersAuthRequired { name: string; file?: string; file_comment?: string; channel?: string; timestamp?: string; } export interface ReactionsRemoveResponse extends Response { } // reminders export interface RemindersAddParameters extends ParametersAuthRequired { text: string; time: number; user?: string; } export interface RemindersAddResponse extends Response { reminder: Reminder; } export interface RemindersCompleteParameters extends ParametersAuthRequired { reminder: string; } export interface RemindersCompleteResponse extends Response { } export interface RemindersDeleteParameters extends ParametersAuthRequired { reminder: string; } export interface RemindersDeleteResponse extends Response { } export interface RemindersInfoParameters extends ParametersAuthRequired { reminder: string; } export interface RemindersInfoResponse extends Response { reminder: Reminder; } export interface RemindersListParameters extends ParametersAuthRequired { } export interface RemindersListResponse extends Response { reminders: Reminder[]; } // rtm export interface RtmConnectParameters extends ParametersAuthRequired { } export interface RtmConnectResponse extends Response { url: string; team: { id: string; name: string; domain: string; enterprise_id?: string; enterprise_name?: string; }; self: { id: string; name: string; }; } export interface RtmStartParameters extends ParametersAuthRequired { simple_latest?: boolean; no_unreads?: boolean; mpim_aware?: boolean; no_latest?: boolean; } export interface RtmStartResponse extends Response { url: string; self: { id: string; name: string; prefs: object; created: number; manual_presence: Presence; }; team: { id: string; name: string; email_domain: string; domain: string; icon: object; msg_edit_window_mins: number; over_storage_limit: boolean; prefs: object; plan: string; }; users: User[]; channels: Channel[]; groups: Group[]; mpims: Mpim[]; ims: Im[]; bots: Bot[]; } // search export interface SearchAllParameters extends ParametersAuthRequired { query: string; sort?: 'score' | 'timestamp'; sort_dir?: 'asc' | 'desc'; highlight?: boolean; count?: number; page?: number; } export interface SearchAllResponse extends Response { query: string; messages: { matches: Message[]; paging: Paging; }; files: { matches: File[]; paging: Paging; }; } export interface SearchFilesParameters extends ParametersAuthRequired { query: string; sort?: 'score' | 'timestamp'; sort_dir?: 'asc' | 'desc'; highlight?: boolean; count?: number; page?: number; } export interface SearchFilesResponse extends Response { query: string; files: { total: number; paging: Paging; matches: File[]; }; } export interface SearchMessagesParameters extends ParametersAuthRequired { query: string; sort?: 'score' | 'timestamp'; sort_dir?: 'asc' | 'desc'; highlight?: boolean; count?: number; page?: number; } export interface SearchMessagesResponse extends Response { query: string; files: { total: number; paging: Paging; matches: Message[]; }; } // stars export interface StarsAddParameters extends ParametersAuthRequired { file?: string; file_comment?: string; channel?: string; timestamp?: string; } export interface StarsAddResponse extends Response { } export interface StarsListParameters extends ParametersAuthRequired { count?: number; page?: number; } export interface StarsListResponse extends Response { items: (MessagePayload | FilePayload | FileCommentPayload | ChannelPayload | ImPayload | GroupPayload)[]; paging: Paging; } export interface StarsRemoveParameters extends ParametersAuthRequired { file?: string; file_comment?: string; channel?: string; timestamp?: string; } export interface StarsRemoveResponse extends Response { } // team export interface TeamAccessLogsParameters extends ParametersAuthRequired { count?: number; page?: number; before?: number; } export interface TeamAccessLogsResponse extends Response { logins: { user_id: string; username: string; date_first: number; date_last: number; count: number; ip: string; user_agent: string; isp: string; country: string; region: string; }[]; paging: Paging; } export interface TeamBillableInfoParameters extends ParametersAuthRequired { user?: string; } export interface TeamBillableInfoResponse extends Response { billable_info: { [user: string]: { billing_active: boolean; }; }; } export interface TeamInfoParameters extends ParametersAuthRequired { } export interface TeamInfoResponse extends Response { team: { id: string; name: string; domain: string; email_domain: string; icon: { image_34: string; image_44: string; image_68: string; image_88: string; image_102: string; image_132: string; image_default: boolean; }; enterprise_id?: string; enterprise_name?: string; }; } export interface TeamIntegrationLogsParameters extends ParametersAuthRequired { service_id?: string; app_id?: string; user?: string; change_type?: 'added' | 'removed' | 'enabled' | 'disabled' | 'updated'; count?: number; page?: number; } export interface TeamIntegrationLogsResponse extends Response { logs: ({ user_id: string; user_name: string; channel: string; date: string; change_type: 'added' | 'removed' | 'enabled' | 'disabled' | 'updated'; reason?: string; scope: string; rss_feed?: boolean; rss_feed_change_type?: string; rss_feed_title?: string; rss_feed_url?: string; } & ({ app_id: string; app_type: string; } | { service_id: string; service_type: string; }))[]; paging: Paging; } export interface TeamProfileGetParameters extends ParametersAuthRequired { visibility?: 'all' | 'visible' | 'hidden'; } export interface TeamProfileGetResponse extends Response { profile: { fields: { id: string; ordering: number; label: string; hint: string; type: string; possible_values: string[] | null; options: object | null; is_hidden?: boolean; }[] } } // usergroups export interface UsergroupsCreateParameters extends ParametersAuthRequired { name: string; handle?: string; description?: string; channels?: string; include_count?: boolean; } export interface UsergroupsCreateResponse extends Response { usergroup: Usergroup; } export interface UsergroupsDisableParameters extends ParametersAuthRequired { usergroup: string; include_count?: boolean; } export interface UsergroupsDisableResponse extends Response { usergroup: Usergroup; } export interface UsergroupsEnableParameters extends ParametersAuthRequired { usergroup: string; include_count?: boolean; } export interface UsergroupsEnableResponse extends Response { usergroup: Usergroup; } export interface UsergroupsListParameters extends ParametersAuthRequired { include_disabled?: boolean; include_count?: boolean; include_users?: boolean; } export interface UsergroupsListResponse extends Response { usergroups: Usergroup[]; } export interface UsergroupsUpdateParameters extends ParametersAuthRequired { usergroup: string; name?: string; handle?: string; description?: string; channels?: string; include_count?: boolean; } export interface UsergroupsUpdateResponse extends Response { usergroup: Usergroup; } export interface UsergroupsUsersListParameters extends ParametersAuthRequired { usergroup: string; include_disabled?: boolean; } export interface UsergroupsUsersListResponse extends Response { users: string[]; } export interface UsergroupsUsersUpdateParameters extends ParametersAuthRequired { usergroup: string; users: string; include_count?: boolean; } export interface UsergroupsUsersUpdateResponse extends Response { usergroup: Usergroup; } // users export interface UsersDeletePhotoParameters extends ParametersAuthRequired { } export interface UsersDeletePhotoResponse extends Response { } export interface UsersGetPresenceParameters extends ParametersAuthRequired { user: string; } export interface UsersGetPresenceResponse extends Response { presence: Presence; } export interface UsersIdentityParameters extends ParametersAuthRequired { } export interface UsersIdentityResponse extends Response { user: { name: string; id: string; email?: string; image_24?: string; image_32?: string; image_48?: string; image_72?: string; image_192?: string; }; team: { id: string; name?: string; } } export interface UsersInfoParameters extends ParametersAuthRequired { user: string; } export interface UsersInfoResponse extends Response { user: User; } export interface UsersListParameters extends ParametersAuthRequired { presence?: boolean; } export interface UsersListResponse extends Response { members: User[]; } export interface UsersSetActiveParameters extends ParametersAuthRequired { } export interface UsersSetActiveResponse extends Response { } export interface UsersSetPhotoParameters extends ParametersAuthRequired { /* Should be a ReadStream, unsure how to import fs without jeopardizing the module structure */ image: any; crop_x?: number; crop_y?: number; crop_w?: number; } export interface UsersSetPhotoResponse extends Response { } export interface UsersSetPresenceParameters extends ParametersAuthRequired { presence: 'auto' | 'away'; } export interface UsersSetPresenceResponse extends Response { } export interface UsersProfileGetParameters extends ParametersAuthRequired { user?: string; include_labels?: boolean; } export interface UsersProfileGetResponse extends Response { profile: Profile; } export interface UsersProfileSetParameters extends ParametersAuthRequired { user?: string; profile?: string; name?: string; value?: string; } export interface UsersProfileSetResponse extends Response { profile: Profile; } } export namespace EventsApi { export interface BaseEvent { type: 'url_verification' | 'event_callback'; token: string; } export interface UrlVerificationEvent extends BaseEvent { type: 'url_verification'; challenge: string; } export interface Event extends BaseEvent { team_id: string; api_app_id: string; event: InnerEvent; type: 'event_callback'; authed_users: string[]; event_id: string; event_time: string; } type InnerEvent = ChannelArchiveEvent | ChannelCreatedEvent | ChannelDeletedEvent | ChannelHistoryChangedEvent | ChannelRenameEvent | ChannelUnarchiveEvent | DndUpdatedEvent | DndUpdatedUserEvent | EmailDomainChangedEvent | EmojiChangedEvent | FileChangeEvent | FileCommentAddedEvent | FileCommentDeletedEvent | FileCommentEditedEvent | FileCreatedEvent | FileDeletedEvent | FilePublicEvent | FileSharedEvent | FileUnsharedEvent | GroupArchiveEvent | GroupCloseEvent | GroupHistoryChangedEvent | GroupOpenEvent | GroupRenameEvent | GroupUnarchiveEvent | ImCloseEvent | ImCreatedEvent | ImHistoryChangedEvent | ImOpenEvent | LinkSharedEvent | MessageEvent | MessageChannelsEvent | MessageGroupsEvent | MessageImEvent | MessageMpimEvent | PinAddedEvent | PinRemovedEvent | ReactionAddedEvent | ReactionRemovedEvent | StarAddedEvent | StarRemovedEvent | SubteamCreatedEvent | SubteamSelfAddedEvent | SubteamSelfRemovedEvent | SubteamUpdatedEvent | TeamDomainChangeEvent | TeamJoinEvent | TeamRenameEvent | UrlVerificationEvent | UserChangeEvent; export interface ChannelArchiveEvent { type: 'channel_archive'; user: string; channel: string; } export interface ChannelCreatedEvent { type: 'channel_created'; channel: { id: string; name: string; created: number; creator: string; }; } export interface ChannelDeletedEvent { type: 'channel_deleted'; channel: string; } export interface ChannelHistoryChangedEvent { type: 'channel_history_changed'; latest: string; ts: string; event_ts: string; } export interface ChannelRenameEvent { type: 'channel_rename'; channel: { id: string; name: string; created: number; } } export interface ChannelUnarchiveEvent { type: 'channel_unarchive'; user: string; channel: string; } export interface DndUpdatedEvent { type: 'dnd_updated'; user: string; dnd_status: { dnd_enabled: boolean; next_dnd_start_ts: number; next_dnd_end_ts: number; snooze_enabled: boolean; snooze_endtime: number; }; } export interface DndUpdatedUserEvent { type: 'dnd_updated_user'; user: string; dnd_status: { dnd_enabled: boolean; next_dnd_start_ts: number; next_dnd_end_ts: number; }; } export interface EmailDomainChangedEvent { type: 'email_domain_changed'; email_domain: string; event_ts: string; } type EmojiChangedEvent = EmojiChangedAddedEvent | EmojiChangedRemovedEvent; interface EmojiChangedBaseEvent { type: 'emoji_changed'; event_ts: string; } export interface EmojiChangedAddedEvent extends EmojiChangedBaseEvent { subtype: 'add'; name: string; value: string; } export interface EmojiChangedRemovedEvent extends EmojiChangedBaseEvent { subtype: 'remove'; names: string[]; } export interface FileChangeEvent { type: 'file_change'; file: File; } export interface FileCommentAddedEvent { type: 'file_comment_added'; file: File; comment: FileComment; } export interface FileCommentDeletedEvent { type: 'file_comment_deleted'; file: File; comment: string; } export interface FileCommentEditedEvent { type: 'file_comment_edited'; file: File; comment: FileComment; } export interface FileCreatedEvent { type: 'file_created'; file: File; } export interface FileDeletedEvent { type: 'file_deleted'; file_id: string; event_ts: string; } export interface FilePublicEvent { type: 'file_public'; file: File; } export interface FileSharedEvent { type: 'file_shared'; file: File; } export interface FileUnsharedEvent { type: 'file_unshared'; file: File; } export interface GroupArchiveEvent { type: 'group_archive'; channel: string; } export interface GroupCloseEvent { type: 'group_close'; user: string; channel: string; } export interface GroupHistoryChangedEvent { type: 'group_history_changed'; latest: string; ts: string; event_ts: string; } export interface GroupOpenEvent { type: 'group_open'; user: string; channel: string; } export interface GroupRenameEvent { type: 'group_rename'; channel: { id: string; name: string; created: number; } } export interface GroupUnarchiveEvent { type: 'group_unarchive'; channel: string; } export interface ImCloseEvent { type: 'im_close'; user: string; channel: string; } export interface ImCreatedEvent { type: 'im_created'; user: string; channel: Channel; } export interface ImHistoryChangedEvent { type: 'im_history_changed'; latest: string; ts: string; event_ts: string; } export interface ImOpenEvent { type: 'im_open'; user: string; channel: string; } export interface LinkSharedEvent { type: 'link_shared'; channel: string; user: string; message_ts: string; links: LinkPayload[]; } export interface MessageEvent { type: 'message'; channel: string; user: string; text: string; ts: string; } export interface MessageChannelsEvent { type: 'message.channels'; channel: string; user: string; text: string; ts: string; } export interface MessageGroupsEvent { type: 'message.groups'; channel: string; user: string; text: string; ts: string; } export interface MessageImEvent { type: 'message.im'; channel: string; user: string; text: string; ts: string; } export interface MessageMpimEvent { type: 'message.mpim'; channel: string; user: string; text: string; ts: string; } export interface PinAddedEvent { type: 'pin_added'; user: string; channel_id: string; item: object; event_ts: string; } export interface PinRemovedEvent { type: 'pin_removed'; user: string; channel_id: string; item: object; has_pins: boolean; event_ts: string; } export interface ReactionAddedEvent { type: 'reaction_added'; user: string; reaction: string; item_user: string; item: MessagePayloadLight | FilePayloadLight | FileCommentPayloadLight; event_ts: string; } export interface ReactionRemovedEvent { type: 'reaction_removed'; user: string; reaction: string; item_user: string; item: MessagePayloadLight | FilePayloadLight | FileCommentPayloadLight; event_ts: string; } export interface StarAddedEvent { type: 'star_added'; user: string; event_ts: string; items: (MessagePayload | FilePayload | FileCommentPayload | ChannelPayload | ImPayload | GroupPayload)[]; } export interface StarRemovedEvent { type: 'star_removed'; user: string; event_ts: string; items: (MessagePayload | FilePayload | FileCommentPayload | ChannelPayload | ImPayload | GroupPayload)[]; } export interface SubteamCreatedEvent { type: 'subteam_created'; subteam: Usergroup; } export interface SubteamSelfAddedEvent { type: 'subteam_self_added'; subteam_id: string; } export interface SubteamSelfRemovedEvent { type: 'subteam_self_removed'; subteam_id: string; } export interface SubteamUpdatedEvent { type: 'subteam_updated'; subteam: Usergroup; } export interface TeamDomainChangeEvent { type: 'team_domain_change'; url: string; domain: string; } export interface TeamJoinEvent { type: 'team_join'; user: User; } export interface TeamRenameEvent { type: 'team_rename'; name: string; } export interface UserChangeEvent { type: 'user_change'; user: User; } } }
{'content_hash': '6d88a7f889f61987aabbfb77ed9d7f5a', 'timestamp': '', 'source': 'github', 'line_count': 1635, 'max_line_length': 129, 'avg_line_length': 33.447094801223244, 'alnum_prop': 0.547434443916176, 'repo_name': 'aaronsky/beeswax', 'id': '75007396af5589501314ffef5d26c5c3697d9dfa', 'size': '54686', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/plugins/beeswax-plugin-slack/slack.d.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '570'}, {'name': 'JavaScript', 'bytes': '18'}, {'name': 'TypeScript', 'bytes': '40662'}]}
<?php namespace Mongotd\Kpi; class Operator{ const plus = '+'; const minus = '-'; const multiply = '*'; const divide = '/'; }
{'content_hash': '6ee058dba427ab0bf3434eab37955a59', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 28, 'avg_line_length': 17.75, 'alnum_prop': 0.5492957746478874, 'repo_name': 'magnusjt/mongotd', 'id': '4bb43e88c2578dcf9fd26450e15757fb046f6fba', 'size': '142', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Kpi/Operator.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '10647'}, {'name': 'PHP', 'bytes': '124075'}, {'name': 'Shell', 'bytes': '1838'}]}
id: 4137 title: Preparing for Work Life date: 2010-09-23T09:30:22+00:00 guid: http://gregoryamcmullen.com/?p=4137 permalink: /life/preparing-for-work-life/ seo_follow: - 'false' shorturls: - 'a:3:{s:9:"permalink";s:60:"http://gregoryamcmullen.com/personal/preparing-for-work-life";s:7:"tinyurl";s:26:"http://tinyurl.com/3zz2lyq";s:4:"isgd";s:19:"http://is.gd/pGJjBP";}' tweetbackscheck: - twittercomments: - 'a:0:{}' tweetcount: - 0 tmac_last_id: - 9223372036854775807 categories: - Life - Personal tags: - business life - personal life --- While you are in school, no one really tells you how to prepare for work life. Honestly, I wasn&#8217;t sure I could make it in the real world. However, I&#8217;m currently working a full time job, paid off 2 student loans (2 to go), picked up my cell phone bill and bought a car! The best part is that I&#8217;m only 23 years old. No one can prepare you for the real world better than yourself! You have to know what will work for you and what won&#8217;t. ## Consistency is Key A lot of college students think that they are clever by taking classes that start after 10 or 11 every day. But in all honesty how many jobs are there where you are going to be able to come in at those times? My first year of college I didn&#8217;t have the luxury of picking late classes, but I was also supposed to be up at 5 everyday for swimming practice. Getting your day started at the same time everyday will help prepare you for working everyday. Make sure that you wake up with plenty of time to get ready and eat. After a night of fasting you&#8217;ll need the energy to make it through the rest of the day. The other aspect that is often overlooked are the &#8220;overnighters&#8221; and late nights out. Now, I understand the desire to want to go out with friends or (in my case) playing video games all night. But making sure that you get into a regular sleeping habit is just as important. ## Make Time for Work&#8230; Doing your work in school or while on the job is important, however, you should also know when to stop. People that I work with seem to lose a bit of separation between the two. I&#8217;ve worked with people that try to get by with doing minimum work and those that work 12-16 hours a day (including my own parents). You need to find what works best for you. While I was in my last year of school I took 22 and 23 credit hours and worked about 15 hours a week. Fortunately I was able to fit everything I needed to get into my day between the hours of 8 and 6. After 6:00 (aside from my night class or class projects) I didn&#8217;t do any work. I took some time for myself and my friends. ## &#8230;And Your Friends Making time for friends is something most college students don&#8217;t have a problem with, but I have noticed it as a problem between people starting their careers. You don&#8217;t have the privilege of going out every night like you did in college and it then seems like you aren&#8217;t MAKING time for your friends anymore. Everyone needs to just take a step back from work and enjoy your time off. Get away for the weekends, go out to a bar or just to a movie or something. Don&#8217;t take life too seriously, no one gets out alive. ## Take Work Seriously&#8230;but don&#8217;t let it consume you In the next part of this post Randy Clark ([@randyclarktko](http://www.twitter.com/randyclarktko)) will talk about being happy with your work life. Which includes certain sacrifices that you might have to make if you aren&#8217;t happy in your current situation. To me, work isn&#8217;t my life I just do it to make sure that I can live. That&#8217;s my philosophy so what&#8217;s yours? How did your transition from school to work go? And more importantly how were you able to manage your time? (See TKO Graphix post here on [Time Management](http://blog.tkographix.com/post/913424703/time-management)) As always feel free to share your thoughts!
{'content_hash': '5aa0ffde1fb13cd298b5bb14100560e1', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 372, 'avg_line_length': 67.13559322033899, 'alnum_prop': 0.7566271143650594, 'repo_name': 'mcmullengreg/mcmullengreg.github.io', 'id': '78151c8453bfe734a474c26500ff028394820047', 'size': '3965', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/2010-09-23-preparing-for-work-life.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '60637'}, {'name': 'HTML', 'bytes': '45720'}, {'name': 'JavaScript', 'bytes': '52622'}, {'name': 'Ruby', 'bytes': '3402'}]}
This is a Ruby client for the [DataBindery](http://databindery.com) REST APIs. The REST API documentation is located at http://api.databindery.com/api-docs ## Installation Add this line to your application's Gemfile: ```ruby gem 'databindery' ``` And then execute: $ bundle Or install it yourself as: $ gem install databindery ## Usage TODO: Write usage instructions here ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing 1. Fork it ( https://github.com/[my-github-username]/databindery/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
{'content_hash': 'afae35a71a6629c834b6932b91b8e8e6', 'timestamp': '', 'source': 'github', 'line_count': 35, 'max_line_length': 315, 'avg_line_length': 33.74285714285714, 'alnum_prop': 0.7408975444538527, 'repo_name': 'databindery/databindery-ruby-client', 'id': '3d5b03a6935b980bf5aecf898f51911b1d7d86ab', 'size': '1208', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '2263'}, {'name': 'Shell', 'bytes': '115'}]}
clear all close all clc load('data.mat') barFile = 'tex/bar.tex'; barLabel = {'Barra', 'P_{carga} [kW]', 'Q_{carga} [kVAR]', 'Shunt [kVAR]'}; barData = [id P./1000 Q./1000 Shunt./1000]; matrix2latex(barData, char(barFile), 'columnLabels', barLabel); lineFile = 'tex/line.tex'; lineLabel = {'Barra Inicial', 'Barra Final', 'R [Ohms]', 'X [Ohms]'}; lineData = [noi nof R X]; matrix2latex(lineData, char(lineFile), 'columnLabels', lineLabel);
{'content_hash': '3e4a497e137878c0f3f15f0ccbce0886', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 75, 'avg_line_length': 29.533333333333335, 'alnum_prop': 0.6591422121896162, 'repo_name': 'DKrepsky/TCC', 'id': '13128026204e2e95ffe793dd5f6986380bdeea7a', 'size': '443', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'monografia/data/14b/data.m', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Matlab', 'bytes': '24680'}, {'name': 'Objective-C', 'bytes': '5540'}, {'name': 'TeX', 'bytes': '252291'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: UserInfo.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: UserInfo.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>/*jshint esversion: 6 */ var UserInfo = (function() { 'use strict'; let _userInfoNameEl = document.getElementById('user-info-name'); let _userInfoEmployerEl = document.getElementById('user-info-employer'); let _userInfoTitleEl = document.getElementById('user-info-title'); let _userInfoBirthdayEl = document.getElementById('user-info-birthday'); let _submitUserInfoButtonEl = document.getElementById('submit-user-info-button'); let _userInfoSpinnerEl = document.getElementById('user-info-spinner'); let _userInfoOldPassword = document.getElementById('user-info-old-password'); let _userInfoNewPassword = document.getElementById('user-info-new-password'); let _userInfoNewPasswordRepeated = document.getElementById('user-info-new-password-repeated'); let _changePasswordButtonEl = document.getElementById('change-password-button'); let _userNameDivEl = document.getElementById('user-name-div'); let _userOrganizationDivEl = document.getElementById('user-organization-div'); let _userJobDivEl = document.getElementById('user-job-div'); let _userBdayDivEl = document.getElementById('user-bday-div'); let _userinfoNewPasswordDivEl = document.getElementById('userinfo-new-password'); let _userinfoPasswordErrorEl = document.getElementById('userinfo-password-error'); let _userinfoNewPasswordRepeatDivEl = document.getElementById('userinfo-new-password-repeat'); let _userinfoPasswordRepeatErrorEl = document.getElementById('userinfo-password-repeat-error'); let _userinfoOldPasswordDivEl = document.getElementById('userinfo-old-password-div'); _submitUserInfoButtonEl.disabled = true; /** * Add info to the page * @param {object} snapshot The user info */ function _addInfo (snapshot) { let info = snapshot.val(); _userInfoNameEl.value = info.name; if(_userInfoNameEl.value) { _userNameDivEl.className += ' is-dirty'; } _userInfoEmployerEl.value = info.employer; if(_userInfoEmployerEl.value) { _userOrganizationDivEl.className += ' is-dirty'; } _userInfoTitleEl.value = info.title; if(_userInfoTitleEl.value) { _userJobDivEl.className += ' is-dirty'; } _userInfoBirthdayEl.value = info.birthday; if(_userInfoBirthdayEl.value) { _userBdayDivEl.className += ' is-dirty'; } UserInfo.checkFields(); } /** * Represents an UserInfo Planner Page * @class UserInfo * */ return class UserInfo { /** * UserInfo constructor. * @constructs UserInfo */ constructor(extraRef, ref) { /** * The events * @member UserInfo#extraRef * @type {object} */ this.extraRef = extraRef; /** * Firebase ref * @member UserInfo#ref * @type {object} */ this.ref = ref; /** * Users email * @member UserInfo#email * @type {string} */ this.email = undefined; } /** * Name Element * @return {Object} Name Element * @memberof UserInfo * @type {Object} * */ static get userInfoNameEl() { return _userInfoNameEl; } /** * @function checkFields * @memberof UserInfo * */ static checkFields() { _submitUserInfoButtonEl.disabled = _userInfoNameEl.value === ''; } /** * Check Password Validation * @function checkPasswords * @memberof UserInfo * */ static checkPasswords() { setTimeout(function() { let valid = true; let passwordMessage = ''; let password2Message = ''; if(_userinfoOldPasswordDivEl.className.indexOf('is-invalid') > -1) { valid = false; } if(!_userInfoNewPassword.value) { passwordMessage += '&lt;div>Required&lt;/div>'; valid = false; } if(_userInfoNewPassword.value === _userInfoOldPassword.value) { passwordMessage += '&lt;div>New password cannot match the old password&lt;/div>'; valid = false; if(_userinfoNewPasswordDivEl.className.indexOf('is-invalid') === -1 ) { _userinfoNewPasswordDivEl.className += ' is-invalid'; } } if(_userInfoNewPassword.value.length &lt; 8) { passwordMessage += '&lt;div>Password must be at least 8 characters long&lt;/div>'; valid = false; if(_userinfoNewPasswordDivEl.className.indexOf('is-invalid') === -1 ) { _userinfoNewPasswordDivEl.className += ' is-invalid'; } } if(!_userInfoNewPassword.value.match(/[A-Z]/g)) { passwordMessage += '&lt;div>Must contain at least one upper case character&lt;/div>'; valid = false; if(_userinfoNewPasswordDivEl.className.indexOf('is-invalid') === -1 ) { _userinfoNewPasswordDivEl.className += ' is-invalid'; } } if(!_userInfoNewPassword.value.match(/[a-z]/g)) { passwordMessage += '&lt;div>Must contain at least one lower case character&lt;/div>'; valid = false; if(_userinfoNewPasswordDivEl.className.indexOf('is-invalid') === -1 ) { _userinfoNewPasswordDivEl.className += ' is-invalid'; } } if(!_userInfoNewPassword.value.match(/\d+/g)) { passwordMessage += '&lt;div>Must contain at least one number&lt;/div>'; valid = false; if(_userinfoNewPasswordDivEl.className.indexOf('is-invalid') === -1 ) { _userinfoNewPasswordDivEl.className += ' is-invalid'; } } if(!_userInfoNewPasswordRepeated.value) { valid = false; password2Message += '&lt;div>Required&lt;/div>'; } if(_userInfoNewPasswordRepeated.value !== _userInfoNewPassword.value) { passwordMessage += '&lt;div>Passwords must match&lt;/div>'; password2Message += '&lt;div>Passwords must match&lt;/div>'; valid = false; if(_userinfoNewPasswordDivEl.className.indexOf('is-invalid') === -1 ) { _userinfoNewPasswordDivEl.className += ' is-invalid'; } if(_userinfoNewPasswordRepeatDivEl.className.indexOf('is-invalid') === -1) { _userinfoNewPasswordRepeatDivEl.className += ' is-invalid'; } } _userinfoPasswordErrorEl.innerHTML = passwordMessage; _userinfoPasswordRepeatErrorEl.innerHTML = password2Message; _changePasswordButtonEl.disabled = !valid; }); } /** * Changes the users password * @function changePassword * @memberof UserInfo * @instance * */ changePassword() { _userInfoSpinnerEl.hidden = false; Displayer.userInfoContainerEl.hidden = true; this.ref.changePassword({ email: this.email, oldPassword: _userInfoOldPassword.value, newPassword: _userInfoNewPassword.value }, function(error) { _userInfoSpinnerEl.hidden = true; Displayer.userInfoContainerEl.hidden = false; if (error) { switch (error.code) { case "INVALID_PASSWORD": Displayer.showSnackbar('Sorry! The password is incorrect. :-('); break; case "INVALID_USER": Displayer.showSnackbar('Sorry! The user account doesn\'t exist. :-('); break; default: Displayer.showSnackbar('Sorry! There was an error changing your password. :-('); } } else { Displayer.showSnackbar('Nice! You just got yourself a brand new password. :-)'); } //Reset Vals _userInfoOldPassword.value = ''; _userInfoNewPassword.value = ''; _userInfoNewPasswordRepeated.value = ''; UserInfo.checkPasswords(); }); } /** * Updates the user info * @function saveInfo * @memberof UserInfo * @instance * */ saveInfo() { _userInfoSpinnerEl.hidden = false; Displayer.userInfoContainerEl.hidden = true; this.extraRef.update({ name: _userInfoNameEl.value, employer: _userInfoEmployerEl.value, title: _userInfoTitleEl.value, birthday: _userInfoBirthdayEl.value }, function(error) { _userInfoSpinnerEl.hidden = true; Displayer.userInfoContainerEl.hidden = false; if(error) { Displayer.showSnackbar('Error updating your info, Please forgive me! :-('); } else { Displayer.showSnackbar('Info upated, Aaaaawwwww Yeah! :-)'); } }); } /** * Listens for user info data * @function listenForData * @memberof UserInfo * @instance * */ listenForData() { try { this.extraRef.on("value", _addInfo); } catch(e) { //Sometimes we end up here signing out } } /** * Turn off the extra fb listener * @function dispose * @memberof UserInfo * @private * @instance * */ dispose() { this.extraRef.off("value", _addInfo); this.extraRef = undefined; this.ref = undefined; this.email = undefined; _userInfoNameEl.value = ''; _userInfoEmployerEl.value = ''; _userInfoTitleEl.value = ''; _userInfoBirthdayEl.value = ''; _userInfoOldPassword.value = ''; _userInfoNewPassword.value = ''; _userInfoNewPasswordRepeated.value = ''; } }; })();</code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="App.html">App</a></li><li><a href="Displayer.html">Displayer</a></li><li><a href="EventPlanner.html">EventPlanner</a></li><li><a href="ResetPassword.html">ResetPassword</a></li><li><a href="ShowEvents.html">ShowEvents</a></li><li><a href="SignInOut.html">SignInOut</a></li><li><a href="SignUp.html">SignUp</a></li><li><a href="UserInfo.html">UserInfo</a></li></ul><h3>Global</h3><ul><li><a href="global.html#VTILAPP">VTILAPP</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Sat Mar 05 2016 08:29:45 GMT-0500 (EST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>
{'content_hash': '443411887870a628a26ba07b72a13678', 'timestamp': '', 'source': 'github', 'line_count': 457, 'max_line_length': 513, 'avg_line_length': 22.844638949671772, 'alnum_prop': 0.64272030651341, 'repo_name': 'vision89/event-planner', 'id': '7050e132fa2f5c69ddd38835bb3c0bc7f51b6f4a', 'size': '10440', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/UserInfo.js.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '3891'}, {'name': 'HTML', 'bytes': '29356'}, {'name': 'JavaScript', 'bytes': '58605'}]}
package de.doe300.activerecord.dsl; import java.util.Map; import javax.annotation.Nonnull; import javax.annotation.Nullable; import de.doe300.activerecord.ReadOnlyRecordBase; import de.doe300.activerecord.RecordBase; import de.doe300.activerecord.jdbc.driver.JDBCDriver; import de.doe300.activerecord.record.ActiveRecord; import de.doe300.activerecord.record.association.AssociationHelper; /** * A Condition on another table referenced by a belongs-to association * @author doe300 */ public class BelongsToCondition implements Condition { @Nonnull private final String foreignKeyColumn, associatedTableKey; @Nonnull private final Condition associatedTableCond; @Nonnull private final ReadOnlyRecordBase<?> associatedTableBase; /** * * @param foreignKeyColumn the name of the local column containing the foreign key * @param associatedTableBase the base of the associated table * @param associatedTableKey the column of the associated table referenced by the foreign key * @param associatedTableCond the condition to test in the associated table */ public BelongsToCondition(@Nonnull final String foreignKeyColumn, @Nonnull final ReadOnlyRecordBase<?> associatedTableBase, @Nonnull final String associatedTableKey, @Nonnull final Condition associatedTableCond) { this.foreignKeyColumn = foreignKeyColumn; this.associatedTableBase = associatedTableBase; this.associatedTableKey = associatedTableKey; this.associatedTableCond = associatedTableCond; } /** * This constructor uses the associated table's primary key as foreign Key * @param foreignKeyColumn the name of the local column containing the foreign key * @param associatedTableBase the base of the associated table * @param associatedTableCond the condition to test in the associated table * @see RecordBase#getPrimaryColumn() */ public BelongsToCondition(@Nonnull final String foreignKeyColumn, @Nonnull final RecordBase<?> associatedTableBase, @Nonnull final Condition associatedTableCond) { this(foreignKeyColumn, associatedTableBase, associatedTableBase.getPrimaryColumn(), associatedTableCond); } @Override public boolean hasWildcards() { return associatedTableCond.hasWildcards(); } @Override @Nullable public Object[] getValues() { return associatedTableCond.getValues(); } @Override public String toSQL(@Nonnull final JDBCDriver driver, final String tableName) { String associatedTableName = JDBCDriver.getNextTableIdentifier( tableName ); //foreignKey IN(SELECT associatedKey FROM associatedTable WHERE cond) //could also be written as: //EXISTS(SELECT associatedKey FROM associatedTable WHERE thisTable.foreignKey = associatedKey AND cond) return tableName + "." + foreignKeyColumn+" IN (SELECT " + associatedTableName + "." + associatedTableKey + " FROM " + associatedTableBase.getTableName() + " AS " + associatedTableName + " WHERE " + associatedTableCond.toSQL(driver, associatedTableName) + ")"; } @Override public boolean test(final ActiveRecord record ) { if (record == null) { return false; } final Object foreignKeyValue = record.getBase().getStore().getValue( record.getBase(), record.getPrimaryKey(), foreignKeyColumn); if(foreignKeyValue == null) { return false; } final ActiveRecord associatedRecord = AssociationHelper.getBelongsTo( foreignKeyValue, associatedTableBase, associatedTableBase.getPrimaryColumn()); if (associatedRecord == null) { return false; } return associatedTableCond.test(associatedRecord); } @Override public boolean test(final Map<String, Object> map ) { if (map.isEmpty()) { return false; } final ActiveRecord associatedRecord = AssociationHelper.getBelongsTo( map.get( foreignKeyColumn), associatedTableBase, associatedTableBase.getPrimaryColumn()); if (associatedRecord == null) { return false; } return associatedTableCond.test(associatedRecord); } @Override public boolean equals( Object obj ) { if(obj == null || !(obj instanceof Condition)) { return false; } return equals( (Condition)obj); } @Override public int hashCode() { return toSQL( JDBCDriver.DEFAULT, null ).hashCode(); } }
{'content_hash': '9b4b0266150f999f992533dbbe2f2d8b', 'timestamp': '', 'source': 'github', 'line_count': 135, 'max_line_length': 161, 'avg_line_length': 31.022222222222222, 'alnum_prop': 0.7679083094555874, 'repo_name': 'doe300/jactiverecord', 'id': 'd9dfd18c0e903912f6996a49a4d9883c41c85b02', 'size': '5329', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/de/doe300/activerecord/dsl/BelongsToCondition.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '1247803'}]}
/* (c) Copyright 2013 Hewlett-Packard Development Company, L.P. 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. */ /* * File: genJPEGStrips.c * Purpose: this file implements routines to compress and decompress jpeg image files. It utilizes * libjpeg to do the "work". */ #include <stdio.h> //#include <unistd.h> #include <stdlib.h> #include "common_defines.h" #include "PCLmGenerator.h" /* * Include file for users of JPEG library. * You will need to have included system headers that define at least * the typedefs FILE and size_t before you can include jpeglib.h. * (stdio.h is sufficient on ANSI-conforming systems.) * You may also wish to include "jerror.h". */ extern "C" { #include "jpeglib.h" } /* * <setjmp.h> is used for the optional error recovery mechanism shown in * the second part of the example. */ #include <setjmp.h> #include <malloc.h> #include <memory.h> /******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/ /* This half of the example shows how to feed data into the JPEG compressor. * We present a minimal version that does not worry about refinements such * as error recovery (the JPEG code will just exit() if it gets an error). */ /* * IMAGE DATA FORMATS: * * The standard input image format is a rectangular array of pixels, with * each pixel having the same number of "component" values (color channels). * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars). * If you are working with color data, then the color values for each pixel * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit * RGB color. * * For this example, we'll assume that this data structure matches the way * our application has stored the image in memory, so we can just pass a * pointer to our image buffer. In particular, let's say that the image is * RGB color and is described by: */ /* typedef char JSAMPLE;*/ int image_width; int image_height; int image_numComponents; extern int DebugIt; extern int DebugIt2; unsigned char *myImageBuffer=NULL; typedef struct jpeg_decompress_struct cinfoCompressType; // int put_scanline_someplace(jpeg_decompress_struct *cinfo, char *buffer, int physicalWidth) int put_scanline_someplace(cinfoCompressType *cinfo, char *buffer, int physicalWidth) { static unsigned char *destBuffer; if(myImageBuffer==NULL) { int width =cinfo->image_width; int height =cinfo->image_height; int numComponents =(int)cinfo->num_components; int allocSize =width*height*numComponents; #if 0 printf("Image Stats\n"); printf(" ImageWidth=%d\n",width); printf(" ImageHeight=%d\n",height); printf(" ImageNumComponents=%d\n",numComponents); // printf(" ImageColorSpace=%d\n"); //printf(" ImageScale=%d\n",scale); #endif myImageBuffer=(unsigned char*)malloc(allocSize*2); /* if(DebugIt2) { printf("myImageBuffer: allocated; size=%d\n",allocSize*2); }*/ if(!myImageBuffer) { printf("Could not allocate enough memory for source JPEG file; exiting\n"); exit(-1); } memset(myImageBuffer,0x0,allocSize); image_width=width; image_height=height; image_numComponents=numComponents; destBuffer=myImageBuffer; } memcpy(destBuffer,buffer,physicalWidth); destBuffer+=physicalWidth; return(1); } /* Sample routine for JPEG compression. We assume that the target file name * and a compression quality factor are passed in. */ /* setup the buffer but we did that in the calling function */ void init_buffer(jpeg_compress_struct* cinfo) {} /* what to do when the buffer is full; this should almost never * happen since we allocated our buffer to be big to start with */ boolean empty_buffer(jpeg_compress_struct* cinfo) { return TRUE; } /* finalize the buffer and do any cleanup stuff */ void term_buffer(jpeg_compress_struct* cinfo) {} GLOBAL(void) write_JPEG_Buff (ubyte * buffPtr, int quality, int image_width, int image_height, JSAMPLE *imageBuffer, int resolution, colorSpaceDisposition destCS, int *numCompBytes) { /* This struct contains the JPEG compression parameters and pointers to * working space (which is allocated as needed by the JPEG library). * It is possible to have several such structures, representing multiple * compression/decompression processes, in existence at once. We refer * to any one struct (and its associated working data) as a "JPEG object". */ struct jpeg_compress_struct cinfo; struct jpeg_destination_mgr dmgr; /* This struct represents a JPEG error handler. It is declared separately * because applications often want to supply a specialized error handler * (see the second half of this file for an example). But here we just * take the easy way out and use the standard error handler, which will * print a message on stderr and call exit() if compression fails. * Note that this struct must live as long as the main JPEG parameter * struct, to avoid dangling-pointer problems. */ struct jpeg_error_mgr jerr; /* More stuff */ JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ int row_stride; /* physical row width in image buffer */ /* here is the magic */ dmgr.init_destination = init_buffer; dmgr.empty_output_buffer = empty_buffer; dmgr.term_destination = term_buffer; dmgr.next_output_byte = (JOCTET *)buffPtr; dmgr.free_in_buffer = image_width * image_height * 3; /* Step 1: allocate and initialize JPEG compression object */ /* We have to set up the error handler first, in case the initialization * step fails. (Unlikely, but it could happen if you are out of memory.) * This routine fills in the contents of struct jerr, and returns jerr's * address which we place into the link field in cinfo. */ cinfo.err = jpeg_std_error(&jerr); /* Now we can initialize the JPEG compression object. */ jpeg_create_compress(&cinfo); cinfo.dest = &dmgr; /* Step 2: specify data destination (eg, a file) */ /* Note: steps 2 and 3 can be done in either order. */ /* Step 3: set parameters for compression */ /* First we supply a description of the input image. * Four fields of the cinfo struct must be filled in: */ cinfo.image_width = image_width; /* image width and height, in pixels */ cinfo.image_height = image_height; cinfo.input_components = 3; /* # of color components per pixel */ cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ if(destCS==deviceRGB || destCS==adobeRGB) { cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ cinfo.jpeg_color_space = JCS_RGB; /* colorspace of input image */ cinfo.input_components = 3; } else { cinfo.in_color_space = JCS_GRAYSCALE; /* colorspace of input image */ cinfo.jpeg_color_space = JCS_GRAYSCALE; /* colorspace of input image */ cinfo.input_components = 1; } /* Now use the library's routine to set default compression parameters. * (You must set at least cinfo.in_color_space before calling this, * since the defaults depend on the source color space.) */ jpeg_set_defaults(&cinfo); /* Now you can set any non-default parameters you wish to. * Here we just illustrate the use of quality (quantization table) scaling: */ jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); /* Set the density so that the JFIF header has the correct settings */ cinfo.density_unit=1; /* 1=dots-per-inch, 2=dots per cm */ cinfo.X_density=(UINT16)resolution; cinfo.Y_density=(UINT16)resolution; /* set the rows/columns setting to reflect the resolution */ /* MCU = Minimum Coded Unit */ #if 0 cinfo.MCUs_per_row =image_width; cinfo.MCU_rows_in_scan=image_height; #else //cinfo.MCUs_per_row =16; cinfo.MCUs_per_row =image_width; // cinfo.MCU_rows_in_scan=16; cinfo.MCU_rows_in_scan=image_height; #endif /* if(DebugIt2) { printf("cinfo:\n"); printf(" width=%d\n",cinfo.image_width); printf(" height=%d\n",cinfo.image_height); printf(" input_components=%d\n",cinfo.input_components); printf(" input_in_color_space=%d\n",cinfo.in_color_space); printf(" input_out_color_space=%d\n",cinfo.jpeg_color_space); printf(" num_components=%d\n",cinfo.num_components); printf(" X_density=%d\n",cinfo.X_density); printf(" Y_density=%d\n",cinfo.Y_density); printf(" MCUs_per_row=%d\n",cinfo.MCUs_per_row); printf(" MCUs_rows_in_scan=%d\n",cinfo.MCU_rows_in_scan); }*/ /* Step 4: Start compressor */ /* TRUE ensures that we will write a complete interchange-JPEG file. * Pass TRUE unless you are very sure of what you're doing. */ jpeg_start_compress(&cinfo, TRUE); /* Step 5: while (scan lines remain to be written) */ /* jpeg_write_scanlines(...); */ /* Here we use the library's state variable cinfo.next_scanline as the * loop counter, so that we don't have to keep track ourselves. * To keep things simple, we pass one scanline per call; you can pass * more if you wish, though. */ row_stride = image_width * cinfo.input_components; /* JSAMPLEs per row in , imageBuffer */ while (cinfo.next_scanline < cinfo.image_height) { /* jpeg_write_scanlines expects an array of pointers to scanlines. * Here the array is only one element long, but you could pass * more than one scanline at a time if that's more convenient. */ //printf("image_height=%d, image_width=%d\n",cinfo.image_height, cinfo.image_width); row_pointer[0] = & imageBuffer[cinfo.next_scanline * row_stride]; /* if(DebugIt) { printf("putting JPEG scanline at address 0x%x\n",imageBuffer[cinfo.next_scanline * row_stride]); JSAMPLE *i,*j; i=(JSAMPLE*)(imageBuffer[cinfo.next_scanline * row_stride]); j=(JSAMPLE*)(imageBuffer); printf(" offset=%ld\n",i-j); }*/ (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); } /* Step 6: Finish compression */ jpeg_finish_compress(&cinfo); /* Step 7: release JPEG compression object */ /* This is an important step since it will release a good deal of memory. */ jpeg_destroy_compress(&cinfo); *numCompBytes=(int)(cinfo.dest->next_output_byte - buffPtr); /* And we're done! */ } #if 1 GLOBAL(void) write_JPEG_file (char * filename, int quality, int image_width, int image_height, JSAMPLE *imageBuffer, int resolution, colorSpaceEnum destCS) { /* This struct contains the JPEG compression parameters and pointers to * working space (which is allocated as needed by the JPEG library). * It is possible to have several such structures, representing multiple * compression/decompression processes, in existence at once. We refer * to any one struct (and its associated working data) as a "JPEG object". */ struct jpeg_compress_struct cinfo; /* This struct represents a JPEG error handler. It is declared separately * because applications often want to supply a specialized error handler * (see the second half of this file for an example). But here we just * take the easy way out and use the standard error handler, which will * print a message on stderr and call exit() if compression fails. * Note that this struct must live as long as the main JPEG parameter * struct, to avoid dangling-pointer problems. */ struct jpeg_error_mgr jerr; /* More stuff */ FILE * outfile; /* target file */ JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ int row_stride; /* physical row width in image buffer */ /* Step 1: allocate and initialize JPEG compression object */ /* We have to set up the error handler first, in case the initialization * step fails. (Unlikely, but it could happen if you are out of memory.) * This routine fills in the contents of struct jerr, and returns jerr's * address which we place into the link field in cinfo. */ cinfo.err = jpeg_std_error(&jerr); /* Now we can initialize the JPEG compression object. */ jpeg_create_compress(&cinfo); /* Step 2: specify data destination (eg, a file) */ /* Note: steps 2 and 3 can be done in either order. */ /* Here we use the library-supplied code to send compressed data to a * stdio stream. You can also write your own code to do something else. * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that * requires it in order to write binary files. */ if ((outfile = fopen(filename, "wb")) == NULL) { fprintf(stderr, "can't open %s\n", filename); exit(1); } jpeg_stdio_dest(&cinfo, outfile); /* Step 3: set parameters for compression */ /* First we supply a description of the input image. * Four fields of the cinfo struct must be filled in: */ cinfo.image_width = image_width; /* image width and height, in pixels */ cinfo.image_height = image_height; cinfo.input_components = 3; /* # of color components per pixel */ cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ #if 0 if(destCS==RGB) cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ else cinfo.in_color_space = JCS_GRAYSCALE; /* colorspace of input image */ #endif if(destCS==RGB) { cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ cinfo.jpeg_color_space = JCS_RGB; /* colorspace of input image */ cinfo.input_components=3; } else { cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ cinfo.jpeg_color_space = JCS_GRAYSCALE; /* colorspace of input image */ cinfo.input_components=3; } /* Now use the library's routine to set default compression parameters. * (You must set at least cinfo.in_color_space before calling this, * since the defaults depend on the source color space.) */ jpeg_set_defaults(&cinfo); /* if(DebugIt) { printf("cinfo:\n"); printf(" width=%d\n",cinfo.image_width); printf(" height=%d\n",cinfo.image_height); printf(" input_components=%d\n",cinfo.input_components); printf(" input_in_color_space=%d\n",cinfo.in_color_space); printf(" input_out_color_space=%d\n",cinfo.jpeg_color_space); printf(" num_components=%d\n",cinfo.num_components); }*/ /* Now you can set any non-default parameters you wish to. * Here we just illustrate the use of quality (quantization table) scaling: */ jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); /* Set the density so that the JFIF header has the correct settings */ cinfo.X_density=(UINT16)resolution; cinfo.Y_density=(UINT16)resolution; /* set the rows/columns setting to reflect the resolution */ cinfo.MCUs_per_row =16; cinfo.MCU_rows_in_scan=16; /* Step 4: Start compressor */ /* TRUE ensures that we will write a complete interchange-JPEG file. * Pass TRUE unless you are very sure of what you're doing. */ jpeg_start_compress(&cinfo, TRUE); /* Step 5: while (scan lines remain to be written) */ /* jpeg_write_scanlines(...); */ /* Here we use the library's state variable cinfo.next_scanline as the * loop counter, so that we don't have to keep track ourselves. * To keep things simple, we pass one scanline per call; you can pass * more if you wish, though. */ row_stride = image_width * 3; /* JSAMPLEs per row in , imageBuffer */ while (cinfo.next_scanline < cinfo.image_height) { /* jpeg_write_scanlines expects an array of pointers to scanlines. * Here the array is only one element long, but you could pass * more than one scanline at a time if that's more convenient. */ //printf("image_height=%d, image_width=%d\n",cinfo.image_height, cinfo.image_width); row_pointer[0] = & imageBuffer[cinfo.next_scanline * row_stride]; (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); } /* Step 6: Finish compression */ jpeg_finish_compress(&cinfo); /* After finish_compress, we can close the output file. */ fclose(outfile); /* Step 7: release JPEG compression object */ /* This is an important step since it will release a good deal of memory. */ jpeg_destroy_compress(&cinfo); /* And we're done! */ } #endif /* * SOME FINE POINTS: * * In the above loop, we ignored the return value of jpeg_write_scanlines, * which is the number of scanlines actually written. We could get away * with this because we were only relying on the value of cinfo.next_scanline, * which will be incremented correctly. If you maintain additional loop * variables then you should be careful to increment them properly. * Actually, for output to a stdio stream you needn't worry, because * then jpeg_write_scanlines will write all the lines passed (or else exit * with a fatal error). Partial writes can only occur if you use a data * destination module that can demand suspension of the compressor. * (If you don't know what that's for, you don't need it.) * * If the compressor requires full-image buffers (for entropy-coding * optimization or a multi-scan JPEG file), it will create temporary * files for anything that doesn't fit within the maximum-memory setting. * (Note that temp files are NOT needed if you use the default parameters.) * On some systems you may need to set up a signal handler to ensure that * temporary files are deleted if the program is interrupted. See libjpeg.doc. * * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG * files to be compatible with everyone else's. If you cannot readily read * your data in that order, you'll need an intermediate array to hold the * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top * source data using the JPEG code's internal virtual-array mechanisms. */ /******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ /* This half of the example shows how to read data from the JPEG decompressor. * It's a bit more refined than the above, in that we show: * (a) how to modify the JPEG library's standard error-reporting behavior; * (b) how to allocate workspace using the library's memory manager. * * Just to make this example a little different from the first one, we'll * assume that we do not intend to put the whole image into an in-memory * buffer, but to send it line-by-line someplace else. We need a one- * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG * memory manager allocate it for us. This approach is actually quite useful * because we don't need to remember to deallocate the buffer separately: it * will go away automatically when the JPEG object is cleaned up. */ /* * ERROR HANDLING: * * The JPEG library's standard error handler (jerror.c) is divided into * several "methods" which you can override individually. This lets you * adjust the behavior without duplicating a lot of code, which you might * have to update with each future release. * * Our example here shows how to override the "error_exit" method so that * control is returned to the library's caller when a fatal error occurs, * rather than calling exit() as the standard error_exit method does. * * We use C's setjmp/longjmp facility to return control. This means that the * routine which calls the JPEG library must first execute a setjmp() call to * establish the return point. We want the replacement error_exit to do a * longjmp(). But we need to make the setjmp buffer accessible to the * error_exit routine. To do this, we make a private extension of the * standard JPEG error handler object. (If we were using C++, we'd say we * were making a subclass of the regular error handler.) * * Here's the extended error handler struct: */ struct my_error_mgr { struct jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ }; typedef struct my_error_mgr * my_error_ptr; /* * Here's the routine that will replace the standard error_exit method: */ METHODDEF(void) my_error_exit (j_common_ptr cinfo) { /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ my_error_ptr myerr = (my_error_ptr) cinfo->err; /* Always display the message. */ /* We could postpone this until after returning, if we chose. */ (*cinfo->err->output_message) (cinfo); /* Return control to the setjmp point */ longjmp(myerr->setjmp_buffer, 1); } /* * Sample routine for JPEG decompression. We assume that the source file name * is passed in. We want to return 1 on success, 0 on error. */ extern colorSpaceEnum sourceColorSpace; GLOBAL(int) read_JPEG_file (char * filename) { /* This struct contains the JPEG decompression parameters and pointers to * working space (which is allocated as needed by the JPEG library). */ struct jpeg_decompress_struct cinfo; /* We use our private extension JPEG error handler. * Note that this struct must live as long as the main JPEG parameter * struct, to avoid dangling-pointer problems. */ struct my_error_mgr jerr; /* More stuff */ FILE * infile; /* source file */ JSAMPARRAY buffer; /* Output row buffer */ int row_stride; /* physical row width in output buffer */ /* In this example we want to open the input file before doing anything else, * so that the setjmp() error recovery below can assume the file is open. * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that * requires it in order to read binary files. */ if ((infile = fopen(filename, "rb")) == NULL) { fprintf(stderr, "can't open %s\n", filename); return 0; } /* Step 1: allocate and initialize JPEG decompression object */ /* We set up the normal JPEG error routines, then override error_exit. */ cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = my_error_exit; /* Establish the setjmp return context for my_error_exit to use. */ if (setjmp(jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. * We need to clean up the JPEG object, close the input file, and return. */ jpeg_destroy_decompress(&cinfo); fclose(infile); return 0; } /* Now we can initialize the JPEG decompression object. */ jpeg_create_decompress(&cinfo); /* Step 2: specify data source (eg, a file) */ jpeg_stdio_src(&cinfo, infile); /* Step 3: read file parameters with jpeg_read_header() */ (void) jpeg_read_header(&cinfo, TRUE); /* We can ignore the return value from jpeg_read_header since * (a) suspension is not possible with the stdio data source, and * (b) we passed TRUE to reject a tables-only JPEG file as an error. * See libjpeg.doc for more info. */ /* Step 4: set parameters for decompression */ /* In this example, we don't need to change any of the defaults set by * jpeg_read_header(), so we do nothing here. */ /* Step 5: Start decompressor */ (void) jpeg_start_decompress(&cinfo); /* if(DebugIt2) { printf("Source Image Stats\n"); printf(" Width=%d\n",cinfo.image_width); printf(" height=%d\n",cinfo.image_height); printf(" num_components=%d\n",cinfo.num_components); if(cinfo.out_color_space==JCS_RGB) { sourceColorSpace=RGB; printf(" JPEG color space==RGB\n"); } else if(cinfo.out_color_space==JCS_GRAYSCALE) { sourceColorSpace=GRAY; printf(" JPEG color space==RGB\n"); } else { sourceColorSpace=unknown; printf(" JPEG color space==RGB\n"); } }*/ /* We can ignore the return value since suspension is not possible * with the stdio data source. */ /* We may need to do some setup of our own at this point before reading * the data. After jpeg_start_decompress() we have the correct scaled * output image dimensions available, as well as the output colormap * if we asked for color quantization. * In this example, we need to make an output work buffer of the right size. */ /* JSAMPLEs per row in output buffer */ row_stride = cinfo.output_width * cinfo.output_components; /* Make a one-row-high sample array that will go away when done with image */ buffer = (*cinfo.mem->alloc_sarray) ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); /* Step 6: while (scan lines remain to be read) */ /* jpeg_read_scanlines(...); */ /* Here we use the library's state variable cinfo.output_scanline as the * loop counter, so that we don't have to keep track ourselves. */ while (cinfo.output_scanline < cinfo.output_height) { /* jpeg_read_scanlines expects an array of pointers to scanlines. * Here the array is only one element long, but you could ask for * more than one scanline at a time if that's more convenient. */ (void) jpeg_read_scanlines(&cinfo, buffer, 1); /* Assume put_scanline_someplace wants a pointer and sample count. */ put_scanline_someplace(&cinfo, (char *)buffer[0], row_stride); } /* Step 7: Finish decompression */ (void) jpeg_finish_decompress(&cinfo); /* We can ignore the return value since suspension is not possible * with the stdio data source. */ /* Step 8: Release JPEG decompression object */ /* This is an important step since it will release a good deal of memory. */ jpeg_destroy_decompress(&cinfo); /* After finish_decompress, we can close the input file. * Here we postpone it until after no more JPEG errors are possible, * so as to simplify the setjmp error logic above. (Actually, I don't * think that jpeg_destroy can do an error exit, but why assume anything...) */ fclose(infile); /* At this point you may want to check to see whether any corrupt-data * warnings occurred (test whether jerr.pub.num_warnings is nonzero). */ /* And we're done! */ return 1; }
{'content_hash': '88097f205813755d79762e2c25718c81', 'timestamp': '', 'source': 'github', 'line_count': 723, 'max_line_length': 168, 'avg_line_length': 36.52558782849239, 'alnum_prop': 0.6889578915480158, 'repo_name': 'ibevilinc/WFDSPrintPlugin', 'id': '759e5be99101168b63fdf8835061b5d982bbc12d', 'size': '26995', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'jni/wprint/plugins/genPCLm/src/genJPEGStrips.cpp', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '678619'}, {'name': 'C++', 'bytes': '159523'}, {'name': 'Java', 'bytes': '282262'}, {'name': 'Shell', 'bytes': '12112'}]}
from __future__ import division import sys import os # Update PYTHONPATH root = os.path.join(os.getcwd().split('src')[0], 'src') if root not in sys.path: sys.path.append(root) from axe.lib import * from axe.demos import * from axe.counts import * from axe.fi import * import re import sys from axe.settings import * sys.dont_write_bytecode = True from pdb import set_trace def rows(file, sep=The.reader.sep, bad=The.reader.bad): """Read comma-seperated rows that might be split over many lines. Finds strings that can compile to nums. Kills comments and white space.""" n, kept = 0, "" for line in open(file): now = re.sub(bad, "", line) kept += now if kept: if not now[-1] == sep: yield n, map(atom, kept.split(sep)) n += 1 kept = "" def row(file, skip=The.reader.skip): "Leaps over any columns marked 'skip'." todo = None for n, line in rows(file): todo = todo or [col for col, name in enumerate(line) if not skip in name] yield n, [line[col] for col in todo] ## Read Headers and Rows def table(source, rows=True, contents=row): t = table0(source) for n, cells in contents(source): if n == 0: head(cells, t) else: body(cells, t, rows) # print ">>>>", t.headers return t def centroid(tbl, selections=False): return [h.centroid() for h in tbl.headers if (not selections or h.selected)] ## Create Table def table0(source): return Thing( source=source, depen=[], indep=[], nums=[], syms=[], more=[], less=[], klass=[], headers=[], _rows=[], at={}, patterns=The.reader.patterns) def head(cells, t, numc=The.reader.numc): for col, cell in enumerate(cells): this = Num if numc in cell else Sym this.rank = 0 header = this() header.col, header.name = col, cell t.at[cell] = header for pattern, val in t.patterns.items(): if re.search(pattern, cell): where = val(t) where += [header] return t def body(cells, t, keep=True): # print "LEN?",len(t._rows) for n, header in enumerate(t.headers): cell = cells[header.col] # print n,"!",cell,"!" if not cell == The.reader.missing: header + cell if keep: new = Row(cells) t._rows += [new] class Row(Thing): def __init__(i, cells): i.newId() i.cells = cells i.pos = [] i.x0, i.y0 = 0, 0 def discreteTable(f, contents=lambda x: row(x)): rows, t = [], table0(f) for n, cells in contents(f): if n == 0: head(cells, t) else: rows += [cells] return discreteNums(t, rows) def discreteNums(tbl, therows): for i, num in enumerate(tbl.indep): if not num in tbl.depen: if isinstance(num, Num): for cut in ediv(therows, num=lambda x: x[num.col], sym=lambda x: x[-1]): for row in cut._has: row[num.col] = cut.range set_trace() return clone(tbl, discrete=True, rows=therows) def clone(tbl1, rows=[], discrete=False, keepSelections=False): def ok(x): if x[-1] == "/": return x return x.replace("$", '') if discrete else x tbl2 = head([ok(h.name) for h in tbl1.headers], table0('copy of ' + tbl1.source)) if keepSelections: for h in tbl1.headers: tbl2.headers[h.col].selected = h.selected for cells in rows: body(cells, tbl2, True) return tbl2 @demo def tabled(f='data/weather2.csv'): t = table(f) for x in t.indep: rprintln(x) rprintln(t) @demo def tableCopied(f='data/weather2.csv'): t0 = table(f) t1 = clone(t0) rprintln([t0.nums, t1.nums]); if __name__ == '__main__': eval(cmd())
{'content_hash': '5896483c7c2ca84870433c6ca686a900', 'timestamp': '', 'source': 'github', 'line_count': 159, 'max_line_length': 80, 'avg_line_length': 25.29559748427673, 'alnum_prop': 0.54425658876181, 'repo_name': 'bellwethers-in-se/defects', 'id': 'c9e459c9b2be4c23d450541855589a245929299f', 'size': '4022', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/old/table.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '163371'}, {'name': 'M', 'bytes': '74'}, {'name': 'Matlab', 'bytes': '18988'}, {'name': 'Python', 'bytes': '756332'}, {'name': 'Roff', 'bytes': '423525'}, {'name': 'Shell', 'bytes': '1549'}]}
set -e export BQ_PROJECT=$1 # project export BQ_DATASET=$2 # dataset ################################################ ## ADD IN OTHER CODES NOT ALREADY CAPTURED ################################################# echo "CONDITION_OCCURRENCE - add other source concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER (order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as id , -1 , 'CONDITION' , 0 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT b.concept_name, b.vocabulary_id, b.concept_id, b.concept_code, count(DISTINCT a.person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.condition_occurrence\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.condition_source_concept_id = b.concept_id LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` c on a.condition_concept_id = c.concept_id WHERE a.condition_source_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE is_standard = 0 and concept_id is not null ) and a.condition_source_concept_id != 0 and a.condition_source_concept_id is not null and b.concept_id is not null and b.vocabulary_id not in ('PPI', 'SNOMED') and (b.domain_id LIKE 'Condition%' OR c.domain_id = 'Condition') GROUP BY 1,2,3,4 ) x" echo "CONDITION_OCCURRENCE - add other standard concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as ID , -1 , 'CONDITION' , 1 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT concept_name, vocabulary_id, concept_id, concept_code, count(DISTINCT person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.condition_occurrence\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.condition_concept_id = b.concept_id WHERE standard_concept = 'S' and domain_id = 'Condition' and condition_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'CONDITION' and is_standard = 1 and concept_id is not null ) GROUP BY 1,2,3,4 ) x" echo "PROCEDURE_OCCURRENCE - add other source concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER (order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as id , -1 , 'PROCEDURE' , 0 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT b.concept_name, b.vocabulary_id, b.concept_id, b.concept_code, count(DISTINCT a.person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.procedure_occurrence\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.procedure_source_concept_id = b.concept_id LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` c on a.procedure_concept_id = c.concept_id WHERE a.procedure_source_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE is_standard = 0 and concept_id is not null ) and a.procedure_source_concept_id != 0 and a.procedure_source_concept_id is not null and b.concept_id is not null and b.vocabulary_id not in ('PPI', 'SNOMED') and (b.domain_id = 'Procedure' OR c.domain_id = 'Procedure') GROUP BY 1,2,3,4 ) x" echo "PROCEDURE_OCCURRENCE - add other standard concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as ID , -1 , 'PROCEDURE',1 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT concept_name, vocabulary_id, concept_id, concept_code, count(DISTINCT person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.procedure_occurrence\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.procedure_concept_id = b.concept_id WHERE standard_concept = 'S' and domain_id = 'Procedure' and procedure_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'PROCEDURE' and is_standard = 1 and concept_id is not null ) GROUP BY 1,2,3,4 ) x" echo "MEASUREMENT - add other standard concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as ID , -1 , 'MEASUREMENT' , 1 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT concept_name, vocabulary_id, concept_id, concept_code, count(DISTINCT person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.measurement\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.measurement_concept_id = b.concept_id WHERE standard_concept = 'S' and domain_id = 'Measurement' and vocabulary_id not in ('PPI') and measurement_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'MEASUREMENT' and is_standard = 1 and concept_id is not null ) GROUP BY 1,2,3,4 ) x" echo "MEASUREMENT - add other source concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as ID , -1 , 'MEASUREMENT' , 0 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT concept_name, vocabulary_id, concept_id, concept_code, count(DISTINCT person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.measurement\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.measurement_concept_id = b.concept_id WHERE standard_concept = 'S' and domain_id = 'Measurement' and vocabulary_id = 'CPT4' and measurement_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'MEASUREMENT' and is_standard = 0 and concept_id is not null ) GROUP BY 1,2,3,4 ) x" echo "OBSERVATION - add other source concepts" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as ID , -1 , 'OBSERVATION' , 0 , vocabulary_id , concept_id , concept_code , concept_name , 0 , cnt , cnt , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT concept_name, vocabulary_id, concept_id, concept_code, count(DISTINCT person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.observation\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.observation_concept_id = b.concept_id WHERE standard_concept = 'S' and domain_id = 'Observation' and vocabulary_id = 'CPT4' and observation_concept_id NOT IN ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'OBSERVATION' and is_standard = 0 and concept_id is not null ) GROUP BY 1,2,3,4 ) x" echo "DRUG_EXPOSURE - add other standard concepts not in hierarchies" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` ( id ,parent_id ,domain_id ,is_standard ,type ,concept_id ,code ,name ,rollup_count ,item_count ,est_count ,is_group ,is_selectable ,has_attribute ,has_hierarchy ,path ) SELECT ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as ID , -1 , 'DRUG' , 1 , vocabulary_id , concept_id , concept_code , concept_name , 0 , 0 , 0 , 0 , 1 , 0 , 0 , CAST(ROW_NUMBER() OVER(order by vocabulary_id,concept_name) + (SELECT MAX(id) FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\`) as STRING) as path FROM ( SELECT concept_name, vocabulary_id, concept_id, concept_code FROM \`$BQ_PROJECT.$BQ_DATASET.drug_exposure\` a LEFT JOIN \`$BQ_PROJECT.$BQ_DATASET.concept\` b on a.drug_concept_id = b.concept_id WHERE standard_concept = 'S' and domain_id = 'Drug' and drug_concept_id NOT IN ( SELECT descendant_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria_ancestor\` WHERE ancestor_id in ( SELECT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'DRUG' and is_standard = 1 ) ) GROUP BY 1,2,3,4 ) x" echo "CB_CRITERIA_ANCESTOR - Drugs - add vocabularies that are non-hierarchy" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "INSERT INTO \`$BQ_PROJECT.$BQ_DATASET.cb_criteria_ancestor\` ( ancestor_id , descendant_id ) SELECT ancestor_concept_id , descendant_concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.concept_ancestor\` WHERE ancestor_concept_id in ( SELECT DISTINCT concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` WHERE domain_id = 'DRUG' and type in ('CVX', 'HCPCS', 'RxNorm Extension') and is_group = 0 and is_selectable = 1 ) and descendant_concept_id in ( SELECT DISTINCT drug_concept_id FROM \`$BQ_PROJECT.$BQ_DATASET.drug_exposure\` )" echo "DRUGS - generate counts for vocabularies that are non-hierarchy" bq --quiet --project_id="$BQ_PROJECT" query --batch --nouse_legacy_sql \ "update \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` x set x.rollup_count = 0 , x.item_count = y.cnt , x.est_count = y.cnt FROM ( SELECT b.ANCESTOR_CONCEPT_ID as concept_id, count(distinct a.person_id) cnt FROM \`$BQ_PROJECT.$BQ_DATASET.drug_exposure\` a JOIN ( SELECT * FROM \`$BQ_PROJECT.$BQ_DATASET.concept_ancestor\` x left JOIN \`$BQ_PROJECT.$BQ_DATASET.cb_criteria\` y on x.ANCESTOR_CONCEPT_ID = y.CONCEPT_ID WHERE type in ('CVX', 'HCPCS', 'RxNorm Extension') ) b on a.DRUG_CONCEPT_ID = b.DESCENDANT_CONCEPT_ID group by 1 ) y WHERE x.concept_id = y.concept_id and x.domain_id = 'DRUG' and x.type in ('CVX', 'HCPCS', 'RxNorm Extension')"
{'content_hash': '52082f32949dd954fb34a3615ecb8a31', 'timestamp': '', 'source': 'github', 'line_count': 514, 'max_line_length': 148, 'avg_line_length': 30.636186770428015, 'alnum_prop': 0.549946021464406, 'repo_name': 'all-of-us/workbench', 'id': 'f143d525eaf594371f6a1866df5c60693428dd0c', 'size': '15760', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'api/db-cdr/generate-cdr/build-cb-criteria-missing-codes.sh', 'mode': '33261', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '14709'}, {'name': 'Dockerfile', 'bytes': '1601'}, {'name': 'Groovy', 'bytes': '5004'}, {'name': 'HTML', 'bytes': '354263'}, {'name': 'Java', 'bytes': '4258561'}, {'name': 'JavaScript', 'bytes': '104985'}, {'name': 'Jupyter Notebook', 'bytes': '12135'}, {'name': 'Kotlin', 'bytes': '76275'}, {'name': 'Mustache', 'bytes': '126650'}, {'name': 'Python', 'bytes': '52410'}, {'name': 'R', 'bytes': '1157'}, {'name': 'Ruby', 'bytes': '237944'}, {'name': 'Shell', 'bytes': '507090'}, {'name': 'TypeScript', 'bytes': '3656309'}, {'name': 'wdl', 'bytes': '31820'}]}
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- From: file:/C:/Users/Office/AndroidstudioProjects/ShoppingList_Drawer/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/values-ms-rMY/values-ms-rMY.xml --> <eat-comment/> <string msgid="4600421777120114993" name="abc_action_bar_home_description">"Navigasi skrin utama"</string> <string msgid="1594238315039666878" name="abc_action_bar_up_description">"Navigasi ke atas"</string> <string msgid="3588849162933574182" name="abc_action_menu_overflow_description">"Lagi pilihan"</string> <string msgid="4076576682505996667" name="abc_action_mode_done">"Selesai"</string> <string msgid="7468859129482906941" name="abc_activity_chooser_view_see_all">"Lihat semua"</string> <string msgid="2031811694353399454" name="abc_activitychooserview_choose_application">"Pilih apl"</string> <string msgid="3691816814315814921" name="abc_searchview_description_clear">"Kosongkan pertanyaan"</string> <string msgid="2550479030709304392" name="abc_searchview_description_query">"Pertanyaan carian"</string> <string msgid="8264924765203268293" name="abc_searchview_description_search">"Cari"</string> <string msgid="8928215447528550784" name="abc_searchview_description_submit">"Serah pertanyaan"</string> <string msgid="893419373245838918" name="abc_searchview_description_voice">"Carian suara"</string> <string msgid="3421042268587513524" name="abc_shareactionprovider_share_with">"Kongsi dengan"</string> <string msgid="7165123711973476752" name="abc_shareactionprovider_share_with_application">"Kongsi dengan %s"</string> </resources>
{'content_hash': '169ef2bd327ed5f9b7e44ba85d532838', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 195, 'avg_line_length': 92.38888888888889, 'alnum_prop': 0.7624774503908599, 'repo_name': 'chinnuabhi/ShoppingList', 'id': '3231aa5cac489fce7362c9b00b01f1c9d32db4ba', 'size': '1663', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/build/intermediates/res/release/values-ms-rMY/values-ms-rMY.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '3223'}, {'name': 'HTML', 'bytes': '203079'}, {'name': 'Java', 'bytes': '2354773'}]}
The purpose of this document to collect the supported keywords with examples. # Supported keywords - [from](#from) - [run](#run) - [cmd](#cmd) - [labels](#labels) - [expose](#expose) - [env](#env) - [add](#add) - [copy](#copy) - [entrypoint](#entrypoint) - [volumes](#volumes) - [user](#user) - [working_dir](#working_dir) - [args](#args) - [onbuild](#onbuild) - [shell](#shell) - [comment](#comment) # Keyword descriptions and examples ## FROM ### Keyword schema ```json "from": { "type": "object", "properties": { "baseImage": { "type": "string" }, "alias": { "type": "string" } }, "required": ["baseImage"] } ``` #### Properties For multi-stage build we are able to use multiple form statement. Please see the multi-stage example. ##### Required properties - baseImage: The name of the base image, what is the starting-point of this image. ##### Optional properties - alias: The reference name of this build step. We are able to use the multi-stage builds. #### Example usages ##### Simple usage ###### Input ```json { "from": { "baseImage": "nginx:latest" } } ``` ###### Output ```javascript FROM nginx:latest ``` ##### Multi-stage usage ###### Input ```json { "from_1": { "baseImage": "nginx:latest", "alias": "http" } } ``` ###### Output ```javascript FROM nginx:latest AS http ``` ## RUN ### Keyword schema ```json "run" : { "oneOf": [ {"type": "string"}, {"type": "array", "items": {"type": "string"}} ] } ``` #### Properties ##### Required properties RUN has two forms - with one command: In this case the command is a runnable shell command. (Shell form) - with array, which contains a executable and the params of the executable. (Exec form) #### Example usages ##### Shell form ###### Input ```json { "from": { "baseImage": "nginx:latest" }, "run": "test_runnable.sh" } ``` ###### Output ```javascript FROM nginx:latest RUN [ "test_runnable.sh" ] ``` ##### Exec form ###### Input ```json { "from": { "baseImage": "nginx:latest" }, "run": ["test_runnable.sh", "param1", "param2"] } ``` ###### Output ```javascript FROM nginx:latest RUN [ "test_runnable.sh", "param1", "param2" ] ``` ### CMD ### Keyword schema ```json "cmd" : { "oneOf": [ {"type": "string"}, {"type": "array", "items": {"type": "string"}} ] } ``` #### Properties ##### Required properties CMD has two forms - with one command: In this case the command is a runnable shell command. (Shell form) - with array, which contains a executable and the params of the executable. (Exec form) #### Example usages ##### Shell form ###### Input ```json { "from": { "baseImage": "nginx:latest" }, "cmd": "test.cmd" } ``` ###### Output ```javascript FROM nginx:latest CMD [ "test.cmd"] ``` ##### Exec form ###### Input ```json { "from": { "baseImage": "nginx:latest" }, "cmd": ["test.cmd", "-b"] } ``` ###### Output ```javascript FROM nginx:latest CMD [ "test.cmd", "-b" ] ``` ### LABELS ### Keyword schema ```json "labels": { "oneOf": [ { "type": "object", "patternProperties": { ".+": { "type": "string" } }, "additionalProperties": false }, {"type": "array", "items": {"type": "string"}, "uniqueItems": true} ] } ``` #### Properties ##### Required properties Labels has two forms - Object: In this case the labels keyword is plain javascript object. The name of the label is the name of the attribute. - Array: In this case the labels keyword is array. The name of the label is the key of the element inside the array. #### Example usages ##### Object form ###### Input ```javascript const labels = { key1: 'value1', key2: 'value2', }; { "from": { "baseImage": "nginx:latest" }, "labels": labels } ``` ###### Output ```javascript FROM nginx:latest LABEL key1=value1 LABEL key2=value2 ``` ##### Array form ###### Input ```javascript const labels = []; labels.key1 = 'value1'; labels.key2 = 'value2'; { "from": { "baseImage": "nginx:latest" }, "labels": labels } ``` ###### Output ```javascript FROM nginx:latest LABEL key1=value1 LABEL key2=value2 ``` ### EXPOSE ### Keyword schema ```json "expose": { "type": "array", "items": { "type": ["string", "number"], "format": "expose" }, "uniqueItems": true } ``` #### Properties ##### Required properties - A array which contains the list of exposed ports. #### Example usages ###### Input ```javascript const expose = ['80', '22', '443']; { from: { baseImage: 'nginx:latest' }, "expose": expose} ``` ###### Output ```javascript FROM nginx:latest EXPOSE 80 EXPOSE 22 EXPOSE 443 ``` ### ENV ### Keyword schema ```json "env": { "oneOf": [ { "type": "object", "patternProperties": { ".+": { "type": ["string", "number", "null"] } }, "additionalProperties": false }, {"type": "array", "items": {"type": "string"}, "uniqueItems": true} ] } ``` #### Properties ##### Required properties ENV has two forms - Object: In this case the ENV keyword is plain javascript object. The name of the variable is the name of the attribute. - Array: In this case the ENV keyword is array. The name of variable is the key of the element inside the array. #### Example usages ##### Object form ###### Input ```javascript const env = { key1: 'value1', key2: 'value2', }; { "from": { "baseImage": "nginx:latest" }, "env": env } ``` ###### Output ```javascript FROM nginx:latest ENV key1=value1 ENV key2=value2 ``` ##### Array form ###### Input ```javascript const env = []; env.key1 = 'value1'; env.key2 = 'value2'; { "from": { "baseImage": "nginx:latest" }, "env": env } ``` ###### Output ```javascript FROM nginx:latest ENV key1=value1 ENV key2=value2 ``` ### ADD ### Keyword schema ```json "add": { "oneOf": [ {"type": "array", "items": {"type": "string"}}, {"type": "object"} ] } ``` #### Properties ##### Required properties ADD has two forms - Object: In this case the ADD keyword is plain javascript object. The source of the added file is the name of the attribute. The destination is the value of the attribute. - Array: In this case the ADD keyword is array. The source of the added file is the key of the item. The destination is the value of the item. #### Example usages ##### Object form ###### Input ```javascript const add = {}; add.key1 = 'value1'; add.key2 = 'value2'; { "from": { "baseImage": "nginx:latest" }, "add": add } ``` ###### Output ```javascript FROM nginx:latest ADD key1 value1 ADD key2 value2 ``` ##### Array form ###### Input ```javascript const add = []; add.key1 = 'value1'; add.key2 = 'value2'; { "from": { "baseImage": "nginx:latest" }, "add": add } ``` ###### Output ```javascript FROM nginx:latest ADD key1 value1 ADD key2 value2 ``` ### COPY ### Keyword schema ```json "copy": { "oneOf": [ {"type": "array", "items": {"type": "string"}}, {"type": "object"} ] } ``` #### Properties ##### Required properties COPY has two forms - Object: In this case the COPY keyword is plain javascript object. The source of the copied file is the name of the attribute. The destination is the value of the attribute. - Array: In this case COPY keyword is array. The source of the copied file is the key of the item. The destination is the value of the item. For multi-stage builds we can use a --from switch with a copy keyword. Please see the multi-stage example below. #### Example usages ##### Object form ###### Input ```javascript const copy = {}; copy.key1 = 'value1'; copy.key2 = 'value2'; { "from": { "baseImage": "nginx:latest" }, "copy": copy } ``` ###### Output ```javascript FROM nginx:latest COPY key1 value1 COPY key2 value2 ``` ##### Array form ###### Input ```javascript const copy = []; copy.key1 = 'value1'; copy.key2 = 'value2'; { "from": { "baseImage": "nginx:latest" }, "copy": copy } ``` ###### Output ```javascript FROM nginx:latest COPY key1 value1 COPY key2 value2 ``` ##### Multi-stage ###### Input ```javascript const copy = {}; copy.key1 = 'value1'; copy.key2 = 'value2'; copy.from = 0; { "from": { "baseImage": "nginx:latest" }, "copy": copy } ``` ###### Output ```javascript FROM nginx:latest COPY --from=0 key1 value1 COPY --from=0 key2 value2 ``` ### ENTRYPOINT ### Keyword schema ```json "entrypoint": { "oneOf": [ {"type": "array", "items": {"type": "string"}}, {"type": "object"} ] } ``` #### Properties ##### Required properties ENTRYPOINT has two forms - Object: In this case the ENTRYPOINT is a single string. This string is a name of a executable shell script. - Array: In this case COPY ENTRYPOINT is array. This array contains a executable shell script with parameters of the script. #### Example usages ##### Object form ###### Input ```javascript { "from": { "baseImage": "nginx:latest" }, "entrypoint": "test_runnable.sh" } ``` ###### Output ```javascript FROM nginx:latest ENTRYPOINT [ "test_runnable.sh" ] ``` ##### Array form ###### Input ```javascript const entrypoint = ['test_runnable.sh', 'param1', 'param2']; { "from": { "baseImage": "nginx:latest" }, "entrypoint": entrypoint } ``` ###### Output ```javascript FROM nginx:latest ENTRYPOINT [ "test_runnable.sh", "param1", "param2" ] ``` ### VOLUMES ### Keyword schema ```json "volumes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } ``` #### Properties ##### Required properties Volumes is array, which contains the path of the volumes. #### Example usages ###### Input ```javascript const volumes = ['/home/app/1', '/home/app/2']; { "from": { "baseImage": "nginx:latest" }, "volumes": volumes } ``` ###### Output ```javascript FROM nginx:latest VOLUME /home/app/1 VOLUME /home/app/2 ``` ### USER ### Keyword schema ```json "user": { "type": "string" } ``` #### Properties ##### Required properties - The name of the user, which is a string. #### Example usages ###### Input ```javascript { from: { baseImage: 'nginx:latest' }, user: 'username' } ``` ###### Output ```javascript FROM nginx:latest USER username ``` ### WORKING_DIR ### Keyword schema ```json "working_dir": { "type": "string" } ``` #### Properties ##### Required properties - The full path of the working directory. #### Example usages ###### Input ```javascript { from: { baseImage: 'nginx:latest' }, working_dir: '/home/app' } ``` ###### Output ```javascript FROM nginx:latest WORKDIR /home/app ``` ### ARGS ### Keyword schema ```json "args": { "oneOf": [ {"type": "array", "items": {"type": "string"}, "uniqueItems": true} ] } ``` #### Properties ##### Required properties ARGS is array, which contains the values of the required arguments. #### Example usages ###### Input ```javascript { "from": { "baseImage": "nginx:latest" }, "args": ['arg1', 'arg2'] } ``` ###### Output ```javascript FROM nginx:latest ARG arg1 ARG arg2 ``` ### STOPSIGNAL ### Keyword schema ```json "stopsignal": { "type": "string" } ``` #### Properties ##### Required properties - The full path of the working directory. #### Example usages ###### Input ```javascript { from: { baseImage: 'nginx:latest' }, stopsignal: 'signal' } ``` ###### Output ```javascript FROM nginx:latest STOPSIGNAL signal ``` ### SHELL ### Keyword schema ```json "shell": { "type": "array", "items": {"type": "string"}, "uniqueItems": true } ``` #### Properties ##### Required properties SHELL is array, which contains the executable and params of the shell command. #### Example usages ###### Input ```javascript { "from": { "baseImage": "nginx:latest" }, "shell": ['executable', 'arg1', 'arg2'] } ``` ###### Output ```javascript FROM nginx:latest SHELL ["executable", "arg1", "arg2"] ``` ### COMMENT ### Keyword schema ```json "comment" : { "type": "string" } ``` We are able to user multiple comment, for this we have to use the comment keyword with a suffix. Please see the example below. #### Properties ##### Required properties COMMENT is a string. #### Example usages ##### Single comment ###### Input ```javascript { "from": { "baseImage": "nginx:latest" }, "comment": "single comment" } ``` ###### Output ```javascript FROM nginx:latest # single comment ``` ##### Multiple comment ###### Input ```javascript { "from": { "baseImage": "nginx:latest" }, "comment_1": "first comment","comment_2": "second comment" } ``` ###### Output ```javascript FROM nginx:latest # first comment # second comment ```
{'content_hash': 'babb78701573f673c2a4c433f922e196', 'timestamp': '', 'source': 'github', 'line_count': 663, 'max_line_length': 175, 'avg_line_length': 19.07843137254902, 'alnum_prop': 0.5974385326903312, 'repo_name': 'tudvari/dockerfile-generator', 'id': '675f0b99b247cc82d070509688284aa793e63a54', 'size': '12683', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'References.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '57865'}]}
.class public Lcom/google/android/collect/Sets; .super Ljava/lang/Object; .source "Sets.java" # direct methods .method public constructor <init>()V .locals 0 invoke-direct {p0}, Ljava/lang/Object;-><init>()V return-void .end method .method public static newArraySet()Landroid/util/ArraySet; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "<E:", "Ljava/lang/Object;", ">()", "Landroid/util/ArraySet", "<TE;>;" } .end annotation new-instance v0, Landroid/util/ArraySet; invoke-direct {v0}, Landroid/util/ArraySet;-><init>()V return-object v0 .end method .method public static varargs newArraySet([Ljava/lang/Object;)Landroid/util/ArraySet; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "<E:", "Ljava/lang/Object;", ">([TE;)", "Landroid/util/ArraySet", "<TE;>;" } .end annotation array-length v2, p0 mul-int/lit8 v2, v2, 0x4 div-int/lit8 v2, v2, 0x3 add-int/lit8 v0, v2, 0x1 new-instance v1, Landroid/util/ArraySet; invoke-direct {v1, v0}, Landroid/util/ArraySet;-><init>(I)V invoke-static {v1, p0}, Ljava/util/Collections;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z return-object v1 .end method .method public static newHashSet()Ljava/util/HashSet; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "<K:", "Ljava/lang/Object;", ">()", "Ljava/util/HashSet", "<TK;>;" } .end annotation new-instance v0, Ljava/util/HashSet; invoke-direct {v0}, Ljava/util/HashSet;-><init>()V return-object v0 .end method .method public static varargs newHashSet([Ljava/lang/Object;)Ljava/util/HashSet; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "<E:", "Ljava/lang/Object;", ">([TE;)", "Ljava/util/HashSet", "<TE;>;" } .end annotation array-length v2, p0 mul-int/lit8 v2, v2, 0x4 div-int/lit8 v2, v2, 0x3 add-int/lit8 v0, v2, 0x1 new-instance v1, Ljava/util/HashSet; invoke-direct {v1, v0}, Ljava/util/HashSet;-><init>(I)V invoke-static {v1, p0}, Ljava/util/Collections;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z return-object v1 .end method .method public static newSortedSet()Ljava/util/SortedSet; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "<E:", "Ljava/lang/Object;", ">()", "Ljava/util/SortedSet", "<TE;>;" } .end annotation new-instance v0, Ljava/util/TreeSet; invoke-direct {v0}, Ljava/util/TreeSet;-><init>()V return-object v0 .end method .method public static varargs newSortedSet([Ljava/lang/Object;)Ljava/util/SortedSet; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "<E:", "Ljava/lang/Object;", ">([TE;)", "Ljava/util/SortedSet", "<TE;>;" } .end annotation new-instance v0, Ljava/util/TreeSet; invoke-direct {v0}, Ljava/util/TreeSet;-><init>()V invoke-static {v0, p0}, Ljava/util/Collections;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z return-object v0 .end method
{'content_hash': '7f9c0d3b582fe4ea014789513b1501fc', 'timestamp': '', 'source': 'github', 'line_count': 149, 'max_line_length': 103, 'avg_line_length': 23.59731543624161, 'alnum_prop': 0.5839021615472128, 'repo_name': 'BatMan-Rom/ModdedFiles', 'id': '376484145f2eee8a26ed62bb9b4dbec9b62e30f4', 'size': '3516', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'framework.jar.out/smali_classes3/com/google/android/collect/Sets.smali', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'GLSL', 'bytes': '15069'}, {'name': 'HTML', 'bytes': '139176'}, {'name': 'Smali', 'bytes': '541934400'}]}
/** * The external dependencies. */ import React from 'react'; import PropTypes from 'prop-types'; import { compose, withHandlers, branch, renderComponent, setStatic } from 'recompose'; /** * The internal dependencies. */ import Field from 'fields/components/field'; import NoOptions from 'fields/components/no-options'; import withStore from 'fields/decorators/with-store'; import withSetup from 'fields/decorators/with-setup'; import { TYPE_RADIO } from 'fields/constants'; /** * Render a radio input field. * * @param {Object} props * @param {String} props.name * @param {Object} props.field * @param {Function} props.handleChange * @param {Function} props.isChecked * @return {React.Element} */ export const RadioField = ({ name, field, handleChange, isChecked }) => { return <Field field={field}> <ul className="carbon-radio-list"> { field.options.map((option, index) => ( <li key={index}> <label> <input type="radio" name={name} value={option.value} checked={isChecked(option)} disabled={!field.ui.is_visible} onChange={handleChange(option)} {...field.attributes} /> {option.name} </label> </li> )) } </ul> </Field>; } /** * Validate the props. * * @type {Object} */ RadioField.propTypes = { name: PropTypes.string, field: PropTypes.shape({ attributes: PropTypes.object, options: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), })), }), handleChange: PropTypes.func, }; /** * The enhancer. * * @type {Function} */ export const enhance = compose( /** * Connect to the Redux store. */ withStore(), /** * Render "No-Options" component when the field doesn't have options. */ branch( /** * Test to see if the "No-Options" should be rendered. */ ({ field: { options } }) => options && options.length, /** * Render the actual field. */ compose( /** * Attach the setup hooks. */ withSetup(), /** * Pass some handlers to the component. */ withHandlers({ handleChange: ({ field, setFieldValue }) => ({ value }) => () => setFieldValue(field.id, value), isChecked: ({ field }) => option => option.value === field.value, }) ), /** * Render the empty component. */ renderComponent(NoOptions) ) ); export default setStatic('type', [ TYPE_RADIO, ])(enhance(RadioField));
{'content_hash': '2fdb62a75d1df625e5c40626f47fe5a4', 'timestamp': '', 'source': 'github', 'line_count': 127, 'max_line_length': 100, 'avg_line_length': 20.236220472440944, 'alnum_prop': 0.6175097276264592, 'repo_name': 'ArtFever911/statrer-kit', 'id': 'cbd4a4754229bb97eef6eefddbf6ecf6404064af', 'size': '2570', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'dist/lib/carbon-fields/assets/js/fields/components/radio/index.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '334467'}, {'name': 'HTML', 'bytes': '4948'}, {'name': 'JavaScript', 'bytes': '185692'}]}