text
stringlengths
2
1.04M
meta
dict
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Css · Bootstrap</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="assets/css/bootstrap.css" rel="stylesheet"> <link href="assets/css/docs.css" rel="stylesheet"> <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> <link rel="shortcut icon" href="assets/ico/favicon.png"> </head> <body data-spy="scroll" data-target=".bs-docs-sidebar"> <!-- Navbar ================================================== --> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="brand" href="./index.html">Bootstrap</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class=""> <a href="./index.html">Home</a> </li> <li class=""> <a href="./getting-started.html">Get started</a> </li> <li class="active"> <a href="./css.html">Core CSS</a> </li> <li class=""> <a href="./components.html">Components</a> </li> <li class=""> <a href="./javascript.html">JavaScript</a> </li> <li class=""> <a href="./customize.html">Customize</a> </li> <li class=""> <a href="./gallery.html">Gallery</a> </li> </ul> </div> </div> </div> <!-- Subhead ================================================== --> <header class="bs-docs-jumbotron subhead"> <div class="container"> <h1>CSS</h1> <p class="lead">Fundamental HTML elements styled and enhanced with extensible classes.</p> </div> </header> <div class="container"> <!-- Docs nav ================================================== --> <div class="row"> <div class="span3 bs-docs-sidebar"> <ul class="nav nav-list bs-docs-sidenav"> <li><a href="#global"><i class="glyphicon-chevron-right"></i> Global styles</a></li> <li><a href="#gridSystem"><i class="glyphicon-chevron-right"></i> Grid system</a></li> <li><a href="#typography"><i class="glyphicon-chevron-right"></i> Typography</a></li> <li><a href="#code"><i class="glyphicon-chevron-right"></i> Code</a></li> <li><a href="#tables"><i class="glyphicon-chevron-right"></i> Tables</a></li> <li><a href="#forms"><i class="glyphicon-chevron-right"></i> Forms</a></li> <li><a href="#buttons"><i class="glyphicon-chevron-right"></i> Buttons</a></li> <li><a href="#images"><i class="glyphicon-chevron-right"></i> Images</a></li> <li><a href="#icons"><i class="glyphicon-chevron-right"></i> Icons by Glyphicons</a></li> <li><a href="#responsive"><i class="glyphicon-chevron-right"></i> Responsive design</a></li> </ul> </div> <div class="span9"> <!-- Global Bootstrap settings ================================================== --> <section id="global"> <div class="page-header"> <h1>Global settings</h1> </div> <h3>Requires HTML5 doctype</h3> <p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p> <pre class="prettyprint linenums"> &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; ... &lt;/html&gt; </pre> <h3>Typography and links</h3> <p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p> <ul> <li>Remove <code>margin</code> on the body</li> <li>Set <code>background-color: white;</code> on the <code>body</code></li> <li>Use the <code>@font-family-base</code>, <code>@font-size-base</code>, and <code>@line-height-base</code> attributes as our typographic base</li> <li>Set the global link color via <code>@link-color</code> and apply link underlines only on <code>:hover</code></li> </ul> <p>These styles can be found within <strong>scaffolding.less</strong>.</p> <h3>Normalize reset</h3> <p>For improved cross-browser rendering, we use <a href="http://necolas.github.com/normalize.css/" target="_blank">Normalize</a>, a project by <a href="http://twitter.com/necolas" target="_blank">Nicolas Gallagher</a> and <a href="http://twitter.com/jon_neal" target="_blank">Jonathan Neal</a>.</p> </section> <!-- Grid system ================================================== --> <section id="gridSystem"> <div class="page-header"> <h1>Grid system</h1> </div> <h2>Live grid example</h2> <p>The default Bootstrap grid system utilizes <strong>12 columns</strong>, making for a 940px wide container without <a href="./scaffolding.html#responsive">responsive features</a> enabled. With the responsive CSS file added, the grid adapts to be 724px and 1170px wide depending on your viewport. Below 767px viewports, the columns become fluid and stack vertically.</p> <div class="bs-docs-grid"> <div class="row show-grid"> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> <div class="span1">1</div> </div> <div class="row show-grid"> <div class="span4">4</div> <div class="span4">4</div> <div class="span4">4</div> </div> <div class="row show-grid"> <div class="span6">6</div> <div class="span6">6</div> </div> <div class="row show-grid"> <div class="span12">12</div> </div> </div> <h3>Basic grid HTML</h3> <p>For a simple two column layout, create a <code>.row</code> and add the appropriate number of <code>.span*</code> columns. As this is a 12-column grid, each <code>.span*</code> spans a number of those 12 columns, and should always add up to 12 for each row (or the number of columns in the parent).</p> <pre class="prettyprint linenums"> &lt;div class="row"&gt; &lt;div class="span4"&gt;...&lt;/div&gt; &lt;div class="span8"&gt;...&lt;/div&gt; &lt;/div&gt; </pre> <p>Given this example, we have <code>.span4</code> and <code>.span8</code>, making for 12 total columns and a complete row.</p> <h2>Offsetting columns</h2> <p>Move columns to the right using <code>.offset*</code> classes. Each class increases the left margin of a column by a whole column. For example, <code>.offset4</code> moves <code>.span4</code> over four columns.</p> <div class="bs-docs-grid"> <div class="row show-grid"> <div class="span4">4</div> <div class="span4 offset4">4 offset 4</div> </div><!-- /row --> <div class="row show-grid"> <div class="span3 offset3">3 offset 3</div> <div class="span3 offset3">3 offset 3</div> </div><!-- /row --> <div class="row show-grid"> <div class="span6 offset6">6 offset 6</div> </div><!-- /row --> </div> <pre class="prettyprint linenums"> &lt;div class="row"&gt; &lt;div class="span4"&gt;...&lt;/div&gt; &lt;div class="span4 offset4"&gt;...&lt;/div&gt; &lt;/div&gt; </pre> <h2>Nesting columns</h2> <p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p> <div class="row show-grid"> <div class="span9"> Level 1: 9 columns <div class="row show-grid"> <div class="span6"> Level 2: 6 columns </div> <div class="span6"> Level 2: 6 columns </div> </div> </div> </div> <pre class="prettyprint linenums"> &lt;div class="row"&gt; &lt;div class="span9"&gt; Level 1: 9 columns &lt;div class="row"&gt; &lt;div class="span6"&gt;Level 2: 6 columns&lt;/div&gt; &lt;div class="span3"&gt;Level 2: 6 columns&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </pre> </section> <!-- Typography ================================================== --> <section id="typography"> <div class="page-header"> <h1>Typography</h1> </div> <h2 id="headings">Headings</h2> <p>All HTML headings, <code>&lt;h1&gt;</code> through <code>&lt;h6&gt;</code> are available.</p> <div class="bs-docs-example"> <h1>h1. Heading 1</h1> <h2>h2. Heading 2</h2> <h3>h3. Heading 3</h3> <h4>h4. Heading 4</h4> <h5>h5. Heading 5</h5> <h6>h6. Heading 6</h6> </div> <h2 id="body-copy">Body copy</h2> <p>Bootstrap's global default <code>font-size</code> is <strong>14px</strong>, with a <code>line-height</code> of <strong>20px</strong>. This is applied to the <code>&lt;body&gt;</code> and all paragraphs. In addition, <code>&lt;p&gt;</code> (paragraphs) receive a bottom margin of half their line-height (10px by default).</p> <div class="bs-docs-example"> <p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.</p> <p>Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.</p> <p>Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p> </div> <pre class="prettyprint">&lt;p&gt;...&lt;/p&gt;</pre> <h3>Lead body copy</h3> <p>Make a paragraph stand out by adding <code>.lead</code>.</p> <div class="bs-docs-example"> <p class="lead">Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.</p> </div> <pre class="prettyprint">&lt;p class="lead"&gt;...&lt;/p&gt;</pre> <h3>Built with Less</h3> <p>The typographic scale is based on two LESS variables in <strong>variables.less</strong>: <code>@font-size-base</code> and <code>@line-height-base</code>. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.</p> <hr class="bs-docs-separator"> <h2 id="emphasis">Emphasis</h2> <p>Make use of HTML's default emphasis tags with lightweight styles.</p> <h3><code>&lt;small&gt;</code></h3> <p>For de-emphasizing inline or blocks of text, <small>use the small tag.</small></p> <div class="bs-docs-example"> <p><small>This line of text is meant to be treated as fine print.</small></p> </div> <pre class="prettyprint"> &lt;p&gt; &lt;small&gt;This line of text is meant to be treated as fine print.&lt;/small&gt; &lt;/p&gt; </pre> <h3>Bold</h3> <p>For emphasizing a snippet of text with a heavier font-weight.</p> <div class="bs-docs-example"> <p>The following snippet of text is <strong>rendered as bold text</strong>.</p> </div> <pre class="prettyprint">&lt;strong&gt;rendered as bold text&lt;/strong&gt;</pre> <h3>Italics</h3> <p>For emphasizing a snippet of text with italics.</p> <div class="bs-docs-example"> <p>The following snippet of text is <em>rendered as italicized text</em>.</p> </div> <pre class="prettyprint">&lt;em&gt;rendered as italicized text&lt;/em&gt;</pre> <p>Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p> <h3>Emphasis classes</h3> <p>Convey meaning through color with a handful of emphasis utility classes.</p> <div class="bs-docs-example"> <p class="muted">Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.</p> <p class="text-warning">Etiam porta sem malesuada magna mollis euismod.</p> <p class="text-error">Donec ullamcorper nulla non metus auctor fringilla.</p> <p class="text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p> </div> <pre class="prettyprint linenums"> &lt;p class="muted"&gt;Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.&lt;/p&gt; &lt;p class="text-warning"&gt;Etiam porta sem malesuada magna mollis euismod.&lt;/p&gt; &lt;p class="text-error"&gt;Donec ullamcorper nulla non metus auctor fringilla.&lt;/p&gt; &lt;p class="text-success"&gt;Duis mollis, est non commodo luctus, nisi erat porttitor ligula.&lt;/p&gt; </pre> <hr class="bs-docs-separator"> <h2 id="abbreviations">Abbreviations</h2> <p>Stylized implementation of HTML's <code>&lt;abbr&gt;</code> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a <code>title</code> attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.</p> <h3><code>&lt;abbr&gt;</code></h3> <p>For expanded text on long hover of an abbreviation, include the <code>title</code> attribute.</p> <div class="bs-docs-example"> <p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p> </div> <pre class="prettyprint">&lt;abbr title="attribute"&gt;attr&lt;/abbr&gt;</pre> <h3><code>&lt;abbr class="initialism"&gt;</code></h3> <p>Add <code>.initialism</code> to an abbreviation for a slightly smaller font-size.</p> <div class="bs-docs-example"> <p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr> is the best thing since sliced bread.</p> </div> <pre class="prettyprint">&lt;abbr title="HyperText Markup Language" class="initialism"&gt;HTML&lt;/abbr&gt;</pre> <hr class="bs-docs-separator"> <h2 id="addresses">Addresses</h2> <p>Present contact information for the nearest ancestor or the entire body of work.</p> <h3><code>&lt;address&gt;</code></h3> <p>Preserve formatting by ending all lines with <code>&lt;br&gt;</code>.</p> <div class="bs-docs-example"> <address> <strong>Twitter, Inc.</strong><br> 795 Folsom Ave, Suite 600<br> San Francisco, CA 94107<br> <abbr title="Phone">P:</abbr> (123) 456-7890 </address> <address> <strong>Full Name</strong><br> <a href="mailto:#">first.last@example.com</a> </address> </div> <pre class="prettyprint linenums"> &lt;address&gt; &lt;strong&gt;Twitter, Inc.&lt;/strong&gt;&lt;br&gt; 795 Folsom Ave, Suite 600&lt;br&gt; San Francisco, CA 94107&lt;br&gt; &lt;abbr title="Phone"&gt;P:&lt;/abbr&gt; (123) 456-7890 &lt;/address&gt; &lt;address&gt; &lt;strong&gt;Full Name&lt;/strong&gt;&lt;br&gt; &lt;a href="mailto:#"&gt;first.last@example.com&lt;/a&gt; &lt;/address&gt; </pre> <hr class="bs-docs-separator"> <h2 id="blockquotes">Blockquotes</h2> <p>For quoting blocks of content from another source within your document.</p> <h3>Default blockquote</h3> <p>Wrap <code>&lt;blockquote&gt;</code> around any <abbr title="HyperText Markup Language">HTML</abbr> as the quote. For straight quotes we recommend a <code>&lt;p&gt;</code>.</p> <div class="bs-docs-example"> <blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> </blockquote> </div> <pre class="prettyprint linenums"> &lt;blockquote&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.&lt;/p&gt; &lt;/blockquote&gt; </pre> <h3>Blockquote options</h3> <p>Style and content changes for simple variations on a standard blockquote.</p> <h4>Naming a source</h4> <p>Add <code>&lt;small&gt;</code> tag for identifying the source. Wrap the name of the source work in <code>&lt;cite&gt;</code>.</p> <div class="bs-docs-example"> <blockquote> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> <small>Someone famous in <cite title="Source Title">Source Title</cite></small> </blockquote> </div> <pre class="prettyprint linenums"> &lt;blockquote&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.&lt;/p&gt; &lt;small&gt;Someone famous &lt;cite title="Source Title"&gt;Source Title&lt;/cite&gt;&lt;/small&gt; &lt;/blockquote&gt; </pre> <h4>Alternate displays</h4> <p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p> <div class="bs-docs-example" style="overflow: hidden;"> <blockquote class="pull-right"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> <small>Someone famous in <cite title="Source Title">Source Title</cite></small> </blockquote> </div> <pre class="prettyprint linenums"> &lt;blockquote class="pull-right"&gt; ... &lt;/blockquote&gt; </pre> <hr class="bs-docs-separator"> <!-- Lists --> <h2 id="lists">Lists</h2> <h3>Unordered</h3> <p>A list of items in which the order does <em>not</em> explicitly matter.</p> <div class="bs-docs-example"> <ul> <li>Lorem ipsum dolor sit amet</li> <li>Consectetur adipiscing elit</li> <li>Integer molestie lorem at massa</li> <li>Facilisis in pretium nisl aliquet</li> <li>Nulla volutpat aliquam velit <ul> <li>Phasellus iaculis neque</li> <li>Purus sodales ultricies</li> <li>Vestibulum laoreet porttitor sem</li> <li>Ac tristique libero volutpat at</li> </ul> </li> <li>Faucibus porta lacus fringilla vel</li> <li>Aenean sit amet erat nunc</li> <li>Eget porttitor lorem</li> </ul> </div> <pre class="prettyprint linenums"> &lt;ul&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; </pre> <h3>Ordered</h3> <p>A list of items in which the order <em>does</em> explicitly matter.</p> <div class="bs-docs-example"> <ol> <li>Lorem ipsum dolor sit amet</li> <li>Consectetur adipiscing elit</li> <li>Integer molestie lorem at massa</li> <li>Facilisis in pretium nisl aliquet</li> <li>Nulla volutpat aliquam velit</li> <li>Faucibus porta lacus fringilla vel</li> <li>Aenean sit amet erat nunc</li> <li>Eget porttitor lorem</li> </ol> </div> <pre class="prettyprint linenums"> &lt;ol&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ol&gt; </pre> <h3>Unstyled</h3> <p>Remove the default <code>list-style</code> and left padding on list items (immediate children only).</p> <div class="bs-docs-example"> <ul class="list-unstyled"> <li>Lorem ipsum dolor sit amet</li> <li>Consectetur adipiscing elit</li> <li>Integer molestie lorem at massa</li> <li>Facilisis in pretium nisl aliquet</li> <li>Nulla volutpat aliquam velit <ul> <li>Phasellus iaculis neque</li> <li>Purus sodales ultricies</li> <li>Vestibulum laoreet porttitor sem</li> <li>Ac tristique libero volutpat at</li> </ul> </li> <li>Faucibus porta lacus fringilla vel</li> <li>Aenean sit amet erat nunc</li> <li>Eget porttitor lorem</li> </ul> </div> <pre class="prettyprint linenums"> &lt;ul class="list-unstyled"&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; </pre> <h3>Inline</h3> <p>Place all list items on a single line with <code>inline-block</code> and some light padding.</p> <div class="bs-docs-example"> <ul class="list-inline"> <li>Lorem ipsum</li> <li>Phasellus iaculis</li> <li>Nulla volutpat</li> </ul> </div> <pre class="prettyprint linenums"> &lt;ul class="list-inline"&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; </pre> <h3>Description</h3> <p>A list of terms with their associated descriptions.</p> <div class="bs-docs-example"> <dl> <dt>Description lists</dt> <dd>A description list is perfect for defining terms.</dd> <dt>Euismod</dt> <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd> <dd>Donec id elit non mi porta gravida at eget metus.</dd> <dt>Malesuada porta</dt> <dd>Etiam porta sem malesuada magna mollis euismod.</dd> </dl> </div> <pre class="prettyprint linenums"> &lt;dl&gt; &lt;dt&gt;...&lt;/dt&gt; &lt;dd&gt;...&lt;/dd&gt; &lt;/dl&gt; </pre> <h4>Horizontal description</h4> <p>Make terms and descriptions in <code>&lt;dl&gt;</code> line up side-by-side.</p> <div class="bs-docs-example"> <dl class="dl-horizontal"> <dt>Description lists</dt> <dd>A description list is perfect for defining terms.</dd> <dt>Euismod</dt> <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd> <dd>Donec id elit non mi porta gravida at eget metus.</dd> <dt>Malesuada porta</dt> <dd>Etiam porta sem malesuada magna mollis euismod.</dd> <dt>Felis euismod semper eget lacinia</dt> <dd>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd> </dl> </div> <pre class="prettyprint linenums"> &lt;dl class="dl-horizontal"&gt; &lt;dt&gt;...&lt;/dt&gt; &lt;dd&gt;...&lt;/dd&gt; &lt;/dl&gt; </pre> <h5>Auto-truncating</h5> <p> Horizontal description lists will truncate terms that are too long to fit in the left column fix <code>text-overflow</code>. In narrower viewports, they will change to the default stacked layout. </p> </section> <!-- Code ================================================== --> <section id="code"> <div class="page-header"> <h1>Code</h1> </div> <h2>Inline</h2> <p>Wrap inline snippets of code with <code>&lt;code&gt;</code>.</p> <div class="bs-docs-example"> For example, <code>&lt;section&gt;</code> should be wrapped as inline. </div> <pre class="prettyprint linenums"> For example, &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; should be wrapped as inline. </pre> <h2>Basic block</h2> <p>Use <code>&lt;pre&gt;</code> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.</p> <div class="bs-docs-example"> <pre>&lt;p&gt;Sample text here...&lt;/p&gt;</pre> </div> <pre class="prettyprint linenums" style="margin-bottom: 9px;"> &lt;pre&gt; &amp;lt;p&amp;gt;Sample text here...&amp;lt;/p&amp;gt; &lt;/pre&gt; </pre> <p>You may optionally add the <code>.pre-scrollable</code> class which will set a max-height of 350px and provide a y-axis scrollbar.</p> </section> <!-- Tables ================================================== --> <section id="tables"> <div class="page-header"> <h1>Tables</h1> </div> <h2>Default styles</h2> <p>For basic styling&mdash;light padding and only horizontal dividers&mdash;add the base class <code>.table</code> to any <code>&lt;table&gt;</code>.</p> <div class="bs-docs-example"> <table class="table"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <pre class="prettyprint linenums"> &lt;table class="table"&gt; … &lt;/table&gt; </pre> <hr class="bs-docs-separator"> <h2>Optional classes</h2> <p>Add any of the following classes to the <code>.table</code> base class.</p> <h3><code>.table-striped</code></h3> <p>Adds zebra-striping to any table row within the <code>&lt;tbody&gt;</code> via the <code>:nth-child</code> CSS selector (not available in IE8).</p> <div class="bs-docs-example"> <table class="table table-striped"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <pre class="prettyprint linenums" style="margin-bottom: 18px;"> &lt;table class="table table-striped"&gt; … &lt;/table&gt; </pre> <h3><code>.table-bordered</code></h3> <p>Add borders and rounded corners to the table.</p> <div class="bs-docs-example"> <table class="table table-bordered"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td rowspan="2">1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>Mark</td> <td>Otto</td> <td>@TwBootstrap</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <pre class="prettyprint linenums"> &lt;table class="table table-bordered"&gt; … &lt;/table&gt; </pre> <h3><code>.table-hover</code></h3> <p>Enable a hover state on table rows within a <code>&lt;tbody&gt;</code>.</p> <div class="bs-docs-example"> <table class="table table-hover"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <pre class="prettyprint linenums" style="margin-bottom: 18px;"> &lt;table class="table table-hover"&gt; … &lt;/table&gt; </pre> <h3><code>.table-condensed</code></h3> <p>Makes tables more compact by cutting cell padding in half.</p> <div class="bs-docs-example"> <table class="table table-condensed"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <pre class="prettyprint linenums" style="margin-bottom: 18px;"> &lt;table class="table table-condensed"&gt; … &lt;/table&gt; </pre> <hr class="bs-docs-separator"> <h2>Optional row classes</h2> <p>Use contextual classes to color table rows.</p> <table class="table table-bordered table-striped"> <colgroup> <col class="span1"> <col class="span7"> </colgroup> <thead> <tr> <th>Class</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>.success</code> </td> <td>Indicates a successful or positive action.</td> </tr> <tr> <td> <code>.error</code> </td> <td>Indicates a dangerous or potentially negative action.</td> </tr> <tr> <td> <code>.warning</code> </td> <td>Indicates a warning that might need attention.</td> </tr> <tr> <td> <code>.info</code> </td> <td>Used as an alternative to the default styles.</td> </tr> </tbody> </table> <div class="bs-docs-example"> <table class="table"> <thead> <tr> <th>#</th> <th>Product</th> <th>Payment Taken</th> <th>Status</th> </tr> </thead> <tbody> <tr class="success"> <td>1</td> <td>TB - Monthly</td> <td>01/04/2012</td> <td>Approved</td> </tr> <tr class="error"> <td>2</td> <td>TB - Monthly</td> <td>02/04/2012</td> <td>Declined</td> </tr> <tr class="warning"> <td>3</td> <td>TB - Monthly</td> <td>03/04/2012</td> <td>Pending</td> </tr> <tr class="info"> <td>4</td> <td>TB - Monthly</td> <td>04/04/2012</td> <td>Call in to confirm</td> </tr> </tbody> </table> </div> <pre class="prettyprint linenums"> ... &lt;tr class="success"&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;TB - Monthly&lt;/td&gt; &lt;td&gt;01/04/2012&lt;/td&gt; &lt;td&gt;Approved&lt;/td&gt; &lt;/tr&gt; ... </pre> <hr class="bs-docs-separator"> <h2>Supported table markup</h2> <p>List of supported table HTML elements and how they should be used.</p> <table class="table table-bordered table-striped"> <colgroup> <col class="span1"> <col class="span7"> </colgroup> <thead> <tr> <th>Tag</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td> <code>&lt;table&gt;</code> </td> <td> Wrapping element for displaying data in a tabular format </td> </tr> <tr> <td> <code>&lt;thead&gt;</code> </td> <td> Container element for table header rows (<code>&lt;tr&gt;</code>) to label table columns </td> </tr> <tr> <td> <code>&lt;tbody&gt;</code> </td> <td> Container element for table rows (<code>&lt;tr&gt;</code>) in the body of the table </td> </tr> <tr> <td> <code>&lt;tr&gt;</code> </td> <td> Container element for a set of table cells (<code>&lt;td&gt;</code> or <code>&lt;th&gt;</code>) that appears on a single row </td> </tr> <tr> <td> <code>&lt;td&gt;</code> </td> <td> Default table cell </td> </tr> <tr> <td> <code>&lt;th&gt;</code> </td> <td> Special table cell for column (or row, depending on scope and placement) labels<br> Must be used within a <code>&lt;thead&gt;</code> </td> </tr> <tr> <td> <code>&lt;caption&gt;</code> </td> <td> Description or summary of what the table holds, especially useful for screen readers </td> </tr> </tbody> </table> <pre class="prettyprint linenums"> &lt;table&gt; &lt;caption&gt;...&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;...&lt;/th&gt; &lt;th&gt;...&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;...&lt;/td&gt; &lt;td&gt;...&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </pre> </section> <!-- Forms ================================================== --> <section id="forms"> <div class="page-header"> <h1>Forms</h1> </div> <h2 id="forms-default">Default styles</h2> <p>Individual form controls automatically receive some global styling. By default, inputs are set to <code>width: 100%;</code>.</p> <form class="bs-docs-example"> <fieldset> <legend>Legend</legend> <label>Label name</label> <input type="text" placeholder="Type something…"> <p class="help-block">Example block-level help text here.</p> <div class="checkbox"> <label> <input type="checkbox"> Check me out </label> </div> <button type="submit" class="btn">Submit</button> </fieldset> </form> <pre class="prettyprint linenums"> &lt;form&gt; &lt;fieldset&gt; &lt;legend&gt;Legend&lt;/legend&gt; &lt;label&gt;Label name&lt;/label&gt; &lt;input type="text" placeholder="Type something…"&gt; &lt;span class="help-block"&gt;Example block-level help text here.&lt;/span&gt; &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox"&gt; Check me out &lt;/label&gt; &lt;/div&gt; &lt;button type="submit" class="btn"&gt;Submit&lt;/button&gt; &lt;/fieldset&gt; &lt;/form&gt; </pre> <hr class="bs-docs-separator"> <h2 id="forms-layouts">Optional layouts</h2> <p>Included with Bootstrap are optional form layouts for common use cases.</p> <h3>Inline form</h3> <p>Add <code>.form-inline</code> for left-aligned labels and inline-block controls for a compact layout.</p> <form class="bs-docs-example form-inline"> <input type="text" class="span3" placeholder="Email"> <input type="password" class="span3" placeholder="Password"> <div class="checkbox"> <label> <input type="checkbox"> Remember me </label> </div> <button type="submit" class="btn">Sign in</button> </form> <pre class="prettyprint linenums"> &lt;form class="form-inline"&gt; &lt;input type="text" class="span3" placeholder="Email"&gt; &lt;input type="password" class="span3" placeholder="Password"&gt; &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox"&gt; Remember me &lt;/label&gt; &lt;/div&gt; &lt;button type="submit" class="btn"&gt;Sign in&lt;/button&gt; &lt;/form&gt; </pre> <h3>Horizontal form</h3> <p>Right align labels and float them to the left to make them appear on the same line as controls. Requires the most markup changes from a default form:</p> <ul> <li>Add <code>.form-horizontal</code> to the form</li> <li>Wrap labels and controls in <code>.control-group</code></li> <li>Add <code>.control-label</code> to the label</li> <li>Wrap any associated controls in <code>.controls</code> for proper alignment</li> </ul> <form class="bs-docs-example form-horizontal"> <div class="control-group"> <label class="control-label" for="inputEmail">Email</label> <div class="controls"> <input type="text" id="inputEmail" placeholder="Email"> </div> </div> <div class="control-group"> <label class="control-label" for="inputPassword">Password</label> <div class="controls"> <input type="password" id="inputPassword" placeholder="Password"> <div class="checkbox"> <label> <input type="checkbox"> Remember me </label> </div> </div> </div> <div class="control-group"> <div class="controls"> <button type="submit" class="btn">Sign in</button> </div> </div> </form> <pre class="prettyprint linenums"> &lt;form class="form-horizontal"&gt; &lt;div class="control-group"&gt; &lt;label class="control-label" for="inputEmail"&gt;Email&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="text" id="inputEmail" placeholder="Email"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group"&gt; &lt;label class="control-label" for="inputPassword"&gt;Password&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="password" id="inputPassword" placeholder="Password"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group"&gt; &lt;div class="controls"&gt; &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox"&gt; Remember me &lt;/label&gt; &lt;/div&gt; &lt;button type="submit" class="btn"&gt;Sign in&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; </pre> <hr class="bs-docs-separator"> <h2 id="forms-controls">Supported form controls</h2> <p>Examples of standard form controls supported in an example form layout.</p> <h3>Inputs</h3> <p>Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.</p> <p>Requires the use of a specified <code>type</code> at all times.</p> <form class="bs-docs-example form-inline"> <input type="text" placeholder="Text input"> </form> <pre class="prettyprint linenums"> &lt;input type="text" placeholder="Text input"&gt; </pre> <h3>Textarea</h3> <p>Form control which supports multiple lines of text. Change <code>rows</code> attribute as necessary.</p> <form class="bs-docs-example form-inline"> <textarea rows="3"></textarea> </form> <pre class="prettyprint linenums"> &lt;textarea rows="3"&gt;&lt;/textarea&gt; </pre> <h3>Checkboxes and radios</h3> <p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p> <h4>Default (stacked)</h4> <form class="bs-docs-example"> <div class="checkbox"> <label> <input type="checkbox" value=""> Option one is this and that&mdash;be sure to include why it's great </label> </div> <br> <div class="radio"> <label> <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked> Option one is this and that&mdash;be sure to include why it's great </label> </div> <div class="radio"> <label> <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"> Option two can be something else and selecting it will deselect option one </label> </div> </form> <pre class="prettyprint linenums"> &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox" value=""&gt; Option one is this and that&mdash;be sure to include why it's great &lt;/label&gt; &lt;/div&gt; &lt;div class="radio"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked&gt; Option one is this and that&mdash;be sure to include why it's great &lt;/label&gt; &lt;/div&gt; &lt;div class="radio"&gt; &lt;label&gt; &lt;input type="radio" name="optionsRadios" id="optionsRadios2" value="option2"&gt; Option two can be something else and selecting it will deselect option one &lt;/label&gt; &lt;/div&gt; </pre> <h4>Inline checkboxes</h4> <p>Add the <code>.inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p> <form class="bs-docs-example"> <label class="checkbox inline"> <input type="checkbox" id="inlineCheckbox1" value="option1"> 1 </label> <label class="checkbox inline"> <input type="checkbox" id="inlineCheckbox2" value="option2"> 2 </label> <label class="checkbox inline"> <input type="checkbox" id="inlineCheckbox3" value="option3"> 3 </label> </form> <pre class="prettyprint linenums"> &lt;label class="checkbox inline"&gt; &lt;input type="checkbox" id="inlineCheckbox1" value="option1"&gt; 1 &lt;/label&gt; &lt;label class="checkbox inline"&gt; &lt;input type="checkbox" id="inlineCheckbox2" value="option2"&gt; 2 &lt;/label&gt; &lt;label class="checkbox inline"&gt; &lt;input type="checkbox" id="inlineCheckbox3" value="option3"&gt; 3 &lt;/label&gt; </pre> <h3>Selects</h3> <p>Use the default option or specify a <code>multiple="multiple"</code> to show multiple options at once.</p> <form class="bs-docs-example"> <select> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <br> <select multiple="multiple"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> </form> <pre class="prettyprint linenums"> &lt;select&gt; &lt;option&gt;1&lt;/option&gt; &lt;option&gt;2&lt;/option&gt; &lt;option&gt;3&lt;/option&gt; &lt;option&gt;4&lt;/option&gt; &lt;option&gt;5&lt;/option&gt; &lt;/select&gt; &lt;select multiple="multiple"&gt; &lt;option&gt;1&lt;/option&gt; &lt;option&gt;2&lt;/option&gt; &lt;option&gt;3&lt;/option&gt; &lt;option&gt;4&lt;/option&gt; &lt;option&gt;5&lt;/option&gt; &lt;/select&gt; </pre> <hr class="bs-docs-separator"> <h2 id="forms-extending">Extending form controls</h2> <p>Adding on top of existing browser controls, Bootstrap includes other useful form components.</p> <h3>Input groups</h3> <p>Add text or buttons before, after, or on both sides of any text-based input. Use <code>.input-group</code> with a <code>.add-on</code> to prepend or append elements to an <code>&lt;input&gt;</code>.</p> <p>Avoid using <code>&lt;select&gt;</code> elements here as they cannot be fully styled in WebKit browsers.</p> <form class="bs-docs-example"> <div class="input-group span9"> <span class="input-group-addon">@</span> <input type="text" placeholder="Username"> </div> <br> <div class="input-group span6"> <input type="text"> <span class="input-group-addon">.00</span> </div> <br> <div class="input-group span3"> <span class="input-group-addon">$</span> <input type="text"> <span class="input-group-addon">.00</span> </div> </form> <pre class="prettyprint linenums"> &lt;div class="input-group span9"&gt; &lt;span class="input-group-addon"&gt;@&lt;/span&gt; &lt;input type="text" placeholder="Username"&gt; &lt;/div&gt; &lt;div class="input-group span6"&gt; &lt;input type="text"&gt; &lt;span class="input-group-addon"&gt;.00&lt;/span&gt; &lt;/div&gt; &lt;div class="input-group span3"&gt; &lt;span class="input-group-addon"&gt;$&lt;/span&gt; &lt;input type="text"&gt; &lt;span class="input-group-addon"&gt;.00&lt;/span&gt; &lt;/div&gt; </pre> <h4>Buttons instead of text</h4> <p>Buttons in input groups are a bit different and require one extra level of nesting. Instead of <code>.input-group-addon</code>, you'll need to use <code>.input-group-btn</code> to wrap the buttons. This is required due to default browser styles that cannot be overridden.</p> <form class="bs-docs-example"> <div class="input-group span7"> <span class="input-group-btn"> <button class="btn" type="button">Go!</button> </span> <input type="text"> </div> <br> <div class="input-group span7"> <input type="text"> <span class="input-group-btn"> <button class="btn" type="button">Go!</button> </span> </div> </form> <pre class="prettyprint linenums"> &lt;div class="input-group span7"&gt; &lt;span class="input-group-btn"&gt; &lt;button class="btn" type="button"&gt;Go!&lt;/button&gt; &lt;/span&gt; &lt;input type="text"&gt; &lt;/div&gt; &lt;div class="input-group span7"&gt; &lt;input type="text"&gt; &lt;span class="input-group-btn"&gt; &lt;button class="btn" type="button"&gt;Go!&lt;/button&gt; &lt;/span&gt; &lt;/div&gt; </pre> <h4>Button dropdowns</h4> <p></p> <form class="bs-docs-example"> <div class="input-group span7"> <div class="input-group-btn btn-group"> <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> </ul> </div><!-- /btn-group --> <input type="text"> </div><!-- /input-group --> <br> <div class="input-group span7"> <input type="text"> <div class="input-group-btn btn-group"> <button class="btn dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> </ul> </div><!-- /btn-group --> </div><!-- /input-group --> </form> <pre class="prettyprint linenums"> &lt;div class="input-group span7"&gt; &lt;div class="input-group-btn btn-group"&gt; &lt;button class="btn dropdown-toggle" data-toggle="dropdown"&gt; Action &lt;span class="caret"&gt;&lt;/span&gt; &lt;/button&gt; &lt;ul class="dropdown-menu"&gt; ... &lt;/ul&gt; &lt;/div&gt; &lt;input type="text"&gt; &lt;/div&gt; &lt;div class="input-group span7"&gt; &lt;input type="text"&gt; &lt;div class="input-group-btn btn-group"&gt; &lt;button class="btn dropdown-toggle" data-toggle="dropdown"&gt; Action &lt;span class="caret"&gt;&lt;/span&gt; &lt;/button&gt; &lt;ul class="dropdown-menu"&gt; ... &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; </pre> <h4>Segmented dropdown groups</h4> <form class="bs-docs-example"> <div class="input-group span7"> <div class="input-group-btn btn-group"> <button class="btn" tabindex="-1">Action</button> <button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1"> <span class="caret"></span> </button> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> </ul> </div> <input type="text" class="span3"> </div> <br> <div class="input-group span7"> <input type="text"> <div class="input-group-btn btn-group"> <button class="btn" tabindex="-1">Action</button> <button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1"> <span class="caret"></span> </button> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> </ul> </div> </div> </form> <pre class="prettyprint linenums"> &lt;div class="input-prepend"&gt; &lt;div class="btn-group"&gt;...&lt;/div&gt; &lt;input type="text" class="span3"&gt; &lt;/div&gt; &lt;div class="input-append"&gt; &lt;input type="text" class="span3"&gt; &lt;div class="btn-group"&gt;...&lt;/div&gt; &lt;/div&gt; </pre> <h3 id="forms-extending-sizes">Control sizing</h3> <p>Use relative sizing classes like <code>.input-large</code> or match your inputs to the grid column sizes using <code>.span*</code> classes.</p> <h4>Relative sizing</h4> <p>Create larger or smaller form controls that match button sizes.</p> <form class="bs-docs-example" style="padding-bottom: 15px;"> <div class="controls docs-input-sizes"> <input class="input-large" type="text" placeholder=".input-large"> <input class="input-small" type="text" placeholder=".input-small"> <input class="input-mini" type="text" placeholder=".input-mini"> </div> </form> <pre class="prettyprint linenums"> &lt;input class="input-large" type="text" placeholder=".input-large"&gt; &lt;input class="input-small" type="text" placeholder=".input-small"&gt; &lt;input class="input-mini" type="text" placeholder=".input-mini"&gt; </pre> <h4>Column sizing</h4> <p>Use <code>.span1</code> to <code>.span12</code> for setting widths on inputs that match Bootstrap's grid system.</p> <form class="bs-docs-example" style="padding-bottom: 15px;"> <div class="controls docs-input-sizes"> <input class="span1" type="text" placeholder=".span1"> <input class="span2" type="text" placeholder=".span2"> <input class="span3" type="text" placeholder=".span3"> <select class="span1"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select class="span2"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select class="span3"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> </div> </form> <pre class="prettyprint linenums"> &lt;input class="span1" type="text" placeholder=".span1"&gt; &lt;input class="span2" type="text" placeholder=".span2"&gt; &lt;input class="span3" type="text" placeholder=".span3"&gt; &lt;select class="span1"&gt; ... &lt;/select&gt; &lt;select class="span2"&gt; ... &lt;/select&gt; &lt;select class="span3"&gt; ... &lt;/select&gt; </pre> <p>If you need multiple inputs on the same line, wrap them in the standard grid markup (with <code>.row</code> and <code>.span*</code> classes). Each input should have it's own column and will expand to fill the available width automatically.</p> <form class="bs-docs-example" style="padding-bottom: 15px;"> <div class="row"> <div class="span4"> <input type="text" placeholder=".span4"> </div> <div class="span4"> <input type="text" placeholder=".span4"> </div> <div class="span4"> <input type="text" placeholder=".span4"> </div> </div> </form> <pre class="prettyprint linenums"> &lt;div class="row"&gt; &lt;div class="span4"&gt; &lt;input type="text" placeholder=".span4"&gt; &lt;/div&gt; &lt;div class="span4"&gt; &lt;input type="text" placeholder=".span4"&gt; &lt;/div&gt; &lt;div class="span4"&gt; &lt;input type="text" placeholder=".span4"&gt; &lt;/div&gt; &lt;/div&gt; </pre> <h3>Uneditable inputs</h3> <p>Present data in a form that's not editable without using actual form markup.</p> <form class="bs-docs-example"> <span class="input-xlarge uneditable-input">Some value here</span> </form> <pre class="prettyprint linenums"> &lt;span class="input-xlarge uneditable-input"&gt;Some value here&lt;/span&gt; </pre> <h3>Form actions</h3> <p>End a form with a group of actions (buttons). When placed within a <code>.form-horizontal</code>, the buttons will automatically indent to line up with the form controls.</p> <form class="bs-docs-example"> <div class="form-actions"> <button type="submit" class="btn btn-primary">Save changes</button> <button type="button" class="btn">Cancel</button> </div> </form> <pre class="prettyprint linenums"> &lt;div class="form-actions"&gt; &lt;button type="submit" class="btn btn-primary"&gt;Save changes&lt;/button&gt; &lt;button type="button" class="btn"&gt;Cancel&lt;/button&gt; &lt;/div&gt; </pre> <h3>Help text</h3> <p>Inline and block level support for help text that appears around form controls.</p> <h4>Inline help</h4> <form class="bs-docs-example form-inline"> <input type="text"> <span class="help-inline">Inline help text</span> </form> <pre class="prettyprint linenums"> &lt;input type="text"&gt;&lt;span class="help-inline"&gt;Inline help text&lt;/span&gt; </pre> <h4>Block help</h4> <form class="bs-docs-example form-inline"> <input type="text"> <span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span> </form> <pre class="prettyprint linenums"> &lt;input type="text"&gt;&lt;span class="help-block"&gt;A longer block of help text that breaks onto a new line and may extend beyond one line.&lt;/span&gt; </pre> <hr class="bs-docs-separator"> <h2>Form control states</h2> <p>Provide feedback to users or visitors with basic feedback states on form controls and labels.</p> <h3 id="forms-input-focus">Input focus</h3> <p>We remove the default <code>outline</code> styles on some form controls and apply a <code>box-shadow</code> in its place for <code>:focus</code>.</p> <form class="bs-docs-example form-inline"> <input class="input-xlarge focused" id="focusedInput" type="text" value="This is focused..."> </form> <pre class="prettyprint linenums"> &lt;input class="input-xlarge" id="focusedInput" type="text" value="This is focused..."&gt; </pre> <h3 id="forms-invalid-inputs">Invalid inputs</h3> <p>Style inputs via default browser functionality with <code>:invalid</code>. Specify a <code>type</code> and add the <code>required</code> attribute.</p> <form class="bs-docs-example form-inline"> <input class="span3" type="email" placeholder="test@example.com" required> </form> <pre class="prettyprint linenums"> &lt;input class="span3" type="email" required&gt; </pre> <h3 id="forms-disabled-inputs">Disabled inputs</h3> <p>Add the <code>disabled</code> attribute on an input to prevent user input and trigger a slightly different look.</p> <form class="bs-docs-example form-inline"> <input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here…" disabled> </form> <pre class="prettyprint linenums"> &lt;input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled&gt; </pre> <h3 id="forms-disabled-fieldsets">Disabled fieldsets</h3> <p>Add the <code>disabled</code> attribute to a <code>&lt;fieldset&gt;</code> to disable all the controls within the <code>&lt;fieldset&gt;</code> at once. Link buttons (with the <code>&lt;a&gt;</code> element) will be aesthetically disabled, but you will need custom JavaScript to disable their behavior.</p> <form class="bs-docs-example form-inline"> <fieldset disabled> <div> <input type="text" class="span4" placeholder="Disabled input"> </div> <div> <select class="span4"> <option>Disabled select</option> </select> </div> <div class="checkbox"> <label> <input type="checkbox"> Can't check this </label> </div> <button type="submit" class="btn btn-primary">Submit</button> </fieldset> </form> <pre class="prettyprint linenums"> &lt;form class="form-inline"&gt; &lt;fieldset disabled&gt; &lt;input type="text" class="span4" placeholder="Disabled input"&gt; &lt;select class="span4"&gt; &lt;option&gt;Disabled select&lt;/option&gt; &lt;/select&gt; &lt;div class="checkbox"&gt; &lt;label&gt; &lt;input type="checkbox"&gt; Can't check this &lt;/label&gt; &lt;/div&gt; &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt; &lt;/fieldset&gt; &lt;/form&gt; </pre> <h3 id="forms-validation">Validation states</h3> <p>Bootstrap includes validation styles for error, warning, info, and success messages. To use:</p> <ul> <li>Add <code>.has-warning</code>, <code>.has-error</code>, or <code>.has-success</code> to the parent element</li> <li>Add .input-with-feedback to the field(s) in question</li> </ul> <p>Validation styles are applied on a per-input basis. With horizontal forms, the <code>&lt;label class="control-label"&gt;</code> will always be styled.</p> <form class="bs-docs-example form-horizontal"> <div class="control-group has-warning"> <label class="control-label" for="inputWarning">Input with warning</label> <div class="controls"> <input type="text" class="input-with-feedback" id="inputWarning"> </div> </div> <div class="control-group has-error"> <label class="control-label" for="inputError">Input with error</label> <div class="controls"> <input type="text" class="input-with-feedback" id="inputError"> </div> </div> <div class="control-group has-success"> <label class="control-label" for="inputSuccess">Input with success</label> <div class="controls"> <input type="text" class="input-with-feedback" id="inputSuccess"> </div> </div> </form> <pre class="prettyprint linenums"> &lt;div class="control-group has-warning"&gt; &lt;label class="control-label" for="inputWarning"&gt;Input with warning&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="text" class="input-with-feedback" id="inputWarning"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group has-error"&gt; &lt;label class="control-label" for="inputError"&gt;Input with error&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="text" class="input-with-feedback" id="inputError"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="control-group has-success"&gt; &lt;label class="control-label" for="inputSuccess"&gt;Input with success&lt;/label&gt; &lt;div class="controls"&gt; &lt;input type="text" class="input-with-feedback id="inputSuccess""&gt; &lt;/div&gt; &lt;/div&gt; </pre> </section> <!-- Buttons ================================================== --> <section id="buttons"> <div class="page-header"> <h1>Buttons</h1> </div> <h2>Default buttons</h2> <p>Button styles can be applied to anything with the <code>.btn</code> class applied. However, typically you'll want to apply these to only <code>&lt;a&gt;</code> and <code>&lt;button&gt;</code> elements for the best rendering.</p> <table class="table table-bordered table-striped"> <thead> <tr> <th>Button</th> <th>class=""</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><button type="button" class="btn btn-default">Default</button></td> <td><code>btn</code></td> <td>Standard gray button with gradient</td> </tr> <tr> <td><button type="button" class="btn btn-primary">Primary</button></td> <td><code>btn btn-primary</code></td> <td>Provides extra visual weight and identifies the primary action in a set of buttons</td> </tr> <tr> <td><button type="button" class="btn btn-success">Success</button></td> <td><code>btn btn-success</code></td> <td>Indicates a successful or positive action</td> </tr> <tr> <td><button type="button" class="btn btn-warning">Warning</button></td> <td><code>btn btn-warning</code></td> <td>Indicates caution should be taken with this action</td> </tr> <tr> <td><button type="button" class="btn btn-danger">Danger</button></td> <td><code>btn btn-danger</code></td> <td>Indicates a dangerous or potentially negative action</td> </tr> <tr> <td><button type="button" class="btn btn-link">Link</button></td> <td><code>btn btn-link</code></td> <td>Deemphasize a button by making it look like a link while maintaining button behavior</td> </tr> </tbody> </table> <h4>Cross browser compatibility</h4> <p>IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled <code>button</code> elements, rendering text gray with a nasty text-shadow that we cannot fix.</p> <h2>Button sizes</h2> <p>Fancy larger or smaller buttons? Add <code>.btn-large</code>, <code>.btn-small</code>, or <code>.btn-mini</code> for additional sizes.</p> <div class="bs-docs-example"> <p> <button type="button" class="btn btn-large btn-primary">Large button</button> <button type="button" class="btn btn-large">Large button</button> </p> <p> <button type="button" class="btn btn-primary">Default button</button> <button type="button" class="btn">Default button</button> </p> <p> <button type="button" class="btn btn-small btn-primary">Small button</button> <button type="button" class="btn btn-small">Small button</button> </p> <p> <button type="button" class="btn btn-mini btn-primary">Mini button</button> <button type="button" class="btn btn-mini">Mini button</button> </p> </div> <pre class="prettyprint linenums"> &lt;p&gt; &lt;button class="btn btn-large btn-primary" type="button"&gt;Large button&lt;/button&gt; &lt;button class="btn btn-large" type="button"&gt;Large button&lt;/button&gt; &lt;/p&gt; &lt;p&gt; &lt;button class="btn btn-primary" type="button"&gt;Default button&lt;/button&gt; &lt;button class="btn" type="button"&gt;Default button&lt;/button&gt; &lt;/p&gt; &lt;p&gt; &lt;button class="btn btn-small btn-primary" type="button"&gt;Small button&lt;/button&gt; &lt;button class="btn btn-small" type="button"&gt;Small button&lt;/button&gt; &lt;/p&gt; &lt;p&gt; &lt;button class="btn btn-mini btn-primary" type="button"&gt;Mini button&lt;/button&gt; &lt;button class="btn btn-mini" type="button"&gt;Mini button&lt;/button&gt; &lt;/p&gt; </pre> <p>Create block level buttons&mdash;those that span the full width of a parent&mdash; by adding <code>.btn-block</code>.</p> <div class="bs-docs-example"> <div class="well" style="max-width: 400px; margin: 0 auto 10px;"> <button type="button" class="btn btn-large btn-block btn-primary">Block level button</button> <button type="button" class="btn btn-large btn-block">Block level button</button> </div> </div> <pre class="prettyprint linenums"> &lt;button class="btn btn-large btn-block btn-primary" type="button"&gt;Block level button&lt;/button&gt; &lt;button class="btn btn-large btn-block" type="button"&gt;Block level button&lt;/button&gt; </pre> <h2>Disabled state</h2> <p>Make buttons look unclickable by fading them back 50%.</p> <h3>Anchor element</h3> <p>Add the <code>.disabled</code> class to <code>&lt;a&gt;</code> buttons.</p> <p class="bs-docs-example"> <a href="#" class="btn btn-large btn-primary disabled">Primary link</a> <a href="#" class="btn btn-large disabled">Link</a> </p> <pre class="prettyprint linenums"> &lt;a href="#" class="btn btn-large btn-primary disabled"&gt;Primary link&lt;/a&gt; &lt;a href="#" class="btn btn-large disabled"&gt;Link&lt;/a&gt; </pre> <p> We use <code>.disabled</code> as a utility class here, similar to the common <code>.active</code> class, so no prefix is required. Also, this class is only for aesthetic; you must use custom JavaScript to disable links here. </p> <h3>Button element</h3> <p>Add the <code>disabled</code> attribute to <code>&lt;button&gt;</code> buttons.</p> <p class="bs-docs-example"> <button type="button" class="btn btn-large btn-primary disabled" disabled="disabled">Primary button</button> <button type="button" class="btn btn-large" disabled>Button</button> </p> <pre class="prettyprint linenums"> &lt;button type="button" class="btn btn-large btn-primary disabled" disabled="disabled"&gt;Primary button&lt;/button&gt; &lt;button type="button" class="btn btn-large" disabled&gt;Button&lt;/button&gt; </pre> <h2>One class, multiple tags</h2> <p>Use the <code>.btn</code> class on an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code>, or <code>&lt;input&gt;</code> element.</p> <form class="bs-docs-example"> <a class="btn" href="">Link</a> <button class="btn" type="submit">Button</button> <input class="btn" type="button" value="Input"> <input class="btn" type="submit" value="Submit"> </form> <pre class="prettyprint linenums"> &lt;a class="btn" href=""&gt;Link&lt;/a&gt; &lt;button class="btn" type="submit"&gt;Button&lt;/button&gt; &lt;input class="btn" type="button" value="Input"&gt; &lt;input class="btn" type="submit" value="Submit"&gt; </pre> <p>As a best practice, try to match the element for your context to ensure matching cross-browser rendering. If you have an <code>input</code>, use an <code>&lt;input type="submit"&gt;</code> for your button.</p> </section> <!-- Images ================================================== --> <section id="images"> <div class="page-header"> <h1>Images</h1> </div> <p>Add classes to an <code>&lt;img&gt;</code> element to easily style images in any project. Rounded corners are not available in IE8.</p> <div class="bs-docs-example bs-docs-example-images"> <img data-src="holder.js/140x140" class="img-rounded"> <img data-src="holder.js/140x140" class="img-circle"> <img data-src="holder.js/140x140" class="img-polaroid"> </div> <pre class="prettyprint linenums"> &lt;img src="..." class="img-rounded"&gt; &lt;img src="..." class="img-circle"&gt; &lt;img src="..." class="img-polaroid"&gt; </pre> </section> <!-- Icons ================================================== --> <section id="icons"> <div class="page-header"> <h1>Icons font <small>by <a href="http://glyphicons.com" target="_blank">Glyphicons</a></small></h1> </div> <h2>Included glyphs</h2> <p>Bootstrap comes with all 160 of <a href="http://glyphicons.com" target="_blank">Glyphicons</a> Halflings set, all available in font formats for easy coloring, sizing, and placement.</p> <ul class="the-icons clearfix"> <li><i class="glyphicon-glass"></i> glyphicon-glass</li> <li><i class="glyphicon-music"></i> glyphicon-music</li> <li><i class="glyphicon-search"></i> glyphicon-search</li> <li><i class="glyphicon-envelope"></i> glyphicon-envelope</li> <li><i class="glyphicon-heart"></i> glyphicon-heart</li> <li><i class="glyphicon-star"></i> glyphicon-star</li> <li><i class="glyphicon-star-empty"></i> glyphicon-star-empty</li> <li><i class="glyphicon-user"></i> glyphicon-user</li> <li><i class="glyphicon-film"></i> glyphicon-film</li> <li><i class="glyphicon-th-large"></i> glyphicon-th-large</li> <li><i class="glyphicon-th"></i> glyphicon-th</li> <li><i class="glyphicon-th-list"></i> glyphicon-th-list</li> <li><i class="glyphicon-ok"></i> glyphicon-ok</li> <li><i class="glyphicon-remove"></i> glyphicon-remove</li> <li><i class="glyphicon-zoom-in"></i> glyphicon-zoom-in</li> <li><i class="glyphicon-zoom-out"></i> glyphicon-zoom-out</li> <li><i class="glyphicon-off"></i> glyphicon-off</li> <li><i class="glyphicon-signal"></i> glyphicon-signal</li> <li><i class="glyphicon-cog"></i> glyphicon-cog</li> <li><i class="glyphicon-trash"></i> glyphicon-trash</li> <li><i class="glyphicon-home"></i> glyphicon-home</li> <li><i class="glyphicon-file"></i> glyphicon-file</li> <li><i class="glyphicon-time"></i> glyphicon-time</li> <li><i class="glyphicon-road"></i> glyphicon-road</li> <li><i class="glyphicon-download-alt"></i> glyphicon-download-alt</li> <li><i class="glyphicon-download"></i> glyphicon-download</li> <li><i class="glyphicon-upload"></i> glyphicon-upload</li> <li><i class="glyphicon-inbox"></i> glyphicon-inbox</li> <li><i class="glyphicon-play-circle"></i> glyphicon-play-circle</li> <li><i class="glyphicon-repeat"></i> glyphicon-repeat</li> <li><i class="glyphicon-refresh"></i> glyphicon-refresh</li> <li><i class="glyphicon-list-alt"></i> glyphicon-list-alt</li> <li><i class="glyphicon-lock"></i> glyphicon-lock</li> <li><i class="glyphicon-flag"></i> glyphicon-flag</li> <li><i class="glyphicon-headphones"></i> glyphicon-headphones</li> <li><i class="glyphicon-volume-off"></i> glyphicon-volume-off</li> <li><i class="glyphicon-volume-down"></i> glyphicon-volume-down</li> <li><i class="glyphicon-volume-up"></i> glyphicon-volume-up</li> <li><i class="glyphicon-qrcode"></i> glyphicon-qrcode</li> <li><i class="glyphicon-barcode"></i> glyphicon-barcode</li> <li><i class="glyphicon-tag"></i> glyphicon-tag</li> <li><i class="glyphicon-tags"></i> glyphicon-tags</li> <li><i class="glyphicon-book"></i> glyphicon-book</li> <li><i class="glyphicon-bookmark"></i> glyphicon-bookmark</li> <li><i class="glyphicon-print"></i> glyphicon-print</li> <li><i class="glyphicon-camera"></i> glyphicon-camera</li> <li><i class="glyphicon-font"></i> glyphicon-font</li> <li><i class="glyphicon-bold"></i> glyphicon-bold</li> <li><i class="glyphicon-italic"></i> glyphicon-italic</li> <li><i class="glyphicon-text-height"></i> glyphicon-text-height</li> <li><i class="glyphicon-text-width"></i> glyphicon-text-width</li> <li><i class="glyphicon-align-left"></i> glyphicon-align-left</li> <li><i class="glyphicon-align-center"></i> glyphicon-align-center</li> <li><i class="glyphicon-align-right"></i> glyphicon-align-right</li> <li><i class="glyphicon-align-justify"></i> glyphicon-align-justify</li> <li><i class="glyphicon-list"></i> glyphicon-list</li> <li><i class="glyphicon-indent-left"></i> glyphicon-indent-left</li> <li><i class="glyphicon-indent-right"></i> glyphicon-indent-right</li> <li><i class="glyphicon-facetime-video"></i> glyphicon-facetime-video</li> <li><i class="glyphicon-picture"></i> glyphicon-picture</li> <li><i class="glyphicon-pencil"></i> glyphicon-pencil</li> <li><i class="glyphicon-map-marker"></i> glyphicon-map-marker</li> <li><i class="glyphicon-adjust"></i> glyphicon-adjust</li> <li><i class="glyphicon-tint"></i> glyphicon-tint</li> <li><i class="glyphicon-edit"></i> glyphicon-edit</li> <li><i class="glyphicon-share"></i> glyphicon-share</li> <li><i class="glyphicon-check"></i> glyphicon-check</li> <li><i class="glyphicon-move"></i> glyphicon-move</li> <li><i class="glyphicon-step-backward"></i> glyphicon-step-backward</li> <li><i class="glyphicon-fast-backward"></i> glyphicon-fast-backward</li> <li><i class="glyphicon-backward"></i> glyphicon-backward</li> <li><i class="glyphicon-play"></i> glyphicon-play</li> <li><i class="glyphicon-pause"></i> glyphicon-pause</li> <li><i class="glyphicon-stop"></i> glyphicon-stop</li> <li><i class="glyphicon-forward"></i> glyphicon-forward</li> <li><i class="glyphicon-fast-forward"></i> glyphicon-fast-forward</li> <li><i class="glyphicon-step-forward"></i> glyphicon-step-forward</li> <li><i class="glyphicon-eject"></i> glyphicon-eject</li> <li><i class="glyphicon-chevron-left"></i> glyphicon-chevron-left</li> <li><i class="glyphicon-chevron-right"></i> glyphicon-chevron-right</li> <li><i class="glyphicon-plus-sign"></i> glyphicon-plus-sign</li> <li><i class="glyphicon-minus-sign"></i> glyphicon-minus-sign</li> <li><i class="glyphicon-remove-sign"></i> glyphicon-remove-sign</li> <li><i class="glyphicon-ok-sign"></i> glyphicon-ok-sign</li> <li><i class="glyphicon-question-sign"></i> glyphicon-question-sign</li> <li><i class="glyphicon-info-sign"></i> glyphicon-info-sign</li> <li><i class="glyphicon-screenshot"></i> glyphicon-screenshot</li> <li><i class="glyphicon-remove-circle"></i> glyphicon-remove-circle</li> <li><i class="glyphicon-ok-circle"></i> glyphicon-ok-circle</li> <li><i class="glyphicon-ban-circle"></i> glyphicon-ban-circle</li> <li><i class="glyphicon-arrow-left"></i> glyphicon-arrow-left</li> <li><i class="glyphicon-arrow-right"></i> glyphicon-arrow-right</li> <li><i class="glyphicon-arrow-up"></i> glyphicon-arrow-up</li> <li><i class="glyphicon-arrow-down"></i> glyphicon-arrow-down</li> <li><i class="glyphicon-share-alt"></i> glyphicon-share-alt</li> <li><i class="glyphicon-resize-full"></i> glyphicon-resize-full</li> <li><i class="glyphicon-resize-small"></i> glyphicon-resize-small</li> <li><i class="glyphicon-plus"></i> glyphicon-plus</li> <li><i class="glyphicon-minus"></i> glyphicon-minus</li> <li><i class="glyphicon-asterisk"></i> glyphicon-asterisk</li> <li><i class="glyphicon-exclamation-sign"></i> glyphicon-exclamation-sign</li> <li><i class="glyphicon-gift"></i> glyphicon-gift</li> <li><i class="glyphicon-leaf"></i> glyphicon-leaf</li> <li><i class="glyphicon-fire"></i> glyphicon-fire</li> <li><i class="glyphicon-eye-open"></i> glyphicon-eye-open</li> <li><i class="glyphicon-eye-close"></i> glyphicon-eye-close</li> <li><i class="glyphicon-warning-sign"></i> glyphicon-warning-sign</li> <li><i class="glyphicon-plane"></i> glyphicon-plane</li> <li><i class="glyphicon-calendar"></i> glyphicon-calendar</li> <li><i class="glyphicon-random"></i> glyphicon-random</li> <li><i class="glyphicon-comment"></i> glyphicon-comment</li> <li><i class="glyphicon-magnet"></i> glyphicon-magnet</li> <li><i class="glyphicon-chevron-up"></i> glyphicon-chevron-up</li> <li><i class="glyphicon-chevron-down"></i> glyphicon-chevron-down</li> <li><i class="glyphicon-retweet"></i> glyphicon-retweet</li> <li><i class="glyphicon-shopping-cart"></i> glyphicon-shopping-cart</li> <li><i class="glyphicon-folder-close"></i> glyphicon-folder-close</li> <li><i class="glyphicon-folder-open"></i> glyphicon-folder-open</li> <li><i class="glyphicon-resize-vertical"></i> glyphicon-resize-vertical</li> <li><i class="glyphicon-resize-horizontal"></i> glyphicon-resize-horizontal</li> <li><i class="glyphicon-hdd"></i> glyphicon-hdd</li> <li><i class="glyphicon-bullhorn"></i> glyphicon-bullhorn</li> <li><i class="glyphicon-bell"></i> glyphicon-bell</li> <li><i class="glyphicon-certificate"></i> glyphicon-certificate</li> <li><i class="glyphicon-thumbs-up"></i> glyphicon-thumbs-up</li> <li><i class="glyphicon-thumbs-down"></i> glyphicon-thumbs-down</li> <li><i class="glyphicon-hand-right"></i> glyphicon-hand-right</li> <li><i class="glyphicon-hand-left"></i> glyphicon-hand-left</li> <li><i class="glyphicon-hand-up"></i> glyphicon-hand-up</li> <li><i class="glyphicon-hand-down"></i> glyphicon-hand-down</li> <li><i class="glyphicon-circle-arrow-right"></i> glyphicon-circle-arrow-right</li> <li><i class="glyphicon-circle-arrow-left"></i> glyphicon-circle-arrow-left</li> <li><i class="glyphicon-circle-arrow-up"></i> glyphicon-circle-arrow-up</li> <li><i class="glyphicon-circle-arrow-down"></i> glyphicon-circle-arrow-down</li> <li><i class="glyphicon-globe"></i> glyphicon-globe</li> <li><i class="glyphicon-wrench"></i> glyphicon-wrench</li> <li><i class="glyphicon-tasks"></i> glyphicon-tasks</li> <li><i class="glyphicon-filter"></i> glyphicon-filter</li> <li><i class="glyphicon-briefcase"></i> glyphicon-briefcase</li> <li><i class="glyphicon-fullscreen"></i> glyphicon-fullscreen</li> <li><i class="glyphicon-dashboard"></i> glyphicon-dashboard</li> <li><i class="glyphicon-paperclip"></i> glyphicon-paperclip</li> <li><i class="glyphicon-heart-empty"></i> glyphicon-heart-empty</li> <li><i class="glyphicon-link"></i> glyphicon-link</li> <li><i class="glyphicon-phone"></i> glyphicon-phone</li> <li><i class="glyphicon-pushpin"></i> glyphicon-pushpin</li> <li><i class="glyphicon-euro"></i> glyphicon-euro</li> <li><i class="glyphicon-usd"></i> glyphicon-usd</li> <li><i class="glyphicon-gbp"></i> glyphicon-gbp</li> <li><i class="glyphicon-sort"></i> glyphicon-sort</li> <li><i class="glyphicon-sort-by-alphabet"></i> glyphicon-sort-by-alphabet</li> <li><i class="glyphicon-sort-by-alphabet-alt"></i> glyphicon-sort-by-alphabet-alt</li> <li><i class="glyphicon-sort-by-order"></i> glyphicon-sort-by-order</li> <li><i class="glyphicon-sort-by-order-alt"></i> glyphicon-sort-by-order-alt</li> <li><i class="glyphicon-sort-by-attributes"></i> glyphicon-sort-by-attributes</li> <li><i class="glyphicon-sort-by-attributes-alt"></i> glyphicon-sort-by-attributes-alt</li> <li><i class="glyphicon-unchecked"></i> glyphicon-unchecked</li> <li><i class="glyphicon-expand"></i> glyphicon-expand</li> <li><i class="glyphicon-collapse"></i> glyphicon-collapse</li> <li><i class="glyphicon-collapse-top"></i> glyphicon-collapse-top</li> </ul> <h3>Glyphicons attribution</h3> <p><a href="http://glyphicons.com/">Glyphicons</a> Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creator have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to <a href="http://glyphicons.com/">Glyphicons</a> whenever practical.</p> <hr class="bs-docs-separator"> <h2>How to use</h2> <p>Add the appropriate class to any inline element. All icon classes are prefixed with <code>glyphicon-</code> for easy styling. To use, place the following code just about anywhere:</p> <pre class="prettyprint linenums"> &lt;i class="glyphicon-search"&gt;&lt;/i&gt; </pre> <p>Want to change the icon color? Just change the <code>color</code> of the parent element.</p> <p>When using beside strings of text, as in buttons or nav links, be sure to leave a space after the icon for proper spacing.</p> <hr class="bs-docs-separator"> <h2>Icon examples</h2> <p>Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.</p> <h4>Buttons</h4> <h5>Button group in a button toolbar</h5> <div class="bs-docs-example"> <div class="btn-toolbar"> <div class="btn-group"> <a class="btn" href="#"><i class="glyphicon-align-left"></i></a> <a class="btn" href="#"><i class="glyphicon-align-center"></i></a> <a class="btn" href="#"><i class="glyphicon-align-right"></i></a> <a class="btn" href="#"><i class="glyphicon-align-justify"></i></a> </div> </div> </div> <pre class="prettyprint linenums"> &lt;div class="btn-toolbar"&gt; &lt;div class="btn-group"&gt; &lt;a class="btn" href="#"&gt;&lt;i class="glyphicon-align-left"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a class="btn" href="#"&gt;&lt;i class="glyphicon-align-center"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a class="btn" href="#"&gt;&lt;i class="glyphicon-align-right"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a class="btn" href="#"&gt;&lt;i class="glyphicon-align-justify"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </pre> <h5>Dropdown in a button group</h5> <div class="bs-docs-example"> <div class="btn-group"> <a class="btn btn-primary" href="#"><i class="glyphicon-user icon-white"></i> User</a> <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#"><i class="glyphicon-pencil"></i> Edit</a></li> <li><a href="#"><i class="glyphicon-trash"></i> Delete</a></li> <li><a href="#"><i class="glyphicon-ban-circle"></i> Ban</a></li> <li class="divider"></li> <li><a href="#"><i class="i"></i> Make admin</a></li> </ul> </div> </div> <pre class="prettyprint linenums"> &lt;div class="btn-group"&gt; &lt;a class="btn btn-primary" href="#"&gt;&lt;i class="glyphicon-user icon-white"&gt;&lt;/i&gt; User&lt;/a&gt; &lt;a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"&gt;&lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt; &lt;ul class="dropdown-menu"&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="glyphicon-pencil"&gt;&lt;/i&gt; Edit&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="glyphicon-trash"&gt;&lt;/i&gt; Delete&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="glyphicon-ban-circle"&gt;&lt;/i&gt; Ban&lt;/a&gt;&lt;/li&gt; &lt;li class="divider"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="i"&gt;&lt;/i&gt; Make admin&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </pre> <h5>Large button</h5> <div class="bs-docs-example"> <a class="btn btn-large" href="#"><i class="icon-star"></i> Star</a> </div> <pre class="prettyprint linenums"> &lt;a class="btn btn-large" href="#"&gt;&lt;i class="icon-star"&gt;&lt;/i&gt; Star&lt;/a&gt; </pre> <h5>Small button</h5> <div class="bs-docs-example"> <a class="btn btn-small" href="#"><i class="glyphicon-star"></i></a> </div> <pre class="prettyprint linenums"> &lt;a class="btn btn-small" href="#"&gt;&lt;i class="glyphicon-star"&gt;&lt;/i&gt;&lt;/a&gt; </pre> <h4>Navigation</h4> <div class="bs-docs-example"> <div class="well" style="padding: 8px 0; margin-bottom: 0;"> <ul class="nav nav-list"> <li class="active"><a href="#"><i class="glyphicon-home icon-white"></i> Home</a></li> <li><a href="#"><i class="glyphicon-book"></i> Library</a></li> <li><a href="#"><i class="glyphicon-pencil"></i> Applications</a></li> <li><a href="#"><i class="i"></i> Misc</a></li> </ul> </div> </div> <pre class="prettyprint linenums"> &lt;ul class="nav nav-list"&gt; &lt;li class="active"&gt;&lt;a href="#"&gt;&lt;i class="glyphicon-home icon-white"&gt;&lt;/i&gt; Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="glyphicon-book"&gt;&lt;/i&gt; Library&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="glyphicon-pencil"&gt;&lt;/i&gt; Applications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;i class="i"&gt;&lt;/i&gt; Misc&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </pre> <h4>Form fields</h4> <form class="bs-docs-example form-horizontal"> <div class="control-group"> <label class="control-label" for="inputIcon">Email address</label> <div class="controls"> <div class="input-prepend"> <span class="add-on"><i class="glyphicon-envelope"></i></span><input class="span2" id="inputIcon" type="text"> </div> </div> </div> </form> <pre class="prettyprint linenums"> &lt;div class="control-group"&gt; &lt;label class="control-label" for="inputIcon"&gt;Email address&lt;/label&gt; &lt;div class="controls"&gt; &lt;div class="input-prepend"&gt; &lt;span class="add-on"&gt;&lt;i class="glyphicon-envelope"&gt;&lt;/i&gt;&lt;/span&gt; &lt;input class="span2" id="inputIcon" type="text"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </pre> </section> <!-- Responsive design ================================================== --> <section id="responsive"> <div class="page-header"> <h1>Responsive design</h1> </div> <h2>Enabling responsive features</h2> <p>Responsive CSS requires the following meta tag in the <code>&lt;head&gt;</code> of your pages.</p> <pre class="prettyprint linenums"> &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; </pre> <h3>Supported devices</h3> <p>Bootstrap supports a handful of media queries to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:</p> <table class="table table-bordered table-striped"> <thead> <tr> <th>Label</th> <th>Layout width</th> <th>Column width</th> <th>Gutter width</th> </tr> </thead> <tbody> <tr> <td>Large display</td> <td>1200px and up</td> <td>70px</td> <td>30px</td> </tr> <tr> <td>Default</td> <td>980px and up</td> <td>60px</td> <td>20px</td> </tr> <tr> <td>Portrait tablets</td> <td>768px and above</td> <td>42px</td> <td>20px</td> </tr> <tr> <td>Phones to tablets</td> <td>767px and below</td> <td class="muted" colspan="2">Fluid columns, no fixed widths</td> </tr> <tr> <td>Phones</td> <td>480px and below</td> <td class="muted" colspan="2">Fluid columns, no fixed widths</td> </tr> </tbody> </table> <pre class="prettyprint linenums"> /* Large desktop */ @media (min-width: 1200px) { ... } /* Portrait tablet to landscape and desktop */ @media (min-width: 768px) and (max-width: 979px) { ... } /* Landscape phone to portrait tablet */ @media (max-width: 767px) { ... } /* Landscape phones and down */ @media (max-width: 480px) { ... } </pre> <h2>Responsive utility classes</h2> <p>For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device).</p> <table class="table table-bordered table-striped responsive-utilities"> <thead> <tr> <th>Class</th> <th>Phones <small>767px and below</small></th> <th>Tablets <small>979px to 768px</small></th> <th>Desktops <small>Default</small></th> </tr> </thead> <tbody> <tr> <th><code>.visible-phone</code></th> <td class="is-visible">Visible</td> <td class="is-hidden">Hidden</td> <td class="is-hidden">Hidden</td> </tr> <tr> <th><code>.visible-tablet</code></th> <td class="is-hidden">Hidden</td> <td class="is-visible">Visible</td> <td class="is-hidden">Hidden</td> </tr> <tr> <th><code>.visible-desktop</code></th> <td class="is-hidden">Hidden</td> <td class="is-hidden">Hidden</td> <td class="is-visible">Visible</td> </tr> <tr> <th><code>.hidden-phone</code></th> <td class="is-hidden">Hidden</td> <td class="is-visible">Visible</td> <td class="is-visible">Visible</td> </tr> <tr> <th><code>.hidden-tablet</code></th> <td class="is-visible">Visible</td> <td class="is-hidden">Hidden</td> <td class="is-visible">Visible</td> </tr> <tr> <th><code>.hidden-desktop</code></th> <td class="is-visible">Visible</td> <td class="is-visible">Visible</td> <td class="is-hidden">Hidden</td> </tr> </tbody> </table> <h3>When to use</h3> <p>Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation. Responsive utilities should not be used with tables, and as such are not supported.</p> <h3>Responsive utilities test case</h3> <p>Resize your browser or load on different devices to test the above classes.</p> <h4>Visible on...</h4> <p>Green checkmarks indicate that class is visible in your current viewport.</p> <ul class="responsive-utilities-test"> <li>Phone<span class="visible-phone">&#10004; Phone</span></li> <li>Tablet<span class="visible-tablet">&#10004; Tablet</span></li> <li>Desktop<span class="visible-desktop">&#10004; Desktop</span></li> </ul> <h4>Hidden on...</h4> <p>Here, green checkmarks indicate that class is hidden in your current viewport.</p> <ul class="responsive-utilities-test hidden-on"> <li>Phone<span class="hidden-phone">&#10004; Phone</span></li> <li>Tablet<span class="hidden-tablet">&#10004; Tablet</span></li> <li>Desktop<span class="hidden-desktop">&#10004; Desktop</span></li> </ul> </section> </div> </div> </div> <!-- Footer ================================================== --> <footer class="footer"> <div class="container"> <div class="bs-docs-social"> <ul class="bs-docs-social-buttons"> <li> <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe> </li> <li> <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe> </li> <li class="follow-btn"> <a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a> </li> <li class="tweet-btn"> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twitter.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a> </li> </ul> </div> <p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p> <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> <p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> <ul class="footer-links"> <li><a href="http://blog.getbootstrap.com">Blog</a></li> <li class="muted">&middot;</li> <li><a href="https://github.com/twitter/bootstrap/issues?state=open">Issues</a></li> <li class="muted">&middot;</li> <li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> </ul> </div> </footer> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <script src="assets/js/jquery.js"></script> <script src="assets/js/bootstrap-transition.js"></script> <script src="assets/js/bootstrap-alert.js"></script> <script src="assets/js/bootstrap-modal.js"></script> <script src="assets/js/bootstrap-dropdown.js"></script> <script src="assets/js/bootstrap-scrollspy.js"></script> <script src="assets/js/bootstrap-tab.js"></script> <script src="assets/js/bootstrap-tooltip.js"></script> <script src="assets/js/bootstrap-popover.js"></script> <script src="assets/js/bootstrap-button.js"></script> <script src="assets/js/bootstrap-collapse.js"></script> <script src="assets/js/bootstrap-carousel.js"></script> <script src="assets/js/bootstrap-typeahead.js"></script> <script src="assets/js/bootstrap-affix.js"></script> <script src="assets/js/holder/holder.js"></script> <script src="assets/js/google-code-prettify/prettify.js"></script> <script src="assets/js/application.js"></script> </body> </html>
{ "content_hash": "791969a9b13640ad5bc54ec6722c4d23", "timestamp": "", "source": "github", "line_count": 2436, "max_line_length": 415, "avg_line_length": 42.82266009852217, "alnum_prop": 0.5450458223091377, "repo_name": "kbanman/phantom-bootstrap", "id": "53cd678d03e80d47730106b90d10bc6b3a3d7a20", "size": "104333", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/css.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "JavaScript", "bytes": "243802" } ], "symlink_target": "" }
function getArmor(index) local armor = game.players[index].get_inventory(defines.inventory.player_armor)[1] if armor ~= nil and armor.valid_for_read == true then return armor end return false end function decideHoverboardStatus(event) local index = event.player_index local armor = getArmor(index) if armor ~= false then local equipment = armor.grid.equipment for i, e in ipairs(equipment) do if e.name == "hoverboard" then activateEquipment(index) end end else deactivateEquipment(index) end end script.on_event(defines.events.on_player_armor_inventory_changed, decideHoverboardStatus)
{ "content_hash": "a523a3affd6dee27aa20b368025701bc", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 89, "avg_line_length": 26.958333333333332, "alnum_prop": 0.7248840803709428, "repo_name": "kiba/Factorio-MagneticFloor", "id": "55a3d804fc5c7cab369bf5c89b44747610bb2f95", "size": "647", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/armor.lua", "mode": "33188", "license": "mit", "language": [ { "name": "Lua", "bytes": "102357" }, { "name": "Ruby", "bytes": "1210" }, { "name": "Shell", "bytes": "159" } ], "symlink_target": "" }
@class RemotingClient; @protocol ClientGesturesDelegate<NSObject> - (void)keyboardShouldShow; - (void)keyboardShouldHide; - (void)menuShouldShow; @end @interface ClientGestures : NSObject - (instancetype)initWithView:(UIView*)view client:(RemotingClient*)client; @property(weak, nonatomic) id<ClientGesturesDelegate> delegate; @end #endif // REMOTING_IOS_CLIENT_GESTURES_H_
{ "content_hash": "f65242b11a1ecc427a4582789e35b0e7", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 74, "avg_line_length": 22.470588235294116, "alnum_prop": 0.7853403141361257, "repo_name": "endlessm/chromium-browser", "id": "6cc4bad7b35b6f7eddc08933df5d913f09718884", "size": "688", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "remoting/ios/client_gestures.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "1a3f1ed9e5664062f6c31c0b4d73142f", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.307692307692308, "alnum_prop": 0.6940298507462687, "repo_name": "mdoering/backbone", "id": "a8ff18d292e2e6b6ada3cc12140d362f394f0442", "size": "200", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Amaryllidaceae/Allium/Allium callimischon/Allium callimischon callimischon/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
{% extends "account/base.html" %} {% load i18n %} {% load crispy_forms_tags %} {% block head_title %}{% trans "Account" %}{% endblock %} {% block content %} <div class="container"> <div class="row"> <div class="col-md-5"> <h2>{% trans "E-mail Addresses" %}</h2> {% if user.emailaddress_set.all %} <p>{% trans 'The following e-mail addresses are associated with your account:' %}</p> <form action="{% url 'account_email' %}" class="email_list" method="post"> {% csrf_token %} <fieldset class="blockLabels"> {% for emailaddress in user.emailaddress_set.all %} <div class="ctrlHolder"> <label for="email_radio_{{ forloop.counter }}" class="{% if emailaddress.primary %}primary_email{% endif %}"> <input id="email_radio_{{ forloop.counter }}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{% endif %} value="{{ emailaddress.email }}"/> {{ emailaddress.email }} {% if emailaddress.verified %} <span class="verified">{% trans "Verified" %}</span> {% else %} <span class="unverified">{% trans "Unverified" %}</span> {% endif %} {% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %} </label> </div> {% endfor %} <div class="buttonHolder"> <button class="secondaryAction" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button> <button class="secondaryAction" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button> <button class="primaryAction" type="submit" name="action_remove" >{% trans 'Remove' %}</button> </div> </fieldset> </form> {% else %} <p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p> {% endif %} <h2>{% trans "Add E-mail Address" %}</h2> <form method="post" action="." class="add_email"> {% csrf_token %} {{ form|crispy }} <button class="btn" name="action_add" type="submit">{% trans "Add E-mail" %}</button> </form> </div> </div> </div> {% endblock %} {% block extra_body %} <script type="text/javascript"> (function() { var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}"; var actions = document.getElementsByName('action_remove'); if (actions.length) { actions[0].addEventListener("click", function(e) { if (! confirm(message)) { e.preventDefault(); } }); } })(); </script> {% endblock %}
{ "content_hash": "8e42cf18541ab451033e339a5f31bdc6", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 218, "avg_line_length": 35.139240506329116, "alnum_prop": 0.5706051873198847, "repo_name": "fretscha/pfa", "id": "5a34404cfa0c68c3b56b4e87000ac314219e3172", "size": "2776", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "pfa/templates/account/email.html", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "1212" }, { "name": "HTML", "bytes": "19726" }, { "name": "JavaScript", "bytes": "2764" }, { "name": "Python", "bytes": "52340" }, { "name": "Shell", "bytes": "2429" } ], "symlink_target": "" }
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from django.views.generic import TemplateView from thanksobama.main.views import * urlpatterns = patterns('', # Examples: # url(r'^$', 'thanksobama.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^$', TemplateView.as_view(template_name='index.html')), url(r'^new-question/$', NewQuestion.as_view()) )
{ "content_hash": "04cc025f85da50033d7a06aa2556a124", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 62, "avg_line_length": 29.235294117647058, "alnum_prop": 0.6901408450704225, "repo_name": "kz26/ThanksObama", "id": "97c952a0655b2fcd99d19a209d75b6efdb606cbb", "size": "497", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "thanksobama/urls.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "33" }, { "name": "CoffeeScript", "bytes": "1835" }, { "name": "Python", "bytes": "8931" } ], "symlink_target": "" }
title: Notes anchor: notes --- ### Browser support Browser support for the canvas element is available in all modern & major mobile browsers <a href="http://caniuse.com/canvas" target="_blank">(caniuse.com/canvas)</a>. For IE8 & below, I would recommend using the polyfill ExplorerCanvas - available at <a href="https://code.google.com/p/explorercanvas/" target="_blank">https://code.google.com/p/explorercanvas/</a>. It falls back to Internet explorer's format VML when canvas support is not available. Example use: ```html <head> <!--[if lte IE 8]> <script src="excanvas.js"></script> <![endif]--> </head> ``` Usually I would recommend feature detection to choose whether or not to load a polyfill, rather than IE conditional comments, however in this case, VML is a Microsoft proprietary format, so it will only work in IE. Some important points to note in my experience using ExplorerCanvas as a fallback. - Initialise charts on load rather than DOMContentReady when using the library, as sometimes a race condition will occur, and it will result in an error when trying to get the 2d context of a canvas. - New VML DOM elements are being created for each animation frame and there is no hardware acceleration. As a result animation is usually slow and jerky, with flashing text. It is a good idea to dynamically turn off animation based on canvas support. I recommend using the excellent <a href="http://modernizr.com/" target="_blank">Modernizr</a> to do this. - When declaring fonts, the library explorercanvas requires the font name to be in single quotes inside the string. For example, instead of your scaleFontFamily property being simply "Arial", explorercanvas support, use "'Arial'" instead. Chart.js does this for default values. ### Bugs & issues Please report these on the GitHub page - at <a href="https://github.com/nnnick/Chart.js" target="_blank">github.com/nnnick/Chart.js</a>. If you could include a link to a simple <a href="http://jsbin.com/" target="_blank">jsbin</a> or similar to demonstrate the issue, that'd be really helpful. ### Contributing New contributions to the library are welcome, just a couple of guidelines: - Tabs for indentation, not spaces please. - Please ensure you're changing the individual files in `/src`, not the concatenated output in the `Chart.js` file in the root of the repo. - Please check that your code will pass `jshint` code standards, `gulp jshint` will run this for you. - Please keep pull requests concise, and document new functionality in the relevant `.md` file. - Consider whether your changes are useful for all users, or if creating a Chart.js extension would be more appropriate. ### License Chart.js is open source and available under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>.
{ "content_hash": "60b954322d1a889f09d91cf584ac6655", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 356, "avg_line_length": 69.36585365853658, "alnum_prop": 0.75, "repo_name": "IIC3143-Equipo1/angularJS", "id": "96eb8d7fce013260a74474cb96942fd519f05dde", "size": "2849", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "app/bower_components/Chart.js/docs/07-Notes.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "24139" }, { "name": "CSS", "bytes": "11202" }, { "name": "HTML", "bytes": "235337" }, { "name": "JavaScript", "bytes": "120874" } ], "symlink_target": "" }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* | ------------------------------------------------------------------- | DATABASE CONNECTIVITY SETTINGS | ------------------------------------------------------------------- | This file will contain the settings needed to access your database. | | For complete instructions please consult the 'Database Connection' | page of the User Guide. | | ------------------------------------------------------------------- | EXPLANATION OF VARIABLES | ------------------------------------------------------------------- | | ['dsn'] The full DSN string describe a connection to the database. | ['hostname'] The hostname of your database server. | ['username'] The username used to connect to the database | ['password'] The password used to connect to the database | ['database'] The name of the database you want to connect to | ['dbdriver'] The database driver. e.g.: mysqli. | Currently supported: | cubrid, ibase, mssql, mysql, mysqli, oci8, | odbc, pdo, postgre, sqlite, sqlite3, sqlsrv | ['dbprefix'] You can add an optional prefix, which will be added | to the table name when using the Query Builder class | ['pconnect'] TRUE/FALSE - Whether to use a persistent connection | ['db_debug'] TRUE/FALSE - Whether database errors should be displayed. | ['cache_on'] TRUE/FALSE - Enables/disables query caching | ['cachedir'] The path to the folder where cache files should be stored | ['char_set'] The character set used in communicating with the database | ['dbcollat'] The character collation used in communicating with the database | NOTE: For MySQL and MySQLi databases, this setting is only used | as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 | (and in table creation queries made with DB Forge). | There is an incompatibility in PHP with mysql_real_escape_string() which | can make your site vulnerable to SQL injection if you are using a | multi-byte character set and are running versions lower than these. | Sites using Latin-1 or UTF-8 database character set and collation are unaffected. | ['swap_pre'] A default table prefix that should be swapped with the dbprefix | ['encrypt'] Whether or not to use an encrypted connection. | | 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE | 'mysqli' and 'pdo/mysql' drivers accept an array with the following options: | | 'ssl_key' - Path to the private key file | 'ssl_cert' - Path to the public key certificate file | 'ssl_ca' - Path to the certificate authority file | 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format | 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':') | 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only) | | ['compress'] Whether or not to use client compression (MySQL only) | ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections | - good for ensuring strict SQL while developing | ['ssl_options'] Used to set various SSL options that can be used when making SSL connections. | ['failover'] array - A array with 0 or more data for connections if the main should fail. | ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries. | NOTE: Disabling this will also effectively disable both | $this->db->last_query() and profiling of DB queries. | When you run a query, with this setting set to TRUE (default), | CodeIgniter will store the SQL statement for debugging purposes. | However, this may cause high memory usage, especially if you run | a lot of SQL queries ... disable this to avoid that problem. | | The $active_group variable lets you choose which connection group to | make active. By default there is only one group (the 'default' group). | | The $query_builder variables lets you determine whether or not to load | the query builder class. */ $active_group = 'default'; $query_builder = TRUE; $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'igniter', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
{ "content_hash": "f84231940f22be58bd27f6ec616e3116", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 102, "avg_line_length": 47.135416666666664, "alnum_prop": 0.6574585635359116, "repo_name": "fiWhy/CodeIgniter-Chat-Application", "id": "c1b8ab7f45394ccba47e59f15a55bb556fb6fcd1", "size": "4525", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/config/database.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "417" }, { "name": "CSS", "bytes": "15433" }, { "name": "HTML", "bytes": "8042855" }, { "name": "JavaScript", "bytes": "55128" }, { "name": "PHP", "bytes": "1861638" } ], "symlink_target": "" }
'use strict' module.exports = require('../lib/actions/TYPES')
{ "content_hash": "8085fe9059573eb10085f9e7bd529054", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 48, "avg_line_length": 21, "alnum_prop": 0.6984126984126984, "repo_name": "agrasley/react-recorder-redux", "id": "1bf83aa29cd13b9bac57d20364bade24f68daa53", "size": "63", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "actions/TYPES.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "7434" } ], "symlink_target": "" }
extern "Java" { namespace gnu { namespace java { namespace beans { namespace decoder { class ClassHandler; class ElementHandler; } } } } } class gnu::java::beans::decoder::ClassHandler : public ::gnu::java::beans::decoder::SimpleHandler { public: // actually package-private ClassHandler(::gnu::java::beans::decoder::ElementHandler *); public: // actually protected virtual ::java::lang::Object * parse(::java::lang::String *); public: static ::java::lang::Class class$; }; #endif // __gnu_java_beans_decoder_ClassHandler__
{ "content_hash": "3e7f0366d29014b5ee0a3d774719304d", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 97, "avg_line_length": 20.566666666666666, "alnum_prop": 0.6110210696920584, "repo_name": "the-linix-project/linix-kernel-source", "id": "7c8ea8844aa3739d2236ab124f31e3bbfd501ce4", "size": "848", "binary": false, "copies": "157", "ref": "refs/heads/master", "path": "gccsrc/gcc-4.7.2/libjava/gnu/java/beans/decoder/ClassHandler.h", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Ada", "bytes": "38139979" }, { "name": "Assembly", "bytes": "3723477" }, { "name": "Awk", "bytes": "83739" }, { "name": "C", "bytes": "103607293" }, { "name": "C#", "bytes": "55726" }, { "name": "C++", "bytes": "38577421" }, { "name": "CLIPS", "bytes": "6933" }, { "name": "CSS", "bytes": "32588" }, { "name": "Emacs Lisp", "bytes": "13451" }, { "name": "FORTRAN", "bytes": "4294984" }, { "name": "GAP", "bytes": "13089" }, { "name": "Go", "bytes": "11277335" }, { "name": "Haskell", "bytes": "2415" }, { "name": "Java", "bytes": "45298678" }, { "name": "JavaScript", "bytes": "6265" }, { "name": "Matlab", "bytes": "56" }, { "name": "OCaml", "bytes": "148372" }, { "name": "Objective-C", "bytes": "995127" }, { "name": "Objective-C++", "bytes": "436045" }, { "name": "PHP", "bytes": "12361" }, { "name": "Pascal", "bytes": "40318" }, { "name": "Perl", "bytes": "358808" }, { "name": "Python", "bytes": "60178" }, { "name": "SAS", "bytes": "1711" }, { "name": "Scilab", "bytes": "258457" }, { "name": "Shell", "bytes": "2610907" }, { "name": "Tcl", "bytes": "17983" }, { "name": "TeX", "bytes": "1455571" }, { "name": "XSLT", "bytes": "156419" } ], "symlink_target": "" }
/** * Filter the query by 2 <?php echo $refClassName ?> objects for a Equal Nest <?php echo $className ?> relation * * @param <?php echo $refClassName ?>|integer $object1 * @param <?php echo $refClassName ?>|integer $object2 * @return <?php echo $queryClassName ?> Fluent API */ public function filterBy<?php echo $pluralRefClassName ?>($object1, $object2) { return $this ->condition('first-one', '<?php echo $fullNameRefColumn1 ?> = ?', is_object($object1) ? $object1->getPrimaryKey() : $object1) ->condition('first-two', '<?php echo $fullNameRefColumn2 ?> = ?', is_object($object2) ? $object2->getPrimaryKey() : $object2) ->condition('second-one', '<?php echo $fullNameRefColumn2 ?> = ?', is_object($object1) ? $object1->getPrimaryKey() : $object1) ->condition('second-two', '<?php echo $fullNameRefColumn1 ?> = ?', is_object($object2) ? $object2->getPrimaryKey() : $object2) ->combine(array('first-one', 'first-two'), 'AND', 'first') ->combine(array('second-one', 'second-two'), 'AND', 'second') ->where(array('first', 'second'), 'OR'); }
{ "content_hash": "a2a60802b019f0cdabca0562c44a2388", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 134, "avg_line_length": 59.21052631578947, "alnum_prop": 0.6213333333333333, "repo_name": "VanTanev/EqualNestBehavior", "id": "fa61325ed4ab140cdf38d65eb3b6eaeabecbe9bb", "size": "1125", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/templates/queryMethods.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "98232" } ], "symlink_target": "" }
package codeu.chat.client.commandline; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; // PANEL // // A panel is a collection of commands that are to be executed within a specifc // context. Similar to how panels are used in a GUI, is is a command line // equivalent. // final class Panel { public interface Command { void invoke(List<String> args); } private final Map<String, Command> commands = new HashMap<>(); // REGISTER // // Register the command to be called when the given command name is // given on the command line. // public void register(String commandName, Command command) { commands.put(commandName, command); } // HANDLE COMMAND // // Given a command name and the rest of the line (from the command line) call // the correct command. If no command is found for the givem command name, false // will be returned. True will be return if a command is found. Whether or not // the command was successful is not returned. // public boolean handleCommand(String commandName, List<String> args) { final Command command = commands.get(commandName); if (command != null) { command.invoke(args); } return command != null; } }
{ "content_hash": "caa435a9a7adefd04d99324d8fd895b6", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 82, "avg_line_length": 27.933333333333334, "alnum_prop": 0.7008750994431185, "repo_name": "PabloG6/codeu_project_2017", "id": "8a3ab9bebb50c1107e9038a3908a05df030505b3", "size": "1845", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/codeu/chat/client/commandline/Panel.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "226367" }, { "name": "Python", "bytes": "5144" } ], "symlink_target": "" }
package com.cky.learnandroiddetails.MVP; /** * Created by cuikangyuan on 16/7/29. */ public class LoginPresenterImpl implements LoginPresenter, OnLoginFinishedListener { private LoginView mLoginView; private LoginModel mLoginModel; public LoginPresenterImpl(LoginView loginView) { mLoginView = loginView; mLoginModel = new LoginModelImpl(); } @Override public void validateCredentials(String username, String password) { if (mLoginView != null) { mLoginView.showProgress(); } mLoginModel.login(username, password, this); } @Override public void onDestroy() { mLoginView = null; } @Override public void onSuccess() { if (mLoginView != null) { mLoginView.hideProgress(); mLoginView.navigateToHome(); } } @Override public void onUsernameError() { if (mLoginView != null) { mLoginView.setUsernameError(); mLoginView.hideProgress(); } } @Override public void onPasswordError() { if (mLoginView != null) { mLoginView.setPasswordError(); mLoginView.hideProgress(); } } }
{ "content_hash": "715b6ac4848be9198f8d38baf0ad6854", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 84, "avg_line_length": 22.814814814814813, "alnum_prop": 0.6038961038961039, "repo_name": "cuikangyuan/LearnAndroidDetails", "id": "ad87af71909d3b4bf0ecc0e53ebdfeebeaf69c6c", "size": "1232", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/cky/learnandroiddetails/MVP/LoginPresenterImpl.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "408" }, { "name": "Java", "bytes": "832012" } ], "symlink_target": "" }
Async Http Client ([@AsyncHttpClient](https://twitter.com/AsyncHttpClient) on twitter) --------------------------------------------------- [Javadoc](http://www.javadoc.io/doc/com.ning/async-http-client/) [Getting](https://jfarcand.wordpress.com/2010/12/21/going-asynchronous-using-asynchttpclient-the-basic/) [started](https://jfarcand.wordpress.com/2011/01/04/going-asynchronous-using-asynchttpclient-the-complex/), and use [WebSockets](http://jfarcand.wordpress.com/2011/12/21/writing-websocket-clients-using-asynchttpclient/) Async Http Client library purpose is to allow Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. The library also supports the WebSocket Protocol. The Async HTTP Client library is simple to use. ## Installation First, in order to add it to your Maven project, simply add this dependency: ```xml <dependency> <groupId>com.ning</groupId> <artifactId>async-http-client</artifactId> <version>1.9.30</version> </dependency> ``` You can also download the artifact [Maven Search](http://search.maven.org) AHC is an abstraction layer that can work on top of the bare JDK, Netty and Grizzly. Note that the JDK implementation is very limited and you should **REALLY** use the other *real* providers. You then have to add the Netty or Grizzly jars in the classpath. For Netty: ```xml <dependency> <groupId>io.netty</groupId> <artifactId>netty</artifactId> <version>LATEST_NETTY_3_VERSION</version> </dependency> ``` For Grizzly: ```xml <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>connection-pool</artifactId> <version>LATEST_GRIZZLY_VERSION</version> </dependency> <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-websockets</artifactId> <version>LATEST_GRIZZLY_VERSION</version> </dependency> ``` Check [migration guide](MIGRATION.md) for migrating from 1.8 to 1.9. ## Usage Then in your code you can simply do ```java import com.ning.http.client.*; import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); Future<Response> f = asyncHttpClient.prepareGet("http://www.ning.com/").execute(); Response r = f.get(); ``` Note that in this case all the content must be read fully in memory, even if you used `getResponseBodyAsStream()` method on returned `Response` object. You can also accomplish asynchronous (non-blocking) operation without using a Future if you want to receive and process the response in your handler: ```java import com.ning.http.client.*; import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); asyncHttpClient.prepareGet("http://www.ning.com/").execute(new AsyncCompletionHandler<Response>(){ @Override public Response onCompleted(Response response) throws Exception{ // Do something with the Response // ... return response; } @Override public void onThrowable(Throwable t){ // Something wrong happened. } }); ``` (this will also fully read `Response` in memory before calling `onCompleted`) You can also mix Future with AsyncHandler to only retrieve part of the asynchronous response ```java import com.ning.http.client.*; import java.util.concurrent.Future; AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); Future<Integer> f = asyncHttpClient.prepareGet("http://www.ning.com/").execute( new AsyncCompletionHandler<Integer>(){ @Override public Integer onCompleted(Response response) throws Exception{ // Do something with the Response return response.getStatusCode(); } @Override public void onThrowable(Throwable t){ // Something wrong happened. } }); int statusCode = f.get(); ``` which is something you want to do for large responses: this way you can process content as soon as it becomes available, piece by piece, without having to buffer it all in memory. You have full control on the Response life cycle, so you can decide at any moment to stop processing what the server is sending back: ```java import com.ning.http.client.*; import java.util.concurrent.Future; AsyncHttpClient c = new AsyncHttpClient(); Future<String> f = c.prepareGet("http://www.ning.com/").execute(new AsyncHandler<String>() { private ByteArrayOutputStream bytes = new ByteArrayOutputStream(); @Override public STATE onStatusReceived(HttpResponseStatus status) throws Exception { int statusCode = status.getStatusCode(); // The Status have been read // If you don't want to read the headers,body or stop processing the response if (statusCode >= 500) { return STATE.ABORT; } } @Override public STATE onHeadersReceived(HttpResponseHeaders h) throws Exception { Headers headers = h.getHeaders(); // The headers have been read // If you don't want to read the body, or stop processing the response return STATE.ABORT; } @Override public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { bytes.write(bodyPart.getBodyPartBytes()); return STATE.CONTINUE; } @Override public String onCompleted() throws Exception { // Will be invoked once the response has been fully read or a ResponseComplete exception // has been thrown. // NOTE: should probably use Content-Encoding from headers return bytes.toString("UTF-8"); } @Override public void onThrowable(Throwable t) { } }); String bodyResponse = f.get(); ``` ## Configuration Finally, you can also configure the AsyncHttpClient via its AsyncHttpClientConfig object: ```java AsyncHttpClientConfig cf = new AsyncHttpClientConfig.Builder() S.setProxyServer(new ProxyServer("127.0.0.1", 38080)).build(); AsyncHttpClient c = new AsyncHttpClient(cf); ``` ## WebSocket Async Http Client also support WebSocket by simply doing: ```java WebSocket websocket = c.prepareGet(getTargetUrl()) .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener( new WebSocketTextListener() { @Override public void onMessage(String message) { } @Override public void onOpen(WebSocket websocket) { websocket.sendTextMessage("...").sendMessage("..."); } @Override public void onClose(WebSocket websocket) { latch.countDown(); } @Override public void onError(Throwable t) { } }).build()).get(); ``` The library uses Java non blocking I/O for supporting asynchronous operations. The default asynchronous provider is build on top of [Netty](http://www.jboss.org/netty), but the library exposes a configurable provider SPI which allows to easily plug in other frameworks like [Grizzly](http://grizzly.java.net) ```java AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder().build(); AsyncHttpClient client = new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config); ``` ## User Group Keep up to date on the library development by joining the Asynchronous HTTP Client discussion group [Google Group](http://groups.google.com/group/asynchttpclient) ## Contributing Of course, Pull Requests are welcome. Here a the few rules we'd like you to respect if you do so: * Only edit the code related to the suggested change, so DON'T automatically format the classes you've edited. * Respect the formatting rules: * Ident with 4 spaces * Use a 140 chars line max length * Don't use * imports * Stick to the org, com, javax, java imports order * Your PR can contain multiple commits when submitting, but once it's been reviewed, we'll ask you to squash them into a single one * Regarding licensing: * You must be the original author of the code you suggest. * If not, you have to prove that the original code was published under Apache License 2 and properly mention original copyrights.
{ "content_hash": "4e9a0d26c566c1ce0ea33c63206d0893", "timestamp": "", "source": "github", "line_count": 243, "max_line_length": 324, "avg_line_length": 33.1522633744856, "alnum_prop": 0.714498510427011, "repo_name": "stepancheg/async-http-client", "id": "9647d8f5a4ea2c92939f3d573635a680e71f1b28", "size": "8056", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "2441789" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_45) on Sat Sep 28 14:09:56 CEST 2013 --> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE> org.apache.solr.client.solrj.response (Solr 4.5.0 API) </TITLE> <META NAME="date" CONTENT="2013-09-28"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.apache.solr.client.solrj.response (Solr 4.5.0 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= 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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.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="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../org/apache/solr/client/solrj/request/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp; &nbsp;<A HREF="../../../../../../org/apache/solr/client/solrj/util/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/solr/client/solrj/response/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-summary.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> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <H2> Package org.apache.solr.client.solrj.response </H2> Convenience classes for dealing with various types of Solr responses. <P> <B>See:</B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A> <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/AnalysisResponseBase.html" title="class in org.apache.solr.client.solrj.response">AnalysisResponseBase</A></B></TD> <TD>A base class for all analysis responses.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/AnalysisResponseBase.AnalysisPhase.html" title="class in org.apache.solr.client.solrj.response">AnalysisResponseBase.AnalysisPhase</A></B></TD> <TD>A phase in the analysis process.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/AnalysisResponseBase.TokenInfo.html" title="class in org.apache.solr.client.solrj.response">AnalysisResponseBase.TokenInfo</A></B></TD> <TD>Holds all information of a token as part of an analysis phase.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/CoreAdminResponse.html" title="class in org.apache.solr.client.solrj.response">CoreAdminResponse</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/DocumentAnalysisResponse.html" title="class in org.apache.solr.client.solrj.response">DocumentAnalysisResponse</A></B></TD> <TD>A response that is returned by processing the <A HREF="../../../../../../org/apache/solr/client/solrj/request/DocumentAnalysisRequest.html" title="class in org.apache.solr.client.solrj.request"><CODE>DocumentAnalysisRequest</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/DocumentAnalysisResponse.DocumentAnalysis.html" title="class in org.apache.solr.client.solrj.response">DocumentAnalysisResponse.DocumentAnalysis</A></B></TD> <TD>An analysis process breakdown of a document.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/DocumentAnalysisResponse.FieldAnalysis.html" title="class in org.apache.solr.client.solrj.response">DocumentAnalysisResponse.FieldAnalysis</A></B></TD> <TD>An analysis process breakdown for a specific field.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/FacetField.html" title="class in org.apache.solr.client.solrj.response">FacetField</A></B></TD> <TD>A utility class to hold the facet response.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/FacetField.Count.html" title="class in org.apache.solr.client.solrj.response">FacetField.Count</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/FieldAnalysisResponse.html" title="class in org.apache.solr.client.solrj.response">FieldAnalysisResponse</A></B></TD> <TD>A response that is returned by processing the <A HREF="../../../../../../org/apache/solr/client/solrj/request/FieldAnalysisRequest.html" title="class in org.apache.solr.client.solrj.request"><CODE>FieldAnalysisRequest</CODE></A>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/FieldAnalysisResponse.Analysis.html" title="class in org.apache.solr.client.solrj.response">FieldAnalysisResponse.Analysis</A></B></TD> <TD>The analysis of a field.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/FieldStatsInfo.html" title="class in org.apache.solr.client.solrj.response">FieldStatsInfo</A></B></TD> <TD>Holds stats info</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/Group.html" title="class in org.apache.solr.client.solrj.response">Group</A></B></TD> <TD>Represents a group.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/GroupCommand.html" title="class in org.apache.solr.client.solrj.response">GroupCommand</A></B></TD> <TD>This class represents the result of a group command.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/GroupResponse.html" title="class in org.apache.solr.client.solrj.response">GroupResponse</A></B></TD> <TD>Overall grouping result.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/LukeResponse.html" title="class in org.apache.solr.client.solrj.response">LukeResponse</A></B></TD> <TD>This is an incomplete representation of the data returned from Luke</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/LukeResponse.FieldInfo.html" title="class in org.apache.solr.client.solrj.response">LukeResponse.FieldInfo</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/LukeResponse.FieldTypeInfo.html" title="class in org.apache.solr.client.solrj.response">LukeResponse.FieldTypeInfo</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/PivotField.html" title="class in org.apache.solr.client.solrj.response">PivotField</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/QueryResponse.html" title="class in org.apache.solr.client.solrj.response">QueryResponse</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/RangeFacet.html" title="class in org.apache.solr.client.solrj.response">RangeFacet&lt;B,G&gt;</A></B></TD> <TD>Represents a range facet result</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/RangeFacet.Count.html" title="class in org.apache.solr.client.solrj.response">RangeFacet.Count</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/RangeFacet.Date.html" title="class in org.apache.solr.client.solrj.response">RangeFacet.Date</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/RangeFacet.Numeric.html" title="class in org.apache.solr.client.solrj.response">RangeFacet.Numeric</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/SolrPingResponse.html" title="class in org.apache.solr.client.solrj.response">SolrPingResponse</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/SolrResponseBase.html" title="class in org.apache.solr.client.solrj.response">SolrResponseBase</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/SpellCheckResponse.html" title="class in org.apache.solr.client.solrj.response">SpellCheckResponse</A></B></TD> <TD>Encapsulates responses from SpellCheckComponent</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/SpellCheckResponse.Suggestion.html" title="class in org.apache.solr.client.solrj.response">SpellCheckResponse.Suggestion</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/TermsResponse.html" title="class in org.apache.solr.client.solrj.response">TermsResponse</A></B></TD> <TD>Encapsulates responses from TermsComponent</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/TermsResponse.Term.html" title="class in org.apache.solr.client.solrj.response">TermsResponse.Term</A></B></TD> <TD>&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/solr/client/solrj/response/UpdateResponse.html" title="class in org.apache.solr.client.solrj.response">UpdateResponse</A></B></TD> <TD>TODO -- mostly a stub until we have a defined output format</TD> </TR> </TABLE> &nbsp; <P> <A NAME="package_description"><!-- --></A><H2> Package org.apache.solr.client.solrj.response Description </H2> <P> Convenience classes for dealing with various types of Solr responses. <P> <P> <DL> </DL> <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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.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="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../org/apache/solr/client/solrj/request/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp; &nbsp;<A HREF="../../../../../../org/apache/solr/client/solrj/util/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/solr/client/solrj/response/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-summary.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> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright &copy; 2000-2013 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </BODY> </HTML>
{ "content_hash": "1828b0eabf50cee8f8c92f8b4a8826e9", "timestamp": "", "source": "github", "line_count": 307, "max_line_length": 244, "avg_line_length": 53.82736156351792, "alnum_prop": 0.6404236006051437, "repo_name": "hajimeni/dbflute-solr-example", "id": "06a6bad413d8576c7fe599b9cbe5d5ae1ff96775", "size": "16525", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "solr-4.5.0/docs/solr-solrj/org/apache/solr/client/solrj/response/package-summary.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "151119" }, { "name": "Java", "bytes": "4711017" }, { "name": "JavaScript", "bytes": "1159148" }, { "name": "Perl", "bytes": "9821" }, { "name": "Python", "bytes": "3285" }, { "name": "Shell", "bytes": "53114" }, { "name": "XSLT", "bytes": "242763" } ], "symlink_target": "" }
title: "NGINX Ingress" meta_title: "nginx" meta_description: "Polyaxon provides support for an Ingress resource compatible with the Nginx stable helm chart." custom_excerpt: "NGINX Ingress Controller for Kubernetes is a controller built around the Kubernetes Ingress resource." image: "../../content/images/integrations/nginx.png" author: name: "Polyaxon" slug: "Polyaxon" website: "https://polyaxon.com" twitter: "polyaxonAI" github: "polyaxon" tags: - setup featured: false popularity: 0 visibility: public status: published --- Polyaxon provides support for an Ingress resource compatible with the NGINX stable helm chart or a customized NGINX ingress controller. ## Install Nginx Ingress In order to use NGINX Ingress controller with Polyaxon, you need to install the controller w/o RBAC depending on your cluster: ```yaml helm repo add nginx-stable https://helm.nginx.com/stable helm install nginx nginx-stable/nginx-ingress -n polyaxon ``` ## Enable ingress in your Polyaxon's config deployment ```yaml ingress: enabled: true ``` ## [Optional] Set a host name ```yaml ingress: enabled: true hostName: polyaxon.acme.com ``` ## [Optional] Set tls to serve Polyaxon on HTTPS ```yaml ingress: enabled: true hostName: polyaxon.acme.com tls: - secretName: polyaxon.acme-tls hosts: - polyaxon.acme.com ``` ## Annotations > **Note**: Depending on your version of nginx ingress you may need to prepend `nginx.` to the annotations. E.g.: > ```yaml > nginx.ingress.kubernetes.io/proxy-body-size: 4G > # instead of > ingress.kubernetes.io/proxy-body-size: 4G > ``` Polyaxon's ingress resource can be customized by providing annotations, we recommend the following annotations ```yaml ingress: annotations: ingress.kubernetes.io/rewrite-target: / ingress.kubernetes.io/add-base-url: "true" ``` If you are using the ingress without a tls, you need to set ```yaml ingress: annotations: ingress.kubernetes.io/ssl-redirect: "false" ``` Also to allow the platform to upload/download large files you need to ```yaml ingress: annotations: ingress.kubernetes.io/proxy-connect-timeout: "600" ingress.kubernetes.io/proxy-read-timeout: "600" ingress.kubernetes.io/proxy-send-timeout: "600" ingress.kubernetes.io/send-timeout: "600" ingress.kubernetes.io/proxy-body-size: 4G ``` You might also need to specify the class ```yaml ingress: annotations: kubernetes.io/ingress.class: nginx ``` ## ConfigMap for the controller In addition to the previous annotations, you may need to update the controller's config map: ```yaml data: ssl-redirect: "false" ```
{ "content_hash": "e5a2d7128863be056ba5e3f09715fc91", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 135, "avg_line_length": 23.945945945945947, "alnum_prop": 0.7302483069977427, "repo_name": "polyaxon/polyaxon", "id": "fca5e17565728152d6b68c41ce4c4cb1a6976776", "size": "2662", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "site/integrations/nginx.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "1989" }, { "name": "Python", "bytes": "5201898" }, { "name": "Shell", "bytes": "1565" } ], "symlink_target": "" }
/* eslint-disable camelcase */ /** * 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 limitationsxw * under the License. */ import { ComparisionType, PostProcessingCompare } from '@superset-ui/core'; import { getMetricOffsetsMap, isTimeComparison } from './utils'; import { PostProcessingFactory } from './types'; export const timeCompareOperator: PostProcessingFactory<PostProcessingCompare> = (formData, queryObject) => { const comparisonType = formData.comparison_type; const metricOffsetMap = getMetricOffsetsMap(formData, queryObject); if ( isTimeComparison(formData, queryObject) && comparisonType !== ComparisionType.Values ) { return { operation: 'compare', options: { source_columns: Array.from(metricOffsetMap.values()), compare_columns: Array.from(metricOffsetMap.keys()), compare_type: comparisonType, drop_original_columns: true, }, }; } return undefined; };
{ "content_hash": "5b9cc72e663e62e05a2120573b621274", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 80, "avg_line_length": 37.977777777777774, "alnum_prop": 0.7115272088940902, "repo_name": "zhouyao1994/incubator-superset", "id": "3fe253edfdfd120d4919cb520072b8b74a011e13", "size": "1709", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "superset-frontend/packages/superset-ui-chart-controls/src/operators/timeCompareOperator.ts", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "4776" }, { "name": "Dockerfile", "bytes": "6940" }, { "name": "HTML", "bytes": "1243911" }, { "name": "JavaScript", "bytes": "2445349" }, { "name": "Jinja", "bytes": "5542" }, { "name": "Jupyter Notebook", "bytes": "1925627" }, { "name": "Less", "bytes": "106438" }, { "name": "Makefile", "bytes": "3946" }, { "name": "Mako", "bytes": "1197" }, { "name": "Pug", "bytes": "2969" }, { "name": "Python", "bytes": "6296253" }, { "name": "Shell", "bytes": "56211" }, { "name": "Smarty", "bytes": "4298" }, { "name": "TypeScript", "bytes": "6909337" } ], "symlink_target": "" }
package org.knowm.xchange.coinmate.dto.marketdata; import org.knowm.xchange.coinmate.dto.CoinmateBaseResponse; import com.fasterxml.jackson.annotation.JsonProperty; /** * @author Martin Stachon */ public class CoinmateTransactions extends CoinmateBaseResponse<CoinmateTransactionsData> { public CoinmateTransactions(@JsonProperty("error") boolean error, @JsonProperty("errorMessage") String errorMessage, @JsonProperty("data") CoinmateTransactionsData data) { super(error, errorMessage, data); } }
{ "content_hash": "0e1d278030ceb0a2efe8a51aa2306db2", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 118, "avg_line_length": 27.42105263157895, "alnum_prop": 0.7869481765834933, "repo_name": "stevenuray/XChange", "id": "a02b5738b96a939a43ad2f0eba368f2477dd47b5", "size": "1652", "binary": false, "copies": "6", "ref": "refs/heads/develop", "path": "xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/dto/marketdata/CoinmateTransactions.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "4640444" } ], "symlink_target": "" }
import {ExecuteOnLoad, ExecuteIfSetting} from 'src/utils/actionDecorators'; import {GalleryPage} from 'src/pages/gallery'; import {DictionaryService} from 'src/services'; import {getSearchTerm} from 'src/utils/path'; import appLog from 'src/log'; const log = appLog.setCategory('Search'); export class SearchPage extends GalleryPage { @ExecuteOnLoad public async changeTitle() { const searchTerm = getSearchTerm(document.location.href); log.debug('Found search term:', searchTerm); const terms = await Promise.all(searchTerm.split(' ').map(async term => { const translation = await DictionaryService.getTranslation(term); log.info('Translation for search term', term, 'found to be', translation); return translation || term; })); const titleText = `[${terms.join(', ')}] Search Results`; log.info('Changing title to: ', titleText); document.title = titleText; } public getTagSelectors() { return [ 'div.with-translation-title h1 > a', ]; } }
{ "content_hash": "feffeb9866c3f63d6786e89704a64697", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 86, "avg_line_length": 35.064516129032256, "alnum_prop": 0.6494940202391905, "repo_name": "paarthenon/pixiv-assistant", "id": "96871ce5a1794e722ee13a83becb60873996ff8c", "size": "1087", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "packages/legacy-extension/src/pages/search.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1143" }, { "name": "JavaScript", "bytes": "4812" }, { "name": "TypeScript", "bytes": "95120" } ], "symlink_target": "" }
using ImmutableDotNet.Serialization.Newtonsoft; using Newtonsoft.Json; using ProtoBuf; using Shouldly; using System.Diagnostics; using System.IO; using System.Runtime.Serialization; using System.Text; using System.Text.Json; using Xunit; namespace ImmutableNet.Tests { public class ImmutableTests { class TestClass { public long Test { get; set; } public int Test2 { get; set; } public Immutable<TestClassMember> Data { get; set; } public TestClass() { Data = new Immutable<TestClassMember>(); } } class TestWithSetter { private int _test; public int Test { get { return _test; } set { _test = value * 2; } } } [DataContract] class TestClassMember { [DataMember(Order = 1)] public int Member { get; set; } [DataMember(Order = 2)] public int Member2 { get; set; } } class TestNullableClass { public int? Nullable { get; set; } } [Fact] public void Test_That_Original_Object_Cannot_Be_Modified() { var testClass = new Immutable<TestClass>(); var newTestClass = testClass.Modify(x => x.Test = 1); testClass.Get(x => x.Test).ShouldBe(0); } [Fact] public void Test_That_Returned_Object_Contains_Modifications() { var testClass = new Immutable<TestClass>(); var newTestClass = testClass.Modify(x => x.Test = 2); newTestClass.Get(x => x.Test).ShouldBe(2); } [Fact] public void Test_That_Modify_Uses_Defined_Setter() { var testClass = new Immutable<TestWithSetter>(); var newTestClass = testClass.Modify(x => x.Test = 2); newTestClass.Get(x => x.Test).ShouldBe(4); } [Fact] public void Test_That_Modifying_Nested_Object_Keeps_Original_Unmodified() { var testClass = new Immutable<TestClass>(); var newTestClass = testClass.Modify(x => x.Data = testClass.Get(t => t.Data) .Modify(t => t.Member = 2) ); testClass.Get(x => x.Data.Get(y => y.Member)).ShouldBe(0); } [Fact] public void Test_That_Modifying_Nested_Returns_Modifications() { var testClass = new Immutable<TestClass>(); var newTestClass = testClass.Modify(x => x.Data = testClass.Get(t => t.Data) .Modify(t => t.Member = 2) ); newTestClass.Get(x => x.Data.Get(y => y.Member)).ShouldBe(2); } [Fact] public void Test_That_Getting_Self_Returns_Clone() { var testClass = new Immutable<TestClass>(); testClass = testClass.Modify(x => x.Test = 5); var self = testClass.Get(x => x); self.Test = 6; testClass.Get(x => x.Test).ShouldNotBe(self.Test); } [Fact] public void Test_That_Builder_Modifies_Original_Instance() { var testClass = (new Immutable<TestClass>()).ToBuilder(); testClass.Modify(x => x.Test = 2); testClass.Get(x => x.Test).ShouldBe(2); } [Fact] public void Test_That_ToBuilder_Returns_New_Instance() { var testClass = new Immutable<TestClass>(); var builder = testClass.ToBuilder(); testClass.ShouldNotBe(builder.ToImmutable()); } [Fact] public void Test_That_ToImmutable_Returns_New_Instance() { var testClass = new ImmutableBuilder<TestClass>(); var immutable = testClass.ToImmutable(); testClass.ToImmutable().ShouldNotBe(immutable); } [Fact] public void Test_That_ImmutableBuilder_Does_Not_Modify_Original() { var testClass = (new Immutable<TestClass>()).Modify(x => x.Test = 1); var testClassBuilder = testClass.ToBuilder().Modify(x => x.Test = 2); testClass.Get(x => x.Test).ShouldNotBe(testClassBuilder.Get(x => x.Test)); } [Fact] public void Test_That_Modify_Can_Alter_Converted_Nullables() { var testClass = new Immutable<TestNullableClass>(); decimal? testDecimal = null; testClass = testClass.Modify(x => x.Nullable = (int?)testDecimal); testClass.Get(x => x.Nullable).ShouldBeNull(); } [Fact] public void Test_That_JSON_NET_Serialization_Is_Correct() { var testClass = new Immutable<TestClassMember>(); testClass = testClass.Modify(x => x.Member = 1); var settings = new JsonSerializerSettings(); settings.Converters.Add(new ImmutableJsonConverter()); var json = JsonConvert.SerializeObject(testClass, settings); json.ShouldBe(@"{""Member"":1,""Member2"":0}"); } [Fact] public void Test_That_JSON_NET_Deserialization_Is_Correct() { var settings = new JsonSerializerSettings(); settings.Converters.Add(new ImmutableJsonConverter()); var json = @"{""Member"":1,""Member2"":0}"; var immutable = JsonConvert.DeserializeObject<Immutable<TestClassMember>>(json, settings); immutable.Get(x => x.Member).ShouldBe(1); immutable.Get(x => x.Member2).ShouldBe(0); } [Fact] public void Test_That_System_Text_Json_Serialization_Is_Correct() { var testClass = new Immutable<TestClassMember>(); testClass = testClass.Modify(x => x.Member = 1); var settings = new JsonSerializerOptions(); settings.Converters.Add(new ImmutableDotNet.Serialization.Json.ImmutableJsonConverter()); var json = System.Text.Json.JsonSerializer.Serialize(testClass, settings); json.ShouldBe(@"{""Member"":1,""Member2"":0}"); } [Fact] public void Test_That_System_Text_Json_Deserialization_Is_Correct() { var settings = new JsonSerializerOptions(); settings.Converters.Add(new ImmutableDotNet.Serialization.Json.ImmutableJsonConverter()); var json = @"{""Member"":1,""Member2"":0}"; var immutable = System.Text.Json.JsonSerializer.Deserialize<Immutable<TestClassMember>>(json, settings); immutable.Get(x => x.Member).ShouldBe(1); immutable.Get(x => x.Member2).ShouldBe(0); } [Fact] public void Test_Protobuf_Serialization_Round_Trip() { var testClass = new Immutable<TestClassMember>(); testClass = testClass.Modify(x => x.Member = 1); var stream = new MemoryStream(); Serializer.Serialize(stream, testClass); stream.Seek(0, SeekOrigin.Begin); var deserialized = Serializer.Deserialize<Immutable<TestClassMember>>(stream); deserialized.Get(x => x.Member).ShouldBe(1); deserialized.Get(x => x.Member2).ShouldBe(0); } } }
{ "content_hash": "f11dc8ae6245d72a311636b432317084", "timestamp": "", "source": "github", "line_count": 240, "max_line_length": 116, "avg_line_length": 31.191666666666666, "alnum_prop": 0.547021106064654, "repo_name": "mattnischan/Immutable.Net", "id": "0dad65e5d441e1fd38defdad79ce0f96dac0eef2", "size": "7488", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/ImmutableDotNet.Tests/ImmutableTests.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "30747" } ], "symlink_target": "" }
SET u{SRC_DIR} /tmp/share ; SET u{FILE_NAME} *.gz ; SET u{LOG_LEVEL} 2 ; -- delete named graphs -- SPARQL CLEAR GRAPH <graph-iri> ; -- register RDF files to load; graph URIs in *.graph files DELETE FROM DB.DBA.load_list ; ld_dir('$u{SRC_DIR}', '$u{FILE_NAME}', NULL) ; SELECT * FROM DB.DBA.load_list ; -- load RDF files rdf_loader_run(log_enable=>$u{LOG_LEVEL}) ; -- count triples per named graph --SPARQL SELECT -- ?g COUNT(*) AS ?n --WHERE { -- GRAPH ?g { ?s ?p ?o } --} --GROUP BY ?g --ORDER BY DESC(?n) ;
{ "content_hash": "ae5f21de3a471a66db87fcc8ed5a1b69", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 58, "avg_line_length": 22.47826086956522, "alnum_prop": 0.6228239845261122, "repo_name": "DTL-FAIRData/ODEX4all-UseCases", "id": "194e891e0460767f3d35f988b4b68f7a3fcdb441", "size": "577", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "B4F/src/import_rdf.sql", "mode": "33188", "license": "mit", "language": [ { "name": "Jupyter Notebook", "bytes": "1431371" }, { "name": "Makefile", "bytes": "1100" }, { "name": "Python", "bytes": "90859" }, { "name": "R", "bytes": "40162" }, { "name": "Shell", "bytes": "30451" }, { "name": "Web Ontology Language", "bytes": "10462628" } ], "symlink_target": "" }
package integration.diff; import diff.DiffConfiguration; import diff.utils.JSONUtils; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.embedded.LocalServerPort; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; import java.io.File; import java.util.Map; import static org.assertj.core.api.BDDAssertions.then; /** */ @RunWith(SpringRunner.class) @SpringBootTest(classes = DiffConfiguration.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @TestPropertySource(properties = {"management.port=0"}) public class DiffIntegrationTests { @LocalServerPort private int port; @Value("${local.management.port}") private int mgt; @Autowired private TestRestTemplate testRestTemplate; @Test public void shouldReturnLeftNotFound() throws Exception { @SuppressWarnings("rawtypes") ResponseEntity<Map> entity = this.testRestTemplate.getForEntity( "http://localhost:" + this.port + "/v1/diff/z/right/eyJhIjoiYSJ9", Map.class); then(entity.getBody().get("content")).isEqualTo("LEFT FILE NOT FOUND"); } @Test public void shouldCompareFileNotFound() throws Exception { @SuppressWarnings("rawtypes") ResponseEntity<Map> entity = this.testRestTemplate.getForEntity( "http://localhost:" + this.port + "/v1/diff/z", Map.class); then(entity.getBody().get("content")).isEqualTo("FILE NOT FOUND"); } @Test public void shouldCompareEQUALS() throws Exception { String left = JSONUtils.encode("{\"name\": \"a\"}"); String right = JSONUtils.encode("{\"name\": \"a\"}"); String result = "EQUALS"; checkComparison(left, right, result); } @Test @Deprecated public void shouldReturnEQUALS() throws Exception { String left = JSONUtils.encode("{\"name\": \"a\"}"); String right = JSONUtils.encode("{\"name\": \"a\"}"); String result = "EQUALS"; checkComparison(left, right, result); } @Test public void shouldReturnADDED() throws Exception { String left = JSONUtils.encode("{\"name\": \"a\"}"); String right = JSONUtils.encode("{\"name\": \"a\", \"name\": \"b\", \"name\": \"c\"}"); String result = "ADDED: \"name\": \"b\", \"name\": \"c\"}"; checkComparison(left, right, result); } @Test public void shouldReturnREMOVED() throws Exception { String left = JSONUtils.encode("{\"name\": \"a\", \"name\": \"b\", \"name\": \"c\"}"); String right = JSONUtils.encode("{\"name\": \"a\"}"); String result = "REMOVED: \"name\": \"b\", \"name\": \"c\"}"; checkComparison(left, right, result); } private void checkComparison(String left, String right, String result) { //First JSON included @SuppressWarnings("rawtypes") ResponseEntity<Map> leftEntity = this.testRestTemplate.getForEntity("http://localhost:" + this.port + "/v1/diff/file/left/" + left, Map.class); then(leftEntity.getStatusCode()).isEqualTo(HttpStatus.OK); Assert.assertTrue(new File("file_left.json").exists()); //Second JSON included @SuppressWarnings("rawtypes") ResponseEntity<Map> rigthEntity = this.testRestTemplate.getForEntity("http://localhost:" + this.port + "/v1/diff/file/right/" + right, Map.class); Assert.assertTrue(new File("file_right.json").exists()); //Comparing files @SuppressWarnings("rawtypes") ResponseEntity<Map> entity = this.testRestTemplate.getForEntity("http://localhost:" + this.port + "/v1/diff/file", Map.class); then(entity.getBody().get("content")).isEqualTo(result); //Check if file was removed Assert.assertFalse(new File("file_left.json").exists()); Assert.assertFalse(new File("right_left.json").exists()); } }
{ "content_hash": "9300e7ac87146f3ef4f79977f56af8e6", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 154, "avg_line_length": 38.526315789473685, "alnum_prop": 0.6559653916211293, "repo_name": "jonatasemidio/diffsb", "id": "f41e016b7e8b0653640543f4007f2eaa15997a74", "size": "5026", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/test/java/integration/diff/DiffIntegrationTests.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "21420" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("hms.entappsettings.context")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("hms.entappsettings.context")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("18a6753a-acbd-48b7-9a64-643a80e152fe")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "content_hash": "1b7dd0a892f103f9448752d55dcecaa5", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 39.583333333333336, "alnum_prop": 0.7473684210526316, "repo_name": "nrogoff/EnterpriseAppSettings", "id": "2e19f293771c05d2c512bb4de661a38d32e68b5d", "size": "1428", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/dotNET/hms.entappsettings.webapi/hms.entappsettings.context/Properties/AssemblyInfo.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "119" }, { "name": "Batchfile", "bytes": "1109" }, { "name": "C#", "bytes": "629538" }, { "name": "CSS", "bytes": "2626" }, { "name": "HTML", "bytes": "5069" }, { "name": "JavaScript", "bytes": "233341" }, { "name": "PLpgSQL", "bytes": "9431" }, { "name": "Roff", "bytes": "3217" }, { "name": "SQLPL", "bytes": "1160" } ], "symlink_target": "" }
#ifndef __BASE64CODECTEST_H__ #define __BASE64CODECTEST_H__ #include <gtest/gtest.h> class Base64CodecTest : public testing::Test { public: Base64CodecTest(); virtual ~Base64CodecTest(); virtual void SetUp(); virtual void TearDown(); }; #endif //__BASE64CODECTEST_H__
{ "content_hash": "53d13729b4425aa1958337645954c591", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 46, "avg_line_length": 18.4, "alnum_prop": 0.717391304347826, "repo_name": "opencs/ocsbincodec-c", "id": "a09f04587c293e498b93a3bd7bd0f2f6ba2966ee", "size": "1862", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ocsbincodec-test/src/Base64CodecTest.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "92322" }, { "name": "C++", "bytes": "108434" }, { "name": "CMake", "bytes": "998" }, { "name": "Python", "bytes": "2935" } ], "symlink_target": "" }
package org.apache.polygene.tutorials.composites.tutorial7; /** * This interface aggregates the behaviour and state * of the HelloWorld sub-interfaces. To a client * this is the same as before though, since it only * has to deal with this interface instead of the * two sub-interfaces. */ public interface HelloWorld extends HelloWorldBehaviour, HelloWorldState { }
{ "content_hash": "e46684611873e0af96ac73fa71d70366", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 59, "avg_line_length": 27, "alnum_prop": 0.7671957671957672, "repo_name": "Qi4j/qi4j-sdk", "id": "c7ae399455d4844cfc39b154211ea34dd6c91d6f", "size": "1203", "binary": false, "copies": "3", "ref": "refs/heads/develop", "path": "tutorials/composites/src/main/java/org/apache/polygene/tutorials/composites/tutorial7/HelloWorld.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "47894" }, { "name": "Dockerfile", "bytes": "6578" }, { "name": "Groovy", "bytes": "182719" }, { "name": "HTML", "bytes": "274845" }, { "name": "Java", "bytes": "9262986" }, { "name": "JavaScript", "bytes": "76579" }, { "name": "Python", "bytes": "6472" }, { "name": "Shell", "bytes": "6828" }, { "name": "XSLT", "bytes": "74729" } ], "symlink_target": "" }
package org.apache.wink.itest.pathmethods; import java.io.IOException; import junit.framework.TestCase; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.URI; import org.apache.commons.httpclient.URIException; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.wink.test.integration.ServerEnvironmentInfo; public class PathMethodTest extends TestCase { protected HttpClient httpclient = new HttpClient(); private static String getBaseURI() { if (ServerEnvironmentInfo.isRestFilterUsed()) { return ServerEnvironmentInfo.getBaseURI(); } return ServerEnvironmentInfo.getBaseURI() + "/pathmethod/pathwarnings"; } public void testNonPublicMethodPathWarning() { try { GetMethod httpMethod = new GetMethod(); httpMethod.setURI(new URI(getBaseURI() + "/private", false)); httpclient = new HttpClient(); try { int result = httpclient.executeMethod(httpMethod); System.out.println("Response status code: " + result); System.out.println("Response body: "); String responseBody = httpMethod.getResponseBodyAsString(); System.out.println(responseBody); assertEquals(404, result); } catch (IOException ioe) { ioe.printStackTrace(); fail(ioe.getMessage()); } finally { httpMethod.releaseConnection(); } } catch (URIException e) { e.printStackTrace(); fail(e.getMessage()); } try { GetMethod httpMethod = new GetMethod(); httpMethod.setURI(new URI(getBaseURI() + "/protected", false)); httpclient = new HttpClient(); try { int result = httpclient.executeMethod(httpMethod); System.out.println("Response status code: " + result); System.out.println("Response body: "); String responseBody = httpMethod.getResponseBodyAsString(); System.out.println(responseBody); assertEquals(404, result); } catch (IOException ioe) { ioe.printStackTrace(); fail(ioe.getMessage()); } finally { httpMethod.releaseConnection(); } } catch (URIException e) { e.printStackTrace(); fail(e.getMessage()); } try { GetMethod httpMethod = new GetMethod(); httpMethod.setURI(new URI(getBaseURI() + "/package", false)); httpclient = new HttpClient(); try { int result = httpclient.executeMethod(httpMethod); System.out.println("Response status code: " + result); System.out.println("Response body: "); String responseBody = httpMethod.getResponseBodyAsString(); System.out.println(responseBody); assertEquals(404, result); } catch (IOException ioe) { ioe.printStackTrace(); fail(ioe.getMessage()); } finally { httpMethod.releaseConnection(); } } catch (URIException e) { e.printStackTrace(); fail(e.getMessage()); } } }
{ "content_hash": "c5a0a811532135ccaa8821cee71158be", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 79, "avg_line_length": 35.739583333333336, "alnum_prop": 0.5689303410084523, "repo_name": "os890/wink2_discuss", "id": "70b1bfba96b12ffe3a4805881c35f6bfd08671e5", "size": "4240", "binary": false, "copies": "4", "ref": "refs/heads/WINK-397", "path": "wink-itests/wink-itest/wink-itest-validation/src/test/java/org/apache/wink/itest/pathmethods/PathMethodTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "10985" }, { "name": "Java", "bytes": "8172426" }, { "name": "JavaScript", "bytes": "3114" } ], "symlink_target": "" }
package org.jivesoftware.openfire.plugin.rest.entity; import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** * The Class RosterEntities. */ @XmlRootElement(name = "roster") public class RosterEntities { /** The roster. */ List<RosterItemEntity> roster; /** * Instantiates a new roster entities. */ public RosterEntities() { } /** * Instantiates a new roster entities. * * @param roster * the roster */ public RosterEntities(List<RosterItemEntity> roster) { this.roster = roster; } /** * Gets the roster. * * @return the roster */ @XmlElement(name = "rosterItem") public List<RosterItemEntity> getRoster() { return roster; } /** * Sets the roster. * * @param roster * the new roster */ public void setRoster(List<RosterItemEntity> roster) { this.roster = roster; } }
{ "content_hash": "3b54675b2511cb00722387c98b7e088c", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 55, "avg_line_length": 17.01851851851852, "alnum_prop": 0.661588683351469, "repo_name": "darkpsy3934/community-plugins", "id": "fd2afc839ffe9514c1926d53f1454fcba0075362", "size": "919", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "chatapi/src/java/org/jivesoftware/openfire/plugin/rest/entity/RosterEntities.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "124" }, { "name": "Batchfile", "bytes": "3440" }, { "name": "CSS", "bytes": "5420290" }, { "name": "HTML", "bytes": "302640" }, { "name": "Java", "bytes": "26350426" }, { "name": "JavaScript", "bytes": "13300966" }, { "name": "Python", "bytes": "5734" }, { "name": "Shell", "bytes": "3076" } ], "symlink_target": "" }
/*# sourceMappingURL=mixin.css.map */
{ "content_hash": "af953c968a48db2a6d8e97a34c618ecc", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 37, "avg_line_length": 13.333333333333334, "alnum_prop": 0.675, "repo_name": "jasonroque/template.com", "id": "80a4df21890f77959614bd1c190f6f447692337d", "size": "40", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "assets/css/mixin.css", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "966" }, { "name": "CSS", "bytes": "102160" }, { "name": "HTML", "bytes": "8139111" }, { "name": "JavaScript", "bytes": "57395" }, { "name": "PHP", "bytes": "6534931" } ], "symlink_target": "" }
/** * @author Florian Feuerstein * @date 03.08.2016 * * Forward declarations and typedefs of G3d lib. */ #pragma once #include <memory> namespace G3d { class Mesh; typedef std::shared_ptr<Mesh> MeshPtr; typedef std::shared_ptr<Mesh const> MeshCPtr; class Shader; typedef std::shared_ptr<Shader> ShaderPtr; typedef std::shared_ptr<Shader const> ShaderCPtr; class Material; typedef std::shared_ptr<Material> MaterialPtr; typedef std::shared_ptr<Material const> MaterialCPtr; class Texture; typedef std::shared_ptr<Texture> TexturePtr; typedef std::shared_ptr<Texture const> TextureCPtr; }
{ "content_hash": "607e5f013d47d26eade35a9ba3af1ce0", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 54, "avg_line_length": 19.64516129032258, "alnum_prop": 0.7438423645320197, "repo_name": "TheFloHub/Graphics3dLib", "id": "94613db2b109642aad302fc3a226773ca4150ab9", "size": "609", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Graphics3dSolution/Graphics3dLib/SharedPtrTypes.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "226697" }, { "name": "C++", "bytes": "141692" }, { "name": "GLSL", "bytes": "19920" } ], "symlink_target": "" }
function setFormat(format) { $("#format").val(format); $(".format").removeClass("active"); $("#format_" + format).addClass("active"); } function checkAdb() { if (typeof(adsOn) == "undefined") { $("body").addClass('adb'); if (typeof(ga) == "function") ga('send', 'event', 'adblock', 'showBlocker'); return false; } return true; } function popup(){ console.log("popup"); $('body').addClass("popup"); $("#popup .close").click(function() {$('body').removeClass("popup");}); $(".input_content input").off("focus", popup); setCookie("know-x", 1, "session"); } function like_popup(){ if ($("#like_popup").length > 0) { $('body').addClass("like_popup"); $("#like_popup .close").click(function() {$('body').removeClass("like_popup");}); } } function setCookie(cname, cvalue, exdays) { var d = new Date(); var expires = ""; if (exdays != "session") { d.setTime(d.getTime() + (exdays*24*60*60*1000)); expires = "expires="+d.toUTCString(); } document.cookie = cname + "=" + cvalue + "; " + expires; } $('#mainForm').on('beforeSubmit', function () { if (checkAdb()) { $("#loader").fadeIn(500); } else { return false; } });
{ "content_hash": "001a8b4f51c0b330d5c215d61b8dcd26", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 89, "avg_line_length": 27.02127659574468, "alnum_prop": 0.5393700787401575, "repo_name": "ovcaman/ydovcaman", "id": "171238dac4ce63517c11bf17f53de25683efd513", "size": "1270", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "web/js/scripts.js", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "421" }, { "name": "Batchfile", "bytes": "1030" }, { "name": "CSS", "bytes": "8288" }, { "name": "JavaScript", "bytes": "1287" }, { "name": "PHP", "bytes": "88185" } ], "symlink_target": "" }
module ThinkingSphinx module Masks; end end require 'thinking_sphinx/masks/scopes_mask' describe ThinkingSphinx::Masks::ScopesMask do let(:search) { double('search', :options => {}, :per_page => 20) } let(:mask) { ThinkingSphinx::Masks::ScopesMask.new search } describe '#search' do it "replaces the query if one is supplied" do search.should_receive(:query=).with('bar') mask.search('bar') end it "keeps the existing query when only options are offered" do search.should_not_receive(:query=) mask.search :with => {:foo => :bar} end it "merges conditions" do search.options[:conditions] = {:foo => 'bar'} mask.search :conditions => {:baz => 'qux'} search.options[:conditions].should == {:foo => 'bar', :baz => 'qux'} end it "merges filters" do search.options[:with] = {:foo => :bar} mask.search :with => {:baz => :qux} search.options[:with].should == {:foo => :bar, :baz => :qux} end it "merges exclusive filters" do search.options[:without] = {:foo => :bar} mask.search :without => {:baz => :qux} search.options[:without].should == {:foo => :bar, :baz => :qux} end it "appends excluded ids" do search.options[:without_ids] = [1, 3] mask.search :without_ids => [5, 7] search.options[:without_ids].should == [1, 3, 5, 7] end it "replaces the retry_stale option" do search.options[:retry_stale] = true mask.search :retry_stale => 6 search.options[:retry_stale].should == 6 end it "returns the original search object" do mask.search.object_id.should == search.object_id end end describe '#search_for_ids' do it "replaces the query if one is supplied" do search.should_receive(:query=).with('bar') mask.search_for_ids('bar') end it "keeps the existing query when only options are offered" do search.should_not_receive(:query=) mask.search_for_ids :with => {:foo => :bar} end it "merges conditions" do search.options[:conditions] = {:foo => 'bar'} mask.search_for_ids :conditions => {:baz => 'qux'} search.options[:conditions].should == {:foo => 'bar', :baz => 'qux'} end it "merges filters" do search.options[:with] = {:foo => :bar} mask.search_for_ids :with => {:baz => :qux} search.options[:with].should == {:foo => :bar, :baz => :qux} end it "merges exclusive filters" do search.options[:without] = {:foo => :bar} mask.search_for_ids :without => {:baz => :qux} search.options[:without].should == {:foo => :bar, :baz => :qux} end it "appends excluded ids" do search.options[:without_ids] = [1, 3] mask.search_for_ids :without_ids => [5, 7] search.options[:without_ids].should == [1, 3, 5, 7] end it "replaces the retry_stale option" do search.options[:retry_stale] = true mask.search_for_ids :retry_stale => 6 search.options[:retry_stale].should == 6 end it "adds the ids_only option" do mask.search_for_ids search.options[:ids_only].should be_true end it "returns the original search object" do mask.search_for_ids.object_id.should == search.object_id end end end
{ "content_hash": "fa9af27ec07ab4230385eaf0424a3b22", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 74, "avg_line_length": 25.083333333333332, "alnum_prop": 0.5974025974025974, "repo_name": "SAManage/thinking-sphinx", "id": "c74e1a473564476f4e8de1af2686ad6efe6daf60", "size": "3311", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "spec/thinking_sphinx/masks/scopes_mask_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "380197" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: AssemblyVersion("0.0.1.1")] [assembly: AssemblyFileVersion("0.0.1.1")]
{ "content_hash": "e869a5a59068864968166223d1531b8f", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 91, "avg_line_length": 24.36842105263158, "alnum_prop": 0.755939524838013, "repo_name": "rolbeh/Magic.net", "id": "7610be73bbf01f86a171b6117a0766f585ca3c7a", "size": "466", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Magic.Controls/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "65735" } ], "symlink_target": "" }
<?php namespace Magento\Sales\Test\Page; use Magento\Mtf\Client\Locator; use Magento\Mtf\Factory\Factory; use Magento\Mtf\Page\Page; /** * Manage orders page. */ class SalesOrderShipmentNew extends Page { /** * URL for manage orders page. */ const MCA = 'sales/order/shipment/new'; /** * Shipment totals block. * * @var string */ protected $totalsBlock = '.order-totals'; /** * Init page. Set page url. * * @return void */ protected function initUrl() { $this->url = $_ENV['app_backend_url'] . self::MCA; } /** * Get shipment totals. * * @return \Magento\Sales\Test\Block\Adminhtml\Order\Shipment\Totals */ public function getTotalsBlock() { return Factory::getBlockFactory()->getMagentoSalesAdminhtmlOrderShipmentTotals( $this->browser->find($this->totalsBlock, Locator::SELECTOR_CSS) ); } }
{ "content_hash": "aec19a5324a4aeecc7d4e1a32064afc2", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 87, "avg_line_length": 19.916666666666668, "alnum_prop": 0.5962343096234309, "repo_name": "andrewhowdencom/m2onk8s", "id": "ac8634ea769bb737c74c0c373e81fcba240837ab", "size": "1064", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "app/dev/tests/functional/tests/app/Magento/Sales/Test/Page/SalesOrderShipmentNew.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "16901" }, { "name": "CSS", "bytes": "1736429" }, { "name": "HTML", "bytes": "6151083" }, { "name": "JavaScript", "bytes": "2413949" }, { "name": "Makefile", "bytes": "4212" }, { "name": "PHP", "bytes": "12463878" }, { "name": "Shell", "bytes": "8784" }, { "name": "Smarty", "bytes": "1089" }, { "name": "XSLT", "bytes": "19979" } ], "symlink_target": "" }
;;----------------------DATOS----TODO EN MAYUSCULAS!!!! let db "ESPACIO LIBRE EN:",0xA," " Sectores db 'sectores', 13, 10 Caras db 'caras', 13, 10 Cilindros db 'cilindros', 13, 10 nl db 0xA res resb 10 ;;----------------------ARRANQUE------------------------------- USE16 ORG 0x7C00 jmp inicio inicio: ;call clr mov esi, let call imprime mov AH, 8h mov DL, 80h INT 13h ; comenzamos con las caras ; que vienen en DH mov al, dh inc al ; incrementamos ; convertimos a cadena mov di, res call EnteroCadena ; y las mostramos mov al, di mov ah, 0x0E ; Servicio int 0x10 ; el número de sectores está,- en los bits 0 a 5 de CL mov al, cl and al, 3Fh ; convertimos a cadena mov di, res call EnteroCadena ; y mostramos los sectores mov al, di mov ah, 0x0E ; Servicio int 0x10 ; el número de mayor cilindro ; está en el registro CH mov al, ch inc ai ; incrementamos ; io convertimos mov di, res call EnteroCadena mov al, di mov ah, 0x0E ; Servicio int 0x10 ;;----------------------PROCEDIMIENTOS----------------------------------- EnteroCadena: ; establecemos valor inicial mov byte [di], '0' ; comprobamos si AL es cero or al , al ; de ser así, no hay más ; que hacer jz FinConversion push bx ; guardamos bx ; y establecemos el divisor mov bl, 10 Bucle: ; vamos dividiendo por 10 div bl ; quedándonos con el resto ; que convertimos a ASCII add ah, '0' ; y guardamos mov [di], ah ; retrocediendo al dígito anterior dec di ; eliminamos el contenido ; de AH para quedarnos con ; el cociente de Al. xor ah, ah ; si el cociente es mayor que 9 cmp al, 9 ; seguimos dividiendo jg Bucle ; en caso contrario guardamos add al, '0' mov [di], al pop bx ; recuperamos BX FinConversion: ret clr: mov ax,0600h mov bh,70H ; color fondo, letra mov cx, 0000H ;superior izquierda ;mov cx,0101H ;superior izquierda menos 1 fila 1 renglon mov dx,184FH ; inferior derecha ;mov dx,174eH ;inferior derecha menos 1 fila 1 renglon int 0x10 ret imprime: cld lodsb ; Cargar 'ax' con 'ds:si' e incrementar 'si' en 1 or al, al ; Verificar si 'al' es cero (fin de la cadena ASCIIZ) jz listo ; Si 'al' es cero salir de la rutina mov ah, 0x0E ; Servicio int 0x10 ; Exhibición de video jmp imprime ; Siguiente caracter listo: ret ;; -----------------------Estructura MBR---------------------------------- hlt ;Coloco la CPU en HALT. TIMES 510 - ($-$$) db 0 ;Completo el archivo con ceros hasta 2 bytes antes ;del final. Para representar el sector boot (MBR). dw 0xAA55 ;Firma de MBR Booteable.
{ "content_hash": "1801e5078d763b0458ee8c726576e55d", "timestamp": "", "source": "github", "line_count": 137, "max_line_length": 87, "avg_line_length": 19.89051094890511, "alnum_prop": 0.6069724770642202, "repo_name": "codeneomatrix/ensamblador", "id": "32dd605066d09ab5e9f92779b2b614875597e02b", "size": "2734", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "escuela/programasiso/espaciodisco.asm", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "58923" }, { "name": "C++", "bytes": "466" }, { "name": "Shell", "bytes": "171" } ], "symlink_target": "" }
<?php /** * DO NOT EDIT THIS FILE! * * This file was automatically generated from external sources. * * Any manual change here will be lost the next time the SDK * is updated. You've been warned! */ namespace DTS\eBaySDK\Account\Types; /** * * @property string $marketplace_id */ class GetFulfillmentPoliciesByMarketplaceRestRequest extends \DTS\eBaySDK\Types\BaseType { /** * @var array Properties belonging to objects of this class. */ private static $propertyTypes = [ 'marketplace_id' => [ 'type' => 'string', 'repeatable' => false, 'attribute' => false, 'elementName' => 'marketplace_id' ] ]; /** * @param array $values Optional properties and values to assign to the object. */ public function __construct(array $values = []) { list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values); parent::__construct($parentValues); if (!array_key_exists(__CLASS__, self::$properties)) { self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes); } $this->setValues(__CLASS__, $childValues); } }
{ "content_hash": "05b4ef13f6ede47e28a6539b109eef2c", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 116, "avg_line_length": 27.152173913043477, "alnum_prop": 0.6084867894315452, "repo_name": "davidtsadler/ebay-sdk-php", "id": "aa20b02f41252826196b91a17167d0d8d106dfcd", "size": "1249", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Account/Types/GetFulfillmentPoliciesByMarketplaceRestRequest.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Makefile", "bytes": "10944" }, { "name": "PHP", "bytes": "9958599" } ], "symlink_target": "" }
var _ = require('../../../lib/alloy/underscore')._; exports.parse = function(node, state) { _.extend(state, { proxyPropertyDefinition: { parents: [ 'Ti.UI.iOS.PreviewContext' ], property: 'preview', skipAssignParent: true } }); return require('./Alloy.Abstract._ProxyProperty').parse(node, state); };
{ "content_hash": "04e335a6ca36ab53c89349d8bcabe019", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 70, "avg_line_length": 23.214285714285715, "alnum_prop": 0.6369230769230769, "repo_name": "mobilehero/adamantium", "id": "f547683a8262e45f3d0941a964d34ec40772d667", "size": "325", "binary": false, "copies": "4", "ref": "refs/heads/develop", "path": "Alloy/commands/compile/parsers/Alloy.Abstract.Preview.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "3828" }, { "name": "CoffeeScript", "bytes": "872" }, { "name": "HTML", "bytes": "5471" }, { "name": "JavaScript", "bytes": "3412153" }, { "name": "Python", "bytes": "5251" } ], "symlink_target": "" }
.. _all-salt.cache: ============= cache modules ============= For understanding and usage of the cache modules see the :ref:`cache` topic. .. currentmodule:: salt.cache .. autosummary:: :toctree: :template: autosummary.rst.tmpl consul etcd_cache localfs mysql_cache redis_cache
{ "content_hash": "391fc32b5d0c6acbea157628f313b0ea", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 76, "avg_line_length": 16.36842105263158, "alnum_prop": 0.617363344051447, "repo_name": "saltstack/salt", "id": "7976f3e853bdf34b214266023c9624aba17a2e04", "size": "311", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/ref/cache/all/index.rst", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "14911" }, { "name": "C", "bytes": "1571" }, { "name": "Cython", "bytes": "1458" }, { "name": "Dockerfile", "bytes": "184" }, { "name": "Groovy", "bytes": "12318" }, { "name": "HCL", "bytes": "257" }, { "name": "HTML", "bytes": "8031" }, { "name": "Jinja", "bytes": "45598" }, { "name": "Makefile", "bytes": "713" }, { "name": "NSIS", "bytes": "76572" }, { "name": "PowerShell", "bytes": "75891" }, { "name": "Python", "bytes": "41444811" }, { "name": "Rich Text Format", "bytes": "6242" }, { "name": "Roff", "bytes": "191" }, { "name": "Ruby", "bytes": "961" }, { "name": "SaltStack", "bytes": "35856" }, { "name": "Scheme", "bytes": "895" }, { "name": "Scilab", "bytes": "1147" }, { "name": "Shell", "bytes": "524917" } ], "symlink_target": "" }
module Striker module Command class Server < Build def initialize(args, options, path) super(args, options, path) end def start if self.options[:no_build] elsif self.options[:build] self.process end start_server end private def start_server port = self.config['port'] root = self.public_dir server = WEBrick::HTTPServer.new(:Port => port, :DocumentRoot => root) trap 'INT' do server.shutdown end p "Site running at: #{File.join("http://localhost:#{port}", self.config['basepath'])}" server.start end end end end
{ "content_hash": "5cc93f64346e9c5a8375529f2ff58a95", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 90, "avg_line_length": 18.59375, "alnum_prop": 0.6420168067226891, "repo_name": "swaroopsm/striker", "id": "776c4780589c54513fa610e067ee1e2626d9da1d", "size": "595", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/striker/command/server.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "34" }, { "name": "JavaScript", "bytes": "31" }, { "name": "Ruby", "bytes": "41893" } ], "symlink_target": "" }
@interface ProductCell : UITableViewCell @end
{ "content_hash": "b83848d45123b837a3276ac73384702d", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 40, "avg_line_length": 15.666666666666666, "alnum_prop": 0.8085106382978723, "repo_name": "forscape/xhcf", "id": "cf6d69ff1328aa72a1f769121f7aefc4f3844af5", "size": "246", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "xhcf/xhcf/ProductCell.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Objective-C", "bytes": "38262" } ], "symlink_target": "" }
package model import ( "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3/core/utils" "errors" "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3/core/converter" "strings" ) type GetServerRemoteConsoleOption struct { // 远程登录协议,请将protocol配置为“vnc”。 Protocol GetServerRemoteConsoleOptionProtocol `json:"protocol"` // 远程登录的类型,请将type配置为“novnc”。 Type GetServerRemoteConsoleOptionType `json:"type"` } func (o GetServerRemoteConsoleOption) String() string { data, err := utils.Marshal(o) if err != nil { return "GetServerRemoteConsoleOption struct{}" } return strings.Join([]string{"GetServerRemoteConsoleOption", string(data)}, " ") } type GetServerRemoteConsoleOptionProtocol struct { value string } type GetServerRemoteConsoleOptionProtocolEnum struct { VNC GetServerRemoteConsoleOptionProtocol } func GetGetServerRemoteConsoleOptionProtocolEnum() GetServerRemoteConsoleOptionProtocolEnum { return GetServerRemoteConsoleOptionProtocolEnum{ VNC: GetServerRemoteConsoleOptionProtocol{ value: "vnc", }, } } func (c GetServerRemoteConsoleOptionProtocol) MarshalJSON() ([]byte, error) { return utils.Marshal(c.value) } func (c *GetServerRemoteConsoleOptionProtocol) UnmarshalJSON(b []byte) error { myConverter := converter.StringConverterFactory("string") if myConverter != nil { val, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) if err == nil { c.value = val.(string) return nil } return err } else { return errors.New("convert enum data to string error") } } type GetServerRemoteConsoleOptionType struct { value string } type GetServerRemoteConsoleOptionTypeEnum struct { NOVNC GetServerRemoteConsoleOptionType } func GetGetServerRemoteConsoleOptionTypeEnum() GetServerRemoteConsoleOptionTypeEnum { return GetServerRemoteConsoleOptionTypeEnum{ NOVNC: GetServerRemoteConsoleOptionType{ value: "novnc", }, } } func (c GetServerRemoteConsoleOptionType) MarshalJSON() ([]byte, error) { return utils.Marshal(c.value) } func (c *GetServerRemoteConsoleOptionType) UnmarshalJSON(b []byte) error { myConverter := converter.StringConverterFactory("string") if myConverter != nil { val, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\"")) if err == nil { c.value = val.(string) return nil } return err } else { return errors.New("convert enum data to string error") } }
{ "content_hash": "7cacd01b7025d8353ae19558642ae352", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 102, "avg_line_length": 25.515463917525775, "alnum_prop": 0.7660606060606061, "repo_name": "kubernetes/autoscaler", "id": "88da0fe5d245df2a042263281fd7825eeab29bfd", "size": "2537", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "cluster-autoscaler/cloudprovider/huaweicloud/huaweicloud-sdk-go-v3/services/ecs/v2/model/model_get_server_remote_console_option.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "5407" }, { "name": "Go", "bytes": "19468437" }, { "name": "Makefile", "bytes": "19380" }, { "name": "Mustache", "bytes": "4034" }, { "name": "Python", "bytes": "20902" }, { "name": "Roff", "bytes": "1730" }, { "name": "Ruby", "bytes": "1255" }, { "name": "Shell", "bytes": "53412" } ], "symlink_target": "" }
from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/military/shared_outpost_shed_s04.iff" result.attribute_template_id = -1 result.stfName("building_name","military_guard_tower_1") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "f79ac36c3cea7e766d50b9576d158fc5", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 73, "avg_line_length": 24.615384615384617, "alnum_prop": 0.703125, "repo_name": "obi-two/Rebelion", "id": "5d427b190190dcad648a777a532c2ec1a633dd2c", "size": "465", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "data/scripts/templates/object/building/military/shared_outpost_shed_s04.py", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "11818" }, { "name": "C", "bytes": "7699" }, { "name": "C++", "bytes": "2293610" }, { "name": "CMake", "bytes": "39727" }, { "name": "PLSQL", "bytes": "42065" }, { "name": "Python", "bytes": "7499185" }, { "name": "SQLPL", "bytes": "41864" } ], "symlink_target": "" }
package org.huahinframework.core; import java.util.HashMap; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.util.ToolRunner; /** * Execution of the job can be done easily and use this class. * * <p>Example:</p> * <p><blockquote><pre> * public class Jobs { * public static void main(String[] args) { * String jobName = args[0]; * String[] newArgs = new String[args.length - 1]; * for (int i = 1; i < args.length; ++i) { * newArgs[i - 1] = args[i]; * } * * Runner runner = new Runner(); * runner.addJob("WordCount", WordCount.class); * runner.addJob("Grep", Grep.class); * * int status = runner.run(jobName, args); * * System.exit(status); * } * } * </pre></blockquote></p> */ public class Runner { private static final Log log = LogFactory.getLog(Runner.class); private Map<String, Class<? extends SimpleJobTool>> jobMap = new HashMap<String, Class<? extends SimpleJobTool>>(); /** * Run the job. * @param jobName running job sequence name * @param args job parameters * @return job status */ public int run(String jobName, String[] args) { int status = -1; try { Class<? extends SimpleJobTool> clazz = jobMap.get(jobName); if (clazz == null) { log.error("Tool " + jobName + " class not found."); return status; } status = ToolRunner.run(clazz.newInstance(), args); } catch (Exception e) { e.printStackTrace(); log.error(e); } return status; } /** * Add job sequence. * @param name job sequence name * @param clazz SimpleJobTool class */ public void addJob(String name, Class<? extends SimpleJobTool> clazz) { jobMap.put(name, clazz); } /** * get job list * @return job list */ public String[] getJobList() { String[] strings = new String[jobMap.keySet().size()]; int i = 0; for (String s : jobMap.keySet()) { strings[i++] = s; } return strings; } }
{ "content_hash": "04e7d0e25d16883d03beeab0acef784b", "timestamp": "", "source": "github", "line_count": 86, "max_line_length": 75, "avg_line_length": 26.046511627906977, "alnum_prop": 0.5629464285714286, "repo_name": "huahin/huahin-core", "id": "839e91e8bf3337165e200cb3aeaaafbee305ae9d", "size": "3045", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/huahinframework/core/Runner.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "347937" } ], "symlink_target": "" }
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. #include "PxcPoolMalloc.h" #include "PsMutex.h" #include "PsPool.h" using namespace physx; /* Implementation of a global pool allocator for casses where a specialized pool allocator does not make sense. For example general containers. Note: Init/Term should not be called concurrently. However PoolMalloc/PoolFree are safe. Also note we do not make PoolMallocData static because on some platforms synchronization objects cannot be created from static constructors(eg PS3/Linux:-( TODO: It would be beneficial to impliment spin counts for Ps::Mutex if we expect high contention on the pool allocator lock. (probably not a problem as it is mostly called during init at present) TODO: Maybe there is some benefit in generalizing the pool sizes. But probably not. */ struct PxcPoolMallocData { static const int BLOCK_SIZE = 1024 * 4; PxcPoolMallocData() : mPool8("mPool8", BLOCK_SIZE/8), mPool16("mPool16", BLOCK_SIZE/16), mPool32("mPool32", BLOCK_SIZE/32) {} ~PxcPoolMallocData() {} Ps::Mutex mPoolMutex; struct PoolData8 { PxU8 mData[8]; }; struct PoolData16 { PxU8 mData[16]; }; struct PoolData32 { PxU8 mData[32]; }; Ps::Pool<PoolData8> mPool8; Ps::Pool<PoolData16> mPool16; Ps::Pool<PoolData32> mPool32; PX_NOCOPY(PxcPoolMallocData) }; static PxcPoolMallocData* gPoolMallocData = NULL; void PxcPoolMallocInit() { gPoolMallocData = (PxcPoolMallocData *) PX_ALLOC(sizeof(PxcPoolMallocData), PX_DEBUG_EXP("PxcPoolMallocData")); new (gPoolMallocData) PxcPoolMallocData(); } void PxcPoolMallocTerm() { if(gPoolMallocData != NULL) { gPoolMallocData->~PxcPoolMallocData(); PX_FREE(gPoolMallocData); gPoolMallocData = NULL; } } void* PxcPoolMalloc(size_t size) { PX_ASSERT(gPoolMallocData != NULL); Ps::Mutex::ScopedLock lock(gPoolMallocData->mPoolMutex); if(size <= 8) { PxcPoolMallocData::PoolData8 *mem = gPoolMallocData->mPool8.allocate(); return mem; } else if(size <= 16) { PxcPoolMallocData::PoolData16 *mem = gPoolMallocData->mPool16.allocate(); return mem; } else if(size <= 32) { PxcPoolMallocData::PoolData32 *mem = gPoolMallocData->mPool32.allocate(); return mem; } else { return PX_ALLOC(size, PX_DEBUG_EXP("PoolMallocData")); } } void PxcPoolFree(void* ptr, size_t size) { PX_ASSERT(gPoolMallocData != NULL); Ps::Mutex::ScopedLock lock(gPoolMallocData->mPoolMutex); if(size <= 8) { PxcPoolMallocData::PoolData8 *mem = (PxcPoolMallocData::PoolData8 *) ptr; gPoolMallocData->mPool8.deallocate(mem); } else if(size <= 16) { PxcPoolMallocData::PoolData16 *mem = (PxcPoolMallocData::PoolData16 *) ptr; gPoolMallocData->mPool16.deallocate(mem); } else if(size <= 32) { PxcPoolMallocData::PoolData32 *mem = (PxcPoolMallocData::PoolData32 *) ptr; gPoolMallocData->mPool32.deallocate(mem); } else { PX_FREE(ptr); } }
{ "content_hash": "cb45c11dedf0ed9fc27536e60132209a", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 112, "avg_line_length": 23.547619047619047, "alnum_prop": 0.7307044152342433, "repo_name": "LiangYue1981816/CrossEngine", "id": "c6169a37c98d57731aa7c41abba81796a1d0e6d6", "size": "3411", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "PhysX-3.3/PhysXSDK/Source/LowLevel/common/src/utils/PxcPoolMalloc.cpp", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "30761" }, { "name": "C", "bytes": "84933432" }, { "name": "C++", "bytes": "92458842" }, { "name": "CMake", "bytes": "10937" }, { "name": "Cuda", "bytes": "319314" }, { "name": "GLSL", "bytes": "108168" }, { "name": "HTML", "bytes": "174058" }, { "name": "Java", "bytes": "563" }, { "name": "LLVM", "bytes": "3292" }, { "name": "Makefile", "bytes": "7764848" }, { "name": "Objective-C", "bytes": "304372" }, { "name": "Objective-C++", "bytes": "90267" }, { "name": "PAWN", "bytes": "15882" }, { "name": "R", "bytes": "14754" }, { "name": "Shell", "bytes": "14659" }, { "name": "Visual Basic", "bytes": "3046" } ], "symlink_target": "" }
using System.Web; using System.Web.Mvc; using System.Web.SessionState; namespace Crowbar { internal static class CrowbarContext { public static ActionExecutingContext ActionExecutingContext { get; set; } public static ActionExecutedContext ActionExecutedContext { get; set; } public static ResultExecutingContext ResultExecutingContext { get; set; } public static ResultExecutedContext ResultExecutedContext { get; set; } public static ExceptionContext ExceptionContext { get; set; } public static HttpSessionState HttpSessionState { get; set; } public static HttpResponse HttpResponse { get; set; } public static void Reset() { ActionExecutedContext = null; ActionExecutingContext = null; ResultExecutingContext = null; ResultExecutedContext = null; ExceptionContext = null; HttpSessionState = null; HttpResponse = null; } } }
{ "content_hash": "f48bff41bd50ede90a300970c35cc156", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 81, "avg_line_length": 28.942857142857143, "alnum_prop": 0.6623889437314906, "repo_name": "mrydengren/crowbar", "id": "8aa873e9a3293bb0b7aa9a141b7f035a08e2212d", "size": "1015", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Crowbar/CrowbarContext.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "593" }, { "name": "C#", "bytes": "241478" }, { "name": "PowerShell", "bytes": "32701" } ], "symlink_target": "" }
/********************* 有任何问题欢迎反馈给我 liuweiself@126.com ****************************************/ /*************** https://github.com/waynezxcv/Gallop 持续更新 ***************************/ /******************** 正在不断完善中,谢谢~ Enjoy ******************************************************/ #import "Menu.h" #import "GallopUtils.h" @interface Menu () @property (nonatomic,assign) BOOL show; @property (nonatomic,assign) BOOL isShowing; @end @implementation Menu #pragma mark - LifeCycle - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.clipsToBounds = YES; self.show = NO; self.isShowing = NO; self.backgroundColor = [UIColor clearColor]; [self addSubview:self.likeButton]; [self addSubview:self.commentButton]; } return self; } - (void)layoutSubviews { [super layoutSubviews]; [self setNeedsDisplay]; self.likeButton.frame = CGRectMake(0, 0, 80, self.bounds.size.height); self.commentButton.frame = CGRectMake(80, 0, 80, self.bounds.size.height); } - (void)drawRect:(CGRect)rect { [super drawRect:rect]; UIBezierPath* beizerPath = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:5.0f]; [RGB(76, 81, 84, 0.95) setFill]; [beizerPath fill]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextMoveToPoint(context, rect.size.width/2, 5.0f); CGContextAddLineToPoint(context, rect.size.width/2, rect.size.height - 5.0f); CGContextSetLineWidth(context, 1.0f); CGContextSetStrokeColorWithColor(context, [UIColor grayColor].CGColor); CGContextStrokePath(context); } #pragma mark - Actions - (void)clickedMenu { if (!self.isShowing) { self.isShowing = YES; if (self.show) { [self menuHide]; } else { [self menuShow]; } } } - (void)menuShow { [UIView animateWithDuration:0.2f delay:0.0f usingSpringWithDamping:0.7 initialSpringVelocity:0.0f options:0 animations:^{ self.frame = CGRectMake(self.frame.origin.x - 160, self.frame.origin.y, 160, 34.0f); } completion:^(BOOL finished) { self.show = YES; self.isShowing = NO; }]; } - (void)menuHide { [UIView animateWithDuration:0.3f delay:0.0f usingSpringWithDamping:0.7f initialSpringVelocity:0.0f options:0 animations:^{ self.frame = CGRectMake(self.frame.origin.x + 160, self.frame.origin.y, 0.5f, 34.0f); } completion:^(BOOL finished) { self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, 0.0f, 34.0f); self.show = NO; self.isShowing = NO; }]; } #pragma mark - Getter & Setter - (void)setStatusModel:(ClassEvaluationListsModel *)statusModel { if (_statusModel != statusModel) { _statusModel = statusModel; } if (self.statusModel.isLike) { [_likeButton setTitle:@" 取消" forState:UIControlStateNormal]; } else { [_likeButton setTitle:@" 赞" forState:UIControlStateNormal]; } } - (LikeButton *)likeButton { if (_likeButton) { return _likeButton; } _likeButton = [LikeButton buttonWithType:UIButtonTypeCustom]; [_likeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_likeButton setImage:[UIImage imageNamed:@"likewhite.png"] forState:UIControlStateNormal]; [_likeButton.titleLabel setFont:[UIFont systemFontOfSize:14]]; return _likeButton; } - (UIButton *)commentButton { if (_commentButton) { return _commentButton; } _commentButton = [UIButton buttonWithType:UIButtonTypeCustom]; [_commentButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_commentButton setTitle:@" 评论" forState:UIControlStateNormal]; [_commentButton setImage:[UIImage imageNamed:@"c.png"] forState:UIControlStateNormal]; [_commentButton.titleLabel setFont:[UIFont systemFontOfSize:14]]; return _commentButton; } @end
{ "content_hash": "5b1b4d41fdafa8af2fb2e46866f66c1a", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 107, "avg_line_length": 31.100671140939596, "alnum_prop": 0.5509279240397065, "repo_name": "HaoXuan1988/ZhiYu", "id": "72d02d42c7fc4562e8efa58d1f53a136d311f76c", "size": "4694", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ZhiYu/Menu.m", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "944" }, { "name": "Objective-C", "bytes": "338954" }, { "name": "Ruby", "bytes": "556" } ], "symlink_target": "" }
* A python application where users upload a photo. * The photo gets analyzed for metadata (EXIF) * The user then gets presented with stories that happened at that time, date and location. # What is Exify? * It's a web application built in Python, Flask, Javscript, HTML, and CSS * At its base, it takes an uploaded photo from a user and analyzes it's meta data, revealing what local news stories occurred at that time, place and location. * Exify exposes the history inside the photo. # Why Exify? * The title Exify is a is a play on the file format found on modern digital photos called. # Final Design and Implementation * https://projects.invisionapp.com/share/BT75V166C#/screens/155386620
{ "content_hash": "cff0acb97bf029396ab49c3ccbb78c24", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 159, "avg_line_length": 47.333333333333336, "alnum_prop": 0.7563380281690141, "repo_name": "mcardacci/exif_python", "id": "d2fd66d14b1bf0533f1b3bcde2640c560d71273f", "size": "719", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "4555" }, { "name": "HTML", "bytes": "5704" }, { "name": "JavaScript", "bytes": "97432" }, { "name": "Python", "bytes": "5433" } ], "symlink_target": "" }
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Republicoin</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;Republicoin&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The Republicoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;a href=&quot;http://www.opensource.org/licenses/mit-license.php&quot;&gt;http://www.opensource.org/licenses/mit-license.php&lt;/a&gt;. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (&lt;a href=&quot;https://www.openssl.org/&quot;&gt;https://www.openssl.org/&lt;/a&gt;) and cryptographic software written by Eric Young (&lt;a href=&quot;mailto:eay@cryptsoft.com&quot;&gt;eay@cryptsoft.com&lt;/a&gt;) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation>ایڈریس یا لیبل میں ترمیم کرنے پر ڈبل کلک کریں</translation> </message> <message> <location line="+24"/> <source>Create a new address</source> <translation>نیا ایڈریس بنائیں</translation> </message> <message> <location line="+10"/> <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="-7"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-43"/> <source>These are your Republicoin 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 line="+53"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign a message to prove you own a Republicoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>Verify a message to ensure it was signed with a specified Republicoin address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Delete</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+250"/> <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="+145"/> <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 type="unfinished"/> </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 line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>For staking only</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+38"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <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>بٹوا ان لاک</translation> </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>خفیہ کشائی کر یںبٹوے کے</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 type="unfinished"/> </message> <message> <location line="+45"/> <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 COINS&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="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten 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="+82"/> <source>Republicoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+44"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation type="unfinished"/> </message> <message> <location line="-56"/> <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="+50"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+12"/> <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="+297"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-18"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <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 Republicoin</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="+4"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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="+9"/> <source>&amp;Export...</source> <translation type="unfinished"/> </message> <message> <location line="-55"/> <source>Send coins to a Republicoin address</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>Modify configuration options for Republicoin</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="-13"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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="+10"/> <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="-5"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-214"/> <location line="+555"/> <source>Republicoin</source> <translation type="unfinished"/> </message> <message> <location line="-555"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>&amp;About Republicoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>&amp;File</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <location line="+9"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+58"/> <source>Republicoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+70"/> <source>%n active connection(s) to Republicoin network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+488"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;Expected time to earn reward is %3</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Not staking because wallet is locked</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is syncing</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because you don&apos;t have mature coins</source> <translation type="unfinished"/> </message> <message> <location line="-812"/> <source>&amp;Dashboard</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+277"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <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="+100"/> <location line="+15"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid Republicoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Wallet is &lt;b&gt;not encrypted&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;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 line="+24"/> <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 numerus="yes"> <location line="+91"/> <source>%n second(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="-429"/> <location line="+433"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="-456"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+27"/> <location line="+433"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="-429"/> <location line="+6"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+0"/> <source>%1 and %2</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+0"/> <source>%n year(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <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="+23"/> <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="+69"/> <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="+324"/> <source>Not staking</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+104"/> <source>A fatal error occurred. Republicoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+110"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+537"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>List mode</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Amount</source> <translation>رقم</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation> پتہ</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>تاریخ</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="-500"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+317"/> <source>highest</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium-high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>low-medium</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>low</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>lowest</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &quot;medium&quot;. This means a fee of at least %1 per kb is required.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if any recipient receives an amount smaller than %1. This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required.</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <location line="+66"/> <source>(no label)</source> <translation>چٹ کے بغیر</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>(change)</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 Republicoin 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="+426"/> <location line="+12"/> <source>Republicoin-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. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Reserve</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start Republicoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start Republicoin on system login</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the Republicoin 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="+19"/> <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="-57"/> <source>Connect to the Republicoin network through a SOCKS5 proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS5 proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+90"/> <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 Republicoin.</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 coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (on by default)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Whether to select the coin outputs randomly or with minimal coin age.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Minimize weight consumption (experimental)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use black visual theme (requires restart)</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="+47"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+148"/> <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 Republicoin.</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="+46"/> <location line="+247"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Republicoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-173"/> <source>Stake:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-113"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+80"/> <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="+23"/> <source>Total:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-118"/> <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 line="-32"/> <source>Total of coins that was staked, 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 republicoin: 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"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-194"/> <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="+197"/> <source>&amp;Network Traffic</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Clear</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Totals</source> <translation type="unfinished"/> </message> <message> <location line="+64"/> <source>In:</source> <translation type="unfinished"/> </message> <message> <location line="+80"/> <source>Out:</source> <translation type="unfinished"/> </message> <message> <location line="-383"/> <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 Republicoin-Qt help message to get a list with possible Republicoin 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="-237"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>Republicoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Republicoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+256"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the Republicoin 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="+325"/> <source>Welcome to the Republicoin 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> <message> <location line="+127"/> <source>%1 B</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 KB</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 MB</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 GB</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>%1 m</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>%1 h</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 h %2 m</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <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="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+106"/> <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="+16"/> <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="+24"/> <source>Balance:</source> <translation>بیلنس:</translation> </message> <message> <location line="+47"/> <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="-174"/> <source>Enter a Republicoin address (e.g. btK1jUZ2SEe7hxMA4tvDWxpBigJyekXPgZ)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+87"/> <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="+29"/> <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> <message> <location line="+247"/> <source>WARNING: Invalid Republicoin address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation>چٹ کے بغیر</translation> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</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. btK1jUZ2SEe7hxMA4tvDWxpBigJyekXPgZ)</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 Republicoin address (e.g. btK1jUZ2SEe7hxMA4tvDWxpBigJyekXPgZ)</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"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="-118"/> <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. btK1jUZ2SEe7hxMA4tvDWxpBigJyekXPgZ)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+203"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <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="+24"/> <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 Republicoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <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"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <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. btK1jUZ2SEe7hxMA4tvDWxpBigJyekXPgZ)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Republicoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Republicoin address (e.g. btK1jUZ2SEe7hxMA4tvDWxpBigJyekXPgZ)</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 Republicoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+85"/> <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>TrafficGraphWidget</name> <message> <location filename="../trafficgraphwidget.cpp" line="+75"/> <source>KB/s</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+25"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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="+17"/> <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>تاریخ</translation> </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="+13"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+19"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <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="+34"/> <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 510 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="+5"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Amount</source> <translation>رقم</translation> </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="-202"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-36"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+67"/> <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="+231"/> <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> <location line="+52"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <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="+42"/> <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>کو بھیجا</translation> </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>(N / A)</translation> </message> <message> <location line="+194"/> <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="+54"/> <location line="+17"/> <source>All</source> <translation>تمام</translation> </message> <message> <location line="-16"/> <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="+12"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>کو بھیجا</translation> </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="+138"/> <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>تاریخ</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 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="+208"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+173"/> <source>Republicoin version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send command to -server or republicoind</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="-147"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify configuration file (default: republicoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: republicoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=republicoinrpc 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;Republicoin Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Listen for connections on &lt;port&gt; (default: 15714 or testnet: 25714)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Always query for peer addresses via DNS lookup (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-36"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+63"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 15715 or testnet: 25715)</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-28"/> <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="+94"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <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="-104"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Republicoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+132"/> <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="-17"/> <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="-34"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="-68"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="-92"/> <source>Sync checkpoints policy (default: strict)</source> <translation type="unfinished"/> </message> <message> <location line="+90"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-89"/> <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="-17"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <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="-34"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+116"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <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="-26"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+54"/> <source>Verifying database integrity...</source> <translation type="unfinished"/> </message> <message> <location line="+43"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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="+7"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</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="-53"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-59"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>Connect through SOCKS5 proxy</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>If &lt;category&gt; is not supplied, output all debugging information.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&lt;category&gt; can be:</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wait for RPC server to start</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</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="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <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>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <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="+5"/> <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Initialization sanity check failed. Republicoin is shutting down.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <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="+3"/> <source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source> <translation type="unfinished"/> </message> <message> <location line="-174"/> <source>This help message</source> <translation>یہ مدد کا پیغام</translation> </message> <message> <location line="+105"/> <source>Wallet %s resides outside data directory %s.</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-131"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+127"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-10"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of Republicoin</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart Republicoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-22"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Sending...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation>غلط رقم</translation> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation>ناکافی فنڈز</translation> </message> <message> <location line="-40"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-111"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="+126"/> <source>Unable to bind to %s on this computer. Republicoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-102"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <source>Minimize weight consumption (experimental) (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>How many blocks to check at startup (default: 500, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Republicoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="-161"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="+188"/> <source>Error</source> <translation>نقص</translation> </message> <message> <location line="-18"/> <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": "5cf58f3060f2711161d60f4c4e7f61b4", "timestamp": "", "source": "github", "line_count": 3330, "max_line_length": 395, "avg_line_length": 32.752852852852854, "alnum_prop": 0.5837879468583531, "repo_name": "republicoin/REP", "id": "96ff6ac0633ae64c4049745fa4f5ed31cd8da201", "size": "109375", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/locale/bitcoin_ur_PK.ts", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "51312" }, { "name": "C", "bytes": "465626" }, { "name": "C++", "bytes": "2534938" }, { "name": "CSS", "bytes": "1127" }, { "name": "HTML", "bytes": "50620" }, { "name": "Makefile", "bytes": "12108" }, { "name": "NSIS", "bytes": "6077" }, { "name": "Objective-C", "bytes": "858" }, { "name": "Objective-C++", "bytes": "6899" }, { "name": "Python", "bytes": "54355" }, { "name": "QMake", "bytes": "14156" }, { "name": "Shell", "bytes": "8509" } ], "symlink_target": "" }
package org.apache.hadoop.hbase.client; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.io.Writable; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Used to perform Delete operations on a single row. * <p> * To delete an entire row, instantiate a Delete object with the row * to delete. To further define the scope of what to delete, perform * additional methods as outlined below. * <p> * To delete specific families, execute {@link #deleteFamily(byte[]) deleteFamily} * for each family to delete. * <p> * To delete multiple versions of specific columns, execute * {@link #deleteColumns(byte[], byte[]) deleteColumns} * for each column to delete. * <p> * To delete specific versions of specific columns, execute * {@link #deleteColumn(byte[], byte[], long) deleteColumn} * for each column version to delete. * <p> * Specifying timestamps, deleteFamily and deleteColumns will delete all * versions with a timestamp less than or equal to that passed. If no * timestamp is specified, an entry is added with a timestamp of 'now' * where 'now' is the servers's System.currentTimeMillis(). * Specifying a timestamp to the deleteColumn method will * delete versions only with a timestamp equal to that specified. * If no timestamp is passed to deleteColumn, internally, it figures the * most recent cell's timestamp and adds a delete at that timestamp; i.e. * it deletes the most recently added cell. * <p>The timestamp passed to the constructor is used ONLY for delete of * rows. For anything less -- a deleteColumn, deleteColumns or * deleteFamily -- then you need to use the method overrides that take a * timestamp. The constructor timestamp is not referenced. */ public class Delete extends Mutation implements Writable, Comparable<Row> { private static final byte DELETE_VERSION = (byte)3; /** Constructor for Writable. DO NOT USE */ public Delete() { this((byte [])null); } /** * Create a Delete operation for the specified row. * <p> * If no further operations are done, this will delete everything * associated with the specified row (all versions of all columns in all * families). * @param row row key */ public Delete(byte [] row) { this(row, HConstants.LATEST_TIMESTAMP, null); } /** * Create a Delete operation for the specified row and timestamp, using * an optional row lock.<p> * * If no further operations are done, this will delete all columns in all * families of the specified row with a timestamp less than or equal to the * specified timestamp.<p> * * This timestamp is ONLY used for a delete row operation. If specifying * families or columns, you must specify each timestamp individually. * @param row row key * @param timestamp maximum version timestamp (only for delete row) * @param rowLock previously acquired row lock, or null */ public Delete(byte [] row, long timestamp, RowLock rowLock) { this.row = row; this.ts = timestamp; if (rowLock != null) { this.lockId = rowLock.getLockId(); } } /** * @param d Delete to clone. */ public Delete(final Delete d) { this.row = d.getRow(); this.ts = d.getTimeStamp(); this.lockId = d.getLockId(); this.familyMap.putAll(d.getFamilyMap()); this.writeToWAL = d.writeToWAL; } /** * Advanced use only. * Add an existing delete marker to this Delete object. * @param kv An existing KeyValue of type "delete". * @return this for invocation chaining * @throws IOException */ public Delete addDeleteMarker(KeyValue kv) throws IOException { if (!kv.isDelete()) { throw new IOException("The recently added KeyValue is not of type " + "delete. Rowkey: " + Bytes.toStringBinary(this.row)); } if (Bytes.compareTo(this.row, 0, row.length, kv.getBuffer(), kv.getRowOffset(), kv.getRowLength()) != 0) { throw new IOException("The row in the recently added KeyValue " + Bytes.toStringBinary(kv.getBuffer(), kv.getRowOffset(), kv.getRowLength()) + " doesn't match the original one " + Bytes.toStringBinary(this.row)); } byte [] family = kv.getFamily(); List<KeyValue> list = familyMap.get(family); if (list == null) { list = new ArrayList<KeyValue>(); } list.add(kv); familyMap.put(family, list); return this; } /** * Delete all versions of all columns of the specified family. * <p> * Overrides previous calls to deleteColumn and deleteColumns for the * specified family. * @param family family name * @return this for invocation chaining */ public Delete deleteFamily(byte [] family) { this.deleteFamily(family, HConstants.LATEST_TIMESTAMP); return this; } /** * Delete all columns of the specified family with a timestamp less than * or equal to the specified timestamp. * <p> * Overrides previous calls to deleteColumn and deleteColumns for the * specified family. * @param family family name * @param timestamp maximum version timestamp * @return this for invocation chaining */ public Delete deleteFamily(byte [] family, long timestamp) { List<KeyValue> list = familyMap.get(family); if(list == null) { list = new ArrayList<KeyValue>(); } else if(!list.isEmpty()) { list.clear(); } list.add(new KeyValue(row, family, null, timestamp, KeyValue.Type.DeleteFamily)); familyMap.put(family, list); return this; } /** * Delete all versions of the specified column. * @param family family name * @param qualifier column qualifier * @return this for invocation chaining */ public Delete deleteColumns(byte [] family, byte [] qualifier) { this.deleteColumns(family, qualifier, HConstants.LATEST_TIMESTAMP); return this; } /** * Delete all versions of the specified column with a timestamp less than * or equal to the specified timestamp. * @param family family name * @param qualifier column qualifier * @param timestamp maximum version timestamp * @return this for invocation chaining */ public Delete deleteColumns(byte [] family, byte [] qualifier, long timestamp) { List<KeyValue> list = familyMap.get(family); if (list == null) { list = new ArrayList<KeyValue>(); } list.add(new KeyValue(this.row, family, qualifier, timestamp, KeyValue.Type.DeleteColumn)); familyMap.put(family, list); return this; } /** * Delete the latest version of the specified column. * This is an expensive call in that on the server-side, it first does a * get to find the latest versions timestamp. Then it adds a delete using * the fetched cells timestamp. * @param family family name * @param qualifier column qualifier * @return this for invocation chaining */ public Delete deleteColumn(byte [] family, byte [] qualifier) { this.deleteColumn(family, qualifier, HConstants.LATEST_TIMESTAMP); return this; } /** * Delete the specified version of the specified column. * @param family family name * @param qualifier column qualifier * @param timestamp version timestamp * @return this for invocation chaining */ public Delete deleteColumn(byte [] family, byte [] qualifier, long timestamp) { List<KeyValue> list = familyMap.get(family); if(list == null) { list = new ArrayList<KeyValue>(); } list.add(new KeyValue( this.row, family, qualifier, timestamp, KeyValue.Type.Delete)); familyMap.put(family, list); return this; } /** * Set the timestamp of the delete. * * @param timestamp */ public void setTimestamp(long timestamp) { this.ts = timestamp; } @Override public Map<String, Object> toMap(int maxCols) { // we start with the fingerprint map and build on top of it. Map<String, Object> map = super.toMap(maxCols); // why is put not doing this? map.put("ts", this.ts); return map; } //Writable public void readFields(final DataInput in) throws IOException { int version = in.readByte(); if (version > DELETE_VERSION) { throw new IOException("version not supported"); } this.row = Bytes.readByteArray(in); this.ts = in.readLong(); this.lockId = in.readLong(); if (version > 2) { this.writeToWAL = in.readBoolean(); } this.familyMap.clear(); int numFamilies = in.readInt(); for(int i=0;i<numFamilies;i++) { byte [] family = Bytes.readByteArray(in); int numColumns = in.readInt(); List<KeyValue> list = new ArrayList<KeyValue>(numColumns); for(int j=0;j<numColumns;j++) { KeyValue kv = new KeyValue(); kv.readFields(in); list.add(kv); } this.familyMap.put(family, list); } if (version > 1) { readAttributes(in); } } public void write(final DataOutput out) throws IOException { out.writeByte(DELETE_VERSION); Bytes.writeByteArray(out, this.row); out.writeLong(this.ts); out.writeLong(this.lockId); out.writeBoolean(this.writeToWAL); out.writeInt(familyMap.size()); for(Map.Entry<byte [], List<KeyValue>> entry : familyMap.entrySet()) { Bytes.writeByteArray(out, entry.getKey()); List<KeyValue> list = entry.getValue(); out.writeInt(list.size()); for(KeyValue kv : list) { kv.write(out); } } writeAttributes(out); } }
{ "content_hash": "c5bb9a945a3e77b418d75b51465b6295", "timestamp": "", "source": "github", "line_count": 294, "max_line_length": 85, "avg_line_length": 32.843537414965986, "alnum_prop": 0.6747100248550124, "repo_name": "ay65535/hbase-0.94.0", "id": "a806f8a29d077a343271d13c7723ffce801266cc", "size": "10513", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "src/main/java/org/apache/hadoop/hbase/client/Delete.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "9918" }, { "name": "CSS", "bytes": "23482" }, { "name": "Java", "bytes": "12409566" }, { "name": "PHP", "bytes": "7350" }, { "name": "Perl", "bytes": "8748" }, { "name": "Python", "bytes": "14535" }, { "name": "Ruby", "bytes": "361404" }, { "name": "Shell", "bytes": "62945" }, { "name": "XSLT", "bytes": "3505" } ], "symlink_target": "" }
\documentclass[11pt]{article} \usepackage{listings} \usepackage{tikz} \usepackage{alltt} \usepackage{hyperref} \usepackage{url} %\usepackage{algorithm2e} \usetikzlibrary{arrows,automata,shapes} \tikzstyle{block} = [rectangle, draw, fill=blue!20, text width=5em, text centered, rounded corners, minimum height=2em] \tikzstyle{bt} = [rectangle, draw, fill=blue!20, text width=1em, text centered, rounded corners, minimum height=2em] \newtheorem{defn}{Definition} \newtheorem{crit}{Criterion} \newcommand{\true}{\mbox{\sf true}} \newcommand{\false}{\mbox{\sf false}} \newcommand{\handout}[5]{ \noindent \begin{center} \framebox{ \vbox{ \hbox to 5.78in { {\bf Software Testing, Quality Assurance and Maintenance } \hfill #2 } \vspace{4mm} \hbox to 5.78in { {\Large \hfill #5 \hfill} } \vspace{2mm} \hbox to 5.78in { {\em #3 \hfill #4} } } } \end{center} \vspace*{4mm} } \newcommand{\lecture}[4]{\handout{#1}{#2}{#3}{#4}{Lecture #1}} \topmargin 0pt \advance \topmargin by -\headheight \advance \topmargin by -\headsep \textheight 8.9in \oddsidemargin 0pt \evensidemargin \oddsidemargin \marginparwidth 0.5in \textwidth 6.5in \parindent 0in \parskip 1.5ex %\renewcommand{\baselinestretch}{1.25} %\renewcommand{\baselinestretch}{1.25} % http://gurmeet.net/2008/09/20/latex-tips-n-tricks-for-conference-papers/ \newcommand{\squishlist}{ \begin{list}{$\bullet$} { \setlength{\itemsep}{0pt} \setlength{\parsep}{3pt} \setlength{\topsep}{3pt} \setlength{\partopsep}{0pt} \setlength{\leftmargin}{1.5em} \setlength{\labelwidth}{1em} \setlength{\labelsep}{0.5em} } } \newcommand{\squishlisttwo}{ \begin{list}{$\bullet$} { \setlength{\itemsep}{0pt} \setlength{\parsep}{0pt} \setlength{\topsep}{0pt} \setlength{\partopsep}{0pt} \setlength{\leftmargin}{2em} \setlength{\labelwidth}{1.5em} \setlength{\labelsep}{0.5em} } } \newcommand{\squishend}{ \end{list} } \begin{document} \lecture{14 --- February 3, 2017}{Winter 2017}{Patrick Lam}{version 2} \subsection*{Mutation Testing} The second major way to use grammars in testing is mutation testing. For our purposes, strings will always be programs. We can use mutation testing in two ways: 1) as a way of evaluating how good another coverage criterion actually is; and 2) as a way of improving a test suite. \begin{defn} Ground string: a (valid) string belonging to the language of the grammar (i.e. a programming language grammar). \end{defn} \begin{defn} Mutation Operator: a rule that specifies syntactic variations of strings generated from a grammar. \end{defn} \begin{defn} Mutant: the result of one application of a mutation operator to a ground string. \end{defn} Mutants may be generated either by modifying existing strings or by changing a string while it is being generated. It is generally difficult to find good mutation operators. One example of a bad mutation operator might be to change all boolean expressions to ``true''. Note that mutation is hard to apply by hand, and automation is complicated. The testing community generally considers mutation to be a ``gold standard'' that serves as a benchmark against which to compare other testing criteria against. For example, consider a test suite $T$ which ensures statement coverage. What can mutation testing say about how good $T$ is? \paragraph{More on ground strings.} Mutation manipulates ground strings to produce variants on these strings. Typically, the ground string is the original program. %Here are some examples: %\squishlist %\item the program that we are testing; or %\item valid inputs to a program. %\squishend %If we are testing invalid inputs, we might not care about ground strings. %% \paragraph{Credit card number examples.} %% {\sf Valid strings:} %{\tt 4500 0000 0000 1234}; {\tt 4599 2345 1111 3666}. %% \noindent %% {\sf Invalid strings:} %{\tt 4599 2345 1111 366i}; {\tt 4522 3433 9x12 ****}. We can also create mutants by applying a mutation operator during generation, which is useful when you don't need the ground string. NB: There are many ways for a string to be invalid but still be generated by the grammar. Some points: \squishlist \item How many mutation operators should you apply to get mutants? \emph{One.} \item Should you apply every mutation operator everywhere it might apply? \emph{More work, but can subsume other criteria.} \squishend \section*{Killing Mutants} Generate a mutant $m$ for an original ground string (program) $m_0$. \begin{defn} Test case $t$ \emph{kills} $m$ if running $t$ on $m$ gives different output than running $t$ on $m_0$. \end{defn} We can also define a mutation score, which is the percentage of mutants killed. To use mutation testing for generating test cases, one would measure the effectiveness of a test suite (the mutation score), and keep adding tests until reaching a desired mutation score. \section*{Program Based Grammars} The usual way to use mutation testing for generating test cases is by generating mutants by modifying programs according to the language grammar, using mutation operators. Mutants are \emph{valid programs} (not tests) which ought to behave differently from the ground string. Our task, in mutation testing, is to create tests which distinguish mutants from originals. \paragraph{Example.} Given the ground string {\tt x = a + b}, we might create mutants {\tt x = a - b}, {\tt x = a * b}, etc. A possible original on the left and a mutant on the right: \begin{minipage}{.5\textwidth} \begin{alltt} int foo(int x, int y) \{ // original if (x > 5) return x + y; else return x; \} \end{alltt} \end{minipage}\begin{minipage}{.5\textwidth} \begin{alltt} int foo(int x, int y) \{ // mutant if (x > 5) return x - y; else return x; \} \end{alltt} \end{minipage} ~\\[3em] %% In this example, the test case $\langle 6, 2 \rangle$ will kill %% the mutant, since it returns 8 for the original and 4 for the mutant, %% while the case $\langle 6, 0 \rangle$ will not kill the mutant, %% since it returns 6 in both cases. Once we find a test case that kills a mutant, we can forget the mutant and keep the test case. The mutant is then \emph{dead}. \paragraph{Uninteresting Mutants.} Three kinds of mutants are uninteresting: \squishlist \item \emph{stillborn}: such mutants cannot compile (or immediately crash); \item \emph{trivial}: killed by almost any test case; \item \emph{equivalent}: indistinguishable from original program. \squishend The usual application of program-based mutation is to individual statements in unit-level (per-method) testing. \newpage \paragraph{Mutation Example.} Here are some mutants. {\small \begin{minipage}[t]{.5\textwidth} \begin{alltt} // original int min(int a, int b) \{ int minVal; minVal = a; if (b < a) \{ minVal = b; \} return minVal; \} \end{alltt} \end{minipage} \begin{minipage}[t]{.5\textwidth} \begin{alltt} // with mutants int min(int a, int b) \{ int minVal; minVal = a; minVal = b; // \(\Delta 1\) if (b < a) \{ if (b > a) \{ // \(\Delta 2\) if (b < minVal) \{ // \(\Delta 3 \) minVal = b; BOMB(); // \(\Delta 4\) minVal = a; // \(\Delta 5\) minVal = failOnZero(b); // \(\Delta 6\) \} return minVal; \} \end{alltt} \end{minipage} } Conceptually we've shown 6 programs, but we display them together for convenience. Goals of mutation testing: \begin{enumerate} \item mimic (and hence test for) typical mistakes; \item encode knowledge about specific kinds of effective tests in practice, e.g. statement coverage ($\Delta 4$), checking for 0 values ($\Delta 6$). \end{enumerate} Reiterating the process for using mutation testing (see picture at end): \squishlist \item \emph{Goal:} kill mutants \item \emph{Desired Side Effect:} good tests which kill the mutants. \squishend These tests will help find faults (we hope). We find these tests by intuition and analysis. \end{document}
{ "content_hash": "a722398ef8e19de3893d44037f94cc4e", "timestamp": "", "source": "github", "line_count": 262, "max_line_length": 123, "avg_line_length": 30.610687022900763, "alnum_prop": 0.7134663341645885, "repo_name": "patricklam/stqam-2017", "id": "22b8de49f886c59936b532faa70bc89f3522ff64", "size": "8020", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "notes/L14.tex", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "C", "bytes": "501" }, { "name": "Java", "bytes": "18418" }, { "name": "JavaScript", "bytes": "483" }, { "name": "Python", "bytes": "3058" }, { "name": "TeX", "bytes": "824319" } ], "symlink_target": "" }
/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/lazy_deserialization/src/terse_writes.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #pragma once #include "thrift/compiler/test/fixtures/lazy_deserialization/gen-cpp2/terse_writes_metadata.h" #include <thrift/lib/cpp2/visitation/visit_union.h> namespace apache { namespace thrift { namespace detail { } // namespace detail } // namespace thrift } // namespace apache
{ "content_hash": "f8863da40f608407b33d87bce91c218d", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 105, "avg_line_length": 27.555555555555557, "alnum_prop": 0.7600806451612904, "repo_name": "facebook/fbthrift", "id": "6da47c99ca070f46fc59407c923deff2b96d1e3f", "size": "496", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "thrift/compiler/test/fixtures/lazy_deserialization/gen-cpp2/terse_writes_visit_union.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "15608" }, { "name": "C++", "bytes": "10658844" }, { "name": "CMake", "bytes": "147347" }, { "name": "CSS", "bytes": "4028" }, { "name": "Cython", "bytes": "339005" }, { "name": "Emacs Lisp", "bytes": "11229" }, { "name": "Go", "bytes": "447092" }, { "name": "Hack", "bytes": "313122" }, { "name": "Java", "bytes": "1990062" }, { "name": "JavaScript", "bytes": "38872" }, { "name": "Mustache", "bytes": "1269560" }, { "name": "Python", "bytes": "1623026" }, { "name": "Ruby", "bytes": "6111" }, { "name": "Rust", "bytes": "283392" }, { "name": "Shell", "bytes": "6615" }, { "name": "Thrift", "bytes": "1859041" }, { "name": "Vim Script", "bytes": "2887" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>V8 API Reference Guide for node.js v4.2.2: Namespace Members</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v4.2.2 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li> <li class="current"><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li> </ul> </div> <div id="navrow3" class="tabs2"> <ul class="tablist"> <li><a href="namespacemembers.html"><span>All</span></a></li> <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li> <li class="current"><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li> </ul> </div> </div><!-- top --> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="contents"> &#160;<ul> <li>AccessControl : <a class="el" href="namespacev8.html#a31d8355cb043d7d2dda3f4a52760b64e">v8</a> </li> <li>AccessType : <a class="el" href="namespacev8.html#add8bef6469c5b94706584124e610046c">v8</a> </li> <li>GCType : <a class="el" href="namespacev8.html#ac109d6f27e0c0f9ef4e98bcf7a806cf2">v8</a> </li> <li>JitCodeEventOptions : <a class="el" href="namespacev8.html#a06f34fa4fa4cfc8518366808d1d461c1">v8</a> </li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
{ "content_hash": "986d641f24dd467875e33e337f94fb67", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 154, "avg_line_length": 39.3859649122807, "alnum_prop": 0.6503340757238307, "repo_name": "v8-dox/v8-dox.github.io", "id": "2088cbb1c14cfc2ab208e037b92552f720feb6e9", "size": "4490", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "0b32bbb/html/namespacemembers_enum.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
import { Component, OnInit, Output, NgZone, EventEmitter } from '@angular/core'; import { CompileService } from '../shared/compile.service'; @Component({ selector: 'app-ts-editor', templateUrl: './ts-editor.component.html', styleUrls: ['./ts-editor.component.css'] }) export class TsEditorComponent implements OnInit { code: string; configs = { mode: { name: 'javascript', json: true, typescript: true }, }; updateTimeout: any; @Output() onCompile = new EventEmitter(); @Output() onStartCompile = new EventEmitter(); @Output() onEndCompile = new EventEmitter(); supportedVersions: string[] = [ '2.2.2', '2.2.0', '2.1.6', '2.1.5', '2.1.4', '2.0', '1.8' ] version: string = this.supportedVersions[0]; constructor(private compileService?: CompileService, private ngZone?: NgZone) { } ngOnInit() { } codeChange(version?: string) { this.ngZone.run(() => { this.onStartCompile.emit(true); version = version || this.version; this.version = version; if (this.supportedVersions.indexOf(version) === -1) { this.onCompile.emit('// Compile failed'); this.onEndCompile.emit(true); } if (this.updateTimeout) { clearTimeout(this.updateTimeout); } this.updateTimeout = setTimeout(() => { this.compileService.compile(this.code, version) .subscribe(jsCode => { this.onCompile.emit(jsCode); this.onEndCompile.emit(true); }, () => { this.onCompile.emit('// Compile failed'); this.onEndCompile.emit(true); }) }, 1000); }); } versionChange(version: string) { this.codeChange(version); } onFocus() { } onBlur() { } }
{ "content_hash": "2696623aff0a2b1b66c94aaf3ba8e760", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 59, "avg_line_length": 18.477777777777778, "alnum_prop": 0.6313890559230306, "repo_name": "tsplayground/tsplayground-ui", "id": "4f33dfab3eb323f8dc853143912d5297fba7d054", "size": "1663", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/app/ts-editor/ts-editor.component.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "919" }, { "name": "HTML", "bytes": "3152" }, { "name": "JavaScript", "bytes": "1996" }, { "name": "TypeScript", "bytes": "27787" } ], "symlink_target": "" }
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Linq; using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Localisation; using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Graphics.UserInterface; using osu.Game.Online; using osu.Game.Online.API; using osu.Game.Overlays.BeatmapListing.Panels; using osu.Game.Overlays.BeatmapSet.Buttons; using osuTK; namespace osu.Game.Overlays.BeatmapSet { public class BeatmapSetHeaderContent : BeatmapDownloadTrackingComposite { private const float transition_duration = 200; private const float buttons_height = 45; private const float buttons_spacing = 5; public bool DownloadButtonsVisible => downloadButtonsContainer.Any(); public readonly Details Details; public readonly BeatmapPicker Picker; private readonly UpdateableOnlineBeatmapSetCover cover; private readonly Box coverGradient; private readonly OsuSpriteText title, artist; private readonly AuthorInfo author; private readonly ExplicitContentBeatmapPill explicitContentPill; private readonly FeaturedArtistBeatmapPill featuredArtistPill; private readonly FillFlowContainer downloadButtonsContainer; private readonly BeatmapAvailability beatmapAvailability; private readonly BeatmapSetOnlineStatusPill onlineStatusPill; private readonly FavouriteButton favouriteButton; private readonly FillFlowContainer fadeContent; private readonly LoadingSpinner loading; [Resolved] private IAPIProvider api { get; set; } [Resolved] private BeatmapRulesetSelector rulesetSelector { get; set; } public BeatmapSetHeaderContent() { ExternalLinkButton externalLink; RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; InternalChild = new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { cover = new UpdateableOnlineBeatmapSetCover { RelativeSizeAxes = Axes.Both, Masking = true, }, coverGradient = new Box { RelativeSizeAxes = Axes.Both }, }, }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Vertical = BeatmapSetOverlay.Y_PADDING, Left = BeatmapSetOverlay.X_PADDING, Right = BeatmapSetOverlay.X_PADDING + BeatmapSetOverlay.RIGHT_WIDTH, }, Children = new Drawable[] { fadeContent = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Child = Picker = new BeatmapPicker(), }, new FillFlowContainer { Direction = FillDirection.Horizontal, AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Top = 15 }, Children = new Drawable[] { title = new OsuSpriteText { Font = OsuFont.GetFont(size: 30, weight: FontWeight.SemiBold, italics: true) }, externalLink = new ExternalLinkButton { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Margin = new MarginPadding { Left = 5, Bottom = 4 }, // To better lineup with the font }, explicitContentPill = new ExplicitContentBeatmapPill { Alpha = 0f, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Margin = new MarginPadding { Left = 10, Bottom = 4 }, } } }, new FillFlowContainer { Direction = FillDirection.Horizontal, AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Bottom = 20 }, Children = new Drawable[] { artist = new OsuSpriteText { Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, italics: true), }, featuredArtistPill = new FeaturedArtistBeatmapPill { Alpha = 0f, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Margin = new MarginPadding { Left = 10 } } } }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Child = author = new AuthorInfo(), }, beatmapAvailability = new BeatmapAvailability(), new Container { RelativeSizeAxes = Axes.X, Height = buttons_height, Margin = new MarginPadding { Top = 10 }, Children = new Drawable[] { favouriteButton = new FavouriteButton { BeatmapSet = { BindTarget = BeatmapSet } }, downloadButtonsContainer = new FillFlowContainer { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { Left = buttons_height + buttons_spacing }, Spacing = new Vector2(buttons_spacing), }, }, }, }, }, } }, loading = new LoadingSpinner { Anchor = Anchor.Centre, Origin = Anchor.Centre, Scale = new Vector2(1.5f), }, new FillFlowContainer { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Top = BeatmapSetOverlay.Y_PADDING, Right = BeatmapSetOverlay.X_PADDING }, Direction = FillDirection.Vertical, Spacing = new Vector2(10), Children = new Drawable[] { onlineStatusPill = new BeatmapSetOnlineStatusPill { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, TextSize = 14, TextPadding = new MarginPadding { Horizontal = 35, Vertical = 10 } }, Details = new Details(), }, }, } }; Picker.Beatmap.ValueChanged += b => { Details.BeatmapInfo = b.NewValue; externalLink.Link = $@"{api.WebsiteRootUrl}/beatmapsets/{BeatmapSet.Value?.OnlineBeatmapSetID}#{b.NewValue?.Ruleset.ShortName}/{b.NewValue?.OnlineBeatmapID}"; }; } [BackgroundDependencyLoader] private void load(OverlayColourProvider colourProvider) { coverGradient.Colour = ColourInfo.GradientVertical(colourProvider.Background6.Opacity(0.3f), colourProvider.Background6.Opacity(0.8f)); onlineStatusPill.BackgroundColour = colourProvider.Background6; State.BindValueChanged(_ => updateDownloadButtons()); BeatmapSet.BindValueChanged(setInfo => { Picker.BeatmapSet = rulesetSelector.BeatmapSet = author.BeatmapSet = beatmapAvailability.BeatmapSet = Details.BeatmapSet = setInfo.NewValue; cover.BeatmapSet = setInfo.NewValue; if (setInfo.NewValue == null) { onlineStatusPill.FadeTo(0.5f, 500, Easing.OutQuint); fadeContent.Hide(); loading.Show(); downloadButtonsContainer.FadeOut(transition_duration); favouriteButton.FadeOut(transition_duration); } else { fadeContent.FadeIn(500, Easing.OutQuint); loading.Hide(); title.Text = new RomanisableString(setInfo.NewValue.Metadata.TitleUnicode, setInfo.NewValue.Metadata.Title); artist.Text = new RomanisableString(setInfo.NewValue.Metadata.ArtistUnicode, setInfo.NewValue.Metadata.Artist); explicitContentPill.Alpha = setInfo.NewValue.OnlineInfo.HasExplicitContent ? 1 : 0; featuredArtistPill.Alpha = setInfo.NewValue.OnlineInfo.TrackId != null ? 1 : 0; onlineStatusPill.FadeIn(500, Easing.OutQuint); onlineStatusPill.Status = setInfo.NewValue.OnlineInfo.Status; downloadButtonsContainer.FadeIn(transition_duration); favouriteButton.FadeIn(transition_duration); updateDownloadButtons(); } }, true); } private void updateDownloadButtons() { if (BeatmapSet.Value == null) return; if (BeatmapSet.Value.OnlineInfo.Availability.DownloadDisabled && State.Value != DownloadState.LocallyAvailable) { downloadButtonsContainer.Clear(); return; } switch (State.Value) { case DownloadState.LocallyAvailable: // temporary for UX until new design is implemented. downloadButtonsContainer.Child = new BeatmapPanelDownloadButton(BeatmapSet.Value) { Width = 50, RelativeSizeAxes = Axes.Y, SelectedBeatmap = { BindTarget = Picker.Beatmap } }; break; case DownloadState.Downloading: case DownloadState.Importing: // temporary to avoid showing two buttons for maps with novideo. will be fixed in new beatmap overlay design. downloadButtonsContainer.Child = new HeaderDownloadButton(BeatmapSet.Value); break; default: downloadButtonsContainer.Child = new HeaderDownloadButton(BeatmapSet.Value); if (BeatmapSet.Value.OnlineInfo.HasVideo) downloadButtonsContainer.Add(new HeaderDownloadButton(BeatmapSet.Value, true)); break; } } } }
{ "content_hash": "5a47c91c04844adf869d76d882b815aa", "timestamp": "", "source": "github", "line_count": 301, "max_line_length": 174, "avg_line_length": 47.66112956810631, "alnum_prop": 0.4339885682420187, "repo_name": "peppy/osu-new", "id": "c1029923f75aa79bcadae44a445b814df4386e91", "size": "14348", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "281779" } ], "symlink_target": "" }
package main.sqlipa.ast.stmt.event.select; import main.sqlipa.ast.Block; import main.sqlipa.ast.expr.Expression; import main.sqlipa.ast.visitor.VoidVisitor; public class ExpressionColumn extends ResultColumn { public Expression expr; public ExpressionColumn() { super(); } public ExpressionColumn(Block block, Expression expr) { super(block); this.expr = expr; } @Override public void accept(VoidVisitor visitor) { visitor.visit(this); } }
{ "content_hash": "fc69c322a0e93978d818c8f82dec4de8", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 59, "avg_line_length": 20.72, "alnum_prop": 0.6718146718146718, "repo_name": "frroliveira/sqlipa", "id": "28ad5a11de431dbd0cb3cae5b7078e4c5a125918", "size": "518", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/sqlipa/ast/stmt/event/select/ExpressionColumn.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "146609" }, { "name": "PLpgSQL", "bytes": "87" } ], "symlink_target": "" }
<component name="ArtifactManager"> <artifact type="war" name="com.eventhorizon.jarvis.web:war"> <output-path>$PROJECT_DIR$/com.eventhorizon.jarvis.web/target</output-path> <root id="archive" name="com.eventhorizon.jarvis.web.war"> <element id="artifact" artifact-name="com.eventhorizon.jarvis.web:war exploded" /> </root> </artifact> </component>
{ "content_hash": "e9a16e341f50c89a0ab458d8c5fe9eb7", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 88, "avg_line_length": 46, "alnum_prop": 0.7146739130434783, "repo_name": "ReeverPD/jarvis", "id": "35219dc4effb65f2eca20a083b7310dbbcfa30e2", "size": "368", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": ".idea/artifacts/com_eventhorizon_jarvis_web_war.xml", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "ActionScript", "bytes": "15982" }, { "name": "CSS", "bytes": "533180" }, { "name": "Erlang", "bytes": "6486" }, { "name": "Java", "bytes": "61355" }, { "name": "JavaScript", "bytes": "2551557" }, { "name": "PHP", "bytes": "45386" }, { "name": "Perl", "bytes": "165395" }, { "name": "Shell", "bytes": "63121" } ], "symlink_target": "" }
// Copyright © 2015 - Present RealDimensions Software, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. namespace chocolatey.package.validator.host.infrastructure.registration { using System; using SimpleInjector; using validator.infrastructure.app; using validator.infrastructure.app.registration; using validator.infrastructure.container; /// <summary> /// The inversion container /// </summary> public static class SimpleInjectorContainer { private static readonly Lazy<Container> _container = new Lazy<Container>(() => new Container()); /// <summary> /// Gets the container. /// </summary> public static Container Container { get { return _container.Value; } } /// <summary> /// Initializes the container /// </summary> public static void start() { "SimpleInjectorContainer".Log().Debug("SimpleInjector is starting up"); Container.Options.AllowOverridingRegistrations = true; var originalConstructorResolutionBehavior = Container.Options.ConstructorResolutionBehavior; Container.Options.ConstructorResolutionBehavior = new SimpleInjectorContainerResolutionBehavior(originalConstructorResolutionBehavior); initialize_container(Container); if (ApplicationParameters.IsDebug) Container.Verify(); } /// <summary> /// Does any Shutdown for the container /// </summary> public static void stop() { "SimpleInjectorContainer".Log().Debug("SimpleInjector has shut down"); } private static void initialize_container(Container container) { var binding = new ContainerBinding(); binding.register_components(container); var bindingClient = new ContainerBindingConsole(); bindingClient.register_components(container); } } }
{ "content_hash": "e0a9c64a0950d932249b6eeefb1f9a0d", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 104, "avg_line_length": 37.2463768115942, "alnum_prop": 0.6466926070038911, "repo_name": "gep13/package-validator", "id": "5835387a70a5010def8baccda9e26e64f660c0ec", "size": "2573", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/chocolatey.package.validator.host/infrastructure/registration/SimpleInjectorContainer.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "3162" }, { "name": "C#", "bytes": "737828" }, { "name": "PowerShell", "bytes": "4677" }, { "name": "Shell", "bytes": "2250" }, { "name": "XSLT", "bytes": "21405" } ], "symlink_target": "" }
 #pragma once #include <aws/elasticache/ElastiCache_EXPORTS.h> #include <aws/elasticache/ElastiCacheRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <utility> namespace Aws { namespace ElastiCache { namespace Model { /** * <p>Represents the input of a <code>RebootCacheCluster</code> * operation.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/RebootCacheClusterMessage">AWS * API Reference</a></p> */ class AWS_ELASTICACHE_API RebootCacheClusterRequest : public ElastiCacheRequest { public: RebootCacheClusterRequest(); Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline const Aws::String& GetCacheClusterId() const{ return m_cacheClusterId; } /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline void SetCacheClusterId(const Aws::String& value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId = value; } /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline void SetCacheClusterId(Aws::String&& value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId = std::move(value); } /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline void SetCacheClusterId(const char* value) { m_cacheClusterIdHasBeenSet = true; m_cacheClusterId.assign(value); } /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline RebootCacheClusterRequest& WithCacheClusterId(const Aws::String& value) { SetCacheClusterId(value); return *this;} /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline RebootCacheClusterRequest& WithCacheClusterId(Aws::String&& value) { SetCacheClusterId(std::move(value)); return *this;} /** * <p>The cache cluster identifier. This parameter is stored as a lowercase * string.</p> */ inline RebootCacheClusterRequest& WithCacheClusterId(const char* value) { SetCacheClusterId(value); return *this;} /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline const Aws::Vector<Aws::String>& GetCacheNodeIdsToReboot() const{ return m_cacheNodeIdsToReboot; } /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline void SetCacheNodeIdsToReboot(const Aws::Vector<Aws::String>& value) { m_cacheNodeIdsToRebootHasBeenSet = true; m_cacheNodeIdsToReboot = value; } /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline void SetCacheNodeIdsToReboot(Aws::Vector<Aws::String>&& value) { m_cacheNodeIdsToRebootHasBeenSet = true; m_cacheNodeIdsToReboot = std::move(value); } /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline RebootCacheClusterRequest& WithCacheNodeIdsToReboot(const Aws::Vector<Aws::String>& value) { SetCacheNodeIdsToReboot(value); return *this;} /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline RebootCacheClusterRequest& WithCacheNodeIdsToReboot(Aws::Vector<Aws::String>&& value) { SetCacheNodeIdsToReboot(std::move(value)); return *this;} /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline RebootCacheClusterRequest& AddCacheNodeIdsToReboot(const Aws::String& value) { m_cacheNodeIdsToRebootHasBeenSet = true; m_cacheNodeIdsToReboot.push_back(value); return *this; } /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline RebootCacheClusterRequest& AddCacheNodeIdsToReboot(Aws::String&& value) { m_cacheNodeIdsToRebootHasBeenSet = true; m_cacheNodeIdsToReboot.push_back(std::move(value)); return *this; } /** * <p>A list of cache node IDs to reboot. A node ID is a numeric identifier (0001, * 0002, etc.). To reboot an entire cache cluster, specify all of the cache node * IDs.</p> */ inline RebootCacheClusterRequest& AddCacheNodeIdsToReboot(const char* value) { m_cacheNodeIdsToRebootHasBeenSet = true; m_cacheNodeIdsToReboot.push_back(value); return *this; } private: Aws::String m_cacheClusterId; bool m_cacheClusterIdHasBeenSet; Aws::Vector<Aws::String> m_cacheNodeIdsToReboot; bool m_cacheNodeIdsToRebootHasBeenSet; }; } // namespace Model } // namespace ElastiCache } // namespace Aws
{ "content_hash": "4d282604a74d2752eae7174bc07b8f85", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 193, "avg_line_length": 40.378571428571426, "alnum_prop": 0.686891915796922, "repo_name": "svagionitis/aws-sdk-cpp", "id": "83ded0a29a4e683f8db9f5aa555d70a845831b37", "size": "6226", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "aws-cpp-sdk-elasticache/include/aws/elasticache/model/RebootCacheClusterRequest.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "2313" }, { "name": "C++", "bytes": "104799778" }, { "name": "CMake", "bytes": "455533" }, { "name": "HTML", "bytes": "4471" }, { "name": "Java", "bytes": "243075" }, { "name": "Python", "bytes": "72896" }, { "name": "Shell", "bytes": "2803" } ], "symlink_target": "" }
export interface Middleware<T> { (context: T, next: ContinuationMiddleware<T>): any } export interface ContinuationMiddleware<T> { (context?: T, next?: Middleware<T>): any } const flatten = <T>(values: Array<T | Array<T>>) => ([] as any).concat(...values) as T[], noop = function noop() { return Promise.resolve() } function throwIfHasBeenCalled(fn: any) { if (fn.__appbuildercalled) { throw new Error('Cannot call next more than once') } return (fn.__appbuildercalled = true) } function tryInvokeMiddleware<T>(context: T, middleware: Middleware<T>, next: ContinuationMiddleware<T> = noop) { try { return Promise.resolve(middleware ? middleware(context, next) : context) } catch (error) { return Promise.reject(error) } } export function functionList<T = any>(list: Function | Function[], ...args: any[]): Middleware<T>[] { const arrayList = Symbol.iterator in list ? Array.from(list as Function[]) : [list as Function] return arrayList.map((x) => { return (_: any, next: any) => Promise.resolve(x(...args)).then(next) }) } /** * Create a function to invoke all passed middleware functions * with a single argument <T>context * @param middleware */ export function compose<T = any>(...middleware: (Middleware<T> | Middleware<T>[])[]): ContinuationMiddleware<T> { return flatten(middleware) .filter((x) => { if ('function' !== typeof x) { throw new TypeError(`${x}, must be a middleware function accpeting (context, next) arguments`) } return x }) .reduceRight((composed: Middleware<T>, mw: Middleware<T>) => { return function (context: T, nextFn: ContinuationMiddleware<T>) { const next = () => throwIfHasBeenCalled(next) && composed(context, nextFn) return tryInvokeMiddleware(context, mw, next) } }, tryInvokeMiddleware) as ContinuationMiddleware<T> }
{ "content_hash": "6ae61642b7c58194f1728c38a9412b57", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 113, "avg_line_length": 34.833333333333336, "alnum_prop": 0.6634768740031898, "repo_name": "calebboyd/app-builder", "id": "3d2827115e8ff8387651397c026eedf9eed49bbd", "size": "1881", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/compose.ts", "mode": "33188", "license": "mit", "language": [ { "name": "TypeScript", "bytes": "6288" } ], "symlink_target": "" }
#pragma once #include <vector> namespace Annulus { class Contact; /** * The contact resolver routine for the contacts that are present in the simulation. * It iterates over the contacts and resolved them for velocity and interpenetration by making use of impulsive forces and moment. */ class ContactResolver { public: ContactResolver() = default; /** * The routine to resolve a given vector of contacts. * @param contacts The vector of Contacts which need to be resolved. * @param seconds The amount of time which has passed in previous frame. */ void ResolveContacts(const std::vector<const Contact*>& contacts, std::float_t seconds); /** * Set the number of iterations that the position resolution may use. * @param iterations The number of iterations. */ void SetPositionIterations(std::uint32_t iterations); /** * Set the number of iterations that the velocity resolution may use. * @param iterations The number of iterations. */ void SetVelocityIterations(std::uint32_t iterations); private: /** * Calculates and caches the data associated with contacts which is required for resolution of contacts when resolving both velocity and interpenetration. * @param contacts The contacts which require preparation of their contact data. * @param seconds The amount of time which has passed in previous frame. */ void PrepareContacts(const std::vector<const Contact*>& contacts, std::float_t seconds); /** * Resolve the interpenetration of contacts. * @param contacts The contacts which require resolution. */ void AdjustPositions(const std::vector<const Contact*>& contacts); /** * Resolve the velocities of contacts. * @param contacts The contacts which require resolution. * @param seconds The amount of time which has passed in previous frame. */ void AdjustVelocities(const std::vector<const Contact*>& contacts, std::float_t seconds); /** * The number of iterations that the position resolution may use. */ std::uint32_t mPositionIterations; /** * The number of iterations that the velocity resolution may use. */ std::uint32_t mVelocityIterations; /** * The margin of error allowed in position resolution. */ const static std::float_t sPositionEpsilion; /** * The margin of error allowed in velocity resolution. */ const static std::float_t sVelocityEpsilon; }; }
{ "content_hash": "b9aae3ac84fe8a44b706e70ac5542b71", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 155, "avg_line_length": 35.56716417910448, "alnum_prop": 0.7343684431389006, "repo_name": "Siddhant628/Annulus-Physics-Engine", "id": "37689b2044d1a50c30a74b6d6b467d51a833f378", "size": "2383", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Annulus/source/Annulus/ContactResolver.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "153192" } ], "symlink_target": "" }
import _plotly_utils.basevalidators class CmidValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="parcats.line", **kwargs): super(CmidValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), role=kwargs.pop("role", "info"), **kwargs )
{ "content_hash": "29e046b8b75306de385200254ab31dfc", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 81, "avg_line_length": 38.15384615384615, "alnum_prop": 0.5967741935483871, "repo_name": "plotly/python-api", "id": "a553f23c8dbb036b7f9def1e88e27840b4f8d4ea", "size": "496", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "packages/python/plotly/plotly/validators/parcats/line/_cmid.py", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "6870" }, { "name": "Makefile", "bytes": "1708" }, { "name": "Python", "bytes": "823245" }, { "name": "Shell", "bytes": "3238" } ], "symlink_target": "" }
/** * Created by doubleL on 2017/4/21. */ var gulp = require("gulp"); var rev = require("gulp-rev"); var revReplace = require("gulp-rev-replace"); var useref = require("gulp-useref"); var filter = require("gulp-filter"); var csso = require("gulp-csso"); // gulp.task('defalut',fuction(){ // // })
{ "content_hash": "3cb48ee49817d2d8aacc8dc8fef02110", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 45, "avg_line_length": 18.9375, "alnum_prop": 0.636963696369637, "repo_name": "liulin1234/webstorm", "id": "55c99d91c69cd7f91ad18f9c4a3fea19636ce9ff", "size": "303", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "WebStormTrain/ResponsiveWeb/src/gulpfile.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "12415" }, { "name": "HTML", "bytes": "20301" }, { "name": "JavaScript", "bytes": "316272" }, { "name": "Shell", "bytes": "261" }, { "name": "Vue", "bytes": "80286" } ], "symlink_target": "" }
({ // Helper required to use test library })
{ "content_hash": "1df48aa20ff09ec526521a3bdb068dac", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 42, "avg_line_length": 16, "alnum_prop": 0.625, "repo_name": "badlogicmanpreet/aura", "id": "3a90fdc9bdaaae4fee04e6c75740e8d5ca02908e", "size": "48", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "aura-components/src/test/components/auraStorageTest/componentDefStorageContainer/componentDefStorageContainerHelper.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "886599" }, { "name": "GAP", "bytes": "10087" }, { "name": "HTML", "bytes": "2932271" }, { "name": "Java", "bytes": "7895565" }, { "name": "JavaScript", "bytes": "16948504" }, { "name": "PHP", "bytes": "3345441" }, { "name": "Python", "bytes": "9744" }, { "name": "Shell", "bytes": "19531" }, { "name": "XSLT", "bytes": "2725" } ], "symlink_target": "" }
package packages import ( "fmt" "path/filepath" "regexp" ) func pathElemReImpl(e string, sep rune) string { escapedSep := regexp.QuoteMeta(string(sep)) // needed for windows sep '\\' return fmt.Sprintf(`(^|%s)%s($|%s)`, escapedSep, e, escapedSep) } func pathElemRe(e string) string { return pathElemReImpl(e, filepath.Separator) } var StdExcludeDirRegexps = []string{ pathElemRe("vendor"), pathElemRe("third_party"), pathElemRe("testdata"), pathElemRe("examples"), pathElemRe("Godeps"), pathElemRe("builtin"), }
{ "content_hash": "45209d760409779673a9eee0c00c0c12", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 75, "avg_line_length": 21.12, "alnum_prop": 0.7045454545454546, "repo_name": "Khan/khan-linter", "id": "cdd327f5d880a75514657954b0a46ab9bdc8a3df", "size": "528", "binary": false, "copies": "11", "ref": "refs/heads/master", "path": "vendor/github.com/golangci/golangci-lint/pkg/packages/skip.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "473" }, { "name": "JavaScript", "bytes": "9867" }, { "name": "Makefile", "bytes": "1397" }, { "name": "Python", "bytes": "409986" }, { "name": "Shell", "bytes": "5543" } ], "symlink_target": "" }
Another game where anagrams are useful is "how many words are in the word?". So if you use all the characters or any subset thereof of any given word, how many words can you form with these characters? Normally a word is regarded a word in this context if it consists of at least three characters. Shorter ones like "it", "be", "a" are regarded as too easy. How many words are there in "arrest"?
{ "content_hash": "a8b99fb57ef9fa46ad8cffab1af13d43", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 155, "avg_line_length": 57.142857142857146, "alnum_prop": 0.7575, "repo_name": "goeckeler/katas", "id": "f11ff5fabb4cd39c7b26e93b358bddc06a2bdaad", "size": "417", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "katas/Anagrams/#4/task.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "284" }, { "name": "Java", "bytes": "145066" }, { "name": "Scala", "bytes": "515" }, { "name": "Shell", "bytes": "309" } ], "symlink_target": "" }
package org.mybatis.generator.codegen.mybatis3.model; import static org.mybatis.generator.internal.util.messages.Messages.getString; import java.util.ArrayList; import java.util.List; import org.mybatis.generator.api.CommentGenerator; import org.mybatis.generator.api.FullyQualifiedTable; import org.mybatis.generator.api.Plugin; import org.mybatis.generator.api.IntrospectedColumn; import org.mybatis.generator.api.dom.java.CompilationUnit; import org.mybatis.generator.api.dom.java.Field; import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType; import org.mybatis.generator.api.dom.java.JavaVisibility; import org.mybatis.generator.api.dom.java.Method; import org.mybatis.generator.api.dom.java.Parameter; import org.mybatis.generator.api.dom.java.TopLevelClass; import org.mybatis.generator.codegen.AbstractJavaGenerator; import org.mybatis.generator.codegen.RootClassInfo; /** * * @author Jeff Butler * */ public class PrimaryKeyGenerator extends AbstractJavaGenerator { public PrimaryKeyGenerator() { super(); } @Override public List<CompilationUnit> getCompilationUnits() { FullyQualifiedTable table = introspectedTable.getFullyQualifiedTable(); progressCallback.startTask(getString( "Progress.7", table.toString())); //$NON-NLS-1$ Plugin plugins = context.getPlugins(); CommentGenerator commentGenerator = context.getCommentGenerator(); TopLevelClass topLevelClass = new TopLevelClass(introspectedTable .getPrimaryKeyType()); topLevelClass.setVisibility(JavaVisibility.PUBLIC); commentGenerator.addJavaFileComment(topLevelClass); String rootClass = getRootClass(); if (rootClass != null) { topLevelClass.setSuperClass(new FullyQualifiedJavaType(rootClass)); topLevelClass.addImportedType(topLevelClass.getSuperClass()); } if (introspectedTable.isConstructorBased()) { addParameterizedConstructor(topLevelClass); if (!introspectedTable.isImmutable()) { addDefaultConstructor(topLevelClass); } } for (IntrospectedColumn introspectedColumn : introspectedTable .getPrimaryKeyColumns()) { if (RootClassInfo.getInstance(rootClass, warnings) .containsProperty(introspectedColumn)) { continue; } Field field = getJavaBeansField(introspectedColumn); if (plugins.modelFieldGenerated(field, topLevelClass, introspectedColumn, introspectedTable, Plugin.ModelClassType.PRIMARY_KEY)) { topLevelClass.addField(field); topLevelClass.addImportedType(field.getType()); } Method method = getJavaBeansGetter(introspectedColumn); if (plugins.modelGetterMethodGenerated(method, topLevelClass, introspectedColumn, introspectedTable, Plugin.ModelClassType.PRIMARY_KEY)) { topLevelClass.addMethod(method); } if (!introspectedTable.isImmutable()) { method = getJavaBeansSetter(introspectedColumn); if (plugins.modelSetterMethodGenerated(method, topLevelClass, introspectedColumn, introspectedTable, Plugin.ModelClassType.PRIMARY_KEY)) { topLevelClass.addMethod(method); } } } List<CompilationUnit> answer = new ArrayList<CompilationUnit>(); if (context.getPlugins().modelPrimaryKeyClassGenerated( topLevelClass, introspectedTable)) { answer.add(topLevelClass); } return answer; } private void addParameterizedConstructor(TopLevelClass topLevelClass) { Method method = new Method(); method.setVisibility(JavaVisibility.PUBLIC); method.setConstructor(true); method.setName(topLevelClass.getType().getShortName()); context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable); StringBuilder sb = new StringBuilder(); for (IntrospectedColumn introspectedColumn : introspectedTable .getPrimaryKeyColumns()) { method.addParameter(new Parameter(introspectedColumn.getFullyQualifiedJavaType(), introspectedColumn.getJavaProperty())); sb.setLength(0); sb.append("this."); //$NON-NLS-1$ sb.append(introspectedColumn.getJavaProperty()); sb.append(" = "); //$NON-NLS-1$ sb.append(introspectedColumn.getJavaProperty()); sb.append(';'); method.addBodyLine(sb.toString()); } topLevelClass.addMethod(method); } }
{ "content_hash": "80a860cbfaca74ef9131c41a988bfccd", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 93, "avg_line_length": 39.524193548387096, "alnum_prop": 0.6568047337278107, "repo_name": "NanYoMy/mybatis-generator", "id": "377a9a5e35079d48f620ef26c70ec06745142e73", "size": "5524", "binary": false, "copies": "8", "ref": "refs/heads/master", "path": "src/main/java/org/mybatis/generator/codegen/mybatis3/model/PrimaryKeyGenerator.java", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "207" }, { "name": "Java", "bytes": "1480142" } ], "symlink_target": "" }
using System; using System.Collections.Generic; namespace Expressive.Expressions.Binary.Bitwise { internal class LeftShiftExpression : BinaryExpressionBase { #region Constructors public LeftShiftExpression(IExpression lhs, IExpression rhs, Context context) : base(lhs, rhs, context) { } #endregion #region BinaryExpressionBase Members /// <inheritdoc /> protected override object EvaluateImpl(object lhsResult, IExpression rightHandSide, IDictionary<string, object> variables) => EvaluateAggregates(lhsResult, rightHandSide, variables, (l, r) => Convert.ToUInt16(l) << Convert.ToUInt16(r)); #endregion } }
{ "content_hash": "aeada44fc697cc8ababe447818e3df3f", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 133, "avg_line_length": 29.541666666666668, "alnum_prop": 0.68688293370945, "repo_name": "bijington/expressive", "id": "9a2f470c80e89947694b6754053c7da2a40e6747", "size": "711", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "Source/Expressive/Expressions/Binary/Bitwise/LeftShiftExpression.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "1721" }, { "name": "C#", "bytes": "543825" }, { "name": "PowerShell", "bytes": "654" } ], "symlink_target": "" }
layout: post title: rebuildingrails tags: [rails] --- > "Build it and they will come....Field of Dreams.." ## Notes on rebuilding rails study This post contains self notes groked from the rebuilding rails book. Not sure at the beginning how useful it will be but that you can only tell at the end..I guess as long as you are writing code how can u go wrong. - This excercise builds a rails application as a GEM which first of all is cool in itself as you can see how a GEM is self contained and documenting, and reusable. - $ bundler gem rulers:
{ "content_hash": "0b0dda867afe77dbfb341f79295dd394", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 216, "avg_line_length": 33.294117647058826, "alnum_prop": 0.7332155477031802, "repo_name": "eaglerockdude/eaglerockdude.github.io", "id": "6542130dbaac5bcbdfe330ac48482c31725a0af1", "size": "570", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2018-12-14-rebuildingrails.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9695" }, { "name": "HTML", "bytes": "28990" }, { "name": "Ruby", "bytes": "72" } ], "symlink_target": "" }
@class DBUSERSGetAccountBatchArg; NS_ASSUME_NONNULL_BEGIN #pragma mark - API Object /// /// The `GetAccountBatchArg` struct. /// /// This class implements the `DBSerializable` protocol (serialize and /// deserialize instance methods), which is required for all Obj-C SDK API route /// objects. /// @interface DBUSERSGetAccountBatchArg : NSObject <DBSerializable, NSCopying> #pragma mark - Instance fields /// List of user account identifiers. Should not contain any duplicate account /// IDs. @property (nonatomic, readonly) NSArray<NSString *> *accountIds; #pragma mark - Constructors /// /// Full constructor for the struct (exposes all instance variables). /// /// @param accountIds List of user account identifiers. Should not contain any /// duplicate account IDs. /// /// @return An initialized instance. /// - (instancetype)initWithAccountIds:(NSArray<NSString *> *)accountIds; - (instancetype)init NS_UNAVAILABLE; @end #pragma mark - Serializer Object /// /// The serialization class for the `GetAccountBatchArg` struct. /// @interface DBUSERSGetAccountBatchArgSerializer : NSObject /// /// Serializes `DBUSERSGetAccountBatchArg` instances. /// /// @param instance An instance of the `DBUSERSGetAccountBatchArg` API object. /// /// @return A json-compatible dictionary representation of the /// `DBUSERSGetAccountBatchArg` API object. /// + (NSDictionary *)serialize:(DBUSERSGetAccountBatchArg *)instance; /// /// Deserializes `DBUSERSGetAccountBatchArg` instances. /// /// @param dict A json-compatible dictionary representation of the /// `DBUSERSGetAccountBatchArg` API object. /// /// @return An instantiation of the `DBUSERSGetAccountBatchArg` object. /// + (DBUSERSGetAccountBatchArg *)deserialize:(NSDictionary *)dict; @end NS_ASSUME_NONNULL_END
{ "content_hash": "d50f3de7977c007b56e22dc7ea844e8f", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 80, "avg_line_length": 26.53731343283582, "alnum_prop": 0.749718785151856, "repo_name": "danielbierwirth/DropboxBrowser", "id": "6606a278892807cd61184abe192ce3b0bfaad8ff", "size": "1964", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Example Project/Pods/ObjectiveDropboxOfficial/Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Users/Headers/DBUSERSGetAccountBatchArg.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "1288" }, { "name": "Objective-C", "bytes": "8410187" }, { "name": "Ruby", "bytes": "1353" }, { "name": "Shell", "bytes": "8838" } ], "symlink_target": "" }
#include "tensorflow_serving/servables/tensorflow/regression_service.h" #include "tensorflow/contrib/session_bundle/session_bundle.h" #include "tensorflow/contrib/session_bundle/signature.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/platform/tracing.h" #include "tensorflow_serving/apis/regressor.h" #include "tensorflow_serving/core/servable_handle.h" #include "tensorflow_serving/servables/tensorflow/regressor.h" namespace tensorflow { namespace serving { Status TensorflowRegressionServiceImpl::Regress( ServerCore* core, const RegressionRequest& request, RegressionResponse* response) { TRACELITERAL("TensorflowRegressionServiceImpl::Regress"); // Verify Request Metadata and create a ServableRequest if (!request.has_model_spec()) { return tensorflow::Status(tensorflow::error::INVALID_ARGUMENT, "Missing ModelSpec"); } ServableHandle<SavedModelBundle> saved_model_bundle; TF_RETURN_IF_ERROR( core->GetServableHandle(request.model_spec(), &saved_model_bundle)); SignatureDef signature; TF_RETURN_IF_ERROR(GetRegressionSignatureDef( request.model_spec(), saved_model_bundle->meta_graph_def, &signature)); std::unique_ptr<RegressorInterface> regressor_interface; TF_RETURN_IF_ERROR(CreateFlyweightTensorFlowRegressor( saved_model_bundle->session.get(), &signature, &regressor_interface)); // Run regression return regressor_interface->Regress(request, response->mutable_result()); } } // namespace serving } // namespace tensorflow
{ "content_hash": "4e312c03bb54f1a26769e9381b777f62", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 77, "avg_line_length": 38.02439024390244, "alnum_prop": 0.758819756254009, "repo_name": "avloss/serving", "id": "f1d356963289f45676ed200532b864db5ef70773", "size": "2215", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tensorflow_serving/servables/tensorflow/regression_service.cc", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "1397437" }, { "name": "CSS", "bytes": "12464" }, { "name": "HTML", "bytes": "3225" }, { "name": "Jupyter Notebook", "bytes": "25836" }, { "name": "Protocol Buffer", "bytes": "20980" }, { "name": "Python", "bytes": "170419" }, { "name": "Shell", "bytes": "442" } ], "symlink_target": "" }
<!-- If you're using Dokku - especially for commercial purposes - consider donating to project development via [OpenCollective](https://opencollective.com/dokku) or [Patreon](https://www.patreon.com/dokku). Funds go to general development, support, and infrastructure costs. --> ## Description of problem ### How reproducible ### Steps to Reproduce 1. 2. 3. #### Actual Results #### Expected Results ## Environment Information ### `dokku report` output > This is required! Issues missing this information may be closed. ### `dokku acl:report` output > This is required! Issues missing this information may be closed. ### `ls -lah ~dokku/.dokkurc/` output > This is required! Issues missing this information may be closed. ### How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?: ### Additional information - Output of failing Dokku commands after running `dokku trace on` (BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
{ "content_hash": "405a1b5b055174f47a5a44ef35970135", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 278, "avg_line_length": 30.916666666666668, "alnum_prop": 0.7439353099730458, "repo_name": "mlebkowski/dokku-acl", "id": "fe5afee8e8ae5e231ee757f48d806519c31cf198", "size": "1113", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "ISSUE_TEMPLATE.md", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "1300" }, { "name": "Shell", "bytes": "2740" } ], "symlink_target": "" }
package io.druid.indexer.path; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.inject.Binder; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; import io.druid.data.input.impl.CSVParseSpec; import io.druid.data.input.impl.DimensionsSpec; import io.druid.data.input.impl.StringInputRowParser; import io.druid.data.input.impl.TimestampSpec; import io.druid.guice.GuiceInjectors; import io.druid.guice.JsonConfigProvider; import io.druid.guice.annotations.Self; import io.druid.indexer.HadoopDruidIndexerConfig; import io.druid.indexer.HadoopIOConfig; import io.druid.indexer.HadoopIngestionSpec; import io.druid.indexer.HadoopTuningConfig; import io.druid.indexer.hadoop.DatasourceIngestionSpec; import io.druid.indexer.hadoop.DatasourceInputFormat; import io.druid.indexer.hadoop.WindowedDataSegment; import io.druid.initialization.Initialization; import io.druid.jackson.DefaultObjectMapper; import io.druid.java.util.common.ISE; import io.druid.java.util.common.Intervals; import io.druid.java.util.common.granularity.Granularities; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; import io.druid.segment.indexing.DataSchema; import io.druid.segment.indexing.granularity.UniformGranularitySpec; import io.druid.server.DruidNode; import io.druid.timeline.DataSegment; import io.druid.timeline.partition.NoneShardSpec; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.Job; import org.easymock.EasyMock; import org.junit.Assert; import org.junit.Test; import java.util.List; import java.util.Map; /** */ public class DatasourcePathSpecTest { private DatasourceIngestionSpec ingestionSpec; private List<WindowedDataSegment> segments; public DatasourcePathSpecTest() { this.ingestionSpec = new DatasourceIngestionSpec( "test", Intervals.of("2000/3000"), null, null, null, null, null, false ); segments = ImmutableList.of( WindowedDataSegment.of( new DataSegment( ingestionSpec.getDataSource(), Intervals.of("2000/3000"), "ver", ImmutableMap.<String, Object>of( "type", "local", "path", "/tmp/index.zip" ), ImmutableList.of("product"), ImmutableList.of("visited_sum", "unique_hosts"), NoneShardSpec.instance(), 9, 12334 ) ), WindowedDataSegment.of( new DataSegment( ingestionSpec.getDataSource(), Intervals.of("2050/3000"), "ver", ImmutableMap.<String, Object>of( "type", "hdfs", "path", "/tmp/index.zip" ), ImmutableList.of("product"), ImmutableList.of("visited_sum", "unique_hosts"), NoneShardSpec.instance(), 9, 12335 ) ) ); } @Test public void testSerde() throws Exception { final UsedSegmentLister segmentList = EasyMock.createMock( UsedSegmentLister.class ); Injector injector = Initialization.makeInjectorWithModules( GuiceInjectors.makeStartupInjector(), ImmutableList.<Module>of( new Module() { @Override public void configure(Binder binder) { binder.bind(UsedSegmentLister.class).toInstance(segmentList); JsonConfigProvider.bindInstance( binder, Key.get(DruidNode.class, Self.class), new DruidNode("dummy-node", null, null, null, true, false) ); } } ) ); ObjectMapper jsonMapper = injector.getInstance(ObjectMapper.class); DatasourcePathSpec expected = new DatasourcePathSpec( jsonMapper, null, ingestionSpec, Long.valueOf(10) ); PathSpec actual = jsonMapper.readValue(jsonMapper.writeValueAsString(expected), PathSpec.class); Assert.assertEquals(expected, actual); expected = new DatasourcePathSpec( jsonMapper, null, ingestionSpec, null ); actual = jsonMapper.readValue(jsonMapper.writeValueAsString(expected), PathSpec.class); Assert.assertEquals(expected, actual); expected = new DatasourcePathSpec( jsonMapper, segments, ingestionSpec, null ); actual = jsonMapper.readValue(jsonMapper.writeValueAsString(expected), PathSpec.class); Assert.assertEquals(expected, actual); } @Test public void testAddInputPaths() throws Exception { HadoopDruidIndexerConfig hadoopIndexerConfig = makeHadoopDruidIndexerConfig(); ObjectMapper mapper = new DefaultObjectMapper(); DatasourcePathSpec pathSpec = new DatasourcePathSpec( mapper, segments, ingestionSpec, null ); Configuration config = new Configuration(); Job job = EasyMock.createNiceMock(Job.class); EasyMock.expect(job.getConfiguration()).andReturn(config).anyTimes(); EasyMock.replay(job); pathSpec.addInputPaths(hadoopIndexerConfig, job); List<WindowedDataSegment> actualSegments = mapper.readValue( config.get(DatasourceInputFormat.CONF_INPUT_SEGMENTS), new TypeReference<List<WindowedDataSegment>>() { } ); Assert.assertEquals(segments, actualSegments); DatasourceIngestionSpec actualIngestionSpec = mapper.readValue( config.get(DatasourceInputFormat.CONF_DRUID_SCHEMA), DatasourceIngestionSpec.class ); Assert.assertEquals( ingestionSpec .withDimensions(ImmutableList.of("product")) .withMetrics(ImmutableList.of("visited_sum")), actualIngestionSpec ); } @Test public void testAddInputPathsWithNoSegments() throws Exception { HadoopDruidIndexerConfig hadoopIndexerConfig = makeHadoopDruidIndexerConfig(); ObjectMapper mapper = new DefaultObjectMapper(); DatasourcePathSpec pathSpec = new DatasourcePathSpec( mapper, null, ingestionSpec, null ); Configuration config = new Configuration(); Job job = EasyMock.createNiceMock(Job.class); EasyMock.expect(job.getConfiguration()).andReturn(config).anyTimes(); EasyMock.replay(job); try { pathSpec.addInputPaths(hadoopIndexerConfig, job); Assert.fail("should've been ISE"); } catch (ISE ex) { //OK } //now with ignoreWhenNoSegments flag set pathSpec = new DatasourcePathSpec( mapper, null, ingestionSpec.withIgnoreWhenNoSegments(true), null ); pathSpec.addInputPaths(hadoopIndexerConfig, job); Assert.assertNull(config.get(DatasourceInputFormat.CONF_INPUT_SEGMENTS)); Assert.assertNull(config.get(DatasourceInputFormat.CONF_DRUID_SCHEMA)); } private HadoopDruidIndexerConfig makeHadoopDruidIndexerConfig() { return new HadoopDruidIndexerConfig( new HadoopIngestionSpec( new DataSchema( ingestionSpec.getDataSource(), HadoopDruidIndexerConfig.JSON_MAPPER.convertValue( new StringInputRowParser( new CSVParseSpec( new TimestampSpec("timestamp", "yyyyMMddHH", null), new DimensionsSpec(null, null, null), null, ImmutableList.of("timestamp", "host", "visited"), false, 0 ), null ), Map.class ), new AggregatorFactory[]{ new LongSumAggregatorFactory("visited_sum", "visited") }, new UniformGranularitySpec( Granularities.DAY, Granularities.NONE, ImmutableList.of(Intervals.of("2000/3000")) ), HadoopDruidIndexerConfig.JSON_MAPPER ), new HadoopIOConfig( ImmutableMap.<String, Object>of( "paths", "/tmp/dummy", "type", "static" ), null, "/tmp/dummy" ), HadoopTuningConfig.makeDefaultTuningConfig().withWorkingPath("/tmp/work").withVersion("ver") ) ); } }
{ "content_hash": "8d0c4e36d058c8fc7362fe98202708f4", "timestamp": "", "source": "github", "line_count": 281, "max_line_length": 124, "avg_line_length": 31.619217081850532, "alnum_prop": 0.6256612267867192, "repo_name": "andy256/druid", "id": "466b11b8ba9cffe3c1c0a6fc960efd8ab97841d4", "size": "9690", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "indexing-hadoop/src/test/java/io/druid/indexer/path/DatasourcePathSpecTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "1406" }, { "name": "CSS", "bytes": "11623" }, { "name": "HTML", "bytes": "26739" }, { "name": "Java", "bytes": "17449250" }, { "name": "JavaScript", "bytes": "295150" }, { "name": "Makefile", "bytes": "659" }, { "name": "PostScript", "bytes": "5" }, { "name": "R", "bytes": "17002" }, { "name": "Roff", "bytes": "3617" }, { "name": "Shell", "bytes": "4905" }, { "name": "TeX", "bytes": "399444" }, { "name": "Thrift", "bytes": "199" } ], "symlink_target": "" }
package github import ( "fmt" "io" "io/ioutil" "github.com/BurntSushi/toml" "gopkg.in/yaml.v2" ) type configDecoder interface { Decode(r io.Reader, c *Config) error } type tomlConfigDecoder struct { } func (t *tomlConfigDecoder) Decode(r io.Reader, c *Config) error { _, err := toml.DecodeReader(r, c) return err } type yamlConfigDecoder struct { } func (y *yamlConfigDecoder) Decode(r io.Reader, c *Config) error { d, err := ioutil.ReadAll(r) if err != nil { return err } yc := yaml.MapSlice{} err = yaml.Unmarshal(d, &yc) if err != nil { return err } for _, hostEntry := range yc { v, ok := hostEntry.Value.([]interface{}) if !ok { return fmt.Errorf("value of host entry is must be array but got %#v", hostEntry.Value) } if len(v) < 1 { continue } hostName, ok := hostEntry.Key.(string) if !ok { return fmt.Errorf("host name is must be string but got %#v", hostEntry.Key) } host := &Host{Host: hostName} for _, prop := range v[0].(yaml.MapSlice) { propName, ok := prop.Key.(string) if !ok { return fmt.Errorf("property name is must be string but got %#v", prop.Key) } switch propName { case "user": host.User, ok = prop.Value.(string) case "oauth_token": host.AccessToken, ok = prop.Value.(string) case "protocol": host.Protocol, ok = prop.Value.(string) case "unix_socket": host.UnixSocket, ok = prop.Value.(string) } if !ok { return fmt.Errorf("%s is must be string but got %#v", propName, prop.Value) } } c.Hosts = append(c.Hosts, host) } return nil }
{ "content_hash": "8fb9fb53e14131add4902d8728e554f9", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 89, "avg_line_length": 20.789473684210527, "alnum_prop": 0.6335443037974684, "repo_name": "github/hub", "id": "6b4ca65aa894ff73711b054add30e19a5982ecf9", "size": "1580", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "github/config_decoder.go", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "2112" }, { "name": "Dockerfile", "bytes": "551" }, { "name": "Gherkin", "bytes": "288983" }, { "name": "Go", "bytes": "358761" }, { "name": "HTML", "bytes": "1666" }, { "name": "Makefile", "bytes": "2397" }, { "name": "Ruby", "bytes": "28753" }, { "name": "Shell", "bytes": "39220" }, { "name": "Vim script", "bytes": "2060" } ], "symlink_target": "" }
package org.wikipedia.util; import android.os.Build; public final class ApiUtil { /** @return True if SDK API level is greater than or equal to 23. */ public static boolean hasMarshmallow() { return has(Build.VERSION_CODES.M); } /** @return True if SDK API level is greater than or equal to 21. */ public static boolean hasLollipop() { return has(Build.VERSION_CODES.LOLLIPOP); } /** @return True if SDK API level is greater than or equal to 19. */ public static boolean hasKitKat() { return has(Build.VERSION_CODES.KITKAT); } /** @return True if SDK API level is greater than or equal to 18. */ public static boolean hasJellyBeanMr2() { return has(Build.VERSION_CODES.JELLY_BEAN_MR2); } /** @return True if SDK API level is greater than or equal to 17. */ public static boolean hasJellyBeanMr1() { return has(Build.VERSION_CODES.JELLY_BEAN_MR1); } /** @return True if SDK API level is greater than or equal to 16. */ public static boolean hasJellyBean() { return has(Build.VERSION_CODES.JELLY_BEAN); } /** @return SDK level. */ private static int getLevel() { return android.os.Build.VERSION.SDK_INT; } /** @return True if SDK API is less than level. */ private static boolean isBefore(int level) { return getLevel() < level; } /** @return True if SDK API to level. */ private static boolean has(int level) { return !isBefore(level); } private ApiUtil() { } }
{ "content_hash": "569085bee5ebc268d7dd9678565844de", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 72, "avg_line_length": 29.942307692307693, "alnum_prop": 0.6358381502890174, "repo_name": "trujunzhang/IEATTA-ANDROID", "id": "dd4056ef6c3f4d0200c14c7bb26160a66e1eb64f", "size": "1557", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "app/src/main/java/org/wikipedia/util/ApiUtil.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "1042601" }, { "name": "Ruby", "bytes": "328" } ], "symlink_target": "" }
package aia.integration import akka.actor.{ Actor, ActorRef } import akka.camel.{ CamelMessage, Consumer } import xml.XML import org.apache.camel.Exchange import util.{ Failure, Success } import collection.mutable import akka.pattern.ask import akka.util.Timeout import concurrent.duration._ import concurrent.ExecutionContext case class TrackingOrder(id: Long, status: String, order: Order) case class OrderId(id: Long) case class NoSuchOrder(id: Long) class ProcessOrders extends Actor { val orderList = new mutable.HashMap[Long, TrackingOrder]() var lastOrderId = 0L def receive = { case order: Order => { lastOrderId += 1 val newOrder = new TrackingOrder(lastOrderId, "received", order) orderList += lastOrderId -> newOrder sender() ! newOrder } case order: OrderId => { orderList.get(order.id) match { case Some(intOrder) => sender() ! intOrder.copy(status = "processing") case None => sender() ! NoSuchOrder(order.id) } } case "reset" => { lastOrderId = 0 orderList.clear() } } } class OrderConsumerRest(uri: String, next: ActorRef) extends Consumer { def endpointUri = uri def receive = { case msg: CamelMessage => { try { val action = msg.headerAs[String](Exchange.HTTP_METHOD) action match { case Success("POST") => { processOrder(msg.bodyAs[String]) } case Success("GET") => { msg.headerAs[String]("id") match { case Success(id) => processStatus(id) case other => sender() ! createErrorMsg(400, "ID not set") } } case Success(act) => { sender() ! createErrorMsg(400, //Bad Request "Unsupported action %s".format(act)) } case Failure(_) => { sender() ! createErrorMsg(400, //Bad Request "HTTP_METHOD not supplied") } } } catch { case ex: Exception => sender() ! createErrorMsg(500, //Internal Server Error ex.getMessage) } } } def createErrorMsg(responseCode: Int, body: String): CamelMessage = { val headers = Map[String, Any]( Exchange.HTTP_RESPONSE_CODE -> responseCode) CamelMessage(body, headers) } def processOrder(content: String): Unit = { implicit val timeout: Timeout = 1 second implicit val ExecutionContext = context.system.dispatcher val order = createOrder(content) val askFuture = next ? order val sendResultTo = sender val headers = Map[String, Any]( Exchange.CONTENT_TYPE -> "text/xml", Exchange.HTTP_RESPONSE_CODE -> 200) askFuture.onComplete { case Success(result: TrackingOrder) => { val response = <confirm> <id>{ result.id }</id> <status>{ result.status }</status> </confirm> sendResultTo ! CamelMessage(response.toString(), headers) } case Success(result) => { val response = <confirm> <status>ID is unknown { result.toString() }</status> </confirm> sendResultTo ! CamelMessage(response.toString(), headers) } case Failure(ex) => val response = <confirm> <status>System Failure { ex.getMessage }</status> </confirm> sendResultTo ! CamelMessage(response.toString(), headers) } } def processStatus(id: String): Unit = { implicit val timeout: Timeout = 1 second implicit val ExecutionContext = context.system.dispatcher val order = new OrderId(id.toLong) val askFuture = next ? order val sendResultTo = sender val headers = Map[String, Any]( Exchange.CONTENT_TYPE -> "text/xml", Exchange.HTTP_RESPONSE_CODE -> 200) askFuture.onComplete { case Success(result: TrackingOrder) => { val response = <statusResponse> <id>{ result.id }</id> <status>{ result.status }</status> </statusResponse> sendResultTo ! CamelMessage(response.toString(), headers) } case Success(result: NoSuchOrder) => { val response = <statusResponse> <id>{ result.id }</id> <status>ID is unknown</status> </statusResponse> sendResultTo ! CamelMessage(response.toString(), headers) } case Success(result) => { val response = <statusResponse> <status>Response is unknown { result.toString() }</status> </statusResponse> sendResultTo ! CamelMessage(response.toString(), headers) } case Failure(ex) => val response = <statusResponse> <status>System Failure { ex.getMessage }</status> </statusResponse> sendResultTo ! CamelMessage(response.toString(), headers) } } def createOrder(content: String): Order = { val xml = XML.loadString(content) val order = xml \\ "order" val customer = (order \\ "customerId").text val productId = (order \\ "productId").text val number = (order \\ "number").text.toInt new Order(customer, productId, number) } }
{ "content_hash": "7a9475aaae7da1c0eacd4a2ca90f0d64", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 71, "avg_line_length": 29.346153846153847, "alnum_prop": 0.5828496536229171, "repo_name": "gilbutITbook/006877", "id": "d1f39c7f17fff8de2dfedb7d8b663a5d2775a0de", "size": "5341", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "chapter-integration/src/main/scala/aia/integration/CamelRest.scala", "mode": "33261", "license": "mit", "language": [ { "name": "Scala", "bytes": "511258" } ], "symlink_target": "" }
namespace gfx { // static double Tween::CalculateValue(Tween::Type type, double state) { DCHECK_GE(state, 0); DCHECK_LE(state, 1); switch (type) { case EASE_IN: return pow(state, 2); case EASE_IN_2: return pow(state, 4); case EASE_IN_3: return gfx::CubicBezier(0.4, 0, 1, 1).Solve(state); case EASE_IN_OUT: if (state < 0.5) return pow(state * 2, 2) / 2.0; return 1.0 - (pow((state - 1.0) * 2, 2) / 2.0); case EASE_IN_OUT_2: return gfx::CubicBezier(0.4, 0, 0.2, 1).Solve(state); case FAST_IN_OUT: return (pow(state - 0.5, 3) + 0.125) / 0.25; case LINEAR: return state; case EASE_OUT_SNAP: state = 0.95 * (1.0 - pow(1.0 - state, 2)); return state; case EASE_OUT: return 1.0 - pow(1.0 - state, 2); case EASE_OUT_2: return gfx::CubicBezier(0, 0, 0.2, 1).Solve(state); case SMOOTH_IN_OUT: return sin(state); case ZERO: return 0; } NOTREACHED(); return state; } namespace { uint8 FloatToColorByte(float f) { return std::min(std::max(ToRoundedInt(f * 255.f), 0), 255); } uint8 BlendColorComponents(uint8 start, uint8 target, float start_alpha, float target_alpha, float blended_alpha, double progress) { // Since progress can be outside [0, 1], blending can produce a value outside // [0, 255]. float blended_premultiplied = Tween::FloatValueBetween( progress, start / 255.f * start_alpha, target / 255.f * target_alpha); return FloatToColorByte(blended_premultiplied / blended_alpha); } } // namespace // static SkColor Tween::ColorValueBetween(double value, SkColor start, SkColor target) { float start_a = SkColorGetA(start) / 255.f; float target_a = SkColorGetA(target) / 255.f; float blended_a = FloatValueBetween(value, start_a, target_a); if (blended_a <= 0.f) return SkColorSetARGB(0, 0, 0, 0); blended_a = std::min(blended_a, 1.f); uint8 blended_r = BlendColorComponents(SkColorGetR(start), SkColorGetR(target), start_a, target_a, blended_a, value); uint8 blended_g = BlendColorComponents(SkColorGetG(start), SkColorGetG(target), start_a, target_a, blended_a, value); uint8 blended_b = BlendColorComponents(SkColorGetB(start), SkColorGetB(target), start_a, target_a, blended_a, value); return SkColorSetARGB( FloatToColorByte(blended_a), blended_r, blended_g, blended_b); } // static double Tween::DoubleValueBetween(double value, double start, double target) { return start + (target - start) * value; } // static float Tween::FloatValueBetween(double value, float start, float target) { return static_cast<float>(start + (target - start) * value); } // static int Tween::IntValueBetween(double value, int start, int target) { if (start == target) return start; double delta = static_cast<double>(target - start); if (delta < 0) delta--; else delta++; #if defined(OS_WIN) return start + static_cast<int>(value * _nextafter(delta, 0)); #else return start + static_cast<int>(value * nextafter(delta, 0)); #endif } //static int Tween::LinearIntValueBetween(double value, int start, int target) { return std::floor(0.5 + DoubleValueBetween(value, start, target)); } // static gfx::Rect Tween::RectValueBetween(double value, const gfx::Rect& start_bounds, const gfx::Rect& target_bounds) { return gfx::Rect( LinearIntValueBetween(value, start_bounds.x(), target_bounds.x()), LinearIntValueBetween(value, start_bounds.y(), target_bounds.y()), LinearIntValueBetween(value, start_bounds.width(), target_bounds.width()), LinearIntValueBetween( value, start_bounds.height(), target_bounds.height())); } // static gfx::Transform Tween::TransformValueBetween( double value, const gfx::Transform& start_transform, const gfx::Transform& end_transform) { if (value >= 1.0) return end_transform; if (value <= 0.0) return start_transform; gfx::Transform to_return = end_transform; to_return.Blend(start_transform, value); return to_return; } } // namespace gfx
{ "content_hash": "c548abbc3398385c2a3420d859d6d498", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 80, "avg_line_length": 29.804878048780488, "alnum_prop": 0.5538052373158756, "repo_name": "ChromiumWebApps/chromium", "id": "abf8a9d68bf317b12d96d709b724862fde2974d5", "size": "5326", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ui/gfx/animation/tween.cc", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP", "bytes": "853" }, { "name": "AppleScript", "bytes": "6973" }, { "name": "Arduino", "bytes": "464" }, { "name": "Assembly", "bytes": "52960" }, { "name": "Awk", "bytes": "8660" }, { "name": "C", "bytes": "42286199" }, { "name": "C#", "bytes": "1132" }, { "name": "C++", "bytes": "198616766" }, { "name": "CSS", "bytes": "937333" }, { "name": "DOT", "bytes": "2984" }, { "name": "Java", "bytes": "5695686" }, { "name": "JavaScript", "bytes": "21967126" }, { "name": "M", "bytes": "2190" }, { "name": "Matlab", "bytes": "2262" }, { "name": "Objective-C", "bytes": "7602057" }, { "name": "PHP", "bytes": "97817" }, { "name": "Perl", "bytes": "1210885" }, { "name": "Python", "bytes": "10774996" }, { "name": "R", "bytes": "262" }, { "name": "Shell", "bytes": "1316721" }, { "name": "Tcl", "bytes": "277091" }, { "name": "TypeScript", "bytes": "1560024" }, { "name": "XSLT", "bytes": "13493" }, { "name": "nesC", "bytes": "15243" } ], "symlink_target": "" }
<?php class ClusterTestCase extends BaumTestCase { public static function setUpBeforeClass() { with(new ClusterMigrator)->up(); } public function setUp() { with(new ClusterSeeder)->run(); } protected function clusters($name, $className = 'Cluster') { return forward_static_call_array(array($className, 'where'), array('name', '=', $name))->first(); } }
{ "content_hash": "cb039014c0f1a44868b359003c7251d6", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 101, "avg_line_length": 22.470588235294116, "alnum_prop": 0.6649214659685864, "repo_name": "unikent/baum", "id": "81038ad09625b15acd2f71af58b6d9c50c0b7987", "size": "382", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "tests/suite/ClusterTestCase.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "237730" } ], "symlink_target": "" }
package org.efaps.db; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.efaps.admin.access.AccessCache; import org.efaps.admin.access.AccessTypeEnums; import org.efaps.admin.datamodel.SQLTable; import org.efaps.admin.datamodel.Type; import org.efaps.admin.event.EventDefinition; import org.efaps.admin.event.EventType; import org.efaps.admin.event.Parameter; import org.efaps.admin.event.Parameter.ParameterValues; import org.efaps.db.store.Resource; import org.efaps.db.transaction.ConnectionResource; import org.efaps.db.wrapper.SQLDelete; import org.efaps.db.wrapper.SQLDelete.DeleteDefintion; import org.efaps.util.EFapsException; /** * The class is used as interface to the eFaps kernel to delete one object. * * @author The eFaps Team * @version $Id$ */ public class Delete { /** * The instance variable stores the instance for which this update is made. * * @see #getInstance() */ private final Instance instance; /** * @param _instance Instance to be deleted */ public Delete(final Instance _instance) { this.instance = _instance; } /** * @param _type type of the Instance to be deleted * @param _id id of the Instance to be deleted */ public Delete(final Type _type, final String _id) { this.instance = Instance.get(_type, _id); } /** * @param _type type of the Instance to be deleted * @param _id id of the Instance to be deleted */ public Delete(final Type _type, final long _id) { this.instance = Instance.get(_type, _id); } /** * @param _oid oid of the Instance to be deleted */ public Delete(final String _oid) { this.instance = Instance.get(_oid); } /** * First it is checked if the user has access to delete the eFaps object * defined in {@link #instance}. If no access, an exception is thrown. If * the context user has access. the delete is made with * {@link #executeWithoutAccessCheck}. * * @throws EFapsException if the current context user has no delete access * on given eFaps object. * @see #executeWithoutAccessCheck() */ public void execute() throws EFapsException { AccessCache.registerUpdate(getInstance()); final boolean hasAccess = this.instance.getType().hasAccess(this.instance, AccessTypeEnums.DELETE.getAccessType()); if (!hasAccess) { throw new EFapsException(getClass(), "execute.NoAccess", this.instance); } executeWithoutAccessCheck(); } /** * Executes the delete without checking the access rights (but with * triggers). * <ol> * <li>executes the pre delete trigger (if exists)</li> * <li>executes the delete trigger (if exists)</li> * <li>executes if no delete trigger exists or the delete trigger is not * executed the update ({@see #executeWithoutTrigger})</li> * <li>executes the post delete trigger (if exists)</li> * </ol> * * @throws EFapsException thrown from {@link #executeWithoutTrigger} or * when the status is invalid * @see #executeWithoutTrigger() */ public void executeWithoutAccessCheck() throws EFapsException { executeEvents(EventType.DELETE_PRE); if (!executeEvents(EventType.DELETE_OVERRIDE)) { executeWithoutTrigger(); } executeEvents(EventType.DELETE_POST); } /** * <p>The executes is done without calling triggers and check of access * rights. The method executes the delete. For the object, a delete is made * in all SQL tables from the type (if the SQL table is not read only!). If * a store is defined for the type, the checked in file is also deleted * (with the help of the store resource implementation; if the store * resource implementation has not implemented the delete, the file is not * deleted!).</p> * <p>It is not checked if the current context user has access to delete * the eFaps object defined in {@link #instance}.</p> * * @see SQLTable#isReadOnly() * @throws EFapsException on error */ public void executeWithoutTrigger() throws EFapsException { final Context context = Context.getThreadContext(); ConnectionResource con = null; try { con = context.getConnectionResource(); // first remove the storeresource, because the information needed from the general // instance to actually delete will be removed in the second step Resource storeRsrc = null; try { if (getInstance().getType().hasStore()) { storeRsrc = context.getStoreResource(getInstance(), Resource.StoreEvent.DELETE); storeRsrc.delete(); storeRsrc.commit(); } } finally { if ((storeRsrc != null) && storeRsrc.isOpened()) { storeRsrc.abort(); } } try { final List<DeleteDefintion> defs = new ArrayList<DeleteDefintion>(); defs.addAll(GeneralInstance.getDeleteDefintion(getInstance(), con.getConnection())); final SQLTable mainTable = getInstance().getType().getMainTable(); for (final SQLTable curTable : getInstance().getType().getTables()) { if ((curTable != mainTable) && !curTable.isReadOnly()) { defs.add(new DeleteDefintion(curTable.getSqlTable(), curTable.getSqlColId(), getInstance().getId())); } } defs.add(new DeleteDefintion(mainTable.getSqlTable(), mainTable.getSqlColId(), getInstance().getId())); final SQLDelete delete = Context.getDbType().newDelete(defs.toArray(new DeleteDefintion[defs.size()])); delete.execute(con.getConnection()); } catch (final SQLException e) { throw new EFapsException(getClass(), "executeWithoutAccessCheck.SQLException", e, this.instance); } con.commit(); } finally { if ((con != null) && con.isOpened()) { con.abort(); } } } /** * This is the getter method for instance variable {@link #instance}. * * @return value of instance variable {@link #instance} * @see #instance */ public Instance getInstance() { return this.instance; } /** * The method gets all events for the given EventType and executes them in * the given order. If no events are defined, nothing is done. The method * return <i>true</i> if a event was found, otherwise <i>false</i>. * * @param _eventtype event type to execute * @return <i>true</i> if a trigger was found and executed, otherwise * <i>false</i> * @throws EFapsException on error */ private boolean executeEvents(final EventType _eventtype) throws EFapsException { final boolean ret; final List<EventDefinition> triggers = getInstance().getType().getEvents(_eventtype); if (triggers == null) { ret = false; } else { final Parameter parameter = new Parameter(); parameter.put(ParameterValues.INSTANCE, getInstance()); for (final EventDefinition evenDef : triggers) { evenDef.execute(parameter); } ret = true; } return ret; } }
{ "content_hash": "86e1fce82422cb634624816624778f44", "timestamp": "", "source": "github", "line_count": 219, "max_line_length": 119, "avg_line_length": 36.02739726027397, "alnum_prop": 0.5978453738910012, "repo_name": "ov3rflow/eFaps-Kernel", "id": "3c0ce697f557bb9755fd05c5c84cbeae65c8de00", "size": "8579", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/efaps/db/Delete.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "2976055" } ], "symlink_target": "" }
<HTML><HEAD> <TITLE>Review for Best of the Best II (1993)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0106393">Best of the Best II (1993)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?James+Berardinelli">James Berardinelli</A></H3><HR WIDTH="40%" SIZE="4"> <PRE> BEST OF THE BEST 2 A film review by James Berardinelli Copyright 1993 James Berardinelli</PRE> <PRE>Date Released: 3/5/93 Running Length: 1:43 Rated: R (Extreme violence, language, mature themes)</PRE> <P>Starring: Eric Roberts, Phillip Rhee, Christopher Penn, Ralf Moeller, Wayne Newton Director: Robert Radler Producers: Peter E. Strauss and Phillip Rhee Screenplay: Max Strom and John Allen Nelson Music: David Michael Frank Released by The Movie Group (through Twentieth Century Fox)</P> <P> Alex (Eric Roberts) and Tommy (Phillip Rhee) are martial arts experts (last seen in the uninspired BEST OF THE BEST). When one of their friends is killed in an underground pit-fight against the sadistic, bloodthirsty brute Brakus (Ralf Moeller), the situation becomes personal. Alex and Tommy are determined to get Brakus--if he doesn't get them first, that is.</P> <P> BEST OF THE BEST 2 is a shameless celebration of blood and violence--a human cockfight with little style and no subtlety. In many films of this nature, the difference between the good guys and the bad guys is that the good guys let the defeated villains live (and presumably face a court hearing), while the bad guys kill everyone in sight. That isn't the case in this movie. There's no real discrimination between who does the killing. Good guys and bad guys end up with blood on their hands.</P> <P> There's no doubt who's good and who's bad, either. The film goes through a rather unnecessarily blunt depiction of Brakus as a devil incarnate. By the same token, Alex and Tommy are presented as caring people who only kill when pushed to it. None of this "characterization" is particularly effective, except in showing how truly one-dimensional the script--and the people who populate it--is.</P> <P> I suppose most people that go to see this film will be expecting a lot of fight sequences and little else. That's exactly what they get. There's a slight visceral appeal to some of these moments, but it's not enough to do more than momentarily stir the blood. The humor in this movie, when it's intentional, is off-key and the dialogue is hopelessly mired in banalities.</P> <P> Watching BEST OF THE BEST 2, with a villain who can barely speak English and the death of a friend to motivate the events of the film, I was strongly reminded of ROCKY IV, one of the weakest and least-watchable movies of Stallone's saga. One would think that if one of the Rocky films was going to be imitated, the movie makers would choose one of the better entries in that series.</P> <P> I cannot, in good conscience, recommend this to a casual movie-goer. The film is aimed at a specific group of people--male teenagers--and those who go into BEST OF THE BEST 2 with open eyes (not expecting plot, characters, dialogue, or anything better than mediocre acting) will probably be reasonably satisfied. Death and violence have become so commonplace in the cinema that it's difficult to be shocked by the gratuitous quantities in this movie, especially considering the motives of the people behind the picture.</P> <PRE> Rating: 5.1 (D+, *1/2)</PRE> <P>- James Berardinelli (<A HREF="mailto:blake7@cc.bellcore.com">blake7@cc.bellcore.com</A>)</P> <PRE>. </PRE> <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
{ "content_hash": "89f5a1ae6124010bedc2d70d38be89b9", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 217, "avg_line_length": 59.333333333333336, "alnum_prop": 0.7292566983578219, "repo_name": "xianjunzhengbackup/code", "id": "ae4459f8f27087746e5b035eaeb8b820d110f693", "size": "4628", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "data science/machine_learning_for_the_web/chapter_4/movie/1811.html", "mode": "33261", "license": "mit", "language": [ { "name": "BitBake", "bytes": "113" }, { "name": "BlitzBasic", "bytes": "256" }, { "name": "CSS", "bytes": "49827" }, { "name": "HTML", "bytes": "157006325" }, { "name": "JavaScript", "bytes": "14029" }, { "name": "Jupyter Notebook", "bytes": "4875399" }, { "name": "Mako", "bytes": "2060" }, { "name": "Perl", "bytes": "716" }, { "name": "Python", "bytes": "874414" }, { "name": "R", "bytes": "454" }, { "name": "Shell", "bytes": "3984" } ], "symlink_target": "" }
 /// <reference path="../_references.ts"/> module powerbitests.slicerHelper { import SlicerOrientation = powerbi.visuals.slicerOrientation.Orientation; import SQExpr = powerbi.data.SQExpr; import ValueType = powerbi.ValueType; export const SelectAllTextKey = 'Select All'; export const SlicerVisual = 'slicer'; export const slicerTextClassSelector = ".slicerText"; export const slicerCountTextClassSelector = ".slicerCountText"; export const slicerHeaderClassSelector = ".slicerHeader"; const SelectedClass = 'selected'; export const longSlicerItems = ["First Slicer Long Name for testing", "Second Slicer Long Name for testing", "Third Slicer Long Name for testing"]; export interface RenderSlicerOptions { visualType: string; hostServices: powerbi.IVisualHostServices; dataView?: powerbi.DataView; dataViewObjects?: powerbi.DataViewObjects; viewport?: powerbi.IViewport; orientation?: SlicerOrientation; }; /** Renders the slicer based on the options passed in. */ export function initSlicer(element: JQuery, options: RenderSlicerOptions, field: SQExpr): powerbi.IVisual { let viewport = options.viewport ? options.viewport : { height: element.height(), width: element.width() }; let dataView = options.dataView ? options.dataView : buildDefaultDataView(field); let visual = powerbi.visuals.visualPluginFactory.createMinerva({}).getPlugin(SlicerVisual).create(); visual.init({ element: element, host: options.hostServices, style: powerbi.visuals.visualStyles.create(), viewport: viewport, interactivity: { selection: true } }); dataView.metadata.objects = options.dataViewObjects ? options.dataViewObjects : buildDefaultDataViewObjects(options.orientation); return visual; } export function createHostServices(): powerbi.IVisualHostServices { let hostServices = new powerbi.visuals.DefaultVisualHostServices(); hostServices.canSelect = () => true; hostServices.analyzedFilter = (options: powerbi.FilterAnalyzerOptions) => { return new mocks.FilterAnalyzerMock(options.filter, options.fieldSQExprs); }; return hostServices; } export function buildDefaultDataView(field: SQExpr): powerbi.DataView { let dataViewMetadata: powerbi.DataViewMetadata = buildDefaultDataViewMetadata(); let dataViewCategorical: powerbi.DataViewCategorical = buildDefaultDataViewCategorical(field); let dataView: powerbi.DataView = { metadata: dataViewMetadata, categorical: dataViewCategorical }; return dataView; } export function buildBooleanValuesDataView(field: SQExpr): powerbi.DataView { let dataViewMetadata: powerbi.DataViewMetadata = buildBooleanValueDataViewMetadata(); let dataViewCategorical: powerbi.DataViewCategorical = buildBooleanValuesDataViewCategorical(field); let dataView: powerbi.DataView = { metadata: dataViewMetadata, categorical: dataViewCategorical }; return dataView; } export function buildImageDataView(field: SQExpr): powerbi.DataView { let dataViewMetadata: powerbi.DataViewMetadata = buildImageDataViewMetadata(); let dataViewCategorical: powerbi.DataViewCategorical = buildImageDataViewCategorical(field); let dataView: powerbi.DataView = { metadata: dataViewMetadata, categorical: dataViewCategorical }; return dataView; } export function buildEmptyDataView(): powerbi.DataView { let dataViewMetadata: powerbi.DataViewMetadata = buildDefaultDataViewMetadata(); let dataViewCategorical: powerbi.DataViewCategorical = buildEmptyDataViewCategorical(); let dataView: powerbi.DataView = { metadata: dataViewMetadata, categorical: dataViewCategorical }; return dataView; } /** * Builds a DataView containing only Categorical with 2 Columns: Fruit (Category) ['<catValuePrefix> <start>', .., '<catValuePrefix> <start + count - 1>'] and Price (Measure) [<rand>, .., <rand>]. * @param {number} start The start. * @param {number} count Number of rows to create. * @param {string = "fruit"} catValuePrefix The prefix for all generated catValuePrefix * @returns DataView */ export function buildSequenceDataView(field: SQExpr, start: number, count: number, catValuePrefix: string = "fruit"): powerbi.DataView { let dataViewMetadata: powerbi.DataViewMetadata = buildDefaultDataViewMetadata(); let dataViewCategorical: powerbi.DataViewCategorical = buildSequenceDataViewCategorical(field, start, count, dataViewMetadata, catValuePrefix); let dataView: powerbi.DataView = { metadata: dataViewMetadata, categorical: dataViewCategorical }; return dataView; } export function buildDefaultDataViewObjects(orientation?: SlicerOrientation, selectAllCheckboxEnabled: boolean = true, singleSelect: boolean = false): powerbi.DataViewObjects { return { general: { orientation: orientation ? orientation : SlicerOrientation.Vertical, }, selection: { selectAllCheckboxEnabled: selectAllCheckboxEnabled, singleSelect: singleSelect, } }; } export function buildDefaultDataViewMetadata(): powerbi.DataViewMetadata { return { columns: [ { displayName: "Fruit", roles: { "Values": true }, type: ValueType.fromDescriptor({ text: true }) }] }; } export function buildBooleanValueDataViewMetadata(): powerbi.DataViewMetadata { return { columns: [ { displayName: "Fruit", roles: { "Values": true }, type: ValueType.fromDescriptor({ bool: true }) }] }; } export function buildDataViewMetadataWithLongName(): powerbi.DataViewMetadata { return { columns: [ { displayName: "This is a long slicer header for testing", roles: { "Values": true }, type: ValueType.fromDescriptor({ text: true }) }] }; } export function buildDefaultDataViewCategorical(field: SQExpr): powerbi.DataViewCategorical { let dataViewMetadata = buildDefaultDataViewMetadata(); let category: powerbi.DataViewCategoryColumn = { source: dataViewMetadata.columns[0], values: ["Apple", "Orange", "Kiwi", "Grapes", "Banana"], identity: [mocks.dataViewScopeIdentityWithEquality(field, "Apple"), mocks.dataViewScopeIdentityWithEquality(field, "Orange"), mocks.dataViewScopeIdentityWithEquality(field, "Kiwi"), mocks.dataViewScopeIdentityWithEquality(field, "Grapes"), mocks.dataViewScopeIdentityWithEquality(field, "Banana")], identityFields: [field] }; let dataViewCategorical = { categories: [category], values: powerbi.data.DataViewTransform.createValueColumns([{ source: dataViewMetadata.columns[0], values: [ undefined, 3, 4, 5, 6, ] }]) }; return dataViewCategorical; } export function buildBooleanValuesDataViewCategorical(field: SQExpr): powerbi.DataViewCategorical { let dataViewMetadata = buildDefaultDataViewMetadata(); let category: powerbi.DataViewCategoryColumn = { source: dataViewMetadata.columns[0], values: [true, false, false], identity: [mocks.dataViewScopeIdentityWithEquality(field, true), mocks.dataViewScopeIdentityWithEquality(field, false), mocks.dataViewScopeIdentityWithEquality(field, false)], identityFields: [field] }; let dataViewCategorical = { categories: [category], values: powerbi.data.DataViewTransform.createValueColumns([{ source: dataViewMetadata.columns[0], values: [ undefined, 3, 4, ] }]) }; return dataViewCategorical; } export function buildImageDataViewMetadata(): powerbi.DataViewMetadata { return { columns: [ { displayName: "DummyImages", roles: { "Values": true }, type: ValueType.fromDescriptor({ misc: { imageUrl: true }, extendedType: powerbi.ExtendedType.ImageUrl, }) }] }; } export function buildImageDataViewCategorical(field: SQExpr): powerbi.DataViewCategorical { let dataViewMetadata = buildDefaultDataViewMetadata(); let category: powerbi.DataViewCategoryColumn = { source: dataViewMetadata.columns[0], values: [], identity: [], identityFields: [field] }; let dataViewCategorical = { categories: [category] }; for (let count = 1; count < 6; count++) { let imageUrl: string = "http://dummyimage.com/600x400/000/fff&text=" + count; category.values.push(imageUrl); let scopeId = mocks.dataViewScopeIdentityWithEquality(field, imageUrl); category.identity.push(scopeId); } return dataViewCategorical; } export function buildEmptyDataViewCategorical(): powerbi.DataViewCategorical { let dataViewMetadata = buildDefaultDataViewMetadata(); let dataViewCategorical = { categories: [{ source: dataViewMetadata.columns[0], values: [], identity: [], }] }; return dataViewCategorical; } /** * Builds a large Categorical Data View with 2 Columns: Fruit (Category) ['<catValuePrefix> <start>', .., '<catValuePrefix> <start + count - 1>'] and Price (Measure) [<Rand>, .., <Rand>] * @param {number} start Starting inclusive Index for Category Values * @param {number} count Number of Category Values * @param {powerbi.DataViewMetadata} dataViewMetadata Metadata associated with the DataView * @param {string = "fruit"} catValuePrefix The prefix for all generated catValuePrefix * @returns Categorical DataView */ export function buildSequenceDataViewCategorical(field: SQExpr, start: number, count: number, dataViewMetadata: powerbi.DataViewMetadata, catValuePrefix: string = "fruit"): powerbi.DataViewCategorical { let cats: string[] = []; let vals: number[] = []; let scopeIds: powerbi.DataViewScopeIdentity[] = []; for (let i = start; i < start + count; i++) { let value = catValuePrefix + " " + i; cats.push(value); scopeIds.push(mocks.dataViewScopeIdentityWithEquality(field, value)); vals.push(Math.random()); } let dataViewCategorical = { categories: [{ source: dataViewMetadata.columns[0], values: cats, identity: scopeIds, identityFields: [field], }] }; return dataViewCategorical; } export function validateSlicerItem(expectedValue: string, index: number = 0): void { let slicerText = $(".slicerText"); expect(slicerText.eq(index).text()).toBe(expectedValue); } export function validateSelectionState(orientation: SlicerOrientation, expectedSelected: number[], builder: TestBuilder): void { let actualSelected: number[] = []; let containerToBeValidated = getContainerToBeValidated(orientation, builder); containerToBeValidated.each((index: number, element: HTMLInputElement) => { if (element.classList.contains(SelectedClass)) actualSelected.push(index); }); expect(actualSelected).toEqual(expectedSelected); if (isVerticalOrientation(orientation)) validateCheckedState(expectedSelected, builder.slicerCheckboxInput); } export function isVerticalOrientation(orientation: SlicerOrientation): boolean { return orientation === SlicerOrientation.Vertical; } function getContainerToBeValidated(orientation: SlicerOrientation, builder: TestBuilder): JQuery { let containerToBeValidated: JQuery; if (isVerticalOrientation(orientation)) { containerToBeValidated = builder.slicerCheckbox; } else { containerToBeValidated = builder.slicerText; } return containerToBeValidated; } function validateCheckedState(expectedChecked: number[], slicerCheckboxInput: JQuery): void { let actualChecked: number[] = []; slicerCheckboxInput.each((index: number, element: HTMLInputElement) => { if (element.checked) actualChecked.push(index); }); expect(actualChecked).toEqual(expectedChecked); } export class TestBuilder { public visual: powerbi.IVisual; public hostServices: powerbi.IVisualHostServices; public field = powerbi.data.SQExprBuilder.fieldDef({ schema: 's', entity: "Entity2", column: "PropertyName" }); public dataViewMetadata: powerbi.DataViewMetadata = buildDefaultDataViewMetadata(); public dataViewCategorical: powerbi.DataViewCategorical = buildDefaultDataViewCategorical(this.field); public dataView: powerbi.DataView = buildDefaultDataView(this.field); public interactiveDataViewOptions: powerbi.VisualDataChangedOptions = { dataViews: [this.dataView] }; public interactiveImageDataViewOptions: powerbi.VisualDataChangedOptions = { dataViews: [buildImageDataView(this.field)] }; public slicerText: JQuery; public slicerCheckbox: JQuery; public slicerCheckboxInput: JQuery; private originalRequestAnimationFrameCallback: (callback: Function) => number; constructor(orientation: SlicerOrientation, height: number = 200, width: number = 300) { let element = helpers.testDom(height.toString(), width.toString(), 'visual'); this.hostServices = createHostServices(); let dataView = this.dataView; dataView.metadata.objects = buildDefaultDataViewObjects(orientation); let slicerRenderOptions: RenderSlicerOptions = { visualType: SlicerVisual, hostServices: this.hostServices, dataView: dataView, dataViewObjects: dataView.metadata.objects, orientation: orientation, }; this.visual = initSlicer(element, slicerRenderOptions, this.field); this.originalRequestAnimationFrameCallback = window.requestAnimationFrame; window.requestAnimationFrame = (callback: () => void) => { callback(); return 0; }; jasmine.clock().install(); helpers.fireOnDataChanged(this.visual, this.interactiveDataViewOptions); this.initializeHelperElements(); spyOn(this.hostServices, "onSelect").and.callThrough(); } public destroy(): void { window.requestAnimationFrame = this.originalRequestAnimationFrameCallback; jasmine.clock().uninstall(); } public initializeHelperElements(): void { this.slicerText = $(".slicerText"); this.slicerCheckbox = $(".slicerCheckbox"); this.slicerCheckboxInput = $(".slicerCheckbox").find("input"); } } }
{ "content_hash": "3b5ad9fe548a7e6cab12485ac0985a1e", "timestamp": "", "source": "github", "line_count": 396, "max_line_length": 206, "avg_line_length": 40.78787878787879, "alnum_prop": 0.6326770678553739, "repo_name": "tsansome/PowerBI-visuals", "id": "e897b857388a6473824c9ffff0b056705bc91efb", "size": "17376", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Clients/PowerBIVisualsTests/helpers/slicerHelper.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "192489" }, { "name": "HTML", "bytes": "1956" }, { "name": "JavaScript", "bytes": "970993" }, { "name": "TypeScript", "bytes": "8536087" } ], "symlink_target": "" }
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>ajax实例</title> </head> <body> <div>测试数据</div> <input type="button" value="点击" id="btn"> <script type="text/javascript"> window.onload = function(){ var btn = document.getElementById('btn'); btn.onclick = function(){ var xhr = null; if(window.XMLHttpRequest){ xhr = new XMLHttpRequest(); }else{ xhr = new ActiveXObject('Mcrosoft.XMLHTTP'); } console.log('1状态吗'+xhr.readyState); xhr.open("get","04demo.php",true); console.log('2状态吗'+xhr.readyState); //xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function(){ console.log('3状态吗'+xhr.readyState); if(xhr.readyState == 4){ console.log('4状态吗'+xhr.readyState); if(xhr.status == 200){ var data = xhr.responseText; console.log(data); }else{ console.log('failure!'); } } } xhr.send(null); console.log('5状态吗'+xhr.readyState); } } </script> </body> </html>
{ "content_hash": "f8e1a90361407e18b80b429086aad993", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 79, "avg_line_length": 23.318181818181817, "alnum_prop": 0.6257309941520468, "repo_name": "puyanLiu/LPYFramework", "id": "e133cced5deaa6bb416a3e626268340dfb0b0912", "size": "1072", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "前端练习/08ajax/demo/04index.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "1401" }, { "name": "CSS", "bytes": "724902" }, { "name": "HTML", "bytes": "15878014" }, { "name": "Java", "bytes": "11226" }, { "name": "JavaScript", "bytes": "4731198" }, { "name": "Makefile", "bytes": "117" }, { "name": "Objective-C", "bytes": "2320861" }, { "name": "PHP", "bytes": "19808" }, { "name": "Python", "bytes": "14849" }, { "name": "Ruby", "bytes": "10097" }, { "name": "Shell", "bytes": "33914" }, { "name": "Swift", "bytes": "330567" }, { "name": "TypeScript", "bytes": "61723" } ], "symlink_target": "" }
package org.deeplearning4j.spark.datavec; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.spark.api.java.JavaRDD; import org.deeplearning4j.spark.BaseSparkTest; import org.deeplearning4j.spark.data.BatchAndExportDataSetsFunction; import org.deeplearning4j.spark.data.BatchAndExportMultiDataSetsFunction; import org.junit.Test; import org.nd4j.linalg.dataset.DataSet; import org.nd4j.linalg.dataset.api.MultiDataSet; import org.nd4j.linalg.factory.Nd4j; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; /** * Created by Alex on 29/08/2016. */ public class TestExport extends BaseSparkTest { @Test public void testBatchAndExportDataSetsFunction() throws Exception { String baseDir = System.getProperty("java.io.tmpdir"); baseDir = FilenameUtils.concat(baseDir, "dl4j_spark_testBatchAndExport/"); baseDir = baseDir.replaceAll("\\\\", "/"); File f = new File(baseDir); if (f.exists()) FileUtils.deleteDirectory(f); f.mkdir(); f.deleteOnExit(); int minibatchSize = 5; int nIn = 4; int nOut = 3; List<DataSet> dataSets = new ArrayList<>(); dataSets.add(new DataSet(Nd4j.create(10, nIn), Nd4j.create(10, nOut))); //Larger than minibatch size -> tests splitting for (int i = 0; i < 98; i++) { if (i % 2 == 0) { dataSets.add(new DataSet(Nd4j.create(5, nIn), Nd4j.create(5, nOut))); } else { dataSets.add(new DataSet(Nd4j.create(1, nIn), Nd4j.create(1, nOut))); dataSets.add(new DataSet(Nd4j.create(1, nIn), Nd4j.create(1, nOut))); dataSets.add(new DataSet(Nd4j.create(3, nIn), Nd4j.create(3, nOut))); } } Collections.shuffle(dataSets, new Random(12345)); JavaRDD<DataSet> rdd = sc.parallelize(dataSets); rdd = rdd.repartition(1); //For testing purposes (should get exactly 100 out, but maybe more with more partitions) JavaRDD<String> pathsRdd = rdd.mapPartitionsWithIndex(new BatchAndExportDataSetsFunction(minibatchSize, "file:///" + baseDir), true); List<String> paths = pathsRdd.collect(); assertEquals(100, paths.size()); File[] files = f.listFiles(); assertNotNull(files); int count = 0; for (File file : files) { if (!file.getPath().endsWith(".bin")) continue; System.out.println(file); DataSet ds = new DataSet(); ds.load(file); assertEquals(minibatchSize, ds.numExamples()); count++; } assertEquals(100, count); FileUtils.deleteDirectory(f); } @Test public void testBatchAndExportMultiDataSetsFunction() throws Exception { String baseDir = System.getProperty("java.io.tmpdir"); baseDir = FilenameUtils.concat(baseDir, "dl4j_spark_testBatchAndExportMDS/"); baseDir = baseDir.replaceAll("\\\\", "/"); File f = new File(baseDir); if (f.exists()) FileUtils.deleteDirectory(f); f.mkdir(); f.deleteOnExit(); int minibatchSize = 5; int nIn = 4; int nOut = 3; List<MultiDataSet> dataSets = new ArrayList<>(); dataSets.add(new org.nd4j.linalg.dataset.MultiDataSet(Nd4j.create(10, nIn), Nd4j.create(10, nOut))); //Larger than minibatch size -> tests splitting for (int i = 0; i < 98; i++) { if (i % 2 == 0) { dataSets.add(new org.nd4j.linalg.dataset.MultiDataSet(Nd4j.create(5, nIn), Nd4j.create(5, nOut))); } else { dataSets.add(new org.nd4j.linalg.dataset.MultiDataSet(Nd4j.create(1, nIn), Nd4j.create(1, nOut))); dataSets.add(new org.nd4j.linalg.dataset.MultiDataSet(Nd4j.create(1, nIn), Nd4j.create(1, nOut))); dataSets.add(new org.nd4j.linalg.dataset.MultiDataSet(Nd4j.create(3, nIn), Nd4j.create(3, nOut))); } } Collections.shuffle(dataSets, new Random(12345)); JavaRDD<MultiDataSet> rdd = sc.parallelize(dataSets); rdd = rdd.repartition(1); //For testing purposes (should get exactly 100 out, but maybe more with more partitions) JavaRDD<String> pathsRdd = rdd.mapPartitionsWithIndex(new BatchAndExportMultiDataSetsFunction(minibatchSize, "file:///" + baseDir), true); List<String> paths = pathsRdd.collect(); assertEquals(100, paths.size()); File[] files = f.listFiles(); assertNotNull(files); int count = 0; for (File file : files) { if (!file.getPath().endsWith(".bin")) continue; System.out.println(file); MultiDataSet ds = new org.nd4j.linalg.dataset.MultiDataSet(); ds.load(file); assertEquals(minibatchSize, ds.getFeatures(0).size(0)); assertEquals(minibatchSize, ds.getLabels(0).size(0)); count++; } assertEquals(100, count); FileUtils.deleteDirectory(f); } }
{ "content_hash": "331b8fc85bfa1598432f45139c1d5931", "timestamp": "", "source": "github", "line_count": 140, "max_line_length": 156, "avg_line_length": 37.42857142857143, "alnum_prop": 0.6269083969465649, "repo_name": "xuzhongxing/deeplearning4j", "id": "bdfbb676bffa2f215e0f0e6f29f29a35e8ab445b", "size": "5901", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "deeplearning4j-scaleout/spark/dl4j-spark/src/test/java/org/deeplearning4j/spark/datavec/TestExport.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "931" }, { "name": "CSS", "bytes": "245406" }, { "name": "FreeMarker", "bytes": "18278" }, { "name": "HTML", "bytes": "111375" }, { "name": "Java", "bytes": "6936373" }, { "name": "JavaScript", "bytes": "636238" }, { "name": "Ruby", "bytes": "4558" }, { "name": "Scala", "bytes": "173698" }, { "name": "Shell", "bytes": "10247" }, { "name": "TypeScript", "bytes": "78035" } ], "symlink_target": "" }
package org.deeplearning4j.datasets.iterator; import lombok.NonNull; import org.nd4j.linalg.primitives.Pair; /** * A simple utility iterator for creating a DataSetIterator from an {@code Iterable<Pair<double[], double[]>>}. * First value in pair is the features vector, second value in pair is the labels. * Supports generating 2d features/labels only * * @author raver119@gmail.com */ public class DoublesDataSetIterator extends AbstractDataSetIterator<double[]> { /** * @param iterable Iterable to source data from * @param batchSize Batch size for generated DataSet objects */ public DoublesDataSetIterator(@NonNull Iterable<Pair<double[], double[]>> iterable, int batchSize) { super(iterable, batchSize); } }
{ "content_hash": "50a749588d00e16af5987b23bb5bb3c5", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 111, "avg_line_length": 31.666666666666668, "alnum_prop": 0.7289473684210527, "repo_name": "RobAltena/deeplearning4j", "id": "7738d31762a59661c6d210f79250a1125b6ed165", "size": "1521", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "deeplearning4j/deeplearning4j-data/deeplearning4j-utility-iterators/src/main/java/org/deeplearning4j/datasets/iterator/DoublesDataSetIterator.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "2469" }, { "name": "C", "bytes": "144275" }, { "name": "C#", "bytes": "138404" }, { "name": "C++", "bytes": "16954560" }, { "name": "CMake", "bytes": "77377" }, { "name": "CSS", "bytes": "10363" }, { "name": "Cuda", "bytes": "2324886" }, { "name": "Dockerfile", "bytes": "1329" }, { "name": "FreeMarker", "bytes": "77045" }, { "name": "HTML", "bytes": "38914" }, { "name": "Java", "bytes": "36293636" }, { "name": "JavaScript", "bytes": "436278" }, { "name": "PureBasic", "bytes": "12256" }, { "name": "Python", "bytes": "325018" }, { "name": "Ruby", "bytes": "4558" }, { "name": "Scala", "bytes": "355054" }, { "name": "Shell", "bytes": "80490" }, { "name": "Smarty", "bytes": "900" }, { "name": "Starlark", "bytes": "931" }, { "name": "TypeScript", "bytes": "80252" } ], "symlink_target": "" }
<!--- Copyright 2019 The AMP HTML Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> # SVK Native SVK Native is a content discovery platform. Please visit our [svk-native.ru](https://svk-native.ru) for more information. ## Example ```html <amp-embed height="200" type="svknative" layout="responsive" data-widgetid="2" </amp-embed> ``` ## Configuration For details on the configuration semantics, please contact your SVK Native personal manager. ### Required parameters - `data-widgetid` - insert your WidgetId
{ "content_hash": "e99a9e60a4995599a31189157fa05a17", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 121, "avg_line_length": 28, "alnum_prop": 0.7567567567567568, "repo_name": "nexxtv/amphtml", "id": "99c6357dc6d4be67201a2940f8ff122965d72971", "size": "1036", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "ads/vendors/svknative.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "1603133" }, { "name": "CSS", "bytes": "544452" }, { "name": "Go", "bytes": "7785" }, { "name": "HTML", "bytes": "2096012" }, { "name": "JavaScript", "bytes": "19296197" }, { "name": "Python", "bytes": "65891" }, { "name": "Shell", "bytes": "29630" }, { "name": "Starlark", "bytes": "31140" }, { "name": "TypeScript", "bytes": "17981" }, { "name": "Yacc", "bytes": "28669" } ], "symlink_target": "" }
#include <qle/models/eqbspiecewiseconstantparametrization.hpp> namespace QuantExt { EqBsPiecewiseConstantParametrization::EqBsPiecewiseConstantParametrization( const Currency& currency, const std::string& eqName, const Handle<Quote>& eqSpotToday, const Handle<Quote>& fxSpotToday, const Array& times, const Array& sigma, const Handle<YieldTermStructure>& eqIrCurveToday, const Handle<YieldTermStructure>& eqDivYieldCurveToday) : EqBsParametrization(currency, eqName, eqSpotToday, fxSpotToday, eqIrCurveToday, eqDivYieldCurveToday), PiecewiseConstantHelper1(times) { initialize(sigma); } EqBsPiecewiseConstantParametrization::EqBsPiecewiseConstantParametrization( const Currency& currency, const std::string& eqName, const Handle<Quote>& eqSpotToday, const Handle<Quote>& fxSpotToday, const std::vector<Date>& dates, const Array& sigma, const Handle<YieldTermStructure>& domesticTermStructure, const Handle<YieldTermStructure>& eqIrCurveToday, const Handle<YieldTermStructure>& eqDivYieldCurveToday) : EqBsParametrization(currency, eqName, eqSpotToday, fxSpotToday, eqIrCurveToday, eqDivYieldCurveToday), PiecewiseConstantHelper1(dates, domesticTermStructure) { initialize(sigma); } void EqBsPiecewiseConstantParametrization::initialize(const Array& sigma) { QL_REQUIRE(PiecewiseConstantHelper1::t().size() + 1 == sigma.size(), "alpha size (" << sigma.size() << ") inconsistent to times size (" << PiecewiseConstantHelper1::t().size() << ")"); // store raw parameter values for (Size i = 0; i < PiecewiseConstantHelper1::y_->size(); ++i) { PiecewiseConstantHelper1::y_->setParam(i, inverse(0, sigma[i])); } update(); } } // namespace QuantExt
{ "content_hash": "341c5ed7416886fcd24d769bb2b09df0", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 110, "avg_line_length": 46.81578947368421, "alnum_prop": 0.7374929735806633, "repo_name": "ChinaQuants/Engine", "id": "3a973dcaea09266513b095d173072d57d6577c13", "size": "2527", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "QuantExt/qle/models/eqbspiecewiseconstantparametrization.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C++", "bytes": "2623899" }, { "name": "CSS", "bytes": "5676" }, { "name": "HTML", "bytes": "119250" }, { "name": "Jupyter Notebook", "bytes": "28581" }, { "name": "M4", "bytes": "47747" }, { "name": "Makefile", "bytes": "42626" }, { "name": "Python", "bytes": "11416" }, { "name": "R", "bytes": "1657" }, { "name": "Shell", "bytes": "4265" }, { "name": "TeX", "bytes": "270547" } ], "symlink_target": "" }
<?php namespace Phramework\JSONAPI\Viewers; /** * Implementation of IViewer for JSON API * * Also sends `Content-Type: application/vnd.api+json;charset=utf-8` header as response * * JSONP Support is disabled * @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 * @author Xenofon Spafaridis <nohponex@gmail.com> * @link http://jsonapi.org/ * @sinse 1.0.0 */ class JSONAPI implements \Phramework\Viewers\IViewer { /** * Send JSON API headers * @see header https://secure.php.net/manual/en/function.header.php * @return boolean Returns false if headers are already sent, else true */ public static function header() { if (headers_sent()) { return false; } header('Content-Type: application/vnd.api+json;charset=utf-8'); return true; } /** * Send output * * @param object|array $parameters Output to display as json */ public function view($parameters) { self::header(); if (!is_object($parameters)) { $parameters = (object)$parameters; } //Include JSON API version object $parameters->jsonapi = (object)[ 'version' => '1.0' ]; echo json_encode($parameters); } }
{ "content_hash": "a36df6395f549196ba297009c76b4478", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 87, "avg_line_length": 23.814814814814813, "alnum_prop": 0.604199066874028, "repo_name": "phramework/jsonapi", "id": "20f8945f5a2800f335b54c31b0dfdd11e3302a72", "size": "1286", "binary": false, "copies": "1", "ref": "refs/heads/1.x", "path": "src/Viewers/JSONAPI.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "296358" }, { "name": "Shell", "bytes": "391" } ], "symlink_target": "" }
home: 'Home' gettingStarted: 'Erste Schritte' basics: 'Grundlagen' advanced: 'Fortgeschritten' examples: 'Beispiele' integrations: 'Integrationen' api: 'API' search: 'Suchen…' ---
{ "content_hash": "0274255cb32fa1f71116a50bb52f4125", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 32, "avg_line_length": 20, "alnum_prop": 0.7444444444444445, "repo_name": "kentcdodds/glamorous-website", "id": "8bd8a9cc9e9e3f8ac918ad364c4c9399b11790a2", "size": "186", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/content/de/nav.md", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "95055" } ], "symlink_target": "" }
function [J, grad] = cofiCostFunc(params, Y, R, num_users, num_movies, ... num_features, lambda) %COFICOSTFUNC Collaborative filtering cost function % [J, grad] = COFICOSTFUNC(params, Y, R, num_users, num_movies, ... % num_features, lambda) returns the cost and gradient for the % collaborative filtering problem. % % Unfold the U and W matrices from params X = reshape(params(1:num_movies*num_features), num_movies, num_features); Theta = reshape(params(num_movies*num_features+1:end), ... num_users, num_features); % You need to return the following values correctly J = 0; X_grad = zeros(size(X)); Theta_grad = zeros(size(Theta)); % ====================== YOUR CODE HERE ====================== % Instructions: Compute the cost function and gradient for collaborative % filtering. Concretely, you should first implement the cost % function (without regularization) and make sure it is % matches our costs. After that, you should implement the % gradient and use the checkCostFunction routine to check % that the gradient is correct. Finally, you should implement % regularization. % % Notes: X - num_movies x num_features matrix of movie features % Theta - num_users x num_features matrix of user features % Y - num_movies x num_users matrix of user ratings of movies % R - num_movies x num_users matrix, where R(i, j) = 1 if the % i-th movie was rated by the j-th user % % You should set the following variables correctly: % % X_grad - num_movies x num_features matrix, containing the % partial derivatives w.r.t. to each element of X % Theta_grad - num_users x num_features matrix, containing the % partial derivatives w.r.t. to each element of Theta % % cost function hyp = X * Theta'; diff = (hyp - Y) .* R; J = 1/2 * sum(sum(diff .^ 2)); % gradient X_grad = diff * Theta; Theta_grad = diff' * X; % regularized J += lambda/2 * sum(sum(X .^ 2)) + lambda/2 * sum(sum(Theta .^ 2)); X_grad += lambda * X; Theta_grad += lambda * Theta; % ============================================================= grad = [X_grad(:); Theta_grad(:)]; end
{ "content_hash": "4fa39a296d0c13b077bf02a8c6ff874e", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 75, "avg_line_length": 34.26865671641791, "alnum_prop": 0.6019163763066202, "repo_name": "Alexoner/mooc", "id": "0fe5bdb029ac43272514092b598dffa096388a14", "size": "2296", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "coursera/ml-007/9.recommender.system/mlclass-ex8-007/mlclass-ex8/cofiCostFunc.m", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "25688" }, { "name": "CSS", "bytes": "4851" }, { "name": "HTML", "bytes": "420458" }, { "name": "Jupyter Notebook", "bytes": "18733340" }, { "name": "Matlab", "bytes": "338664" }, { "name": "Python", "bytes": "574460" }, { "name": "R", "bytes": "205" }, { "name": "Shell", "bytes": "6924" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>V8 API Reference Guide for node.js v5.12.0: v8::StackFrame Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v5.12.0 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1StackFrame.html">StackFrame</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="classv8_1_1StackFrame-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">v8::StackFrame Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include &lt;<a class="el" href="v8_8h_source.html">v8.h</a>&gt;</code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a57886e590ac1a4c57ee6f6bf1009b5b1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#a57886e590ac1a4c57ee6f6bf1009b5b1">GetLineNumber</a> () const </td></tr> <tr class="separator:a57886e590ac1a4c57ee6f6bf1009b5b1"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a44eccfb1bf17221ab6f69e977f3aa3a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#a44eccfb1bf17221ab6f69e977f3aa3a2">GetColumn</a> () const </td></tr> <tr class="separator:a44eccfb1bf17221ab6f69e977f3aa3a2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac449d55656f8b7638de3cf5f5530cb7a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#ac449d55656f8b7638de3cf5f5530cb7a">GetScriptId</a> () const </td></tr> <tr class="separator:ac449d55656f8b7638de3cf5f5530cb7a"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac9701a5687dd04bcf24fd02f62bbe1a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#ac9701a5687dd04bcf24fd02f62bbe1a8">GetScriptName</a> () const </td></tr> <tr class="separator:ac9701a5687dd04bcf24fd02f62bbe1a8"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac9f436f4cb245d871fe7efce03edc0cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#ac9f436f4cb245d871fe7efce03edc0cc">GetScriptNameOrSourceURL</a> () const </td></tr> <tr class="separator:ac9f436f4cb245d871fe7efce03edc0cc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac13cdea4b4253d82485e673de6264073"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>&lt; <a class="el" href="classv8_1_1String.html">String</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#ac13cdea4b4253d82485e673de6264073">GetFunctionName</a> () const </td></tr> <tr class="separator:ac13cdea4b4253d82485e673de6264073"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae45f4d6ff9398a00a0b6534c160ec0c7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#ae45f4d6ff9398a00a0b6534c160ec0c7">IsEval</a> () const </td></tr> <tr class="separator:ae45f4d6ff9398a00a0b6534c160ec0c7"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ade01313f4a3f6b88691d9d544737f65c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1StackFrame.html#ade01313f4a3f6b88691d9d544737f65c">IsConstructor</a> () const </td></tr> <tr class="separator:ade01313f4a3f6b88691d9d544737f65c"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>A single JavaScript stack frame. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a44eccfb1bf17221ab6f69e977f3aa3a2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int v8::StackFrame::GetColumn </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns the 1-based column offset on the line for the associated function call. This method will return Message::kNoColumnInfo if it is unable to retrieve the column number, or if kColumnOffset was not passed as an option when capturing the <a class="el" href="classv8_1_1StackTrace.html">StackTrace</a>. </p> </div> </div> <a class="anchor" id="ac13cdea4b4253d82485e673de6264073"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classv8_1_1Local.html">Local</a>&lt;<a class="el" href="classv8_1_1String.html">String</a>&gt; v8::StackFrame::GetFunctionName </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns the name of the function associated with this stack frame. </p> </div> </div> <a class="anchor" id="a57886e590ac1a4c57ee6f6bf1009b5b1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int v8::StackFrame::GetLineNumber </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns the number, 1-based, of the line for the associate function call. This method will return Message::kNoLineNumberInfo if it is unable to retrieve the line number, or if kLineNumber was not passed as an option when capturing the <a class="el" href="classv8_1_1StackTrace.html">StackTrace</a>. </p> </div> </div> <a class="anchor" id="ac449d55656f8b7638de3cf5f5530cb7a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int v8::StackFrame::GetScriptId </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns the id of the script for the function for this <a class="el" href="classv8_1_1StackFrame.html">StackFrame</a>. This method will return Message::kNoScriptIdInfo if it is unable to retrieve the script id, or if kScriptId was not passed as an option when capturing the <a class="el" href="classv8_1_1StackTrace.html">StackTrace</a>. </p> </div> </div> <a class="anchor" id="ac9701a5687dd04bcf24fd02f62bbe1a8"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classv8_1_1Local.html">Local</a>&lt;<a class="el" href="classv8_1_1String.html">String</a>&gt; v8::StackFrame::GetScriptName </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns the name of the resource that contains the script for the function for this <a class="el" href="classv8_1_1StackFrame.html">StackFrame</a>. </p> </div> </div> <a class="anchor" id="ac9f436f4cb245d871fe7efce03edc0cc"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classv8_1_1Local.html">Local</a>&lt;<a class="el" href="classv8_1_1String.html">String</a>&gt; v8::StackFrame::GetScriptNameOrSourceURL </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns the name of the resource that contains the script for the function for this <a class="el" href="classv8_1_1StackFrame.html">StackFrame</a> or sourceURL value if the script name is undefined and its source ends with //# sourceURL=... string or deprecated //@ sourceURL=... string. </p> </div> </div> <a class="anchor" id="ade01313f4a3f6b88691d9d544737f65c"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool v8::StackFrame::IsConstructor </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns whether or not the associated function is called as a constructor via "new". </p> </div> </div> <a class="anchor" id="ae45f4d6ff9398a00a0b6534c160ec0c7"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool v8::StackFrame::IsEval </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns whether or not the associated function is compiled via a call to eval(). </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
{ "content_hash": "b2bc55ea2cc4e939b4fa0d28bad75b34", "timestamp": "", "source": "github", "line_count": 262, "max_line_length": 403, "avg_line_length": 51.79007633587786, "alnum_prop": 0.6646031395091754, "repo_name": "v8-dox/v8-dox.github.io", "id": "b692ac843361048564bb22fb59f7abe34bdcbfc9", "size": "13569", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "34b96c1/html/classv8_1_1StackFrame.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var DependenciesBlock = require("./DependenciesBlock"); function AsyncDependenciesBlock(name, module, loc) { DependenciesBlock.call(this); this.chunkName = name; this.chunks = null; this.module = module; this.loc = loc; Object.defineProperty(this, "chunk", { get: function() { throw new Error("`chunk` was been renamed to `chunks` and is now an array"); }, set: function() { throw new Error("`chunk` was been renamed to `chunks` and is now an array"); } }); } module.exports = AsyncDependenciesBlock; AsyncDependenciesBlock.prototype = Object.create(DependenciesBlock.prototype); AsyncDependenciesBlock.prototype.updateHash = function updateHash(hash) { hash.update(this.chunkName || ""); DependenciesBlock.prototype.updateHash.call(this, hash); }; AsyncDependenciesBlock.prototype.disconnect = function() { this.chunks = null; DependenciesBlock.prototype.disconnect.call(this); };
{ "content_hash": "7f2e6de04f69d403510a6f7ff656ccbb", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 79, "avg_line_length": 28.13888888888889, "alnum_prop": 0.7403751233958539, "repo_name": "thealjey/evolution-test", "id": "cbe4d118f230e9236b884c022473f0078ef5a6c3", "size": "1013", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "node_modules/webpack/lib/AsyncDependenciesBlock.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "165157" }, { "name": "HTML", "bytes": "509" }, { "name": "JavaScript", "bytes": "1180963" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <meta name="description" content="" /> <meta name="author" content="" /> <link rel="icon" href="../favicon.ico" /> <title>Nyandere</title> <!-- Bootstrap core CSS --> <link href="./dist/css/bootstrap.min.css" rel="stylesheet" /> <!-- Bootstrap theme --> <link href="./dist/css/bootstrap-theme.min.css" rel="stylesheet" /> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <link href="./docs/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet"/> <!-- Custom styles for this template --> <link href="theme.css" rel="stylesheet" /> <!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]--> <script src="./docs/assets/js/ie-emulation-modes-warning.js"></script> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[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 role="document"> <div class="container"> <div class="navbar-header" style="display:inline;"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="container theme-showcase" role="main"> <!-- Main jumbotron for a primary marketing message or call to action --> <div class="jumbotron"> <h1 align="center"> <img src="./img/cat.png" alt="Nyaaaa" style="width:60px;" /> &nbsp; Nyandere &nbsp; <img src="./img/cat.png" alt="Nyaaaa" style="width:60px;" /> </h1> <p align="center">Yandere Nekomimi Simulator</p> <p align="center">Play as a yandere nekomimi and try to win the affections of your senpai.</p> <p align="center"><i>-Oodrye 2016</i></p> </div> <div class="page-header"> <h1>Hi, Senpai!</h1> <button type="button" class="btn btn-lg btn-success" onclick="hello_kohai()">Hello, Kohai!</button> <br/><br/> <button type="button" class="btn btn-lg btn-info">Hi.</button><br/><br/> <button type="button" class="btn btn-lg btn-warning">You friggen Weabu.</button><br/><br/> <button type="button" class="btn btn-lg btn-danger">Ugh. Gross. Cat.</button><br/><br/> </div> <!-- <div class="page-header"> <h1>Hi, Senpai!</h1> </div> <div class="alert alert-success" role="alert"> <strong>Hello, Kohai!</strong> </div> <div class="alert alert-info" role="alert"> <strong>Hi.</strong> </div> <div class="alert alert-warning" role="alert"> <strong>You friggen weaboo</strong> </div> <div class="alert alert-danger" role="alert"> <strong>Ugh! Gross! Cat.</strong> </div> <!-- <div class="page-header"> <h1>Buttons</h1> </div> <p> <button type="button" class="btn btn-lg btn-default">Default</button> <button type="button" class="btn btn-lg btn-primary">Primary</button> <button type="button" class="btn btn-lg btn-success">Success</button> <button type="button" class="btn btn-lg btn-info">Info</button> <button type="button" class="btn btn-lg btn-warning">Warning</button> <button type="button" class="btn btn-lg btn-danger">Danger</button> <button type="button" class="btn btn-lg btn-link">Link</button> </p> <p> <button type="button" class="btn btn-default">Default</button> <button type="button" class="btn btn-primary">Primary</button> <button type="button" class="btn btn-success">Success</button> <button type="button" class="btn btn-info">Info</button> <button type="button" class="btn btn-warning">Warning</button> <button type="button" class="btn btn-danger">Danger</button> <button type="button" class="btn btn-link">Link</button> </p> <p> <button type="button" class="btn btn-sm btn-default">Default</button> <button type="button" class="btn btn-sm btn-primary">Primary</button> <button type="button" class="btn btn-sm btn-success">Success</button> <button type="button" class="btn btn-sm btn-info">Info</button> <button type="button" class="btn btn-sm btn-warning">Warning</button> <button type="button" class="btn btn-sm btn-danger">Danger</button> <button type="button" class="btn btn-sm btn-link">Link</button> </p> <p> <button type="button" class="btn btn-xs btn-default">Default</button> <button type="button" class="btn btn-xs btn-primary">Primary</button> <button type="button" class="btn btn-xs btn-success">Success</button> <button type="button" class="btn btn-xs btn-info">Info</button> <button type="button" class="btn btn-xs btn-warning">Warning</button> <button type="button" class="btn btn-xs btn-danger">Danger</button> <button type="button" class="btn btn-xs btn-link">Link</button> </p> <div class="page-header"> <h1>Tables</h1> </div> <div class="row"> <div class="col-md-6"> <table class="table"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <div class="col-md-6"> <table class="table table-striped"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> </div> <div class="row"> <div class="col-md-6"> <table class="table table-bordered"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td rowspan="2">1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>Mark</td> <td>Otto</td> <td>@TwBootstrap</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> <div class="col-md-6"> <table class="table table-condensed"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td colspan="2">Larry the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> </div> <div class="page-header"> <h1>Thumbnails</h1> </div> <img data-src="holder.js/200x200" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera"> <div class="page-header"> <h1>Labels</h1> </div> <h1> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </h1> <h2> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </h2> <h3> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </h3> <h4> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </h4> <h5> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </h5> <h6> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </h6> <p> <span class="label label-default">Default</span> <span class="label label-primary">Primary</span> <span class="label label-success">Success</span> <span class="label label-info">Info</span> <span class="label label-warning">Warning</span> <span class="label label-danger">Danger</span> </p> <div class="page-header"> <h1>Badges</h1> </div> <p> <a href="#">Inbox <span class="badge">42</span></a> </p> <ul class="nav nav-pills" role="tablist"> <li role="presentation" class="active"><a href="#">Home <span class="badge">42</span></a></li> <li role="presentation"><a href="#">Profile</a></li> <li role="presentation"><a href="#">Messages <span class="badge">3</span></a></li> </ul> <div class="page-header"> <h1>Dropdown menus</h1> </div> <div class="dropdown theme-dropdown clearfix"> <a id="dropdownMenu1" href="#" class="sr-only dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> <li class="active"><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li role="separator" class="divider"></li> <li><a href="#">Separated link</a></li> </ul> </div> <div class="page-header"> <h1>Navs</h1> </div> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="#">Home</a></li> <li role="presentation"><a href="#">Profile</a></li> <li role="presentation"><a href="#">Messages</a></li> </ul> <ul class="nav nav-pills" role="tablist"> <li role="presentation" class="active"><a href="#">Home</a></li> <li role="presentation"><a href="#">Profile</a></li> <li role="presentation"><a href="#">Messages</a></li> </ul> <div class="page-header"> <h1>Navbars</h1> </div> <nav class="navbar navbar-default"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Project name</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#contact">Blog</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li role="separator" class="divider"></li> <li class="dropdown-header">Nav header</li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> </div><!--/.nav-collapse </div> </nav> <nav class="navbar navbar-inverse"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Project name</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li role="separator" class="divider"></li> <li class="dropdown-header">Nav header</li> <li><a href="#">Separated link</a></li> <li><a href="#">One more separated link</a></li> </ul> </li> </ul> </div> </div> </nav>--> <!-- <div class="page-header"> <h1>Hi, Senpai!</h1> </div> <div class="alert alert-success" role="alert"> <strong>Hello, Kohai!</strong> </div> <div class="alert alert-info" role="alert"> <strong>Hi.</strong> </div> <div class="alert alert-warning" role="alert"> <strong>You friggen weaboo</strong> </div> <div class="alert alert-danger" role="alert"> <strong>Ugh! Gross! Cat.</strong> </div> --> <!-- <div class="page-header"> <h1>Progress bars</h1> </div> <div class="progress"> <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;"><span class="sr-only">60% Complete</span></div> </div> <div class="progress"> <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"><span class="sr-only">40% Complete (success)</span></div> </div> <div class="progress"> <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"><span class="sr-only">20% Complete</span></div> </div> <div class="progress"> <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"><span class="sr-only">60% Complete (warning)</span></div> </div> <div class="progress"> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"><span class="sr-only">80% Complete (danger)</span></div> </div> <div class="progress"> <div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"><span class="sr-only">60% Complete</span></div> </div> <div class="progress"> <div class="progress-bar progress-bar-success" style="width: 35%"><span class="sr-only">35% Complete (success)</span></div> <div class="progress-bar progress-bar-warning" style="width: 20%"><span class="sr-only">20% Complete (warning)</span></div> <div class="progress-bar progress-bar-danger" style="width: 10%"><span class='sr-only'>10% Complete (danger)</span></div> </div> <div class="page-header"> <h1>List groups</h1> </div> <div class="row"> <div class="col-sm-4"> <ul class="list-group"> <li class="list-group-item">Cras justo odio</li> <li class="list-group-item">Dapibus ac facilisis in</li> <li class="list-group-item">Morbi leo risus</li> <li class="list-group-item">Porta ac consectetur ac</li> <li class="list-group-item">Vestibulum at eros</li> </ul> </div><!-- /.col-sm-4 <div class="col-sm-4"> <div class="list-group"> <a href="#" class="list-group-item active"> Cras justo odio </a> <a href="#" class="list-group-item">Dapibus ac facilisis in</a> <a href="#" class="list-group-item">Morbi leo risus</a> <a href="#" class="list-group-item">Porta ac consectetur ac</a> <a href="#" class="list-group-item">Vestibulum at eros</a> </div> </div><!-- /.col-sm-4 <div class="col-sm-4"> <div class="list-group"> <a href="#" class="list-group-item active"> <h4 class="list-group-item-heading">List group item heading</h4> <p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p> </a> <a href="#" class="list-group-item"> <h4 class="list-group-item-heading">List group item heading</h4> <p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p> </a> <a href="#" class="list-group-item"> <h4 class="list-group-item-heading">List group item heading</h4> <p class="list-group-item-text">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p> </a> </div> </div><!-- /.col-sm-4 </div> <div class="page-header"> <h1>Panels</h1> </div> <div class="row"> <div class="col-sm-4"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Panel title</h3> </div> <div class="panel-body"> Panel content </div> </div> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Panel title</h3> </div> <div class="panel-body"> Panel content </div> </div> </div><!-- /.col-sm-4 <div class="col-sm-4"> <div class="panel panel-success"> <div class="panel-heading"> <h3 class="panel-title">Panel title</h3> </div> <div class="panel-body"> Panel content </div> </div> <div class="panel panel-info"> <div class="panel-heading"> <h3 class="panel-title">Panel title</h3> </div> <div class="panel-body"> Panel content </div> </div> </div><!-- /.col-sm-4 <div class="col-sm-4"> <div class="panel panel-warning"> <div class="panel-heading"> <h3 class="panel-title">Panel title</h3> </div> <div class="panel-body"> Panel content </div> </div> <div class="panel panel-danger"> <div class="panel-heading"> <h3 class="panel-title">Panel title</h3> </div> <div class="panel-body"> Panel content </div> </div> </div><!-- /.col-sm-4 </div> --> <!-- <div class="page-header"> <h1>Wells</h1> </div> <div class="well"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sed diam eget risus varius blandit sit amet non magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Cras mattis consectetur purus sit amet fermentum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur.</p> </div> <div class="page-header"> <h1>Carousel</h1> </div> <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-generic" data-slide-to="1"></li> <li data-target="#carousel-example-generic" data-slide-to="2"></li> </ol> <div class="carousel-inner" role="listbox"> <div class="item active"> <img data-src="holder.js/1140x500/auto/#777:#555/text:First slide" alt="First slide"> </div> <div class="item"> <img data-src="holder.js/1140x500/auto/#666:#444/text:Second slide" alt="Second slide"> </div> <div class="item"> <img data-src="holder.js/1140x500/auto/#555:#333/text:Third slide" alt="Third slide"> </div> </div> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> --> </div> <!-- /container --> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="../assets/js/vendor/jquery.min.js"><\/script>')</script> <script type="text/javascript"> $(document).ready(function(){ $('#menu').load('navbar.html'); });</script> <script src="./dist/js/bootstrap.min.js"></script> <script src="./docs/assets/js/docs.min.js"></script> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <script src="./docs/assets/js/ie10-viewport-bug-workaround.js"></script> </body> </html>
{ "content_hash": "2909834a1539e4c0bb6c622ba6daf3a1", "timestamp": "", "source": "github", "line_count": 659, "max_line_length": 454, "avg_line_length": 40.32018209408194, "alnum_prop": 0.5243310375973806, "repo_name": "aulee/aulee.github.io", "id": "110324bd3f2bec95b0b98c74a408d2aba9f94610", "size": "26571", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "index_old.html", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "206532" }, { "name": "HTML", "bytes": "214322" }, { "name": "JavaScript", "bytes": "291617" }, { "name": "PowerShell", "bytes": "468" }, { "name": "Python", "bytes": "5734" }, { "name": "Shell", "bytes": "350" } ], "symlink_target": "" }
package org.omg.PortableServer.POAPackage; /** * org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl * Friday, March 1, 2013 3:32:42 AM PST */ abstract public class ObjectAlreadyActiveHelper { private static String _id = "IDL:omg.org/PortableServer/POA/ObjectAlreadyActive:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.PortableServer.POAPackage.ObjectAlreadyActive that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.PortableServer.POAPackage.ObjectAlreadyActive extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.PortableServer.POAPackage.ObjectAlreadyActiveHelper.id (), "ObjectAlreadyActive", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.PortableServer.POAPackage.ObjectAlreadyActive read (org.omg.CORBA.portable.InputStream istream) { org.omg.PortableServer.POAPackage.ObjectAlreadyActive value = new org.omg.PortableServer.POAPackage.ObjectAlreadyActive (); // read and discard the repository ID istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.POAPackage.ObjectAlreadyActive value) { // write the repository ID ostream.write_string (id ()); } }
{ "content_hash": "886fcadab14c210d90e800c6a3334b3f", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 171, "avg_line_length": 32.40277777777778, "alnum_prop": 0.6746678096870982, "repo_name": "haikuowuya/android_system_code", "id": "7db5482640b979df4bc7465b482258439a28b65c", "size": "2333", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "182432" }, { "name": "Java", "bytes": "124952631" } ], "symlink_target": "" }
class RemoveTriesFromEmailSignupEntry < ActiveRecord::Migration def change remove_column :email_signup_entries, :tries end end
{ "content_hash": "05f2b541fc7c1aa786915071a0eaa52e", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 63, "avg_line_length": 27, "alnum_prop": 0.7925925925925926, "repo_name": "shageman/cbratools", "id": "3649bb69f856c562ecc90d0252da91e9d35803b8", "size": "135", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "sample_app_for_rnc_specs/original/the_next_big_thing/components/email_signup/db/migrate/20130403220851_remove_tries_from_email_signup_entry.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "8620" }, { "name": "HTML", "bytes": "20118" }, { "name": "JavaScript", "bytes": "29850" }, { "name": "Ruby", "bytes": "163071" }, { "name": "Shell", "bytes": "5258" } ], "symlink_target": "" }
class Milestones < ActiveRecord::Migration def self.up create_table :milestones do |t| t.decimal :value t.date :date t.datetime :created_at t.datetime :updated_at end add_column :indicator_histories, :goal, :decimal end def self.down remove_column :indicator_histories, :goal drop_table :milestones end end
{ "content_hash": "7e047324202b860b630f1545ce50f634", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 52, "avg_line_length": 20.38888888888889, "alnum_prop": 0.6566757493188011, "repo_name": "gabriprat/hoshinplan", "id": "a4d2f9a8f59f6edc26372a91ba056cf0e53c2f6e", "size": "367", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/migrate/20130517161217_milestones.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "62049" }, { "name": "CoffeeScript", "bytes": "31432" }, { "name": "Dockerfile", "bytes": "390" }, { "name": "HTML", "bytes": "60079" }, { "name": "JavaScript", "bytes": "824053" }, { "name": "Less", "bytes": "48" }, { "name": "Procfile", "bytes": "456" }, { "name": "Ruby", "bytes": "1052825" }, { "name": "SCSS", "bytes": "413443" }, { "name": "Shell", "bytes": "2206" }, { "name": "Slim", "bytes": "1639" } ], "symlink_target": "" }
const { EventEmitter } = require('events') const { expect } = require('code') const Lab = require('lab') const Proxyquire = require('proxyquire') const Sinon = require('sinon') let ClientStub = {} let S3Stub = {} const SendToS3 = Proxyquire('../src/sendToS3', { 's3': S3Stub }) const { beforeEach, describe, it } = exports.lab = Lab.script() describe('src/sendToS3', () => { let datetime, emitter, options beforeEach((done) => { datetime = new Date() emitter = new EventEmitter() ClientStub.uploadFile = Sinon.stub().returns(emitter) S3Stub.createClient = Sinon.stub().returns(ClientStub) options = { accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey', bucket: 'bucket', output: process.cwd(), datetime } done() }) it('builds s3 options', (done) => { const uploaderOptions = { localFile: `${process.cwd()}/${datetime}.tar.gz`, s3Params: { Bucket: 'bucket', Key: `${datetime}.tar.gz`, ACL: 'private' } } const s3Options = { s3RetryCount: 3, s3Options: { accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey' } } SendToS3(options)(() => { expect(S3Stub.createClient.calledWith(s3Options)).to.be.true() expect(ClientStub.uploadFile.calledWith(uploaderOptions)).to.be.true() done() }) emitter.emit('end') }) it('uses options.retry if supplied', (done) => { options.retry = 10 const uploaderOptions = { localFile: `${process.cwd()}/${datetime}.tar.gz`, s3Params: { Bucket: 'bucket', Key: `${datetime}.tar.gz`, ACL: 'private' } } const s3Options = { s3RetryCount: 10, s3Options: { accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey' } } SendToS3(options)(() => { expect(S3Stub.createClient.calledWith(s3Options)).to.be.true() expect(ClientStub.uploadFile.calledWith(uploaderOptions)).to.be.true() done() }) emitter.emit('end') }) it('has a handler for progress emission', (done) => { SendToS3(options)(done) emitter.emit('progress') emitter.emit('end') }) it('yields an error when emitted', (done) => { const errMessage = new Error('emitter error') SendToS3(options)((err) => { expect(err).to.equal(err) done() }) emitter.emit('error', errMessage) }) })
{ "content_hash": "660dc3459e80d03b73b3dcd1f82de7c3", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 76, "avg_line_length": 23.71153846153846, "alnum_prop": 0.5916463909164639, "repo_name": "theworkflow/s3-mongodump", "id": "d959e741d07fd9e66876c26e6f4465796dd0accf", "size": "2466", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/sendToS3.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "17501" } ], "symlink_target": "" }
require "bump/dependency" require "bump/file_parsers/base" require "bump/file_fetchers/java_script/yarn" require "bump/shared_helpers" module Bump module FileParsers module JavaScript class Yarn < Bump::FileParsers::Base def parse dependency_versions.map do |dep| Dependency.new( name: dep["name"], version: dep["version"], package_manager: "yarn" ) end end private def dependency_versions SharedHelpers.in_a_temporary_directory do |dir| File.write(File.join(dir, "package.json"), package_json.content) File.write(File.join(dir, "yarn.lock"), yarn_lock.content) SharedHelpers.run_helper_subprocess( command: "node #{js_helper_path}", function: "parse", args: [dir] ) end end def js_helper_path project_root = File.join(File.dirname(__FILE__), "../../../..") File.join(project_root, "helpers/javascript/bin/run.js") end def required_files Bump::FileFetchers::JavaScript::Yarn.required_files end def package_json @package_json ||= get_original_file("package.json") end def yarn_lock @yarn_lock ||= get_original_file("yarn.lock") end end end end end
{ "content_hash": "6fc0dce1d8038639089fe71ac63c0369", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 76, "avg_line_length": 26.462962962962962, "alnum_prop": 0.5507347795661302, "repo_name": "gocardless/bump-core", "id": "b8c1a3f0a5f4e62d96702a12ec3e54a18832226a", "size": "1459", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/bump/file_parsers/java_script/yarn.rb", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "11434" }, { "name": "PHP", "bytes": "7310" }, { "name": "Ruby", "bytes": "141206" }, { "name": "Shell", "bytes": "405" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace EESLP.Backend.Gateway.API.Enums { public enum ScriptInstanceStatus { Completed, Running, Created, CompletedWithError, CompletedWithWarning, Aborted, Timeout } }
{ "content_hash": "9c44a84515ece93ca8b9161445b2f750", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 41, "avg_line_length": 18.77777777777778, "alnum_prop": 0.6538461538461539, "repo_name": "andiexer/EagleEye-ScriptLogPlatform", "id": "5d2500dced83ded9535291962d4effe32513d911", "size": "340", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/Backend/Gateway.API/Enums/ScriptInstanceStatus.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "174261" }, { "name": "CSS", "bytes": "3714" }, { "name": "HTML", "bytes": "27994" }, { "name": "JavaScript", "bytes": "125538" }, { "name": "PowerShell", "bytes": "7012" }, { "name": "Shell", "bytes": "187" }, { "name": "TypeScript", "bytes": "86210" } ], "symlink_target": "" }
<html> <head> <title>Converting between JSON and XML</title> <link href="styles.css" rel="stylesheet" type="text/css" /> <link href="custom.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="control"> <span class="productTitle">Json.NET - Quick Starts & API Documentation</span><br /> <span class="topicTitle">Converting between JSON and XML</span></div> <div id="content"> <span style="color: DarkGray"> </span> <p>Json.NET supports converting JSON to XML and vice versa using the <a href="./html/T_Newtonsoft_Json_Converters_XmlNodeConverter.htm">XmlNodeConverter</a>.</p> <p> Elements, attributes, text, comments, character data, processing instructions, namespaces and the XML declaration are all preserved when converting between the two. The only caveat is that it is possible to lose the order of differently named nodes at the same level when they are grouped together into an array.</p> <h3>Conversion Rules</h3> <ul> <li>Elements remain unchanged. </li> <li>Attributes are prefixed with an @. </li> <li>Single child text nodes are a value directly against an element, otherwise they are accessed via #text. </li> <li>The XML declaration and processing instructions are prefixed with ?. </li> <li>Charater data, comments, whitespace and significate whitespace nodes are accessed via #cdata-section,&nbsp;#comment, #whitespace and #significate-whitespace respectively. </li> <li>Multiple nodes with the same name at the same level are grouped together into an array. </li> <li>Empty elements are null.</li> </ul> <h3>SerializeXmlNode</h3> <p>The JsonConvert has two helper methods for converting between JSON and XML. The first is <a href="./html/M_Newtonsoft_Json_JsonConvert_SerializeXmlNode.htm">SerializeXmlNode</a>. This method takes an XmlNode and serializes it to JSON text.</p> <div class="overflowpanel"> <div class="code"> <div style="font-family: Courier New; font-size: 10pt; color: black;"> <pre style="margin: 0px;"><span style="color: blue;">string</span> xml = <span style="color: #a31515;">@&quot;&lt;?xml version=&quot;&quot;1.0&quot;&quot; standalone=&quot;&quot;no&quot;&quot;?&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&lt;root&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;person id=&quot;&quot;1&quot;&quot;&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;name&gt;Alan&lt;/name&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;url&gt;http://www.google.com&lt;/url&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;/person&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;person id=&quot;&quot;2&quot;&quot;&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;name&gt;Louis&lt;/name&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;url&gt;http://www.yahoo.com&lt;/url&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &lt;/person&gt;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&lt;/root&gt;&quot;</span>;</pre> <pre style="margin: 0px;">&nbsp;</pre> <pre style="margin: 0px;"><span style="color: #2b91af;">XmlDocument</span> doc = <span style="color: blue;">new</span> <span style="color: #2b91af;">XmlDocument</span>();</pre> <pre style="margin: 0px;">doc.LoadXml(xml);</pre> <pre style="margin: 0px;">&nbsp;</pre> <pre style="margin: 0px;"><span style="color: blue;">string</span> jsonText = <span style="color: #2b91af;">JsonConvert</span>.SerializeXmlNode(doc);</pre> <pre style="margin: 0px;"><span style="color: green;">//{</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &quot;?xml&quot;: {</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &quot;@version&quot;: &quot;1.0&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &quot;@standalone&quot;: &quot;no&quot;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; },</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &quot;root&quot;: {</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &quot;person&quot;: [</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; {</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; &nbsp; &quot;@id&quot;: &quot;1&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; &nbsp; &quot;name&quot;: &quot;Alan&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; &nbsp; &quot;url&quot;: &quot;http://www.google.com&quot;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; },</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; {</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; &nbsp; &quot;@id&quot;: &quot;2&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; &nbsp; &quot;name&quot;: &quot;Louis&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; &nbsp; &quot;url&quot;: &quot;http://www.yahoo.com&quot;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; &nbsp; }</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; &nbsp; ]</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp; }</span></pre> <pre style="margin: 0px;"><span style="color: green;">//}</span></pre> </div> </div> </div> <h3>DeserializeXmlNode</h3> <p>The second helper method on JsonConvert is <a href="./html/M_Newtonsoft_Json_JsonConvert_DeserializeXmlNode.htm">DeserializeXmlNode</a>. This method takes JSON text and deserializes it into a XmlNode.</p> <p>Because valid XML must have one root element the JSON passed to DeserializeXmlNode should have one property in the root JSON object. If the root JSON object has multiple properties then the overload that also takes an element name should be used. A root element with that name will be inserted into the deserialized XmlNode.</p> <div class="overflowpanel"> <div class="code"> <div style="font-family: Courier New; font-size: 10pt; color: black;"> <pre style="margin: 0px;"><span style="color: blue;">string</span> json = <span style="color: #a31515;">@&quot;{</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &quot;&quot;?xml&quot;&quot;: {</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &quot;&quot;@version&quot;&quot;: &quot;&quot;1.0&quot;&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &quot;&quot;@standalone&quot;&quot;: &quot;&quot;no&quot;&quot;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; },</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &quot;&quot;root&quot;&quot;: {</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &quot;&quot;person&quot;&quot;: [</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; {</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;@id&quot;&quot;: &quot;&quot;1&quot;&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;name&quot;&quot;: &quot;&quot;Alan&quot;&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;url&quot;&quot;: &quot;&quot;http://www.google.com&quot;&quot;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; },</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; {</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;@id&quot;&quot;: &quot;&quot;2&quot;&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;name&quot;&quot;: &quot;&quot;Louis&quot;&quot;,</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;url&quot;&quot;: &quot;&quot;http://www.yahoo.com&quot;&quot;</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; &nbsp; }</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; &nbsp; ]</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">&nbsp; }</span></pre> <pre style="margin: 0px;"><span style="color: #a31515;">}&quot;</span>;</pre> <pre style="margin: 0px;">&nbsp;</pre> <pre style="margin: 0px;"><span style="color: #2b91af;">XmlDocument</span> doc = (<span style="color: #2b91af;">XmlDocument</span>)<span style="color: #2b91af;">JsonConvert</span>.DeserializeXmlNode(json);</pre> <pre style="margin: 0px;"><span style="color: green;">// &lt;?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">// &lt;root&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;person id=&quot;1&quot;&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;name&gt;Alan&lt;/name&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;url&gt;http://www.google.com&lt;/url&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;/person&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;person id=&quot;2&quot;&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;name&gt;Louis&lt;/name&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;url&gt;http://www.yahoo.com&lt;/url&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">//&nbsp;&nbsp; &lt;/person&gt;</span></pre> <pre style="margin: 0px;"><span style="color: green;">// &lt;/root&gt;</span></pre> </div> </div> </div> <div id="footer"></div> </div> </body> </html>
{ "content_hash": "3f411c2b9bde62649b9aac9ac880e673", "timestamp": "", "source": "github", "line_count": 146, "max_line_length": 211, "avg_line_length": 74.06849315068493, "alnum_prop": 0.6377843536156834, "repo_name": "alexgit/GitShout", "id": "38cedfa77bc5e54aa172ff8f1534cba7c770339d", "size": "10814", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "lib/Newtonsoft.JSON/Source/Doc/ConvertingJSONandXML.html", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "1941831" }, { "name": "CSS", "bytes": "6408" }, { "name": "JavaScript", "bytes": "1636" }, { "name": "PowerShell", "bytes": "39848" }, { "name": "Shell", "bytes": "155" } ], "symlink_target": "" }
#include <vector> #include "common/filesystem.h" #include "common/config.h" #include "examples/iris/helper.cpp" #include "marian.h" using namespace marian; using namespace data; // Constants for Iris example const size_t MAX_EPOCHS = 200; // Function creating feedforward dense network graph Expr buildIrisClassifier(Ptr<ExpressionGraph> graph, std::vector<float> inputData, std::vector<IndexType> outputData = {}, bool train = false) { // The number of input data int N = inputData.size() / NUM_FEATURES; graph->clear(); // Define the input layer auto x = graph->constant({N, NUM_FEATURES}, inits::fromVector(inputData)); // Define the hidden layer auto W1 = graph->param("W1", {NUM_FEATURES, 5}, inits::uniform(-0.1f, 0.1f)); auto b1 = graph->param("b1", {1, 5}, inits::zeros()); auto h = tanh(affine(x, W1, b1)); // Define the output layer auto W2 = graph->param("W2", {5, NUM_LABELS}, inits::uniform(-0.1f, 0.1f)); auto b2 = graph->param("b2", {1, NUM_LABELS}, inits::zeros()); auto o = affine(h, W2, b2); if(train) { auto y = graph->indices(outputData); /* Define cross entropy cost on the output layer. * It can be also defined directly as: * -mean(sum(logsoftmax(o) * y, axis=1), axis=0) * But then `y` requires to be a one-hot-vector, i.e. [0,1,0, 1,0,0, 0,0,1, * ...] instead of [1, 0, 2, ...]. */ auto cost = mean(cross_entropy(o, y), /*axis =*/ 0); return cost; } else { auto preds = logsoftmax(o); return preds; } } int main() { // Initialize global settings createLoggers(); // Disable randomness by setting a fixed seed for random number generator Config::seed = 123456; // Get path do data set std::string dataPath = (filesystem::Path(std::string(__FILE__)).parentPath() / filesystem::Path(std::string("iris.data"))).string(); // Read data set (all 150 examples) std::vector<float> trainX; std::vector<IndexType> trainY; readIrisData(dataPath, trainX, trainY); // Split shuffled data into training data (120 examples) and test data (rest // 30 examples) shuffleData(trainX, trainY); std::vector<float> testX(trainX.end() - 30 * NUM_FEATURES, trainX.end()); trainX.resize(120 * NUM_FEATURES); std::vector<IndexType> testY(trainY.end() - 30, trainY.end()); trainY.resize(120); { // Create network graph auto graph = New<ExpressionGraph>(); // Set general options #ifdef CUDA_FOUND auto deviceType = DeviceType::gpu; #else auto deviceType = DeviceType::cpu; #endif graph->setDevice({0, deviceType}); graph->reserveWorkspaceMB(128); // Choose optimizer (Sgd, Adagrad, Adam) and initial learning rate auto opt = Optimizer<Adam>(0.005); for(size_t epoch = 1; epoch <= MAX_EPOCHS; ++epoch) { // Shuffle data in each epochs shuffleData(trainX, trainY); // Build classifier auto cost = buildIrisClassifier(graph, trainX, trainY, true); // Train classifier and update weights graph->forward(); graph->backward(); opt->update(graph); if(epoch % 10 == 0) std::cout << "Epoch: " << epoch << " Cost: " << cost->scalar() << std::endl; } // Build classifier with test data auto probs = buildIrisClassifier(graph, testX); // Print probabilities for debugging. The `debug` function has to be called // prior to computations in the network. // debug(probs, "Classifier probabilities") // Run classifier graph->forward(); // Extract predictions std::vector<float> preds(testY.size()); probs->val()->get(preds); std::cout << "Accuracy: " << calculateAccuracy(preds, testY) << std::endl; } return 0; }
{ "content_hash": "c395f1ff4b1f941aa7a66731c64d9f0d", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 117, "avg_line_length": 29.640625, "alnum_prop": 0.6265155508697944, "repo_name": "emjotde/amunn", "id": "328a4dfaec70b1a27bf5c2e463a24a92866cf4d5", "size": "3794", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/examples/iris/iris.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "93" }, { "name": "C++", "bytes": "396947" }, { "name": "CMake", "bytes": "2614" }, { "name": "Cuda", "bytes": "27337" }, { "name": "Objective-C", "bytes": "2923" }, { "name": "Perl", "bytes": "7272" }, { "name": "Python", "bytes": "197" } ], "symlink_target": "" }
<div class="section-catalog"> <div class="widget-table-wrapper"> <div class="widget-table-title"> <h4 class="product-table-icon"><?php echo $lang['TITLE_PRODUCTS'];?></h4> <p class="produc-count"><?php echo $lang['ALL_COUNT_PRODUCT']; ?> : <strong><?php echo $productsCount ?></strong> <?php echo $lang['UNIT'];?></p> <div class="clear"></div> </div> <!-- Тут начинается Верстка таблицы товаров --> <div class="widget-table-body"> <div class="widget-table-action"> <div class="add-new-button tool-tip-top" title="<?php echo $lang['T_TIP_CREATE_PROD'];?>"><span><?php echo $lang['ADD_NEW_PRODUCT'];?></span></div> <a href="javascript:void(0);" class="show-filters tool-tip-top" title="<?php echo $lang['T_TIP_SHOW_FILTER'];?>"><span><?php echo $lang['FILTER'];?></span></a> <a href="<?php echo SITE ?>/mg-admin?csv=1" class="get-csv tool-tip-top" title="<?php echo $lang['T_TIP_PRODUCT_CSV'];?>"><span><?php echo $lang['IN_CSV'];?></span></a> <a href="javascript:void(0);" class="import-csv tool-tip-top custom-btn" title="<?php echo $lang['PROD_FROM_CSV'];?>"><span><?php echo $lang['PROD_FROM_CSV'];?></span></a> <a href="javascript:void(0);" class="get-yml-market tool-tip-top" title="<?php echo $lang['T_TIP_UPLOAD_YA'];?>"><span><?php echo $lang['PROD_UPLOAD_YA'];?></span></a> <div class="filter" > <span class="last-items"><?php echo $lang['SHOW_PRODUCT_COUNT'];?></span> <select class="last-items-dropdown countPrintRowsProduct"> <?php foreach(array(10, 20, 50, 100) as $value){ $selected = ''; if($value == $countPrintRowsProduct){ $selected = 'selected="selected"'; } echo '<option value="'.$value.'" '.$selected.' >'.$value.'</option>'; } ?> </select> </div> <input type="text" name="search" value="<?php echo $lang['FIND'];?>..." onfocus="if (this.value == '<?php echo $lang['FIND'];?>...') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php echo $lang['FIND'];?>...';}" class="custom-input search-input"/> <a href="#" class="searchProd tool-tip-top" title="<?php echo $lang['FIND'];?>"></a> <div class="clear"></div> </div> <div class="filter-container" <?php if($displayFilter){echo "style='display:block'";} ?>> <div class="select"> <span class="label-field"> <?php echo $lang['CATEGORIES'] ?> :</span> <select name="cat_id" class="last-items-dropdown"> <?php foreach ($listCategory as $value => $text) { $selected = ($_REQUEST['cat_id']."" === $value."") ? 'selected="selected"' : ''; $html .= '<option value="'.$value.'" '.$selected.'>'.$text.'</option>'; } $html .= '</select>'; $checked = ''; if ($_REQUEST['insideCat']==="true"||empty($_REQUEST['insideCat'])) { $checked = 'checked=checked'; } $html .= '<div class="checkbox"><label>'.$lang['FILTR_PRICE7'].'<input type="checkbox" name="insideCat" '.$checked.' /></label></div>'; echo $html; ?> </div> <?php echo $filter ?> <div class="clear"></div> </div> <div class="import-container"> <div class="message-importing"></div> <div class="process"> </div> <div class="block-upload-сsv"> <span><?php echo $lang['CSV_TYPE_UPLOAD'];?>:</span> <select name='importType'> <option value="MogutaCMS">MogutaCMS</option> <option value="MogutaCMSUpdate">MogutaCMS [обновление цен и остатков]</option> </select> <a href="<?php echo SITE?>/mg-admin?examplecsv=1" class="get-example-csv view-MogutaCMS example-csv" ><?php echo $lang['EXAMPLE_CATALOG_CSV'];?></a> <a href="<?php echo SITE?>/mg-admin?examplecsvupdate=1" class="get-example-csv-update view-MogutaCMSUpdate example-csv" style="display:none">Скачать пример файла для обновления цен и остатков</a> <form method="post" noengine="true" enctype="multipart/form-data" class="upload-csv-form"> <span><?php echo $lang['UPLOAD'];?></span> <input type="file" name="upload" class="" title="<?php echo $lang['CSV_UPLOAD_FILE'];?>"/> </form> </div> <div class="block-importer"> <div class="repeat-upload-file"><a href="javascript:void(0);" class="repeat-upload-csv" title="Отменить"></a></div> <div class="cancel-importing"><a href="javascript:void(0);" class="cancel-import custom-btn"><span><?php echo $lang['BREAK_UPLOAD_CSV'];?></span></a></div> <div class="delete-all-products-btn"><input type="checkbox" name="no-merge" class="" title="<?php echo $lang['CLEAR_BEFORE_CSV'];?>" value="false"><?php echo $lang['DEL_ALL_PROD'];?></div> <a href="javascript:void(0);" class="start-import custom-btn"><span><?php echo $lang['BEGIN_UPLOAD_CSV'];?></span></a> </div> <div class="clear"></div> </div> <div class="main-settings-container"> <table class="widget-table product-table"> <thead> <tr> <th class="checkbox-cell"><input type="checkbox" name="product-check"></th> <th class="id-product"><a href="javascript:void(0);" class="field-sorter <?php echo ($sorterData[0]=="id") ? 'sort-dir-'.$sorterData[3]:'sort-dir-asc' ?>" data-sort="<?php echo ($sorterData[0]=="id") ? $sorterData[1]*(-1) : 1 ?>" data-field="id">№</a></th> <th class="prod-cat"><a href="javascript:void(0);" class="field-sorter <?php echo ($sorterData[0]=="cat_id") ? 'sort-dir-'.$sorterData[3]:'sort-dir-asc' ?>" data-sort="<?php echo ($sorterData[0]=="cat_id") ? $sorterData[1]*(-1) : 1?>" data-field="cat_id"><?php echo $lang['CAT_PRODUCT'];?></a></th> <th class="product-picture"><?php echo $lang['IMAGE'];?></th> <th class="prod-name" class="product-name "><a href="javascript:void(0);" class="field-sorter <?php echo ($sorterData[0]=="title") ? 'sort-dir-'.$sorterData[3]:'sort-dir-asc' ?>" data-sort="<?php echo ($sorterData[0]=="title")? $sorterData[1]*(-1) : 1?>" data-field="title"><?php echo $lang['NAME_PRODUCT'];?></a></th> <th class="prod-price"><a href="javascript:void(0);" class="field-sorter <?php echo ($sorterData[0]=="price") ? 'sort-dir-'.$sorterData[3]:'sort-dir-asc' ?>" data-sort="<?php echo ($sorterData[0]=="price") ? $sorterData[1]*(-1) : 1 ?>" data-field="price"><?php echo $lang['PRICE_PRODUCT'];?></a></th> <th class="rest"><a href="javascript:void(0);" class="field-sorter <?php echo ($sorterData[0]=="count") ? 'sort-dir-'.$sorterData[3]:'sort-dir-asc' ?>" data-sort="<?php echo ($sorterData[0]=="count") ? $sorterData[1]*(-1) : 1 ?>" data-field="count"><?php echo $lang['REMAIN'];?></a></th> <th class="actions"><?php echo $lang['ACTIONS'];?></th> </tr> </thead> <tbody class="product-tbody"> <?php if(!empty($catalog)){ // viewData($catalog); $currencyShort = MG::getSetting('currencyShort'); $currencyShopIso = MG::getSetting('currencyShopIso'); $currency = MG::getSetting('currency'); foreach($catalog as $data){ $data['currency_iso'] = $data['currency_iso']?$data['currency_iso']:$currencyShopIso; ?> <tr id="<?php echo $data['id'] ?>" data-id="<?php echo $data['id'] ?>" class="product-row"> <td class="check-align"><input type="checkbox" name="product-check"></td> <td class="id"><?php echo $data['id'] ?></td> <td id="<?php echo $data['cat_id'] ?>" class="cat_id"> <?php $path = (strpos($data['category_url'], '/')) ? '<a class="parentCat tool-tip-bottom" title="" style="cursor:pointer;">../</a>' : '' ; ?> <?php echo $listCategories[$data['cat_id']] ? $path.$listCategories[$data['cat_id']]:'Категория удалена'; ?></td> <td class="product-picture image_url"> <?php $imagesUrl = explode("|", $data['image_url']); $src = SITE.'/mg-admin/design/images/no-img.png'; if(!empty($imagesUrl[0])){ if(file_exists(URL::$documentRoot.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'thumbs'.DIRECTORY_SEPARATOR.'30_'.$imagesUrl[0])){ $src = SITE.'/uploads/thumbs/30_'.$imagesUrl[0]; } } ?> <img class="uploads" src="<?php echo $src ?>"/> </td> <td class="name" ><?php echo $data['title'] ?><a class="link-to-site tool-tip-bottom" title="<?php echo $lang['PRODUCT_VIEW_SITE'];?>" href="<?php echo SITE?>/<?php echo $data['category_url']?$data['category_url']:'catalog'?>/<?php echo $data['product_url']?>" target="_blank" ><img src="<?php echo SITE?>/mg-admin/design/images/icons/link.png" alt="" /></a></td> <?php $printPrice = false;?> <td class="price"> <table class="variant-row-table"> <?php if($data['price']!=MG::numberFormat($data['real_price'])&&empty($data['variants'])):?> <?php $printPrice = true;?> <tr> <td colspan="3"> <span class="view-price tool-tip-bottom" data-productId="<?php echo $data['id']?>" style="color: <?php echo ($data['price']>$data['real_price'])?'#1C9221':'#B42020';?>;" title="с учетом скидки/наценки"><?php echo MG::priceCourse($data['price_course']).' '.$currency?></span> <div class="clear"></div> </td> </tr> <?php endif;?> <?php if(!empty($data['variants'])){ foreach ($data['variants'] as $item) { ?> <tr> <td colspan="3"> <?php if ($item['price']!=$item['price_course']): ?> <span class="view-price tool-tip-bottom" data-productId="<?php echo $item['id']?>" style="color: <?php echo ($item['price']<$item['price_course'])?'#1C9221':'#B42020';?>;" title="с учетом скидки/наценки"><?php echo MG::priceCourse($item['price_course']).' '.$currency?></span> <div class="clear"></div> <?php endif;?> </td> </tr> <?php $printPrice = true; echo ' <tr><td><span class="price-help">'.$item['title_variant'].'</span></td><td><input style="width: 45px;" class="variant-price fastsave" type="text" value="'.$item['price'].'" data-packet="{variant:1,id:'.$item['id'].',field:\'price\'}"/></td><td>'.$currencyShort[$data['currency_iso']].'<div class="clear"></div></td></tr>'; } }else{ echo ' <tr><td></td><td><input style="width: 45px;" type="text" value="'.$data['real_price'].'" class="fastsave" data-packet="{variant:0,id:'.$data['id'].',field:\'price\'}"/></td><td> '. $currencyShort[$data['currency_iso']].'</td></tr>'; }?> </table> </td> <td class="count"> <?php if($printPrice){ $margin ='margin-top:14px;'; } if(!empty($data['variants'])){ foreach ($data['variants'] as $item) { echo '<input style="width: 25px; '.$margin.'" class="variant-count fastsave" type="text" value="'.($item['count']<0?'&#8734;':$item['count']).'" data-packet="{variant:1,id:'.$item['id'].',field:\'count\'}"/> '.$lang['UNIT'].'<div class="clear"></div>'; } }else{ echo '<input style="width: 25px; '.$margin.'" type="text" value="'.($data['count']<0?'&#8734;':$data['count']).'" class="fastsave" data-packet="{variant:0,id:'.$data['id'].',field:\'count\'}"/> '.$lang['UNIT']; }?> </td> <td class="actions"> <ul class="action-list"> <li class="edit-row" id="<?php echo $data['id'] ?>"><a class="tool-tip-bottom" href="javascript:void(0);" title="<?php echo $lang['EDIT'];?>"></a></li> <li class="new tool-tip-bottom <?php echo ($data['new'])?'active':''?>" data-id="<?php echo $data['id'] ?>" title="<?php echo ($data['new'])? $lang['PRINT_IN_NEW']:$lang['PRINT_NOT_IN_NEW'];?>"><a href="javascript:void(0);"></a></li> <li class="recommend tool-tip-bottom <?php echo ($data['recommend'])?'active':''?>" data-id="<?php echo $data['id'] ?>" title="<?php echo ($data['recommend'])? $lang['PRINT_IN_RECOMEND']:$lang['PRINT_NOT_IN_RECOMEND'];?>"><a href="javascript:void(0);"></a></li> <li class="clone-row" id="<?php echo $data['id'] ?>"><a class="tool-tip-bottom" href="javascript:void(0);" title="<?php echo $lang['CLONE'];?>"></a></li> <li class="visible tool-tip-bottom <?php echo ($data['activity'])?'active':''?>" data-id="<?php echo $data['id'] ?>" title="<?php echo ($data['activity'])? $lang['ACT_V_PROD']:$lang['ACT_UNV_PROD'];?>"><a href="javascript:void(0);"></a></li> <li class="delete-order " id="<?php echo $data['id'] ?>"><a class="tool-tip-bottom" href="javascript:void(0);" title="<?php echo $lang['DELETE'];?>"></a></li> </ul> </td> </tr> <?php } }else{ ?> <tr class="no-results"><td colspan="10"><?php echo $lang['PROD_NONE']?></td></tr> <?php }?> </tbody> </table> </div> <select name="operation" class="product-operation"> <option value="activity_0"><?php echo $lang['ACTION_PROD_1']?></option> <option value="activity_1"><?php echo $lang['ACTION_PROD_2']?></option> <option value="recommend_1"><?php echo $lang['ACTION_PROD_3']?></option> <option value="recommend_0"><?php echo $lang['ACTION_PROD_4']?></option> <option value="new_1"><?php echo $lang['ACTION_PROD_5']?></option> <option value="new_0"><?php echo $lang['ACTION_PROD_6']?></option> <option value="clone"><?php echo $lang['ACTION_PROD_7']?></option> <option value="getcsv"><?php echo $lang['ACTION_PROD_8']?></option> <option value="getyml"><?php echo $lang['ACTION_PROD_9']?></option> <?php foreach (MG::getSetting('currencyShort') as $iso => $short):?> <option value="changecur_<?php echo $iso; ?>">Пересчитать валюту в <?php echo $iso; ?></option> <?php endforeach; ?> <option value="delete"><?php echo $lang['DELL_SELECTED_PROD']?></option> </select> <a href="javascript:void(0);" class="run-operation custom-btn"><span><?php echo $lang['ACTION_RUN']?></span></a> <?php echo $pagination ?> <div class="clear"></div> </div> <!-- Тут заканчивается Верстка таблицы товаров --> <!-- Тут начинается Верстка модального окна --> <div class="b-modal hidden-form" id="add-product-wrapper"> <div class="product-table-wrapper"> <div class="widget-table-title"> <h4 class="add-product-table-icon"><?php echo $lang['ADD_PRODUCT'];?></h4> <div class="b-modal_close tool-tip-bottom" title="<?php echo $lang['T_TIP_CLOSE_MODAL'];?>"></div> </div> <div class="widget-table-body"> <div class="add-product-form-wrapper"> <div class="add-img-form"> <div class="images-block"> <p class="add-img-text"><?php echo $lang['IMAGE_PRODUCT']?></p> <div class="prod-gallery"> <div class="small-img-wrapper"></div> </div> <div class="controller-gallery"> <a href="javascript:void(0);" class="add-image"><span><?php echo $lang['ADD_IMG'];?></span></a> </div> <div class="clear"></div> </div> <div class="product-text-inputs"> <label for="title"><span class="custom-text"><?php echo $lang['NAME_PRODUCT'];?>:</span><input style="width:248px;" type="text" name="title" class="product-name-input tool-tip-right" title="<?php echo $lang['T_TIP_NAME_PROD'];?>" ><div class="errorField"><?php echo $lang['ERROR_SPEC_SYMBOL'];?></div> <input type="hidden" name="link_electro" class="product-name-input"> <a href="javascript:void(0);" class="add-link-electro">Добавить ссылку на электронный товар</a> <a href="javascript:void(0);" class="del-link-electro">Удалить</a> </label> <label><span class="custom-text"><?php echo $lang['URL_PRODUCT'];?>:</span><input style="width:248px;" type="text" name="url" class="product-name-input tool-tip-right" title="<?php echo $lang['T_TIP_URL_PRODUCT'];?>"><div class="errorField"><?php echo $lang['ERROR_EMPTY'];?></div></label> <div class="category-filter"> <span class="custom-text"><?php echo $lang['CAT_PRODUCT'];?>:<a href="javascript:void(0);" class="add-category"><span>+</span></a></span> <select style="width:270px;" class="last-items-dropdown custom-dropdown tool-tip-right" title="<?php echo $lang['T_TIP_CAT_PROD'];?>" id="productCategorySelect" name="cat_id"> <option selected="selected" value="0"><?php echo $lang['ALL'];?></option> <?php echo $categoriesOptions ?> </select> </div> <div class="inside-category" style="display:none"> <span class="custom-text"><?php echo $lang['PROD_VIEW_IN_CAT'];?>:</span> <select class ="tool-tip-top" title="<?php echo $lang['T_TIP_SELECTED_U_CAT'];?>" name="inside_cat" multiple size="4"> <?php echo $categoriesOptions ?> </select> <div class="clear"></div> <a href="javascript:void(0);" class="clear-select-cat"><span><?php echo $lang['PROD_CLEAR_CAT'];?></span></a> <a href="javascript:void(0);" class="full-size-select-cat closed-select-cat"><span><?php echo $lang['PROD_OPEN_CAT'];?></span></a> </div> <div class="select-currency-block" style="display:none"> <div class="currency-block"> <div class="add-product-field"> <span>Выберите валюту:</span> <select name="currency_iso" class="product-name-input"> <?php $currencyShort = MG::getSetting('currencyShort'); $currencyRate = MG::getSetting('currencyRate'); foreach ($currencyShort as $iso => $short):?> <option value="<?php echo $iso; ?>" data-rate="<?php echo $currencyRate[$iso]; ?>"><?php echo $short; ?></option> <?php endforeach; ?> </select> </div> <a class="apply-currency fl-right custom-btn" href="javascript:void(0);"><span>Применить</span></a> <div class="clear"></div> </div> </div> <div class="variant-table-wrapper"> <table class='variant-table'> </table> <a href="javascript:void(0);" class="add-position"><span><?php echo $lang['ADD_VARIANT'];?></span></a> </div> </div> <!--Блок для редактирования галереии продуктов--> <div class="userField"></div> <div class="product-desc-wrapper"> <span class="custom-text" style="margin-bottom: 10px;"><?php echo $lang['DESCRIPTION_PRODUCT'];?>:</span> <div style="background:#FFF"> <textarea class="product-desc-field" name="html_content" style="width:821px;"></textarea> </div> </div> <div class="add-related-product-block"> <div class="add-related-button-wrapper"> <a class="add-related-product tool-tip-bottom" href="javascript:void(0);" title="<?php echo $lang['RELATED_6'];?>"><?php echo $lang['RELATED_5'];?><span class="add-icon"></span></a> <div class="select-product-block"> <div class="search-block"> <div class="add-product-field"> <span><?php echo $lang['PROD_ADD_RELATE'];?>: </span> <input type="text" autocomplete="off" name="searchcat" class="search-field" placeholder="<?php echo $lang['RELATED_7'];?>" > <div class="errorField" style="display: none;"><?php echo $lang['RELATED_1'];?></div> </div> <div class="example-line"><?php echo $lang['RELATED_2'];?>: <a href="javascript:void(0)" class="example-find" ><?php echo $exampleName?></a></div> <div class="fastResult"></div> <a class="cancel-add-related custom-btn" href="javascript:void(0);"><span><?php echo $lang['RELATED_3'];?></span></a> <a class="random-add-related custom-btn" href="javascript:void(0);"><span>Случайный товар</span></a> <div class="clear"></div> </div> </div> </div> <div class="related-wrapper"> <div class="added-related-product-block"> <a class="add-related-product in-block-message" href="javascript:void(0);"><span><?php echo $lang['RELATED_4'];?></span></a> <div class="clear"></div> </div> </div> </div> <span class="yml-title">Показать настройки YML</span> <div class="yml-wrapper" style="display:none"> <label> <span class="custom-text">Содержание поля sales_notes: <a href='javascript:void(0);' class='tool-tip-top desc-property' title="Используется для указания особых условий: комплектации, покупки, доставки для данного товара, а также для описания акций, скидок и распродаж." >?</a> </span><input type="text" name="yml_sales_notes" title="Будет подставлено в sales_notes. Допустимая длина - 50 символов." class="product-name-input meta-data tool-tip-bottom"></label> </div> <div class="clear"></div> <span class="seo-title"><?php echo $lang['SEO_BLOCK']?></span> <div class="seo-wrapper"> <label><span class="custom-text"><?php echo $lang['META_TITLE'];?>:</span><input type="text" name="meta_title" title="<?php echo $lang['T_TIP_META_TITLE'];?>" class="product-name-input meta-data tool-tip-bottom"></label> <label><span class="custom-text"><?php echo $lang['META_KEYWORDS'];?>:</span><input type="text" name="meta_keywords" class="product-name-input meta-data tool-tip-bottom" title="<?php echo $lang['T_TIP_META_KEYWORDS'];?>"></label> <label> <ul class="meta-list"> <li><span class="custom-text"><?php echo $lang['META_DESC'];?>:</span></li> <li><span class="symbol-left"><?php echo $lang['LENGTH_META_DESC'];?></span>: <span class="symbol-count"></span></li> </ul> <textarea class="product-meta-field tool-tip-bottom" name="meta_desc" title="<?php echo $lang['T_TIP_META_DESC'];?>"></textarea> </label> </div> <div class="clear"></div> <button class="save-button tool-tip-bottom" title="<?php echo $lang['T_TIP_SAVE_PROD'];?>"><span><?php echo $lang['SAVE'];?></span></button> <div class="clear"></div> </div> </div> </div> </div> </div> <!-- Тут заканчивается Верстка модального окна --> </div> </div> <script>$(".added-related-product-block").sortable();</script>
{ "content_hash": "e648d9b4c383b951542d4fd60ddf8a1e", "timestamp": "", "source": "github", "line_count": 394, "max_line_length": 380, "avg_line_length": 67.48984771573605, "alnum_prop": 0.4832462111240645, "repo_name": "hlogeon/autoryad", "id": "2db66b5ca894cb05a3845442bbc0c397ab30898d", "size": "27185", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "mg-admin/section/views/catalog.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "482450" }, { "name": "HTML", "bytes": "4167" }, { "name": "JavaScript", "bytes": "704270" }, { "name": "PHP", "bytes": "3788984" } ], "symlink_target": "" }
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header aui-dropdown2-trigger-group" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo aui-header-logo-clover"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="aui-header-logo-device">OpenClover</span></a> </h1> </div> <div class="aui-header-secondary"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="aui-page-panel-inner"> <div class="aui-page-panel-nav aui-page-panel-nav-clover"> <div class="aui-page-header-inner" style="margin-bottom: 20px;"> <div class="aui-page-header-image"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="aui-page-header-main" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup aui-navgroup-vertical"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading packages-nav-heading"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui package-filter-container"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="package-filter-no-results-message hidden"> <small>No results found.</small> </p> <div class="packages-tree-wrapper" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="packages-tree-container"></div> <div class="clover-packages-lozenges"></div> </div> </div> </div> </nav> </div> <section class="aui-page-panel-content"> <div class="aui-page-panel-content-clover"> <div class="aui-page-header-main"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="test-Test_AbaRouteValidator_10.html">Class Test_AbaRouteValidator_10</a></li> </ol></div> <h1 class="aui-h2-clover"> Test testAbaNumberCheck_21191_good </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_10.html?line=28649#src-28649" >testAbaNumberCheck_21191_good</a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:40:08 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> testAbaNumberCheck_21191_good</th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=35653#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.7352941</span>73.5% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="73.5% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:73.5%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="aui-page-panel-content-clover" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="aui-page-panel-content" --> </div> <!-- class="aui-page-panel-inner" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
{ "content_hash": "d4152f8484a1c5bba49edea1dfafb5d8", "timestamp": "", "source": "github", "line_count": 209, "max_line_length": 297, "avg_line_length": 43.92822966507177, "alnum_prop": 0.5097483934211959, "repo_name": "dcarda/aba.route.validator", "id": "141f55dd082a4bb74306b5fabe1da3f96a7ab1d8", "size": "9181", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "target13/site/clover/com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_10_testAbaNumberCheck_21191_good_rid.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "18715254" } ], "symlink_target": "" }