answer
stringlengths
15
1.25M
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Player * * @ORM\Table(name="player") * @ORM\Entity */ class Player { /** * @var integer * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=45, nullable=true) */ private $name; /** * @var \DateTime * * @ORM\Column(name="birthday", type="date", nullable=true) */ private $birthday; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>buchberger: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.0 / buchberger - 8.14.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> buchberger <small> 8.14.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-26 20:28:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-26 20:28:19 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/coq-community/buchberger&quot; dev-repo: &quot;git+https://github.com/coq-community/buchberger.git&quot; bug-reports: &quot;https://github.com/coq-community/buchberger/issues&quot; license: &quot;LGPL-2.1-or-later&quot; synopsis: &quot;Verified implementation in Coq of Buchberger& description: &quot;&quot;&quot; A verified implementation of Buchberger&#39;s algorithm in Coq, which computes the Gröbner basis associated with a polynomial ideal. Also includes a constructive proof of Dickson&#39;s lemma.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.12&quot; &amp; &lt; &quot;8.16~&quot;} ] tags: [ &quot;category:Mathematics/Algebra&quot; &quot;category:Miscellaneous/Extracted Programs/Combinatorics&quot; &quot;keyword:Gröbner basis&quot; &quot;keyword:polynomial ideal&quot; &quot;keyword:Buchberger&#39;s algorithm&quot; &quot;logpath:Buchberger&quot; &quot;date:2021-12-12&quot; ] authors: [ &quot;Laurent Théry&quot; &quot;Henrik Persson&quot; ] url { src: &quot;https://github.com/coq-community/buchberger/archive/v8.14.0.tar.gz&quot; checksum: &quot;sha512=bb38c3b1e658698fe457a91b8507f19797dbb82214edf58166880c6e0e1fe0b8093b8c67c9dfeac2495db118bf83322139c4518458e63004b7693d58f8b84fd8&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-buchberger.8.14.0 coq.8.7.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.0). The following dependencies couldn&#39;t be met: - coq-buchberger -&gt; coq &gt;= 8.12 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-buchberger.8.14.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>demos: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.1 / demos - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> demos <small> 8.5.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-29 09:04:54 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-29 09:04:54 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.10.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.2 Official release 4.10.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/demos&quot; license: &quot;LGPL 2&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Demos&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:sorting&quot; &quot;keyword:cases&quot; &quot;keyword:tauto&quot; &quot;keyword:autorewrite&quot; &quot;keyword:prolog&quot; &quot;category:Miscellaneous/Coq Use Examples&quot; ] authors: [ &quot;Coq group &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/demos/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/demos.git&quot; synopsis: &quot;Demos of some Coq tools appeared in version V6.0&quot; description: &quot;&quot;&quot; Example of sorting algorithms defined using the Cases (pattern-matching) construction. Demo of the decision tactic Tauto for intuitionistic propositional calculus. Demo of the AutoRewrite tactic. Demo of the Prolog tactic applied to the compilation of miniML programs.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/demos/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-demos.8.5.0 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.1). The following dependencies couldn&#39;t be met: - coq-demos -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-demos.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
package pl.iterators.kebs.instances.time import pl.iterators.kebs.instances.InstanceConverter import pl.iterators.kebs.instances.time.PeriodString.PeriodFormat import java.time.Period trait PeriodString { implicit val periodFormatter: InstanceConverter[Period, String] = InstanceConverter[Period, String](_.toString, Period.parse, Some(PeriodFormat)) } object PeriodString { private[instances] val PeriodFormat = "ISO-8601 standard format e.g. P2Y" }
<!DOCTYPE html> <html xmlns="http: <head> <meta charset="UTF-8"/> <title>Stories</title> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css"> <!--[if IE 7]> <link rel="stylesheet" href="font-awesome/css/font-awesome-ie7.min.css"> <![endif]--><!-- JQuery --> <script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script><!-- Bootstrap --> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet"> <script src="bootstrap/js/bootstrap.min.js"></script><link rel="stylesheet" href="css/core.css"/> <link rel="stylesheet" href="css/link.css"/> <link type="text/css" media="screen" href="css/screen.css" rel="Stylesheet"/><!-- JQuery-UI --> <link type="text/css" href="jqueryui/1.11.2-start/jquery-ui.min.css" rel="Stylesheet" /> <script type="text/javascript" src="jqueryui/1.11.2-start/jquery-ui.min.js"></script><!-- DataTables --> <link type="text/css" href="datatables/1.10.4/media/jqueryui/dataTables.jqueryui.css" rel="Stylesheet"/> <link type="text/css" href="css/tables.css" rel="stylesheet" /> <script type="text/javascript" src="datatables/1.10.4/media/js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="datatables/1.10.4/media/jqueryui/dataTables.jqueryui.min.js"></script><!-- jQplot --> <!--[if IE]> <script language="javascript" type="text/javascript" src="excanvas/3/excanvas.compiled.js"></script> <![endif]--><link rel="stylesheet" type="text/css" href="jqplot/1.0.8/jquery.jqplot.min.css"/> <script type="text/javascript" src="jqplot/1.0.8/jquery.jqplot.min.js"></script> <script type="text/javascript" src="jqplot/1.0.8/plugins/jqplot.pieRenderer.min.js"></script> <script class="code" type="text/javascript">$(document).ready(function () { var plot1 = $.jqplot('coverage_pie_chart', [ [ ['Passing', 9], ['Pending', 0], ['Ignored', 0], ['Failing', 0], ['Errors', 0], ['Compromised', 0], ['Untested', 0], ] ], { gridPadding: {top: 0, bottom: 38, left: 0, right: 0}, seriesColors: [ '#30cb23', '#a2f2f2', '#eeeadd', '#f8001f', '#fc6e1f', 'fuchsia', 'darkgrey'], seriesDefaults: { renderer: $.jqplot.PieRenderer, trendline: {show: false}, rendererOptions: {padding: 8, showDataLabels: true} }, legend: { show: true, placement: 'outside', rendererOptions: { numberRows: 3 }, location: 's', marginTop: '15px' }, series: [ {label: '9 requirements tested successfully'}, {label: '0 requirements pending'}, {label: '0} requirements skipped'}, {label: '0} requirements with failures'}, {label: '0} requirements with errors'}, {label: '0} requirements compromised'}, {label: '0} requirements untested'}, ] }); // Results table $('#test-results-table').DataTable({ "order": [ [ 1, "asc" ] ], "pageLength": 100, "lengthMenu": [ [50, 100, 200, -1] , [50, 100, 200, "All"] ] }); // Results table $('#req-results-table').DataTable({ "order": [ [ 1, "asc" ] ], "pageLength": 100, "lengthMenu": [ [50, 100, 200, -1] , [50, 100, 200, "All"] ] }); $('#examples-table').DataTable({ "order": [ [2, "asc"] ], "pageLength": 25 }); $("#requirements-tabs").tabs(); $("#test-tabs").tabs(); }) ; </script> <script type="text/javascript"> $(document).ready(function () { $(".read-more-link").click(function () { $(this).nextAll("div.read-more-text").toggle(); var isrc = $(this).find("img").attr('src'); if (isrc == 'images/plus.png') { $(this).find("img").attr("src", function () { return "images/minus.png"; }); } else { $(this).find("img").attr("src", function () { return "images/plus.png"; }); } }); }); </script> </head> <body class="results-page"> <div id="topheader"> <div id="topbanner"> <div id="logo"><a href="index.html"><img src="images/serenity-bdd-logo.png" border="0"/></a></div> <div id="projectname-banner" style="float:right"> <span class="projectname"></span> </div> </div> </div> <div class="middlecontent"> <div id="contenttop"> <div class="middlebg"> <span class="breadcrumbs"> <a href='index.html'>Home</a> > <a href="capabilities.html">Requirements</a> > <a href="<API key>.html" title="Collections">Collections</a> > Collections Test </span> </div> <div class="rightbg"></div> </div> <div class="clr"></div> <!--/* starts second table*/--> <div> <ul class="nav nav-tabs" role="tablist"> <li > <a href="index.html"><i class="fa fa-check-square-o"></i> Overall Test Results</a> </li> <li > <a href="capabilities.html"><i class="fa fa-book"></i> Requirements</a> </li> <li > <a href="<API key>.html"><i class="fa fa-comments-o"></i> Epics</a> </li> <li class="active"> <a href="#"><i class="fa fa-comments-o"></i> Stories</a> </li> </ul> <span class="date-and-time"><a href="build-info.html"><i class="fa fa-info-circle"></i></a> Report generated 20-10-2017 17:32</span> <br style="clear:left"/> </div> <div class="clr"></div> <div id="beforetable"></div> <div id="results-dashboard"> <div class="middlb"> <div class="table"> <div> <h2><i class="fa fa-book"></i> Stories: Collections Test</h2> </div> <div id="<API key>"> <div id="coverage_pie_chart" style="margin-top:10px; margin-left:10px; width:250px; height:250px;"></div> <div id="coverage_summary"> <div> <h4>Requirements Overview</h4> <table class="summary-table"> <head> <tr> <th>Requirement Type</th> <th>Total</th> <th>Pass&nbsp;<i class="icon-check"></i></th> <th>Fail&nbsp;<i class="icon-thumbs-down"></i></th> <th>Pending&nbsp;<i class="icon-calendar"></i></th> <th>Ignored&nbsp;<i class="icon-ban-circle"></i></th> </tr> </head> <body> <tr> <td class="<API key>"><a href="#test-results-table">Acceptance Criteria (tests)</a></td> <td>9</td> <td>9</td> <td>0</td> <td>0</td> <td>0</td> <td></td> </tr> </body> </table> </div> <div> <h4>Test Result Summary</h4> <table class="summary-table"> <head> <tr> <th>Test Type</th> <th>Total</th> <th>Pass&nbsp;<i class="icon-check"/> </th> <th>Fail&nbsp;<i class="icon-thumbs-down"/></th> <th>Pending&nbsp;<i class="icon-calendar"/></th> <th>Ignored&nbsp;<i class="icon-ban-circle"/></th> </tr> </head> <body> <tr> <td class="<API key>">Automated</td> <td>9</td> <td>9 (100%)</td> <td>0 (0%)</td> <td>0 (0%)</td> <td>0 (0%)</td> </tr> <tr> <td class="<API key>">Manual</td> <td>0</td> <td>0 (0%)</td> <td>0 (0%)</td> <td>0 (0%)</td> <td>0 (0%)</td> </tr> <tr> <td class="<API key>">Total</td> <td>9</td> <td>9 (100%)</td> <td>0 (0%)</td> <td>0 (0%)</td> <td>0 (0%)</td> </tr> <tr> <td class="<API key>">Total Duration</td> <td colspan="5">1 seconds</td> </tr> </body> </table> </div> </div> </div> <div class="clr"></div> <div id="requirements-tabs"> <table> <tr> <td> <div><h3>Acceptance Criteria</h3></div> <div id="test_list_tests" class="table"> <div class="test-results"> <table id="test-results-table"> <thead> <tr> <th width="50" class="<API key>">&nbsp;</th> <th width="%" class="<API key>">Tests</th> <th width="70" class="<API key>">Steps</th> <th width="100" class="<API key>">Duration<br>(seconds)</th> </tr> </thead> <tbody> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Be Able To Create Instances Of Concurrent Hash Maps <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">5</td> <td class="lightgreentext">0.15</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Be Able To Create Instances Of Hash Maps <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">5</td> <td class="lightgreentext">0.11</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Be Able To Create Instances Of Sorted Maps <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">5</td> <td class="lightgreentext">0.12</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Be Able To Fill In Pojos With Raw Type Collection Attributes And Default Values To Object <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">5</td> <td class="lightgreentext">0.15</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Fill In Pojos With Attributes Containing Wildcards <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">5</td> <td class="lightgreentext">0.13</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Handle Pojos With No Setters And Collections In The Constructor <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">10</td> <td class="lightgreentext">0.17</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Handle Immutable Pojos With Generified Collections In The Constructor <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">11</td> <td class="lightgreentext">0.18</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Handle Immutable Pojos With Non Generic Collections <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">11</td> <td class="lightgreentext">0.15</td> </tr> <tr class="test-SUCCESS"> <td><span class="summary-icon"><i class='fa fa-check-square-o success-icon ' title='SUCCESS'></i></span> <span style="display:none">SUCCESS</span></td> <td class="SUCCESS-text"> <div class="ellipsis"> <a href="<API key>.html" class="ellipsis" title=""> Podam Should Handle Standard Collections <span class="related-issue-title"></span> </a> </div> </td> <td class="lightgreentext">23</td> <td class="lightgreentext">0.21</td> </tr> </tbody> </table> </div> </div> </td> </tr> </table> </div> </div> </div> </div> </div> </div> </div> </div> <div id="bottomfooter"> <span class="version">Serenity BDD version 1.2.2</span> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>io-evaluate: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.2 / io-evaluate - 1.0.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> io-evaluate <small> 1.0.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-01-18 13:05:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-18 13:05:13 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;dev@clarus.me&quot; homepage: &quot;https://github.com/clarus/io-evaluate&quot; dev-repo: &quot;git+https://github.com/clarus/io-evaluate.git&quot; bug-reports: &quot;https://github.com/clarus/io-evaluate/issues&quot; authors: [&quot;Guillaume Claret&quot;] license: &quot;MIT&quot; build: [ [&quot;./configure.sh&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.4pl4&quot; &amp; &lt; &quot;8.5~&quot;} &quot;coq-function-ninjas&quot; &quot;coq-io&quot; {&gt;= &quot;3.1.0&quot;} ] tags: [ &quot;date:2015-06-14&quot; &quot;keyword:effects&quot; ] synopsis: &quot;Generic functions to run effects&quot; url { src: &quot;https://github.com/coq-io/evaluate/archive/1.0.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-io-evaluate.1.0.0 coq.8.10.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.2). The following dependencies couldn&#39;t be met: - coq-io-evaluate -&gt; coq &lt; 8.5~ -&gt; ocaml &lt; 4.03.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-io-evaluate.1.0.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
FROM donpiekarz/jessie MAINTAINER DonPiekarz <DonPiekarz@gmail.com> ADD . /bd_build RUN /bd_build/prepare.sh && \ /bd_build/system_services.sh && \ /bd_build/utilities.sh && \ /bd_build/cleanup.sh CMD ["/sbin/my_init"]
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys # Functions for initializing neural nets parameters def <API key>(shape, nameIn): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) return tf.Variable(initial, name=nameIn) def init_bias_variable(shape, nameIn): initial = tf.constant(0.1, shape=shape, dtype=tf.float32) return tf.Variable(initial, name=nameIn) def conv2d(x, W): return tf.nn.conv2d(x, W, [1, 1, 1, 1], 'VALID') def loadData(filepath): ''' Load and return four variables from the file with path filepath X_train: input data for training y_train: labels for X_train X_val: input data for validation y_val: labels for X_val ''' print('==> Experiment 2l') print('==> Loading data from {}'.format(filepath)) # benchmark t_start = time.time() # reading data f = h5py.File(filepath) X_train = np.array(f.get('trainingFeatures')) y_train = np.array(f.get('trainingLabels')) X_val = np.array(f.get('validationFeatures')) y_val = np.array(f.get('validationLabels')) t_end = time.time() print('--Time elapsed for loading data: {t:.2f} \ seconds'.format(t = t_end - t_start)) del f print('-- Number of training samples: {}'.format(X_train.shape[0])) print('-- Number of validation samples: {}'.format(X_val.shape[0])) print('Shape of X_train: %s'%str(X_train.shape)) print('Shape of y_train: %s'%str(y_train.shape)) print('Shape of X_val: %s'%str(X_val.shape)) print('Shape of y_val: %s'%str(y_val.shape)) return [X_train, y_train, X_val, y_val] #self, X_train, y_train, X_val, y_val, num_freq, filter_row, filter_col, k1, k2, learningRate, pooling_strategy): # set up property that makes it only be set once # we'll use this to avoid adding tensors to the graph multiple times import functools def lazy_property(function): attribute = '_cache_' + function.__name__ @property @functools.wraps(function) def decorator(self): if not hasattr(self, attribute): setattr(self, attribute, function(self)) return getattr(self, attribute) return decorator class Model: def __init__(self, num_freq, X_train, y_train, X_val, y_val, filter_row, filter_col, k1, num_hidden_nodes, learningRate, debug): ''' Initializer for the model ''' # store the data self.X_train, self.y_train, self.X_val, self.y_val = X_train, y_train, X_val, y_val # store the parameters sent to init that define our model self.num_freq, self.filter_row, self.filter_col, self.k1, self.num_hidden_nodes, self.learningRate, self.debug = num_freq, filter_row, filter_col, k1, num_hidden_nodes, learningRate, debug # find num_training_vec, total_features, num_frames, num_classes, and l from the shape of the data # and store them self.storeParamsFromData() # Set-up and store the input and output placeholders x = tf.placeholder(tf.float32, [None, self.total_features]) y_ = tf.placeholder(tf.float32, [None, self.num_classes]) self.x = x self.y_ = y_ # Setup and store tensor that performs the one-hot encoding y_train_OHEnc = tf.one_hot(self.y_train.copy(), self.num_classes) y_val_OHEnc = tf.one_hot(self.y_val.copy(), self.num_classes) self.y_train_OHEnc = y_train_OHEnc self.y_val_OHEnc = y_val_OHEnc # create each lazy_property # each lazy_property will add tensors to the graph self.y_conv self.cross_entropy self.train_step self.accuracy # properties for use in debugging if self.debug: self.grads_and_vars # print to the user that the network has been set up, along with its properties print("Setting up Single Conv Layer Neural net with %g x %g filters, k1 = %g, followed by hidden layer with %g nodes, learningRate = %g"%(filter_row, filter_col, k1, num_hidden_nodes, learningRate)) def storeParamsFromData(self): ''' Calculate and store parameters from the raw data total_features: The number of CQT coefficients total (incldues all context frames) num_training_vec: The number of training examples in your dataset num_frames: The number of context frames in each training example (total_features / num_freq) num_classes: The number of songs we're distinguishing between in our output l: The length of our second convolutional kernel - for now, its equal to num_frames ''' # Neural-network model set-up # calculating some values which will be nice as we set up the model num_training_vec, total_features = self.X_train.shape num_frames = int(total_features / self.num_freq) print('-- Num frames: {}'.format(num_frames)) num_classes = int(max(self.y_train.max(), self.y_val.max()) + 1) l = num_frames # store what will be helpful later self.total_features = total_features self.num_training_vec = num_training_vec self.num_frames = num_frames self.num_classes = num_classes self.l = l @lazy_property def y_conv(self): # reshape the input into the form of a spectrograph x_image = tf.reshape(self.x, [-1, self.num_freq, self.num_frames, 1]) x_image = tf.identity(x_image, name="x_image") # first convolutional layer parameters self.W_conv1 = <API key>([self.filter_row, self.filter_col, 1, self.k1], "W_conv1") self.b_conv1 = init_bias_variable([self.k1], "b_conv1") # tensor that computes the output of the first convolutional layer h_conv1 = tf.nn.relu(conv2d(x_image, self.W_conv1) + self.b_conv1) h_conv1 = tf.identity(h_conv1, name="h_conv_1") # flatten out the output of the first convolutional layer to pass to the softmax layer h_conv1_flat = tf.reshape(h_conv1, [-1, (self.num_freq - self.filter_row + 1) * (self.num_frames - self.filter_col + 1) * self.k1]) h_conv1_flat = tf.identity(h_conv1_flat, name="h_conv1_flat") # go through a hidden layer self.W_1 = <API key>([(self.num_freq - self.filter_row + 1) * (self.num_frames - self.filter_col + 1) * self.k1, self.num_hidden_nodes], "W1") self.b_1 = init_bias_variable([self.num_hidden_nodes], "b_1") a_1 = tf.nn.relu(tf.matmul(h_conv1_flat, self.W_1) + self.b_1) # softmax layer parameters self.W_sm = <API key>([self.num_hidden_nodes, self.num_classes], "W_sm") self.b_sm = init_bias_variable([self.num_classes], "b_sm") # the output of the layer - un-normalized and without a non-linearity # since <API key> takes care of that y_conv = tf.matmul(a_1, self.W_sm) + self.b_sm y_conv = tf.identity(y_conv, name="y_conv") return y_conv # would want to softmax it to get an actual prediction @lazy_property def cross_entropy(self): ''' Create a tensor that computes the cross entropy cost Use the placeholder y_ as the labels, with input y_conv Note that <API key> takes care of normalizing y_conv to make it a probability distribution This tensor can be accessed using: self.cross_entropy ''' cross_entropy = tf.reduce_mean( tf.nn.<API key>(labels=self.y_, logits=self.y_conv)) cross_entropy = tf.identity(cross_entropy, name="cross_entropy") return cross_entropy @lazy_property def optimizer(self): ''' Create a tensor that represents the optimizer. This tensor can be accessed using: self.optimizer ''' optimizer = tf.train.AdamOptimizer(learning_rate = self.learningRate) return optimizer @lazy_property def train_step(self): ''' Creates a tensor that represents a single training step. This tensor can be passed a feed_dict that has x and y_, and it will compute the gradients and perform a single step. This tensor can be accessed using: self.train_step ''' return self.optimizer.minimize(self.cross_entropy) @lazy_property def accuracy(self): ''' Create a tensor that computes the accuracy, using the placeholder y_ as the labeled data and y_conv for the predictions of the network. This tensor can be accessed using: self.accuracy ''' correct_prediction = tf.equal(tf.argmax(self.y_conv, 1), tf.argmax(self.y_, 1)) accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32)) return accuracy ''' Properties that we'll use for debugging ''' @lazy_property def grads_and_vars(self): grads_and_vars = self.optimizer.compute_gradients(self.cross_entropy, tf.trainable_variables()) return grads_and_vars def train(self, batch_size, num_epochs, print_freq, debug_out='debug.txt'): ''' Train the Network on the data that will have been loaded when the NN is initialized Trained on: self.X_train, and a OH encoding of self.y_train Trains with batch_size batches for num_epochs epochs Debugging info is written to debug.txt (can add params to have more places to write out to) ''' # Starting an interactive session and initializing the parameters #sess = tf.InteractiveSession(config=tf.ConfigProto(<API key>=True)) sess = tf.InteractiveSession() sess.run(tf.<API key>()) y_trainOH = sess.run(self.y_train_OHEnc)[:, 0, :] y_valOH = sess.run(self.y_val_OHEnc)[:, 0, :] # lists to record accuracy at several points during training train_acc_list = [] val_acc_list = [] <API key> = [] # lists to record the error at several points during training train_err_list = [] val_err_list = [] <API key> = [] # track which epochs you record data during epoch_numbers = [] # record the start time t_start = time.time() for epoch in range(num_epochs): epochStart = time.time() # train by systematically pulling batches of batch_size from # the training set and taking a training step on each batch for i in range(0, self.num_training_vec, batch_size): batch_end_point = min(i + batch_size, self.num_training_vec) train_batch_data = self.X_train[i : batch_end_point] train_batch_label = y_trainOH[i : batch_end_point] self.train_step.run(feed_dict={self.x: train_batch_data, self.y_: train_batch_label}) epochEnd = time.time() # print and record data now that we've trained on our full training set if (epoch + 1) % print_freq == 0: # timing for the measurements of cost and accuracy evaluationStart = time.time() # compute training (on the most recent batch and the full data set) # and validation cost and accuracy, then print them and add them to the list # we start with accuracy: train_acc = self.evalByBatch(self.accuracy, X_train, y_trainOH, 5000) train_acc_list.append(train_acc) val_acc = self.evalByBatch(self.accuracy, X_val, y_valOH, 5000) val_acc_list.append(val_acc) # Now we compute the error on each set: train_err = self.evalByBatch(self.cross_entropy, X_train, y_trainOH, 5000) train_err_list.append(train_err) val_err = self.evalByBatch(self.cross_entropy, X_val, y_valOH, 5000) val_err_list.append(val_err) # keep track of which epochs we have data for epoch_numbers += [epoch] # this marks the end of our evaluation evaluationEnd = time.time() # print a summary of our NN at this epoch print("epoch: %d, time (train, evaluation): (%g, %g), t acc, v acc, t cost, v cost: %.5f, %.5f, %.5f, %.5f"%(epoch+1, epochEnd - epochStart, evaluationEnd - evaluationStart, train_acc, val_acc, train_err, val_err)) # debugging print outs if self.debug: # print out step / current value ratio for each parameter in our network # based on training data from the most recent batch # to the file with name debug_out self.<API key>(train_batch_data, train_batch_label, epoch, debug_out) # record the total time spent training the neural network t_end = time.time() print('--Time elapsed for training for %g epochs: %g'%(num_epochs, t_end - t_start)) # return the lists of logged data return [train_acc_list, val_acc_list, train_err_list, val_err_list, epoch_numbers, self.W_conv1.eval(), self.b_conv1.eval(), self.W_1.eval(), self.b_1.eval(), self.W_sm.eval(), self.b_sm.eval()] def evalByBatch(self, toEval, x, y_, batchSize): weightedAvg = 0.0 for i in range(0, len(x), batchSize): batch_end_point = min(i + batchSize, len(x)) batch_data = x[i : batch_end_point] batch_label = y_[i : batch_end_point] curAmount = toEval.eval(feed_dict={self.x: batch_data, self.y_: batch_label}) # weight by the length of the batch and keep adding on weightedAvg = weightedAvg + curAmount * float(batch_end_point - i) / len(x) return weightedAvg def <API key>(self, xDebug, yDebug, epoch, debug_out): ''' Helper function that prints the ratio of the training step that would be taken on input data and labels xDebug and yDebug to the magnitude of each parameter in the network. This gives us a sense of how much each parameter is changing. Inputs: xDebug: input data to calculate the gradient from yDebug: labels for the input data epoch: the number of the epoch (to print out to the file) debug_out: the file to write to - if it doesn't exist it will be created ''' file_object = open(debug_out, 'a+') # record which epoch this is file_object.write("Epoch: %d\n"%(epoch)) # find the current learning rate - this will be used with the gradient to find the step size curLearningRate = self.optimizer._lr # print each gradient and the variables they are associated with # the gradients are stored in tuples, where the first element is a tensor # that computes the gradient, and the second is the parameter that gradient # is associated with for gv in self.grads_and_vars: curGrads = gv[0].eval(feed_dict={self.x: xDebug, self.y_: yDebug}) curSteps = curGrads * curLearningRate # scale down the graident by the learning rate curVars = gv[1].eval() # How much, compared to the magnitude of the weight, are we stepping stepToVarRatio = np.absolute(np.divide(curSteps, curVars)) # print the name of the variable, then all the step ratios (step amount / current value) # these values will have been averaged across the training examples curName = gv[1].name file_object.write("Variable: " + curName + "\n") for index, step in np.ndenumerate(stepToVarRatio): file_object.write(str(index) + ": " + str(step) + "\n") # print summary statistics for this layer maxVal = np.amax(stepToVarRatio) thirdQuartile = np.percentile(stepToVarRatio, 75) mean = np.mean(stepToVarRatio) median = np.median(stepToVarRatio) firstQuartile = np.percentile(stepToVarRatio, 25) minVal = np.amin(stepToVarRatio) file_object.write("Statistics: (%g, %g, %g, %g, %g, %g)\n"%(minVal, firstQuartile, median, mean, thirdQuartile, maxVal)) file_object.write(" # close the file file_object.close() def makeTrainingPlots(epochs, paramValues, trainingMetricLists, <API key>, paramName, metricName, titles, filenames): ''' Plots of the given training and validation metrics versus epoch number. One plot per list in trainingMetricLists and <API key>. Assume there will be the same number of sublists in both those parameters. Titles will hold a list of strings that will be used for the titles of the graphs. The last title will be for the plot with all the validation curves. Filenames is a list of filenames to save your plots to Input: epochs: a list of the epochs on which data was taken - assume all of them took data at the same epoch numbers paramValues: the values of the param that we were varying (to label the curves in our validation plot) trainingMetricLists: a list of lists, where each list represents some metric on the progress of training throughout training <API key>: a list of lists, where each list represents some metric on the progress of training throughout training paramName: name of the parameter you're varying (e.g. learningRate or kernel height) metricName: the name of the metric (e.g. accuracy, or cross-entropy error), to be used on the y-axis titles: titles for the graph (will include info on the params used). *The last title will be for the validation plot filename: the filenames to write the graphs to (will include info on the params used) * the last filename will be for the validation plot Output: Write a png file for each list in trainingMetricLists/<API key> with the desired plot ''' # figure with all the validation curves validationFig = plt.figure(figsize=(7, 4)) validationPlot = validationFig.add_subplot(111) # go through each setup and make a plot for each for i in range(len(trainingMetricLists)): # pull out the list we're concerned with trainingMetric = trainingMetricLists[i] validationMetric = <API key>[i] # make the figure, add plots, axis lables, a title, and legend fig = plt.figure(figsize=(7, 4)) myPlot = fig.add_subplot(111) myPlot.plot(epochs, trainingMetric, label="Training") myPlot.plot(epochs, validationMetric, label="Validation") myPlot.set_xlabel("Epoch Number") myPlot.set_ylabel(metricName) myPlot.set_title(titles[i]) myPlot.legend(loc="best", frameon=False) # Write the figure fig.savefig(filenames[i]) # update the figure with all the validation curves validationPlot.plot(epochs, validationMetric, label=(paramName + " = " + str(paramValues[i]))) # finish labeling + write the validation plot validationPlot.set_xlabel("Epoch Number") validationPlot.set_ylabel(metricName) validationPlot.set_title(titles[-1]) validationPlot.legend(loc="best", frameon=False) validationFig.savefig(filenames[-1]) def makeBestResultPlot(paramValues, trainingMetricLists, <API key>, paramName, metricName, title, filename): ''' Plot the "best" value of the training and validation metric against the param that led to it Best is assumed to be the largest value of the metric Input: trainingMetricLists: a list of lists, where each list represents some metric on the progress of training throughout training <API key>: a list of lists, where each list represents some metric on the progress of training throughout training paramName: metricName: title: the title of the graph (will include info on the params used) filename: the filename to write the graph to (will include info on the params used) Output: Write a png file with the desired plot Is there a way to call the other one to do this? if didn't assume epoch number then yes - oh well ''' bestTrainingMetrics = [max(curList) for curList in trainingMetricLists] <API key> = [max(curList) for curList in <API key>] # make the figure, add plots, axis lables, a title, and legend fig = plt.figure(figsize=(7, 4)) myPlot = fig.add_subplot(111) myPlot.plot(paramValues, bestTrainingMetrics, label="Training") myPlot.plot(paramValues, <API key>, label="Validation") myPlot.set_xlabel(paramName) myPlot.set_ylabel(metricName) myPlot.set_title(title) myPlot.legend(loc="best", frameon=False) # Write the figure fig.savefig(filename) def makeEndResultPlot(paramValues, trainingMetricLists, <API key>, paramName, metricName, title, filename): ''' Plot the final value of the training and validation metric against the param that led to it Input: trainingMetricLists: a list of lists, where each list represents some metric on the progress of training throughout training <API key>: a list of lists, where each list represents some metric on the progress of training throughout training paramName: metricName: title: the title of the graph (will include info on the params used) filename: the filename to write the graph to (will include info on the params used) Output: Write a png file with the desired plot Is there a way to call the other one to do this? if didn't assume epoch number then yes - oh well ''' <API key> = [curList[-1] for curList in trainingMetricLists] <API key> = [curList[-1] for curList in <API key>] # make the figure, add plots, axis lables, a title, and legend fig = plt.figure(figsize=(7, 4)) myPlot = fig.add_subplot(111) myPlot.plot(paramValues, <API key>, label="Training") myPlot.plot(paramValues, <API key>, label="Validation") myPlot.set_xlabel(paramName) myPlot.set_ylabel(metricName) myPlot.set_title(title) myPlot.legend(loc="best", frameon=False) # Write the figure fig.savefig(filename) ''' Our main, with 121x1 convolutional layer. ''' # read in command line parameters try: filterRowsString = sys.argv[1] # map it from a string into a list of ints filterRowsIn = map(int, filterRowsString.strip('[]').split(',')) # the number of hidden units numHiddenUnits = int(sys.argv[2]) # read in the number of epochs numEpochs = int(sys.argv[3]) finalPlotName = sys.argv[4] except Exception, e: print('-- {}'.format(e)) # filepath to the data you want to laod filepath = '/pylon2/ci560sp/cstrong/exp3/<API key>.mat' # define the configurations we're going to be looking at # in this exp: just change the number of rows in a vertical kernel filterRows = filterRowsIn filterCols = [1] * len(filterRows) k1s = [39] * len(filterRows) learningRates = [0.0001] * len(filterRows) # set training parameters batchSize = 1000 print_freq = 10 # make lists to store data train_acc_lists = [] val_acc_lists = [] train_err_lists = [] val_err_lists = [] epoch_number_lists = [] W_conv1_lists = [] b_conv1_lists = [] W_1_lists = [] b_1_lists = [] W_sm_lists = [] b_sm_lists = [] # load data [X_train, y_train, X_val, y_val] = loadData(filepath) # loop through the setups and make a model each time for i in range(len(filterRows)): # create the model - this will create the TF graph as well as load the data m = Model(169, X_train, y_train, X_val, y_val, filterRows[i], filterCols[i], k1s[i], numHiddenUnits, learningRates[i], False) # actually train the model (on the data it already loaded) [train_acc_list, val_acc_list, train_err_list, val_err_list, epoch_numbers, W_conv1, b_conv1, W_1, b_1, W_sm, b_sm] = m.train(1000, numEpochs, print_freq) # store the new data train_acc_lists.append(train_acc_list) val_acc_lists.append(val_acc_list) train_err_lists.append(train_err_list) val_err_lists.append(val_err_list) epoch_number_lists.append(epoch_numbers) W_conv1_lists.append(W_conv1.tolist()) b_conv1_lists.append(b_conv1.tolist()) W_1_lists.append(W_1.tolist()) b_1_lists.append(b_1.tolist()) W_sm_lists.append(W_sm.tolist()) b_sm_lists.append(b_sm.tolist()) del m # clear out the model to avoid huge buildup of memory # print what you have so far in case it crashes print("So far after %g models we have:"%(i+1)) print("Filter Rows: %s"%(filterRows)) print("Filter Cols: %s"%(filterCols)) print("K1s: %s"%(k1s)) print("Learning Rates: %s"%(learningRates)) print("Train acc list: %s"%(str(train_acc_lists))) print("Val acc list: %s"%(str(val_acc_lists))) print("Train err list: %s"%(str(train_err_lists))) print("Val err list: %s"%(str(val_err_lists))) print("Epoch number lists: %s"%(str(epoch_number_lists))) # printing print("Filter Rows: %s"%(filterRows)) print("Filter Cols: %s"%(filterCols)) print("K1s: %s"%(k1s)) print("Learning Rates: %s"%(learningRates)) print("Train acc list: %s"%(str(train_acc_lists))) print("Val acc list: %s"%(str(val_acc_lists))) print("Train err list: %s"%(str(train_err_lists))) print("Val err list: %s"%(str(val_err_lists))) print("Epoch number lists: %s"%(str(epoch_number_lists))) print("Final W_conv1: %s"%str(W_conv1_lists)) print("Final b_conv1: %s"%str(b_conv1_lists)) print("Final W_1 lists: %s"%str(W_1_lists)) print("Final b_1 lists: %s"%str(b_1_lists)) print("Final W_sm lists: %s"%str(W_sm_lists)) print("Final b_sm lists: %s"%str(b_sm_lists)) # plotting trainingPlotTitles = ['Single Layer CNN + Dense Layer with %gx%g kernels and k1=%g'%(filterRows[i], filterCols[i], k1s[i]) for i in range(len(filterRows))] trainingPlotTitles.append('Exp 3e, Validation Cross-Entropy Cost vs. Epoch') trainingPlotFiles = ['exp3e_training_%gx%g_k1=%g_numHiddenUnits=%g_%gEpochs.png'%(filterRows[i], filterCols[i], k1s[i], numHiddenUnits, numEpochs) for i in range(len(filterRows))] trainingPlotFiles.append(finalPlotName + 'validationCurves_%gEpochs.png'%(numEpochs)) makeTrainingPlots(epoch_number_lists[0], filterRows, train_err_lists, val_err_lists, "Height of Kernel", "Cross Entropy Cost", trainingPlotTitles, trainingPlotFiles) makeBestResultPlot(filterRows, train_err_lists, val_err_lists, "Height of Vertical Kernel", "Cross Entropy Cost", 'Best Cost vs. Height of Filter, k1=%g'%k1s[0], finalPlotName)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><API key>: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.11.0 / <API key> - 8.9.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> <API key> <small> 8.9.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-12 17:32:44 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-12 17:32:44 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.11.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;http://perso.ens-lyon.fr/sebastien.briais/tools/Arith_080201.tar.gz&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/<API key>&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} ] tags: [ &quot;keyword: arithmetic&quot; &quot;keyword: number theory&quot; &quot;category: Mathematics/Arithmetic and Number Theory/Miscellaneous&quot; &quot;date: 2008-02-1&quot; ] authors: [ &quot;Sébastien Briais &lt;sebastien.briais at ens-lyon.fr&gt; [http://perso.ens-lyon.fr/sebastien.briais/]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/<API key>/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/<API key>.git&quot; synopsis: &quot;Fundamental theorems of arithmetic&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/<API key>/archive/v8.9.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.9.0 coq.8.11.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &lt; 8.10~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.9.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>elpi: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.9.0 / elpi - 1.9.7</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> elpi <small> 1.9.7 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-01-23 18:18:12 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-23 18:18:12 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.9.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Enrico Tassi &lt;enrico.tassi@inria.fr&gt;&quot; authors: [ &quot;Enrico Tassi&quot; ] license: &quot;LGPL-2.1-or-later&quot; homepage: &quot;https://github.com/LPCIC/coq-elpi&quot; bug-reports: &quot;https://github.com/LPCIC/coq-elpi/issues&quot; dev-repo: &quot;git+https://github.com/LPCIC/coq-elpi&quot; build: [ [ make &quot;build&quot; &quot;COQBIN=%{bin}%/&quot; &quot;ELPIDIR=%{prefix}%/lib/elpi&quot; &quot;OCAMLWARN=&quot; ] [ make &quot;test&quot; &quot;COQBIN=%{bin}%/&quot; &quot;ELPIDIR=%{prefix}%/lib/elpi&quot; ] {with-test} ] install: [ make &quot;install&quot; &quot;COQBIN=%{bin}%/&quot; &quot;ELPIDIR=%{prefix}%/lib/elpi&quot; ] depends: [ &quot;elpi&quot; {&gt;= &quot;1.13.1&quot; &amp; &lt; &quot;1.14.0~&quot;} &quot;coq&quot; {&gt;= &quot;8.13&quot; &amp; &lt; &quot;8.14~&quot; } ] tags: [ &quot;logpath:elpi&quot; ] synopsis: &quot;Elpi extension language for Coq&quot; description: &quot;&quot;&quot; Coq-elpi provides a Coq plugin that embeds ELPI. It also provides a way to embed Coq& the Higher-Order Abstract Syntax approach and a way to read terms back. In addition to that it exports to ELPI a set of Coq&#39;s primitives, e.g. printing a message, accessing the environment of theorems and data types, defining a new constant and so on. For convenience it also provides a quotation and anti-quotation for Coq&#39;s syntax in λProlog. E.g. `{{nat}}` is expanded to the type name of natural numbers, or `{{A -&gt; B}}` to the representation of a product by unfolding the `-&gt;` notation. Finally it provides a way to define new vernacular commands and new tactics.&quot;&quot;&quot; url { src: &quot;https://github.com/LPCIC/coq-elpi/archive/v1.9.7.tar.gz&quot; checksum: &quot;sha256=<SHA256-like>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-elpi.1.9.7 coq.8.9.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.9.0). The following dependencies couldn&#39;t be met: - coq-elpi -&gt; coq &gt;= 8.13 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-elpi.1.9.7</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
/**Resources for drone. * @see game.sprites.enemy.ships.Drone */ package game.util.resources.sprites.enemy.craft.drone;
<div class="highlight"><pre><span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">wraps</span> <span class="k">def</span> <span class="nf">cached</span><span class="p">(</span><span class="n">func</span><span class="p">):</span> <span class="n">cache</span> <span class="o">=</span> <span class="p">{}</span> <span class="nd">@wraps</span><span class="p">(</span><span class="n">func</span><span class="p">)</span> <span class="k">def</span> <span class="nf">cached_wrapper</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">):</span> <span class="k">if</span> <span class="n">args</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">cache</span><span class="p">:</span> <span class="n">cache</span><span class="p">[</span><span class="n">args</span><span class="p">]</span> <span class="o">=</span> <span class="n">func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span> <span class="k">return</span> <span class="n">cache</span><span class="p">[</span><span class="n">args</span><span class="p">]</span> <span class="k">return</span> <span class="n">cached_wrapper</span> </pre></div>
// NSString+CDNEncrypt.h // CDNKitDemo #import <Foundation/Foundation.h> @interface NSString (CDNEncrypt) /** * 32MD5 * * @return 32MD5 */ - (NSString *)md5; /** * SHA1 * * @return SHA1 */ - (NSString *)sha1; @end
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>interval: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1 / interval - 4.3.1</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> interval <small> 4.3.1 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-01-28 23:20:48 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-28 23:20:48 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.7.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.2 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;guillaume.melquiond@inria.fr&quot; homepage: &quot;https://coqinterval.gitlabpages.inria.fr/&quot; dev-repo: &quot;git+https://gitlab.inria.fr/coqinterval/interval.git&quot; bug-reports: &quot;https://gitlab.inria.fr/coqinterval/interval/issues&quot; license: &quot;CeCILL-C&quot; build: [ [&quot;autoconf&quot;] {dev} [&quot;./configure&quot;] [&quot;./remake&quot; &quot;-j%{jobs}%&quot;] ] install: [&quot;./remake&quot; &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.15~&quot;} &quot;coq-bignums&quot; &quot;coq-flocq&quot; {&gt;= &quot;3.1&quot;} &quot;<API key>&quot; {&gt;= &quot;1.6&quot;} &quot;coq-coquelicot&quot; {&gt;= &quot;3.0&quot;} &quot;conf-autoconf&quot; {build &amp; dev} (&quot;conf-g++&quot; {build} | &quot;conf-clang&quot; {build}) ] tags: [ &quot;keyword:interval arithmetic&quot; &quot;keyword:decision procedure&quot; &quot;keyword:floating-point arithmetic&quot; &quot;keyword:reflexive tactic&quot; &quot;keyword:Taylor models&quot; &quot;category:Mathematics/Real Calculus and Topology&quot; &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Decision procedures&quot; &quot;logpath:Interval&quot; &quot;date:2021-11-08&quot; ] authors: [ &quot;Guillaume Melquiond &lt;guillaume.melquiond@inria.fr&gt;&quot; &quot;Érik Martin-Dorel &lt;erik.martin-dorel@irit.fr&gt;&quot; &quot;Pierre Roux &lt;pierre.roux@onera.fr&gt;&quot; &quot;Thomas Sibut-Pinote &lt;thomas.sibut-pinote@inria.fr&gt;&quot; ] synopsis: &quot;A Coq tactic for proving bounds on real-valued expressions automatically&quot; url { src: &quot;https://coqinterval.gitlabpages.inria.fr/releases/interval-4.3.1.tar.gz&quot; checksum: &quot;sha512=ca04b178eecc6264116daf52a6b3dc6ca8f8bd9ce704761e574119a2caeceb4367b1c1e7b715b38ec79f4e226d87c3f39efdbde94b2415ef17ce39b0fe9ba9d8&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-interval.4.3.1 coq.8.7.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1). The following dependencies couldn&#39;t be met: - coq-interval -&gt; coq &gt;= 8.8 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-interval.4.3.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<div class="container"> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th> <th>Applicant Name</th> <th>Email Id</th> <th>Phone Number</th> <th>Action</th> </tr> </thead> <?php foreach($result as $tuple){ echo' <tbody> <tr> <td>'.$tuple['id'].'</td> <td>'.$tuple['name'].'</td> <td>'.$tuple['email'].'</td> <td>'.$tuple['pno'].'</td> <td> <button type="button" class="btn btn-default" data-toggle="modal" data-target="#myModal'.$tuple['id'].'">Process </button> <div class="modal fade" id="myModal'.$tuple['id'].'" role="dialog"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Enter the following details</h4> </div> <div class="modal-body"> <div class="container"> <h2>Create Interview</h2> <form class="form-horizontal" role="form" action="http://localhost:8888/work/index.php/dashboard/get_details" method="post"> <div class="form-group"> <label class="control-label col-sm-2" for="email">Interviewer Email:</label> <div class="col-sm-10"> <select name="email" style="width: 450px;font-size: 1120px;"> <option value="mark@gmail.com">Mark - mark@gmail.com</option> <option value="steve@gmail.com">Steve - steve@gmail.com</option> </select> </div> </div> <div class="form-group"> <label class="control-label col-sm-2" for="pwd">Interview Name</label> <div class="col-sm-5"> <input type="name" name="int_name" class="form-control" id="name" placeholder="Interview Name"> </div> </div> <input type="hidden" name="cand_email" value="'.$tuple['email'].'"> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <button type="submit" class="btn btn-default">Create Interview</button> </div> </div> </form> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> </td> </tr> </tbody>'; } ?> </table> </div> </div>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>lemma-overloading: 1 m 40 s </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.1 / lemma-overloading - 8.10.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> lemma-overloading <small> 8.10.0 <span class="label label-success">1 m 40 s </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-25 11:03:18 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-25 11:03:18 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/coq-community/lemma-overloading&quot; dev-repo: &quot;git+https://github.com/coq-community/lemma-overloading.git&quot; bug-reports: &quot;https://github.com/coq-community/lemma-overloading/issues&quot; license: &quot;GPL-3.0-or-later&quot; synopsis: &quot;Libraries demonstrating design patterns for programming and proving with canonical structures in Coq&quot; description: &quot;&quot;&quot; This project contains Hoare Type Theory libraries which demonstrate a series of design patterns for programming with canonical structures that enable one to carefully and predictably coax Coq&#39;s type inference engine into triggering the execution of user-supplied algorithms during unification, and illustrates these patterns through several realistic examples drawn from Hoare Type Theory. The project also contains typeclass-based re-implementations for comparison.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.12~&quot;} &quot;<API key>&quot; {&gt;= &quot;1.7&quot; &amp; &lt; &quot;1.11~&quot;} ] tags: [ &quot;category:Computer Science/Data Types and Data Structures&quot; &quot;keyword:canonical structures&quot; &quot;keyword:proof automation&quot; &quot;keyword:Hoare type theory&quot; &quot;keyword:lemma overloading&quot; &quot;logpath:LemmaOverloading&quot; &quot;date:2019-12-07&quot; ] authors: [ &quot;Georges Gonthier&quot; &quot;Beta Ziliani&quot; &quot;Aleksandar Nanevski&quot; &quot;Derek Dreyer&quot; ] url { src: &quot;https://github.com/coq-community/lemma-overloading/archive/v8.10.0.tar.gz&quot; checksum: &quot;sha512=9da994cd10358f9c5b6e8bb3591819d23ff0def0f3b86ac585fa1eeb0a32f1a926e5066d279fbb84da173f8aa26c8e33bedb8a5260b40893f90467798eb2f92b&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.10.0 coq.8.10.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only <API key>.8.10.0 coq.8.10.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>1 m 51 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v <API key>.8.10.0 coq.8.10.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>1 m 40 s</dd> </dl> <h2>Installation size</h2> <p>Total: 26 M</p> <ul> <li>11 M <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/heaps.vo</code></li> <li>10 M <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/prelude.vo</code></li> <li>329 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/heaps.glob</code></li> <li>293 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/finmap.vo</code></li> <li>279 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stmod.vo</code></li> <li>251 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/domains.vo</code></li> <li>177 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/terms.vo</code></li> <li>172 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/domains.glob</code></li> <li>161 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stsep.vo</code></li> <li>149 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/finmap.glob</code></li> <li>125 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/rels.vo</code></li> <li>122 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlog.vo</code></li> <li>120 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/llistR.vo</code></li> <li>95 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlogR.vo</code></li> <li>94 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/perms.vo</code></li> <li>82 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stmod.glob</code></li> <li>81 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/terms.glob</code></li> <li>78 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancel2.vo</code></li> <li>77 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noalias.vo</code></li> <li>76 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlog.glob</code></li> <li>76 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlogR.glob</code></li> <li>62 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stsep.glob</code></li> <li>61 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/ordtype.vo</code></li> <li>59 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancel.vo</code></li> <li>58 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/rels.glob</code></li> <li>56 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noalias.glob</code></li> <li>54 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noaliasCTC.vo</code></li> <li>52 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/prelude.glob</code></li> <li>51 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/heaps.v</code></li> <li>50 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/hprop.vo</code></li> <li>49 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlogCTC.vo</code></li> <li>47 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/auto.vo</code></li> <li>45 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancelCTC.vo</code></li> <li>43 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/perms.glob</code></li> <li>40 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/indom.vo</code></li> <li>40 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/prefix.vo</code></li> <li>39 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancelD.vo</code></li> <li>39 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/llistR.glob</code></li> <li>39 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noaliasBT.vo</code></li> <li>37 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/domains.v</code></li> <li>37 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/indomCTC.vo</code></li> <li>37 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/xfind.vo</code></li> <li>36 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancel2.glob</code></li> <li>36 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/xfindCTC.vo</code></li> <li>29 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noaliasCTC.glob</code></li> <li>28 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancel.glob</code></li> <li>26 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/ordtype.glob</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlogCTC.glob</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/finmap.v</code></li> <li>20 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/rels.v</code></li> <li>18 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noaliasBT.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/terms.v</code></li> <li>17 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stmod.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlogR.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noalias.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stsep.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlog.v</code></li> <li>13 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancelCTC.glob</code></li> <li>12 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/indom.glob</code></li> <li>11 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/prelude.v</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/xfind.glob</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/auto.glob</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/perms.v</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/hprop.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/prefix.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/indomCTC.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/xfindCTC.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancel2.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancelD.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancel.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/ordtype.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/llistR.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noaliasCTC.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/auto.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/noaliasBT.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/stlogCTC.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/indom.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancelCTC.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/xfind.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/cancelD.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/prefix.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/hprop.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/xfindCTC.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/LemmaOverloading/indomCTC.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y <API key>.8.10.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>finger-tree: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.14.1 / finger-tree - 8.7.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> finger-tree <small> 8.7.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-15 19:54:23 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-15 19:54:23 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq 8.14.1 Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/finger-tree&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/FingerTree&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.8~&quot;} ] tags: [ &quot;keyword: data structures&quot; &quot;keyword: dependent types&quot; &quot;keyword: Finger Trees&quot; &quot;category: Computer Science/Data Types and Data Structures&quot; &quot;date: 2009-02&quot; ] authors: [ &quot;Matthieu Sozeau &lt;mattam@mattam.org&gt; [http://mattam.org]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/finger-tree/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/finger-tree.git&quot; synopsis: &quot;Dependent Finger Trees&quot; description: &quot;&quot;&quot; http://mattam.org/research/russell/fingertrees.en.html A verified generic implementation of Finger Trees&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/finger-tree/archive/v8.7.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-finger-tree.8.7.0 coq.8.14.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.14.1). The following dependencies couldn&#39;t be met: - coq-finger-tree -&gt; coq &lt; 8.8~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-finger-tree.8.7.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
module MusixMatch module Models class Lyrics include Model <API key> :lyrics_id, :lyrics_body, :lyrics_language, :script_tracking_url, :lyrics_copyright, :track_name, :artist_name, :restricted end end end
module.exports = require('./src/api');
#include <stdio.h> #include <stdlib.h> #define M (1024 * 1024) #define K (1024) #ifdef PART2 #define TOTAL_ALLOCS 5*M #else #define TOTAL_ALLOCS 50*K #endif int main() { malloc(1); int i; int **arr = malloc(TOTAL_ALLOCS * sizeof(int *)); if (arr == NULL) { printf("Memory failed to allocate!\n"); return 1; } for (i = 0; i < TOTAL_ALLOCS; i++) { arr[i] = malloc(sizeof(int)); if (arr[i] == NULL) { printf("Memory failed to allocate!\n"); return 1; } *(arr[i]) = i; } for (i = 0; i < TOTAL_ALLOCS; i++) { if (*(arr[i]) != i) { printf("Memory failed to contain correct data after many allocations!\n"); return 2; } } for (i = 0; i < TOTAL_ALLOCS; i++) free(arr[i]); free(arr); printf("Memory was allocated, used, and freed!\n"); return 0; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>unicoq: 28 s </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.1 / unicoq - 1.5+8.12</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> unicoq <small> 1.5+8.12 <span class="label label-success">28 s </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-19 00:31:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-19 00:31:13 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;matthieu.sozeau@inria.fr&quot; authors: [ &quot;Matthieu Sozeau &lt;matthieu.sozeau@inria.fr&gt;&quot; &quot;Beta Ziliani &lt;beta@mpi-sws.org&gt;&quot; ] dev-repo: &quot;git+https://github.com/unicoq/unicoq.git&quot; homepage: &quot;https://github.com/unicoq/unicoq&quot; bug-reports: &quot;https://github.com/unicoq/unicoq/issues&quot; license: &quot;MIT&quot; build: [ [&quot;coq_makefile&quot; &quot;-f&quot; &quot;_CoqProject&quot; &quot;-o&quot; &quot;Makefile&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.12.0&quot; &amp; &lt; &quot;8.13~&quot;} ] synopsis: &quot;An enhanced unification algorithm for Coq&quot; tags: [ &quot;logpath:Unicoq&quot; &quot;date:2020-08-12&quot; ] url { src: &quot;https://github.com/unicoq/unicoq/archive/v1.5-8.12.tar.gz&quot; checksum: &quot;sha512=c2326af1972ddf0f34e6f2c81426882a332729a3d7f8a9c6cbffb23f85fa5b61d747adfa1cd149c05640e2c329945ab7405620eb80c9c3f6744aaf01f3ee8c1f&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-unicoq.1.5+8.12 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-unicoq.1.5+8.12 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>14 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-unicoq.1.5+8.12 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>28 s</dd> </dl> <h2>Installation size</h2> <p>Total: 354 K</p> <ul> <li>318 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/unicoq.cmxs</code></li> <li>16 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/unicoq.cmx</code></li> <li>11 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/unicoq.cmi</code></li> <li>7 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/unicoq.cmxa</code></li> <li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/Unicoq.vo</code></li> <li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/Unicoq.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/Unicoq/Unicoq.glob</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-unicoq.1.5+8.12</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Text; using System.Threading; using System.Xml; using NUnit.Framework; using BerkeleyDB; namespace CsharpAPITest { [TestFixture] public class SecondaryCursorTest : CSharpTestFixture { [TestFixtureSetUp] public void SetUpTestFixture() { testFixtureName = "SecondaryCursorTest"; base.SetUpTestfixture(); } [Test] public void TestDuplicate() { testName = "TestDuplicate"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; // Open a primary database. BTreeDatabaseConfig dbConfig = new BTreeDatabaseConfig(); dbConfig.Creation = CreatePolicy.IF_NEEDED; BTreeDatabase db = BTreeDatabase.Open( dbFileName, dbConfig); // Open a secondary database. <API key> secConfig = new <API key>(db, new <API key>(SecondaryKeyGen)); secConfig.Creation = CreatePolicy.IF_NEEDED; secConfig.Duplicates = DuplicatesPolicy.UNSORTED; <API key> secDB = <API key>.Open(dbSecFileName, secConfig); // Put a pair of key and data into the database. DatabaseEntry key, data; key = new DatabaseEntry( ASCIIEncoding.ASCII.GetBytes("key")); data = new DatabaseEntry( ASCIIEncoding.ASCII.GetBytes("data")); db.Put(key, data); // Create a cursor. SecondaryCursor cursor = secDB.SecondaryCursor(); cursor.Move(key, true); // Duplicate the cursor. SecondaryCursor dupCursor; dupCursor = cursor.Duplicate(true); /* * Confirm that the duplicate cursor has the same * position as the original one. */ Assert.AreEqual(cursor.Current.Key, dupCursor.Current.Key); Assert.AreEqual(cursor.Current.Value, dupCursor.Current.Value); // Close the cursor and the duplicate cursor. dupCursor.Close(); cursor.Close(); // Close secondary and primary database. secDB.Close(); db.Close(); } [Test] public void TestDelete() { testName = "TestDelete"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; // Open a primary database and its secondary database. BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); // Put a pair of key and data into database. DatabaseEntry key, data; key = new DatabaseEntry( ASCIIEncoding.ASCII.GetBytes("key")); data = new DatabaseEntry( ASCIIEncoding.ASCII.GetBytes("data")); db.Put(key, data); // Delete the pair with cursor. SecondaryCursor secCursor = secDB.SecondaryCursor(); Assert.IsTrue(secCursor.MoveFirst()); secCursor.Delete(); // Confirm that the pair is deleted. Assert.IsFalse(db.Exists(key)); // Close all databases. secDB.Close(); db.Close(); } [Test] public void TestCurrent() { testName = "TestCurrent"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; // Open a primary database and its secondary database. BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); // Put a pair of key and data into database. DatabaseEntry key, data; key = new DatabaseEntry( ASCIIEncoding.ASCII.GetBytes("key")); data = new DatabaseEntry( ASCIIEncoding.ASCII.GetBytes("data")); db.Put(key, data); // Delete the pair with cursor. SecondaryCursor secCursor = secDB.SecondaryCursor(); Assert.IsTrue(secCursor.Move(data, true)); // Confirm that the current is the one we put into database. Assert.AreEqual(data.Data, secCursor.Current.Key.Data); // Close all databases. secDB.Close(); db.Close(); } [Test] public void TestGetEnumerator() { testName = "TestGetEnumerator"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; // Open a primary database and its secondary database. BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); // Write ten records into the database. WriteRecords(db); /* * Get all records from the secondary database and see * if the records with key other than 10 have the same as * their primary key. */ SecondaryCursor secCursor = secDB.SecondaryCursor(); foreach (KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> secData in secCursor) { if (BitConverter.ToInt32(secData.Key.Data, 0) != 10) Assert.AreEqual(secData.Value.Key.Data, secData.Value.Value.Data); } // Close all cursors and databases. secCursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestMoveToKey() { testName = "TestMoveToKey"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; MoveToPos(dbFileName, dbSecFileName, false); } [Test] public void TestMoveToPair() { testName = "TestMoveToPair"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; MoveToPos(dbFileName, dbSecFileName, true); } public void MoveToPos(string dbFileName, string dbSecFileName, bool ifPair) { // Open a primary database and its secondary database. BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); // Write ten records into the database. WriteRecords(db); SecondaryCursor secCursor = secDB.SecondaryCursor(); DatabaseEntry key = new DatabaseEntry( BitConverter.GetBytes((int)0)); DatabaseEntry notExistingKey = new DatabaseEntry( BitConverter.GetBytes((int)100)); if (ifPair == false) { Assert.IsTrue(secCursor.Move(key, true)); Assert.IsFalse(secCursor.Move(notExistingKey, true)); Assert.IsTrue(secCursor.Move(key, new DatabaseEntry(), new DatabaseEntry(2, 2), true)); CheckPartial(null, 0, 0, null, 0, 0, secCursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(secCursor.Move(key, new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), true)); CheckPartial(null, 0, 0, secCursor.Current.Value.Key, 1, 1, secCursor.Current.Value.Value, 2, 2);*/ byte[] partBytes = new byte[] {key.Data[1]}; key = new DatabaseEntry(partBytes, 1, 1); Assert.IsTrue(secCursor.Move(key, false)); CheckPartial(secCursor.Current.Key, 1, 1, null, 0, 0, null, 0, 0); } else { KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair = new KeyValuePair<DatabaseEntry, KeyValuePair<DatabaseEntry, DatabaseEntry>>(key, new KeyValuePair<DatabaseEntry, DatabaseEntry>( key, key)); KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> notExistingPair; notExistingPair = new KeyValuePair<DatabaseEntry, KeyValuePair<DatabaseEntry, DatabaseEntry>>( notExistingKey, new KeyValuePair< DatabaseEntry, DatabaseEntry>( notExistingKey, notExistingKey)); Assert.IsTrue(secCursor.Move(pair, true)); Assert.IsFalse(secCursor.Move(notExistingPair, true)); } secCursor.Close(); secDB.Close(); db.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; <API key>(testHome, dbFileName, dbSecFileName, false); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; <API key>(testHome, dbFileName, dbSecFileName, true); } public void <API key>(string home, string dbFileName, string dbSecFileName, bool ifPair) { // Open a primary database and its secondary database. BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(home, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); // Create an secondary cursor. Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor secCursor = secDB.SecondaryCursor( cursorTxn); DatabaseEntry key = new DatabaseEntry( BitConverter.GetBytes((int)0)); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_THREE; lockingInfo.ReadModifyWrite = true; if (ifPair == false) { Assert.IsTrue(secCursor.Move( key, true, lockingInfo)); Assert.IsTrue(secCursor.Move(key, new DatabaseEntry(), new DatabaseEntry(2, 2), true)); CheckPartial(null, 0, 0, null, 0, 0, secCursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(secCursor.Move(key, new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), true)); CheckPartial(null, 0, 0, secCursor.Current.Value.Key, 1, 1, secCursor.Current.Value.Value, 2, 2);*/ byte[] partByte = new byte[] {key.Data[2]}; key = new DatabaseEntry(partByte, 2, 1); Assert.IsTrue(secCursor.Move(key, false)); CheckPartial(secCursor.Current.Key, 2, 1, null, 0, 0, null, 0, 0); } else { KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; pair = new KeyValuePair<DatabaseEntry, KeyValuePair<DatabaseEntry, DatabaseEntry>>(key, new KeyValuePair<DatabaseEntry, DatabaseEntry>( key, key)); Assert.IsTrue(secCursor.Move(pair, true, lockingInfo)); } secCursor.Close(); cursorTxn.Commit(); secDB.Close(); db.Close(); env.Close(); } [Test] public void TestMoveFirst() { testName = "TestMoveFirst"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; // Open primary and secondary database. BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); // Write ten records into the database. WriteRecords(db); // Move the cursor to the first record(0,0). SecondaryCursor cursor = secDB.SecondaryCursor(); Assert.IsTrue(cursor.MoveFirst()); Assert.AreEqual(BitConverter.GetBytes((int)0), cursor.Current.Key.Data); Assert.IsTrue(cursor.MoveFirst( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveFirst( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ // Close all. cursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestMoveLast() { testName = "TestMoveLast"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); SecondaryCursor cursor = secDB.SecondaryCursor(); Assert.IsTrue(cursor.MoveLast()); Assert.AreEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); Assert.IsTrue(cursor.MoveLast( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveLast( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestMoveNext() { testName = "TestMoveNext"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); SecondaryCursor cursor = secDB.SecondaryCursor(); cursor.MoveFirst(); for (int i = 0; i < 5; i++) { Assert.IsTrue(cursor.MoveNext()); Assert.IsTrue(cursor.MovePrev()); Assert.IsTrue(cursor.MoveNext( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveNext( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ } cursor.Close(); secDB.Close(); db.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); // Create a cursor and move the cursor to duplicate record. SecondaryCursor cursor = secDB.SecondaryCursor(); cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)10)), true); Assert.IsTrue(cursor.MoveNextDuplicate()); Assert.AreEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); cursor.MovePrevDuplicate(); Assert.IsTrue(cursor.MoveNextDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveNextDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestMoveNextUnique() { testName = "TestMoveNextUnique"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); /* * Move cursor to duplicate record. Since the duplicate * record has the largest key, moving to the next * unique record should fail. */ SecondaryCursor cursor = secDB.SecondaryCursor(); cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)1)), true); Assert.IsTrue(cursor.MoveNextUnique()); cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)10)), true); Assert.IsFalse(cursor.MoveNextUnique()); cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)4)), true); Assert.IsTrue(cursor.MoveNextUnique( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveNextUnique( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestMovePrev() { testName = "TestMovePrev"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); SecondaryCursor cursor = secDB.SecondaryCursor(); cursor.MoveLast(); for (int i = 0; i < 5; i++) { Assert.IsTrue(cursor.MovePrev()); cursor.MoveNext(); Assert.IsTrue(cursor.MovePrev( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MovePrev( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ } cursor.Close(); secDB.Close(); db.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); SecondaryCursor cursor = secDB.SecondaryCursor(); KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; DatabaseEntry pKey, pData; pKey = new DatabaseEntry(BitConverter.GetBytes((int)6)); pData = new DatabaseEntry(BitConverter.GetBytes((int)10)); pair = new KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>>(pData, new KeyValuePair<DatabaseEntry, DatabaseEntry>( pKey, pData)); cursor.Move(pair, true); Assert.IsTrue(cursor.MovePrevDuplicate()); Assert.AreEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); cursor.Move(pair, true); Assert.IsTrue(cursor.MovePrevDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test cursor.Move(pair, true); Assert.IsTrue(cursor.MovePrevDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestMovePrevUnique() { testName = "TestMovePrevUnique"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); SecondaryCursor cursor = secDB.SecondaryCursor(); KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; DatabaseEntry pKey, pData; pKey = new DatabaseEntry(BitConverter.GetBytes((int)6)); pData = new DatabaseEntry(BitConverter.GetBytes((int)10)); pair = new KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>>(pData, new KeyValuePair<DatabaseEntry, DatabaseEntry>( pKey, pData)); cursor.Move(pair, true); Assert.IsTrue(cursor.MovePrevUnique()); Assert.AreNotEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); cursor.Move(pair, true); Assert.IsTrue(cursor.MovePrevUnique( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MovePrevUnique( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); secDB.Close(); db.Close(); } [Test] public void TestRefresh() { testName = "TestRefresh"; SetUpTest(true); string dbFileName = testHome + "/" + testName + ".db"; string dbSecFileName = testHome + "/" + testName + "_sec.db"; BTreeDatabase db; <API key> secDB; OpenSecDB(dbFileName, dbSecFileName, out db, out secDB); WriteRecords(db); SecondaryCursor cursor = secDB.SecondaryCursor(); KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; DatabaseEntry pKey, pData; pKey = new DatabaseEntry(BitConverter.GetBytes((int)6)); pData = new DatabaseEntry(BitConverter.GetBytes((int)10)); pair = new KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>>(pData, new KeyValuePair<DatabaseEntry, DatabaseEntry>( pKey, pData)); cursor.Move(pair, true); Assert.IsTrue(cursor.Refresh()); Assert.AreEqual(pData.Data, cursor.Current.Key.Data); Assert.AreEqual(pKey.Data, cursor.Current.Value.Key.Data); Assert.IsTrue(cursor.Refresh( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.Refresh( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2))); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); secDB.Close(); db.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); // Move the cursor to the first record(0, 0). Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_THREE; lockingInfo.ReadModifyWrite = true; Assert.IsTrue(cursor.MoveFirst(lockingInfo)); Assert.AreEqual(BitConverter.GetBytes((int)0), cursor.Current.Key.Data); Assert.IsTrue(cursor.MoveFirst( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveFirst( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); /* * Move the cursor to the last record(10, 6), that is * record(6, 10) in primary database. */ Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_THREE; lockingInfo.ReadModifyWrite = true; Assert.IsTrue(cursor.MoveLast(lockingInfo)); Assert.AreEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); Assert.IsTrue(cursor.MoveLast( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveLast( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); /* * Move cursor to the first record and move to next * record for five times. */ Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_THREE; lockingInfo.ReadModifyWrite = true; cursor.MoveFirst(lockingInfo); for (int i = 0; i < 5; i++) { Assert.IsTrue(cursor.MoveNext(lockingInfo)); cursor.MovePrev(lockingInfo); Assert.IsTrue(cursor.MoveNext( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveNext( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ } cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); /* * Create a cursor and move the cursor to duplicate * record(10, 5), that is record(5,10) in primary database. * Then move the cursor to the next duplicate record * (10, 6), that is record(6,10) in primary database. */ Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_THREE; lockingInfo.ReadModifyWrite = true; cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)10)), true, lockingInfo); Assert.IsTrue(cursor.MoveNextDuplicate(lockingInfo)); Assert.AreEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); cursor.MovePrevDuplicate(lockingInfo); Assert.IsTrue(cursor.MoveNextDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveNextDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); /* * Move cursor to duplicate record. Since the duplicate * record has the largest key, moving to the next * unique record should fail. */ Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_THREE; lockingInfo.ReadModifyWrite = true; cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)10)), true); Assert.IsFalse(cursor.MoveNextUnique(lockingInfo)); cursor.Move(new DatabaseEntry( BitConverter.GetBytes((int)3)), true, lockingInfo); Assert.IsTrue(cursor.MoveNextUnique( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MoveNextUnique( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); /* * Move the cursor to the last record and move to its * previous record for five times. */ Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_TWO; lockingInfo.ReadModifyWrite = true; cursor.MoveLast(lockingInfo); for (int i = 0; i < 5; i++) { Assert.IsTrue(cursor.MovePrev(lockingInfo)); cursor.MoveNext(lockingInfo); Assert.IsTrue(cursor.MovePrev( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MovePrev( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ } cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_TWO; lockingInfo.ReadModifyWrite = true; /* * Move the cursor to the record(10,6), that is the * record(6, 10) in the primary database. Move to * its previous duplicate record, that is (10,5). */ KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; DatabaseEntry pKey, pData; pKey = new DatabaseEntry(BitConverter.GetBytes((int)6)); pData = new DatabaseEntry(BitConverter.GetBytes((int)10)); pair = new KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>>(pData, new KeyValuePair<DatabaseEntry, DatabaseEntry>( pKey, pData)); cursor.Move(pair, true, lockingInfo); Assert.IsTrue(cursor.MovePrevDuplicate(lockingInfo)); Assert.AreEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); cursor.MoveNextDuplicate(lockingInfo); Assert.IsTrue(cursor.MovePrevDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MovePrevDuplicate( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_TWO; lockingInfo.ReadModifyWrite = true; /* * Move the cursor to the record(10, 6) and move to the * previous unique record which has different key from * the record(10,6). */ KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; DatabaseEntry pKey, pData; pKey = new DatabaseEntry(BitConverter.GetBytes((int)6)); pData = new DatabaseEntry(BitConverter.GetBytes((int)10)); pair = new KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>>(pData, new KeyValuePair<DatabaseEntry, DatabaseEntry>( pKey, pData)); cursor.Move(pair, true, lockingInfo); Assert.IsTrue(cursor.MovePrevUnique(lockingInfo)); Assert.AreNotEqual(BitConverter.GetBytes((int)10), cursor.Current.Key.Data); cursor.Move(new DatabaseEntry(BitConverter.GetBytes( (int)3)), true, lockingInfo); Assert.IsTrue(cursor.MovePrevUnique( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.MovePrevUnique( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } [Test] public void <API key>() { testName = "<API key>"; SetUpTest(true); string dbFileName = testName + ".db"; string dbSecFileName = testName + "_sec.db"; /* * Open environment, primary database and * secondary database. */ BTreeDatabase db; DatabaseEnvironment env; <API key> secDB; OpenSecDBInTxn(testHome, dbFileName, dbSecFileName, out env, out db, out secDB); // Write ten records into the database. WriteRecordsInTxn(db, env); Transaction cursorTxn = env.BeginTransaction(); SecondaryCursor cursor = secDB.SecondaryCursor(cursorTxn); LockingInfo lockingInfo = new LockingInfo(); lockingInfo.IsolationDegree = Isolation.DEGREE_TWO; lockingInfo.ReadModifyWrite = true; // Move cursor to a record and refresh it. KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>> pair; DatabaseEntry pKey, pData; pKey = new DatabaseEntry(BitConverter.GetBytes((int)6)); pData = new DatabaseEntry(BitConverter.GetBytes((int)10)); pair = new KeyValuePair<DatabaseEntry, KeyValuePair< DatabaseEntry, DatabaseEntry>>(pData, new KeyValuePair<DatabaseEntry, DatabaseEntry>( pKey, pData)); cursor.Move(pair, true, lockingInfo); Assert.IsTrue(cursor.Refresh(lockingInfo)); Assert.AreEqual(pData.Data, cursor.Current.Key.Data); Assert.AreEqual(pKey.Data, cursor.Current.Value.Key.Data); Assert.IsTrue(cursor.Refresh( new DatabaseEntry(0, 1), new DatabaseEntry(), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, null, 0, 0, cursor.Current.Value.Value, 2, 2); /* Disable the test. Assert.IsTrue(cursor.Refresh( new DatabaseEntry(0, 1), new DatabaseEntry(1, 1), new DatabaseEntry(2, 2), lockingInfo)); CheckPartial(cursor.Current.Key, 0, 1, cursor.Current.Value.Key, 1, 1, cursor.Current.Value.Value, 2, 2);*/ cursor.Close(); cursorTxn.Commit(); // Close all. secDB.Close(); db.Close(); env.Close(); } public void OpenSecDBInTxn(string home, string dbFileName, string dbSecFileName, out DatabaseEnvironment env, out BTreeDatabase db, out <API key> secDB) { // Open environment. <API key> envCfg = new <API key>(); envCfg.Create = true; envCfg.UseLocking = true; envCfg.UseLogging = true; envCfg.UseMPool = true; envCfg.UseTxns = true; env = DatabaseEnvironment.Open( home, envCfg); // Open primary and secondary database in a transaction. Transaction openTxn = env.BeginTransaction(); BTreeDatabaseConfig dbConfig = new BTreeDatabaseConfig(); dbConfig.Creation = CreatePolicy.IF_NEEDED; dbConfig.Env = env; dbConfig.PageSize = 4096; dbConfig.Duplicates = DuplicatesPolicy.NONE; dbConfig.ReadUncommitted = true; db = BTreeDatabase.Open(dbFileName, dbConfig, openTxn); openTxn.Commit(); openTxn = env.BeginTransaction(); <API key> secConfig = new <API key>(db, new <API key>(SecondaryKeyGen)); secConfig.Creation = CreatePolicy.IF_NEEDED; secConfig.Duplicates = DuplicatesPolicy.SORTED; secConfig.Env = env; secConfig.ReadUncommitted = true; secDB = <API key>.Open(dbSecFileName, secConfig, openTxn); openTxn.Commit(); } public void WriteRecords(BTreeDatabase db) { /* * Write ten records into the database. The records * from 1st to 5th and 8th to 10th are unique in the * database. The data in the 6th and 7th records * are the same. */ for (int i = 0; i < 10; i++) { if (i == 5 || i == 6) db.Put(new DatabaseEntry( BitConverter.GetBytes(i)), new DatabaseEntry( BitConverter.GetBytes((int)10))); else db.Put(new DatabaseEntry( BitConverter.GetBytes(i)), new DatabaseEntry(BitConverter.GetBytes(i))); } } public void WriteRecordsInTxn(BTreeDatabase db, DatabaseEnvironment env) { Transaction txn = env.BeginTransaction(); /* * Write ten records into the database. The records * from 1st to 5th and 8th to 10th are unique in the * database. The data in the 6th and 7th records * are the same. */ for (int i = 0; i < 10; i++) { if (i == 5 || i == 6) db.Put(new DatabaseEntry( BitConverter.GetBytes(i)), new DatabaseEntry( BitConverter.GetBytes((int)10)), txn); else db.Put(new DatabaseEntry( BitConverter.GetBytes(i)), new DatabaseEntry(BitConverter.GetBytes(i)), txn); } txn.Commit(); } public void OpenSecDB(string dbFileName, string dbSecFileName, out BTreeDatabase db, out <API key> secDB) { // Open a primary database. BTreeDatabaseConfig dbConfig = new BTreeDatabaseConfig(); dbConfig.Creation = CreatePolicy.IF_NEEDED; db = BTreeDatabase.Open(dbFileName, dbConfig); // Open a secondary database. <API key> secConfig = new <API key>(db, new <API key>(SecondaryKeyGen)); secConfig.Creation = CreatePolicy.IF_NEEDED; secConfig.Duplicates = DuplicatesPolicy.SORTED; secDB = <API key>.Open(dbSecFileName, secConfig); } public DatabaseEntry SecondaryKeyGen( DatabaseEntry key, DatabaseEntry data) { DatabaseEntry dbtGen; dbtGen = new DatabaseEntry(data.Data); return dbtGen; } public void CheckPartial( DatabaseEntry key, uint kOffset, uint kLen, DatabaseEntry pkey, uint pkOffset, uint pkLen, DatabaseEntry data, uint dOffset, uint dLen) { if (key != null) { Assert.IsTrue(key.Partial); Assert.AreEqual(kOffset, key.PartialOffset); Assert.AreEqual(kLen, key.PartialLen); Assert.AreEqual(kLen, (uint)key.Data.Length); } if (pkey != null) { Assert.IsTrue(pkey.Partial); Assert.AreEqual(pkOffset, pkey.PartialOffset); Assert.AreEqual(pkLen, pkey.PartialLen); Assert.AreEqual(pkLen, (uint)pkey.Data.Length); } if (data != null) { Assert.IsTrue(data.Partial); Assert.AreEqual(dOffset, data.PartialOffset); Assert.AreEqual(dLen, data.PartialLen); Assert.AreEqual(dLen, (uint)data.Data.Length); } } } }
using Microsoft.VisualStudio.TestTools.UnitTesting; using System; namespace Telerik.Less.UnitTests { [TestClass] public class TestCompiler { [TestMethod] public void TestCssOutPut() { string lessFile = Environment.CurrentDirectory + @"\test.less"; string output = "body{background-color:Green}\n"; LessCompiler compiler = null; try { compiler = new LessCompiler(); } catch (Exception) { Assert.Fail("Compiler was not created successfully!"); } string css = string.Empty; if (compiler != null) { css = compiler.CompileFile(lessFile, true); } Assert.AreEqual(output, css); } [TestMethod] public void TestLessOperations() { string lessFile = Environment.CurrentDirectory + @"\test2.less"; string output = "#header{color:#333;border-left:1px;border-right:2px}\n#footer{color:#333}\n"; LessCompiler compiler = null; try { compiler = new LessCompiler(); } catch (Exception) { Assert.Fail("Compiler was not created successfully!"); } string css = string.Empty; if (compiler != null) { css = compiler.CompileFile(lessFile, true); } Assert.AreEqual(output, css); } } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" href="/static/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/layer/skin/default/layer.css"> <style> body { width: 80%; margin: 0 auto; } </style> </head> <body style="padding-top:50px;"> <div id="toolbar"> <button class="btn btn-primary" id="add"></button> <button class="btn btn-warning" id="edit"></button> <button class="btn btn-danger" id="delete"></button> <button class="btn btn-info" id="info"></button> </div> <div id="table"></div> <script src="/static/js/jquery.js"></script> <script src="/static/js/bootstrap.min.js"></script> <script src="/static/js/bootstrap-table.js"></script> <script src="/static/js/<API key>.js"></script> <script src="/static/layer/layer.js"></script> <script> var $table = null; $(function () { //console.log(1); $table = $('#table').bootstrapTable({ locale: 'zh-CN', columns: [ {field:'select', radio:true, width:50} ,{field:'id', title:'id', align:'center', width:100} ,{field:'loginName', title:'', align:'center',width:100} ,{field:'password', title:'', align:'center',width:300} ,{field:'email', title:'', align:'center'} ,{field:'type', title:'', align:'center', width:100, formatter:function (value,index) { return value === 0 ? '' : ''; }} ,{field:'status', title:'', align:'center', width:100,} ,{field:'crTime', title:'', align:'center',width:300} ,{field:'lastTime', title:'', align:'center',width:300} ], url: '/user/data', search: true, toolbar: '#toolbar', striped: true, showRefresh: true, showToggle: true, showColumns: true, cardView: false, detailView: true, detailFormatter: function (index, row) { return '<div id="detail"></div>'; }, clickToSelect: true, pagination: true, sidePagination: 'client', pageSize: 10, pageList: [5,10,15,20] }) }); function getSelectRows() { //console.log($table); var rows = $table.bootstrapTable('getSelections'); if (!rows[0]) { layer.msg(''); return; } else { return rows[0].id; } } $('#add').click(function () { layer.msg('add'); }); $('#edit').click(function () { layer.msg('edit'); }); $('#delete').click(function () { layer.msg('delete'); }); $('#info').click(function () { var id = null; var rows = $table.bootstrapTable('getSelections'); if (!rows[0]) { layer.msg(''); return false; } else { id = rows[0].id; } //console.log(id); layer.open({ type:2 ,title: '' ,area: ['30em','30em'] ,shade: 0 ,maxmin: true ,content: '/user/info/' + id + "?rnd=" + new Date().getTime() }); }); </script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>menhirlib: 40 s </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.2 / menhirlib - 20190924</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> menhirlib <small> 20190924 <span class="label label-success">40 s </span> </small> </h1> <p> <em><script>document.write(moment("2022-01-18 13:05:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-18 13:05:13 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; synopsis: &quot;A support library for verified Coq parsers produced by Menhir&quot; maintainer: &quot;francois.pottier@inria.fr&quot; authors: [ &quot;Jacques-Henri Jourdan &lt;jacques-henri.jourdan@lri.fr&gt;&quot; ] homepage: &quot;https://gitlab.inria.fr/fpottier/menhir&quot; dev-repo: &quot;git+https://gitlab.inria.fr/fpottier/menhir.git&quot; bug-reports: &quot;jacques-henri.jourdan@lri.fr&quot; build: [ [make &quot;-C&quot; &quot;coq-menhirlib&quot; &quot;-j%{jobs}%&quot;] ] patches: [ &quot;<API key>.patch&quot; ] extra-files: [ [&quot;<API key>.patch&quot; &quot;sha512=785e48a7d78cdc5a822adad057d69caa232cf9a62dd2402d3b3f0cd768c6d1417c74460e5866f80d8cd2c1edcc8b24b8f8432f916a291daef251bbb75b21ecdd&quot;] ] install: [ [make &quot;-C&quot; &quot;coq-menhirlib&quot; &quot;install&quot;] ] depends: [ &quot;coq&quot; { &gt;= &quot;8.7&quot; &amp; &lt; &quot;8.12&quot; } ] conflicts: [ &quot;menhir&quot; { != &quot;20190924&quot; } ] tags: [ &quot;date:2019-09-24&quot; &quot;logpath:MenhirLib&quot; ] url { src: &quot;https://gitlab.inria.fr/fpottier/menhir/-/archive/20190924/archive.tar.gz&quot; checksum: [ &quot;md5=<API key>&quot; &quot;sha512=ea8a9a6d773529cf6ac05e4c6c4532770fbb8e574c9b646efcefe90d9f24544741e3e8cfd94c8afea0447e34059a8c79c2829b46764ce3a3d6dcb3e7f75980fc&quot; ] } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-menhirlib.20190924 coq.8.10.2</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-menhirlib.20190924 coq.8.10.2</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>11 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-menhirlib.20190924 coq.8.10.2</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>40 s</dd> </dl> <h2>Installation size</h2> <p>Total: 6 M</p> <ul> <li>2 M <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/<API key>.vo</code></li> <li>1 M <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Main.vo</code></li> <li>1 M <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_complete.vo</code></li> <li>300 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Interpreter.vo</code></li> <li>241 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Interpreter_correct.vo</code></li> <li>141 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_safe.vo</code></li> <li>110 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Automaton.vo</code></li> <li>106 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/<API key>.glob</code></li> <li>82 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Alphabet.vo</code></li> <li>72 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Grammar.vo</code></li> <li>43 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Interpreter.glob</code></li> <li>39 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_classes.vo</code></li> <li>38 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_complete.glob</code></li> <li>33 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Alphabet.glob</code></li> <li>33 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/<API key>.v</code></li> <li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Interpreter_correct.glob</code></li> <li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_safe.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Interpreter.v</code></li> <li>15 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_complete.v</code></li> <li>11 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Grammar.glob</code></li> <li>9 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Automaton.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Alphabet.v</code></li> <li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_safe.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Main.glob</code></li> <li>7 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Interpreter_correct.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Automaton.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_classes.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Grammar.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Main.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Validator_classes.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Version.vo</code></li> <li>1 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Version.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/MenhirLib/Version.glob</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-menhirlib.20190924</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>random: 1 m 26 s </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.5.1 / random - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> random <small> 8.5.0 <span class="label label-success">1 m 26 s </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-27 00:59:42 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-27 00:59:42 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.5.1 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.04.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.04.2 Official 4.04.2 release ocaml-config 1 OCaml Switch Configuration # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/random&quot; license: &quot;LGPL 2&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Random&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:randomized algorithms&quot; &quot;keyword:monads&quot; &quot;keyword:probability&quot; &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; ] authors: [ &quot;Christine Paulin &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/random/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/random.git&quot; synopsis: &quot;Interpretation of random programs&quot; description: &quot;&quot;&quot; This contribution is a modelisation of random programs as measures in Coq. It started in 2004 in the context of the AVERROES project (http://www-verimag.imag.fr/AVERROES/). It is based on comon work with Philippe Audebaud (ENS Lyon). It was last updated in february 2007. It contains the following elements - an axiomatisation of the interval [0,1] and derived properties (files Ubase.v and Uprop.v); - a definition of measures on a type A as functions of type (A-&gt;[0,1])-&gt;[0,1] enjoying special stability properties (files Monads.v and Probas.v); proofs that these constructions have a monadic structure; - an interpretation of programs of type A as measures, in particular a fixpoint construction; the definition of an axiomatic semantic for deriving judgements such as ``the probability of an expression e to evaluate to a result satisfying property q belongs to an interval [p,q]&#39;&#39; (file Prog.v); - Proof of probabilistic termination of a linear random walk (file Iterflip.v); - Proof of a program implementing a bernoulli distribution (Proba(bernouilli(p)=true)=p) using a coin flip and the derived binomial law (Proba(binomial p n=k)=C(n,k)p^k(1-p)^{n-k}) (file Bernoulli.v); - Proof of estimation of the combination of two random executions (file Choice.v) - Proof of partial termination of parameterized random walk (file Ycart.v) - Definition of a measure on traces from a mesure on transitions steps (file Nelist.v, Transitions.v) The document random.pdf contains a short introduction to the library associated to the Gallina source code of the library.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/random/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-random.8.5.0 coq.8.5.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-random.8.5.0 coq.8.5.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>13 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-random.8.5.0 coq.8.5.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>1 m 26 s</dd> </dl> <h2>Installation size</h2> <p>Total: 4 M</p> <ul> <li>667 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Uprop.glob</code></li> <li>433 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Uprop.vo</code></li> <li>296 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Bernoulli.vo</code></li> <li>279 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Carac.vo</code></li> <li>275 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Prog.vo</code></li> <li>255 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Ycart.vo</code></li> <li>210 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/IterFlip.vo</code></li> <li>209 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Transitions.vo</code></li> <li>208 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Choice.vo</code></li> <li>207 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Probas.vo</code></li> <li>204 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Prog.glob</code></li> <li>145 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Monads.vo</code></li> <li>123 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Sets.vo</code></li> <li>116 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Probas.glob</code></li> <li>111 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Bernoulli.glob</code></li> <li>95 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Uprop.v</code></li> <li>87 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Carac.glob</code></li> <li>53 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Sets.glob</code></li> <li>39 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Choice.glob</code></li> <li>37 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Ycart.glob</code></li> <li>37 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Prog.v</code></li> <li>34 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Monads.glob</code></li> <li>28 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Transitions.glob</code></li> <li>24 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/IterFlip.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Probas.v</code></li> <li>17 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Carac.v</code></li> <li>17 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Sets.v</code></li> <li>16 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Ubase.glob</code></li> <li>16 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Bernoulli.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Prelude.vo</code></li> <li>13 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Ubase.vo</code></li> <li>11 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Prelude.glob</code></li> <li>11 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Nelist.vo</code></li> <li>8 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Monads.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Ycart.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Nelist.glob</code></li> <li>4 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Ubase.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Transitions.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Choice.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Prelude.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/IterFlip.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.04.2/lib/coq/user-contrib/Random/Nelist.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-random.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
package assembly; import java.util.ArrayList; public class StringHandler { ArrayList<String> statements; ArrayList<Register> registers; public StringHandler(){ statements = new ArrayList<String>(); registers = new ArrayList<Register>(); } public void addStatement(String statement){ if(statement.length() > 0){ statements.add(statement); statements.add(computeStatement(statement)); } } public String output(){ String temp = "<html>"; for(int i = 0; i < statements.size(); i++){ temp = temp + statements.get(i)+"<br>"; } temp = temp + "</html>"; return temp; } private String computeStatement(String statement){ if(statement.substring(0, 4).equals("addi")) return addI(statement); else if(statement.substring(0, 3).equals("lwi")) return lwi(statement); return "This doesn't appear to be a supported equation"; } private String addI(String statement){ String temp = statement.replace(",",""); String delims = "[ ]+"; String[] terms = temp.split(delims); int term1 = fetchRegister(terms[2]); int term2 = Integer.parseInt(terms[3]); int result = term1 + term2; loadRegister(terms[1], result); String finalString = terms[1] + " = " + terms[2] + " + " + terms[3] + " = " + result; return finalString; } private String lwi(String statement){ String temp = statement.replace(",",""); String delims = "[ ]+"; String[] terms = temp.split(delims); int term1 = Integer.parseInt(terms[2]); loadRegister(terms[1], term1); String finalString = terms[1] + " = " + terms[2]; return finalString; } private int fetchRegister(String regName){ for (Register reg : registers) if(reg.name.equals(regName)) return reg.value; return 0; } private void loadRegister(String regName, int regValue){ for (Register reg : registers) if(reg.name.equals(regName)){ reg.value = regValue; return; } Register temp = new Register(regName, regValue); registers.add(temp); } }
var fs = require('fs'); var mongoose = require('mongoose'); module.exports = function(grunt) { /** * Configuration settings for grunt tasks */ var Config = Object.freeze({ url: '', port: '27017' }); /** * Task for removing data from database. * This is the analog to "insert" and should * be used to remove test data after it is * inserted. */ grunt.registerMultiTask('delete', 'Delete data from database', function() { grunt.log.write('Removing data...\n\n'); grunt.log.write('Using file: ' + this.data + "\n"); console.log(__dirname); var path = this.data; var data = JSON.parse(fs.readFileSync(path)); //var db = mongo.connect(Config.url, Config.port); grunt.log.write('\nSuccessfully removed data').ok(); }); };
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>yalla: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.0 / yalla - 2.0.2</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> yalla <small> 2.0.2 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-03-02 09:40:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-02 09:40:27 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.0 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; synopsis: &quot;Yalla library&quot; description: &quot;&quot;&quot; YALLA: an LL library for Coq Yet Another deep embedding of Linear Logic in Coq &quot;&quot;&quot; homepage: &quot;https://perso.ens-lyon.fr/olivier.laurent/yalla/&quot; dev-repo: &quot;git+https://github.com/olaure01/yalla.git&quot; bug-reports: &quot;https://github.com/olaure01/yalla/issues&quot; doc: &quot;https://perso.ens-lyon.fr/olivier.laurent/yalla/&quot; maintainer: &quot;olivier.laurent@ens-lyon.fr&quot; authors: [ &quot;Olivier Laurent&quot; ] license: &quot;LGPL-3.0-or-later&quot; depends: [ &quot;coq&quot; { &gt;= &quot;8.13&quot; &amp; &lt; &quot;8.15&quot; } ] build: [ [&quot;./configure&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] url { src: &quot;https://github.com/olaure01/yalla/archive/v2.0.2.tar.gz&quot; checksum: &quot;sha256=<SHA256-like>&quot; } tags: [ &quot;keyword:linear logic&quot; &quot;keyword:metatheory&quot; &quot;keyword:cut elimination&quot; &quot;category:Mathematics/Logic/Foundations&quot; &quot;date:2021-01-13&quot; &quot;logpath:Yalla&quot; ] </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-yalla.2.0.2 coq.8.12.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.0). The following dependencies couldn&#39;t be met: - coq-yalla -&gt; coq &gt;= 8.13 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-yalla.2.0.2</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
var isObject = require('isobject'); module.exports = function getValue(o, prop, escape) { if (o == null || !isObject(o)) { return {}; } if (prop == null) { return o; } var path; if (escape === true) { prop = prop.replace(/\\\./g, '___DOT___'); path = prop.split('.').map(function(seg) { return seg.replace(/___DOT___/g, '.'); }); } else { path = prop.split('.'); } var last = path.pop(); var len = path.length; for (var i = 0; i < len; i++) { var key = path[i]; o = o[key]; if (o == null) { return {}; } } return o[last]; };
#!/bin/sh function lint() { xmllint --c14n "$1"|xmllint --format - } set -o pipefail && xcodebuild -workspace ContentfulPlugin.xcworkspace \ -scheme <API key> 2>/dev/null | xcpretty -c BUILD="`ls -d $HOME/Library/Developer/Xcode/DerivedData/ContentfulPlugin-*`" $BUILD/Build/Products/Debug/<API key> \ a3rsszoo7qqp $<API key> lint Tests/a3rsszoo7qqp.xml >1.xml lint ContentfulModel.xcdatamodeld/ContentfulModel.xcdatamodel/contents >2.xml diff -w 1.xml 2.xml rm -f 1.xml 2.xml rm -rf ContentfulModel.xcdatamodeld
(function() { 'use strict'; angular .module('app.admin') .run(appRun); appRun.$inject = ['routerHelper']; /* @ngInject */ function appRun(routerHelper) { routerHelper.configureStates(getStates()); } function getStates() { return [ { state: 'admin', config: { url: '/admin', templateUrl: 'app/admin/admin.html', controller: 'AdminController', controllerAs: 'vm', title: 'Admin', settings: { nav: 2, content: '<i class="fa fa-lock"></i> Admin' } } } ]; } })();
(function() { var randomAtoZ, randomWord, randomWordLength, word_history, wordfrequency, returnWord; randomAtoZ = (function(lookup) { return function() { var chance, char, charfreq, prev, random; random = Math.random() * 100000; char = void 0; prev = 0; for (char in lookup) { charfreq = lookup[char]; chance = (charfreq - prev) / 1000 + '%'; if (random < charfreq) { return { char : char, charfreq : charfreq, chance : chance }; } prev = charfreq; } }; })({ // Ranges calculated from data found at a: 8167, b: 9659, c: 12441, d: 16694, e: 29396, f: 31624, g: 33639, h: 39733, i: 46699, j: 46852, k: 47624, l: 51649, m: 54055, n: 60804, o: 68311, p: 70240, q: 70335, r: 76322, s: 82649, t: 91705, u: 94463, v: 95441, w: 97801, x: 97951, y: 99925, z: 100000 }); wordfrequency = []; randomWordLength = function() { var amount, chance, j, len, length, lengthfreq, lookup, percent, percentages, prev, random, total; total = 0; // word length frequency in the english language from 1-19 characters percentages = [ 0.1, 0.6, 2.6, 5.2, 8.5, 12.2, 14.0, 14.0, 12.6, 10.1, 7.5, 5.2, 3.2, 2.0, 1.0, 0.6, 0.3, 0.2, 0.1 ]; for (j = 0, len = percentages.length; j < len; j++) { percent = percentages[j]; amount = total + ((percent / 100) * 100000); wordfrequency.push(amount); total = amount; } random = Math.random() * 100000; length = void 0; lookup = { 1 : wordfrequency[0], 2 : wordfrequency[1], 3 : wordfrequency[2], 4 : wordfrequency[3], 5 : wordfrequency[4], 6 : wordfrequency[5], 7 : wordfrequency[6], 8 : wordfrequency[7], 9 : wordfrequency[8], 10 : wordfrequency[9], 11 : wordfrequency[10], 12 : wordfrequency[11], 13 : wordfrequency[12], 14 : wordfrequency[13], 15 : wordfrequency[14], 16 : wordfrequency[15], 17 : wordfrequency[16], 18 : wordfrequency[17], 19 : wordfrequency[18] }; prev = 0; for (length in lookup) { lengthfreq = lookup[length]; chance = Math.round(lengthfreq - prev) / 1000 + '%'; if (random < lengthfreq) { return { length : length, chance : chance }; } prev = lengthfreq; } }; randomWord = function() { var chance, char_map, character, i, isword, j, length, length_i, ref, word; length = randomWordLength(); length_i = length.length; chance = length.chance; word = ''; char_map = []; for (i = j = 1, ref = length_i; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { character = randomAtoZ(); word += character.char; char_map.push(character); } return { length_i : length_i, chance : chance, word : word, isword : isword, char_map : char_map }; }; word_history = []; returnWord = function(generated_word) { var char, charlist, charlist_html, history_string, isword, j, k, len, len1, length, ref, w, word; document.<API key>('body')[0].className = ''; if (generated_word.isword === true) { isword = 'isword'; } else { isword = 'isnotword'; } word = document.getElementById('word'); word.innerHTML = ' <div style="font-size: 18px;margin-left:10%;">Generated Word : ' +generated_word.word +'</div>'; document.<API key>('body')[0].className = isword; length = document.getElementById('length'); length.innerHTML = '<div style="font-size: 18px;margin-left:10%;">Word Length &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: ' + generated_word.length_i+'</div>'; charlist = document.getElementById('charlist'); charlist_html = ''; ref = generated_word.char_map; word_history.unshift({ word : generated_word.word, isword : generated_word.isword }); history_string = '<div style="margin-left: -20%; font-size: 18px;">History: </div>'; for (k = 0, len1 = word_history.length; k < len1; k++) { w = word_history[k]; if (w.isword === true) { isword = 'isword'; } else { isword = 'isnotword'; } history_string += '<li class="' + isword + '">' + w.word + '</li>'; } return document.getElementById('history').innerHTML = history_string; }; document.getElementById('generated_word').onclick = function() { return returnWord(randomWord()); }; }).call(this);
import React from 'react'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import RaisedButton from 'material-ui/RaisedButton'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import AppBar from 'material-ui/AppBar'; import {Link} from 'react-router' import Subheader from 'material-ui/Subheader'; import Divider from 'material-ui/Divider'; import ThemeFactory from '../res/styles/ThemeFactory'; import GitHubForkRibbon from '<API key>'; const styles = { menuItem: { paddingLeft: '6px', lineHeight: "43px", fontSize: '13px', fontWeight: 'bold' }, subHeader: { height: '56px', fontSize: '22px', padding: '12px 0 11px 24px', lineHeight: '35px', fontWeight: 'bold' }, menuItemDiv: { paddingTop: '12px' }, childDiv: { margin: '1%' } }; export default class <API key> extends React.Component { constructor(props) { super(props); this.state = { open: false, title: 'Material-UI', <API key>: ThemeFactory.Default }; } handleToggle = () => this.setState({open: !this.state.open}); handleClose = () => this.setState({open: false}); render() { var appBarTitle = this.state.title; var <API key> = this.state.<API key>; var currentRoute = this.props.routes[this.props.routes.length - 1]; if (currentRoute && currentRoute.name) { appBarTitle = currentRoute.name; console.log(currentRoute.name); <API key> = ThemeFactory[currentRoute.name]; // this.setState({<API key>:ThemeFactory[currentRoute.name]}); } return ( <MuiThemeProvider> <div> <GitHubForkRibbon href="https://github.com/leoliew/<API key>" target="_blank" position="right"> Fork me on GitHub </GitHubForkRibbon> <AppBar <API key>={this.handleToggle} title={appBarTitle} style={{backgroundColor: <API key>}} iconClassNameRight="<API key>" /> <Drawer docked={false} width={240} open={this.state.open} onRequestChange={(open) => this.setState({open})} > <Link style={{ textDecoration: 'none' }} to="/"> <Subheader style={styles.subHeader} onTouchTap={this.handleClose}>Google</Subheader> </Link> <Divider /> <div style={styles.menuItemDiv}> {this.props.route.childRoutes.map((route, i) => ( <MenuItem key={i} onTouchTap={this.handleClose} containerElement={<Link to={route.path}/>} primaryText={route.name} style={styles.menuItem} /> ))} </div> </Drawer> <div style={styles.childDiv}> {this.props.children} </div> </div> </MuiThemeProvider> ); } }
require File.dirname(__FILE__) + '/test_helper' context "Resque::Plugins::Aps" do setup do Resque.redis.flushall end # test "needs to infer a queue with enqueue" do # assert_raises Resque::NoQueueError do # Resque.enqueue(SomeJob, 20, '/tmp') # end # end test "can create an application" do assert Resque.<API key>('SomeApp', '/var/apps/certificates/someapp.pem') assert_equal 1, Resque.<API key> assert Resque.<API key>('SomeApp2', '/var/apps/certificates/someapp2.pem', 'secret') assert_equal 2, Resque.<API key> end test "can get an application" do Resque.<API key>('SomeApp', '/var/apps/certificates/someapp.pem', 'secret') a = Resque.aps_application('SomeApp') assert_equal 'SomeApp', a.name assert_equal '/var/apps/certificates/someapp.pem', a.cert_file assert_equal 'secret', a.cert_passwd end # test "can update an application" do # end test "knows how big the application queue is" do assert_equal 0, Resque.<API key> Resque.<API key>('SomeApp', '/var/apps/certificates/someapp.pem', 'secret') assert_equal 1, Resque.<API key> end test "can get a list of application names" do assert Resque.<API key>('SomeApp', '/var/apps/certificates/someapp.pem') assert Resque.<API key>('SomeApp2', '/var/apps/certificates/someapp2.pem', 'secret') assert_equal ['SomeApp2', 'SomeApp'], Resque.<API key>(0, 2) end test "can enqueue aps notifications" do n = Resque::Plugins::Aps::Notification.new('application_name' => 'SomeApp', 'device_token' => '<API key>', 'payload' => '{"aps": { "alert": "hello"}}') assert Resque.enqueue_aps('SomeApp', n) assert_equal 1, Resque.<API key>('SomeApp') assert Resque.enqueue_aps('SomeApp', n) assert_equal 2, Resque.<API key>('SomeApp') end test "can dequeue aps notifications" do n = Resque::Plugins::Aps::Notification.new('application_name' => 'SomeApp', 'device_token' => '<API key>', 'payload' => '{"aps": { "alert": "hello"}}') assert Resque.enqueue_aps('SomeApp', n) assert_equal 1, Resque.<API key>('SomeApp') nn = Resque.dequeue_aps('SomeApp') assert nn assert_kind_of Resque::Plugins::Aps::Notification, nn assert_equal n.application_name, nn.application_name assert_equal n.device_token, nn.device_token assert_equal n.payload, nn.payload end test "knows how big the application notification queue is" do n = Resque::Plugins::Aps::Notification.new('application_name' => 'SomeApp', 'device_token' => '<API key>', 'payload' => '{"aps": { "alert": "hello"}}') assert Resque.enqueue_aps('SomeApp', n) assert_equal 1, Resque.<API key>('SomeApp') assert Resque.enqueue_aps('SomeApp', n) assert_equal 2, Resque.<API key>('SomeApp') end test "can get a list of application notifications" do n = Resque::Plugins::Aps::Notification.new('application_name' => 'SomeApp', 'device_token' => '<API key>', 'payload' => '{"aps": { "alert": "hello"}}') assert Resque.enqueue_aps('SomeApp', n) assert Resque.enqueue_aps('SomeApp', n) assert Resque.enqueue_aps('SomeApp', n) assert_equal 3, Resque.<API key>('SomeApp') a = Resque.<API key>('SomeApp', 0, 20) assert_equal 3, a.size end end
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Sensorless control of 3-phase brushless DC motors: File Index</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindexHL" href="files.html">File&nbsp;List</a> | <a class="qindex" href="globals.html">Globals</a></div> <h1>Sensorless control of 3-phase brushless DC motors File List</h1>Here is a list of all files with brief descriptions:<table> <tr><td class="indexkey"><a class="el" href="BLDC_8h.html">BLDC.h</a> <a href="BLDC_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr> <tr><td class="indexkey"><a class="el" href="main_8c.html">main.c</a> <a href="main_8c-source.html">[code]</a></td><td class="indexvalue"></td></tr> </table> <hr size="1"><address style="align: right;"><small>Generated on Tue Oct 11 10:57:02 2005 for Sensorless control of 3-phase brushless DC motors by&nbsp; <a href="http: <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> </html>
var FrozenColumns = function FrozenColumns(table) { this.table = table; //hold Tabulator object this.leftColumns = []; this.rightColumns = []; this.leftMargin = 0; this.rightMargin = 0; this.rightPadding = 0; this.initializationMode = "left"; this.active = false; this.scrollEndTimer = false; }; //reset initial state FrozenColumns.prototype.reset = function () { this.initializationMode = "left"; this.leftColumns = []; this.rightColumns = []; this.leftMargin = 0; this.rightMargin = 0; this.rightMargin = 0; this.active = false; this.table.columnManager.headersElement.style.marginLeft = 0; this.table.columnManager.element.style.paddingRight = 0; }; //initialize specific column FrozenColumns.prototype.initializeColumn = function (column) { var config = { margin: 0, edge: false }; if (!column.isGroup) { if (this.frozenCheck(column)) { config.position = this.initializationMode; if (this.initializationMode == "left") { this.leftColumns.push(column); } else { this.rightColumns.unshift(column); } this.active = true; column.modules.frozen = config; } else { this.initializationMode = "right"; } } }; FrozenColumns.prototype.frozenCheck = function (column) { var frozen = false; if (column.parent.isGroup && column.definition.frozen) { console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"); } if (column.parent.isGroup) { return this.frozenCheck(column.parent); } else { return column.definition.frozen; } return frozen; }; //quick layout to smooth horizontal scrolling FrozenColumns.prototype.scrollHorizontal = function () { var _this = this; var rows; if (this.active) { clearTimeout(this.scrollEndTimer); //layout all rows after scroll is complete this.scrollEndTimer = setTimeout(function () { _this.layout(); }, 100); rows = this.table.rowManager.getVisibleRows(); this.calcMargins(); this.<API key>(); this.layoutCalcRows(); rows.forEach(function (row) { if (row.type === "row") { _this.layoutRow(row); } }); this.table.rowManager.tableElement.style.marginRight = this.rightMargin; } }; //calculate margins for rows FrozenColumns.prototype.calcMargins = function () { this.leftMargin = this._calcSpace(this.leftColumns, this.leftColumns.length) + "px"; this.table.columnManager.headersElement.style.marginLeft = this.leftMargin; this.rightMargin = this._calcSpace(this.rightColumns, this.rightColumns.length) + "px"; this.table.columnManager.element.style.paddingRight = this.rightMargin; //calculate right frozen columns this.rightPadding = this.table.rowManager.element.clientWidth + this.table.columnManager.scrollLeft; }; //layout calculation rows FrozenColumns.prototype.layoutCalcRows = function () { if (this.table.modExists("columnCalcs")) { if (this.table.modules.columnCalcs.topInitialized && this.table.modules.columnCalcs.topRow) { this.layoutRow(this.table.modules.columnCalcs.topRow); } if (this.table.modules.columnCalcs.botInitialized && this.table.modules.columnCalcs.botRow) { this.layoutRow(this.table.modules.columnCalcs.botRow); } } }; //calculate column positions and layout headers FrozenColumns.prototype.<API key> = function (allCells) { var _this2 = this; var leftParents = []; this.leftColumns.forEach(function (column, i) { column.modules.frozen.margin = _this2._calcSpace(_this2.leftColumns, i) + _this2.table.columnManager.scrollLeft + "px"; if (i == _this2.leftColumns.length - 1) { column.modules.frozen.edge = true; } else { column.modules.frozen.edge = false; } if (column.parent.isGroup) { var parentEl = _this2.<API key>(column); if (!leftParents.includes(parentEl)) { _this2.layoutElement(parentEl, column); leftParents.push(parentEl); } if (column.modules.frozen.edge) { parentEl.classList.add("tabulator-frozen-" + column.modules.frozen.position); } } else { _this2.layoutElement(column.getElement(), column); } if (allCells) { column.cells.forEach(function (cell) { _this2.layoutElement(cell.getElement(), column); }); } }); this.rightColumns.forEach(function (column, i) { column.modules.frozen.margin = _this2.rightPadding - _this2._calcSpace(_this2.rightColumns, i + 1) + "px"; if (i == _this2.rightColumns.length - 1) { column.modules.frozen.edge = true; } else { column.modules.frozen.edge = false; } if (column.parent.isGroup) { _this2.layoutElement(_this2.<API key>(column), column); } else { _this2.layoutElement(column.getElement(), column); } if (allCells) { column.cells.forEach(function (cell) { _this2.layoutElement(cell.getElement(), column); }); } }); }; FrozenColumns.prototype.<API key> = function (column) { return column.parent.isGroup ? this.<API key>(column.parent) : column.getElement(); }; //layout columns appropropriatly FrozenColumns.prototype.layout = function () { var self = this, rightMargin = 0; if (self.active) { //calculate row padding this.calcMargins(); // self.table.rowManager.activeRows.forEach(function(row){ // self.layoutRow(row); // if(self.table.options.dataTree){ self.table.rowManager.getDisplayRows().forEach(function (row) { if (row.type === "row") { self.layoutRow(row); } }); this.layoutCalcRows(); //calculate left columns this.<API key>(true); // if(tableHolder.scrollHeight > tableHolder.clientHeight){ // rightMargin -= tableHolder.offsetWidth - tableHolder.clientWidth; this.table.rowManager.tableElement.style.marginRight = this.rightMargin; } }; FrozenColumns.prototype.layoutRow = function (row) { var _this3 = this; var rowEl = row.getElement(); rowEl.style.paddingLeft = this.leftMargin; // rowEl.style.paddingRight = this.rightMargin + "px"; this.leftColumns.forEach(function (column) { var cell = row.getCell(column); if (cell) { _this3.layoutElement(cell.getElement(), column); } }); this.rightColumns.forEach(function (column) { var cell = row.getCell(column); if (cell) { _this3.layoutElement(cell.getElement(), column); } }); }; FrozenColumns.prototype.layoutElement = function (element, column) { if (column.modules.frozen) { element.style.position = "absolute"; element.style.left = column.modules.frozen.margin; element.classList.add("tabulator-frozen"); if (column.modules.frozen.edge) { element.classList.add("tabulator-frozen-" + column.modules.frozen.position); } } }; FrozenColumns.prototype._calcSpace = function (columns, index) { var width = 0; for (var i = 0; i < index; i++) { if (columns[i].visible) { width += columns[i].getWidth(); } } return width; }; Tabulator.prototype.registerModule("frozenColumns", FrozenColumns);
#include <fstream> #include <string> #include "StrTools.h" #include "IniParser.h" using namespace std; IniParser::IniParser(const string &filename, bool mustExist) : filename(filename) { dirty = false; updateCnt = 0; reload(mustExist); } void IniParser::changed() { dirty = true; if (updateCnt == 0) flush(); } void IniParser::beginUpdate() { updateCnt++; } void IniParser::endUpdate() { if (updateCnt == 0) throw IniException("endUpdate without beginUpdate"); updateCnt if (dirty || updateCnt == 0) flush(); } void IniParser::reload(bool mustExist) { freeStructs(); ifstream ifs(filename.c_str()); vector<string> fileLines; if (ifs.is_open()) { for (string line; getline(ifs, line);) fileLines.push_back(line); ifs.close(); } else if (mustExist) throw IniException(filename + " not exists"); Sect *psect = NULL; size_t sectCount = 0; vector<string> comments; for (size_t i = 0; i < fileLines.size(); i++) { string curLine = StrTools::trim(fileLines[i]); if (curLine=="") continue; if (curLine[0] == ';') { comments.push_back(curLine.substr(1, curLine.length()-1)); continue; } if (curLine[0] == '[') { if (curLine.back() != ']') throw IniException("Invalid section: " + curLine + " in file "+filename); psect = new Sect(); psect->sectHeader = curLine.substr(1, curLine.length() - 2); psect->commentsBefore = comments; comments.clear(); unordered_map<string, size_t>::const_iterator it = sectMap.find(psect->sectHeader); if (it != sectMap.end()) throw IniException("Duplicate section [" + psect->sectHeader + "] in file " + filename); sectCount++; sections.push_back(psect); sectMap[psect->sectHeader] = sectCount - 1; } else { if (psect==NULL) throw IniException("Key before first section in line: \"" + curLine + "\" in file " + filename); size_t eqPos = curLine.find('='); if (eqPos == string::npos) throw IniException("Invalid key without '=': " + curLine + " in file " + filename); Trio trio; trio.key = StrTools::trimRight(curLine.substr(0, eqPos)); trio.val = StrTools::trimLeft(curLine.substr(eqPos + 1, curLine.length() - eqPos - 1)); trio.comments = comments; comments.clear(); unordered_map<string, size_t>::const_iterator it2 = psect->keysMap.find(trio.key); if (it2 != psect->keysMap.end()) throw IniException("Duplicate key \"" + trio.key + "\"in section [" + psect->sectHeader+ "] in file " + filename); psect->keysMap[trio.key] = psect->keysval.size(); psect->keysval.push_back(trio); } } } void IniParser::flush() { ofstream ofs(filename.c_str()); for (size_t i = 0; i < sections.size(); i++) { if (i > 0) ofs << endl; for (size_t j = 0; j < sections[i]->commentsBefore.size(); j++) ofs << ";" << sections[i]->commentsBefore[j] << endl; ofs << "[" << sections[i]->sectHeader << "]" << endl; for (size_t j = 0; j < sections[i]->keysval.size(); j++) { for (size_t k = 0; k < sections[i]->keysval[j].comments.size(); k++) ofs << ";" << sections[i]->keysval[j].comments[k] << endl; ofs << sections[i]->keysval[j].key << "=" << sections[i]->keysval[j].val << endl; } } ofs.close(); dirty = false; } void IniParser::freeStructs() { for (size_t i = 0; i < sections.size(); i++) delete sections[i]; sections.clear(); } void IniParser::clearAll() { freeStructs(); changed(); } IniParser::~IniParser() { if (dirty) flush(); freeStructs(); } bool IniParser::sectionExists(const string &sectStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); return it != sectMap.end(); } bool IniParser::keyExists(const string &sectStr, const string &keyStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) return false; Sect* sect = sections[(*it).second]; unordered_map<string, size_t>::const_iterator it2 = sect->keysMap.find(keyStr); return it2 != sect->keysMap.end(); } vector<string> IniParser::readSections() { vector<string> sectNames; for (size_t i = 0; i < sections.size(); i++) sectNames.push_back(sections[i]->sectHeader); return sectNames; } IniParser::Sect* IniParser::getSectPtr(const string &sectStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) throw IniException("Section " + sectStr + " not found in file " + filename); size_t index = (*it).second; return sections[index]; } vector<string> IniParser::readSectionKeys(const string &sectStr) { Sect* sect = getSectPtr(sectStr); vector<string> keyNames; for (size_t i = 0; i < sect->keysval.size(); i++) keyNames.push_back(sect->keysval[i].key); return keyNames; } vector<pair<string,string>> IniParser::readSectionPairs(const string &sectStr) { Sect* sect = getSectPtr(sectStr); vector<pair<string, string>> keyPairs; for (size_t i = 0; i < sect->keysval.size(); i++) { Trio t = sect->keysval[i]; keyPairs.push_back(make_pair(t.key, t.val)); } return keyPairs; } unordered_map<string, string> IniParser::readSectionMap(const string &sectStr) { Sect* sect = getSectPtr(sectStr); unordered_map<string, string> map; for (size_t i = 0; i < sect->keysval.size(); i++) { Trio t = sect->keysval[i]; map[t.key] = t.val; } return map; } string IniParser::mapValue(unordered_map<string, string> map, const string &key) { unordered_map<string, string>::const_iterator iter = map.find(key); if (iter != map.end()) return iter->second; else throw IniException("Map not contains " + key); } string IniParser::mapValueDef(unordered_map<string, string> map, const string &key, const string &def) { unordered_map<string, string>::const_iterator iter = map.find(key); if (iter != map.end()) return iter->second; else return def; } void IniParser::eraseSection(const string &sectStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) throw IniException("Section " + sectStr + " not found in file " + filename); Sect* sect = sections[(*it).second]; sect->keysMap.clear(); sect->keysval.clear(); changed(); } void IniParser::deleteSection(const string &sectStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) return; size_t index = (*it).second; Sect* sect = sections[index]; delete sect; sections.erase(sections.begin() + index); sectMap.erase(it); changed(); } void IniParser::deleteKey(const string &sectStr, const string &keyStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) throw IniException("Section " + sectStr + " not found in file " + filename); Sect* sect = sections[(*it).second]; unordered_map<string, size_t>::const_iterator it2 = sect->keysMap.find(keyStr); if (it2 == sect->keysMap.end()) throw IniException("Key " + keyStr + " not found in file " + filename + " in section " + sectStr); sect->keysval.erase(sect->keysval.begin() + (*it2).second); sect->keysMap.erase(it2); changed(); } bool IniParser::tryReadString(string &result, const string &sectStr, const string &keyStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) return false; Sect* sect = sections[(*it).second]; unordered_map<string, size_t>::const_iterator it2 = sect->keysMap.find(keyStr); if (it2 == sect->keysMap.end()) return false; result = sect->keysval[(*it2).second].val; return true; } string IniParser::readString(const string &sectStr, const string &keyStr) { string result; if (tryReadString(result, sectStr, keyStr)) return result; else throw IniException("Not found key "+keyStr+" in section "+sectStr); } string IniParser::readStringDef(const string &sectStr, const string &keyStr, const string &def) { string result; if (tryReadString(result, sectStr, keyStr)) return result; else return def; } int IniParser::readInt32(const string &sectStr, const string &keyStr) { string str = readString(sectStr, keyStr); return atoi(str.c_str()); } int IniParser::readInt32Def(const string &sectStr, const string &keyStr, const long long def) { string str = readStringDef(sectStr, keyStr, to_string(def)); return atoi(str.c_str()); } long long IniParser::readInt64(const string &sectStr, const string &keyStr) { string str = readString(sectStr, keyStr); return atoll(str.c_str()); } long long IniParser::readInt64Def(const string &sectStr, const string &keyStr, const long long def) { string str = readStringDef(sectStr, keyStr, to_string(def)); return atoll(str.c_str()); } double IniParser::readDouble(const string &sectStr, const string &keyStr) { string str = readString(sectStr, keyStr); return atof(str.c_str()); } double IniParser::readDoubleDef(const string &sectStr, const string &keyStr, const double def) { string str = readStringDef(sectStr, keyStr, to_string(def)); return atof(str.c_str()); } bool IniParser::readBool(const string &sectStr, const string &keyStr) { long long num = readInt64(sectStr, keyStr); return num != 0; } bool IniParser::readBoolDef(const string &sectStr, const string &keyStr, const bool def) { int num = readInt32Def(sectStr, keyStr, static_cast<int>(def)); return num != 0; } //three cases: new seciotn, new key and replace value void IniParser::writeString(const string &sectStr, const string &keyStr, const string &valueStr) { unordered_map<string, size_t>::const_iterator it = sectMap.find(sectStr); if (it == sectMap.end()) { dirty = true; Sect *psect = new Sect(); Trio trio; trio.key = keyStr; trio.val = valueStr; psect->keysval.push_back(trio); psect->keysMap[keyStr] = 0; psect->sectHeader = sectStr; sections.push_back(psect); sectMap[sectStr] = sections.size()-1; return; } Sect* sect = sections[(*it).second]; unordered_map<string, size_t>::const_iterator it2 = sect->keysMap.find(keyStr); if (it2 == sect->keysMap.end()) { dirty = true; Trio trio; trio.key = keyStr; trio.val = valueStr; sect->keysMap[keyStr] = sect->keysval.size(); sect->keysval.push_back(trio); return; } size_t index = (*it2).second; if (sect->keysval[index].val != valueStr) { dirty = true; sect->keysval[index].val = valueStr; } } void IniParser::writeLong(const string &sectStr, const string &keyStr, const long long value) { writeString(sectStr, keyStr, to_string(value)); } void IniParser::writeDouble(const string &sectStr, const string &keyStr, const double value) { writeString(sectStr, keyStr, to_string(value)); } void IniParser::writeBool(const string &sectStr, const string &keyStr, const bool value) { writeLong(sectStr, keyStr, value?1:0); }
// FLO<API key>.h // FishLamp #import "FishLampCore.h" #import "FLHttpRequest.h" #import "FLO<API key>.h" #import "FLOAuthApp.h" @interface FLO<API key> : FLHttpRequest { @private FLO<API key>* _authData; FLOAuthApp* _app; NSURL* _url; } - (id) initWithOAuthApp:(FLOAuthApp*) app authData:(FLO<API key>*) data; + (FLO<API key>*) O<API key>:(FLOAuthApp*) app authData:(FLO<API key>*) data; @end
using System.Collections; namespace Anycmd.Xacml.Interfaces { using Runtime; <summary> Defines a value that can be used as a function parameter. Containing methods that allows getting a typed value in order to evaluate the function with typed values. </summary> public interface IFunctionParameter { <summary> Gets the data type of the value. </summary> <param name="context">The evaluation context.</param> <returns>The data type descriptor.</returns> IDataType GetType(EvaluationContext context); <summary> Whether the function parameter is a bag of values. </summary> bool IsBag { get; } <summary> The size of the bag. </summary> int BagSize { get; } <summary> All the elements of the bag. </summary> ArrayList Elements { get; } <summary> Returns a function value from the function parameter. </summary> <param name="parNo"></param> <returns></returns> IFunction GetFunction(int parNo); <summary> Returns an object value from the function parameter. This method is used in fuctions that uses data types not defined in the specification. </summary> <param name="dataType">The expected data type of the value.</param> <param name="parNo">The parameter number that represents this value.</param> object GetTypedValue(IDataType dataType, int parNo); } }
export * from './App' export {default as CompleteLogIn} from './CompleteLogIn' export * from './Error404' export * from './EventSelectField' export * from './<API key>' export * from './Home' export * from './LogInForm' export * from './LookUpRegister' export * from './MainFooter' export * from './MainNav' export * from './<API key>' export * from './OrganizationModal' export * from './Page' export * from './Student' export * from './StudentSearchField' export * from './TicketTypes' export * from './UnionIndicator'
using UnityEngine; using UnityEngine.UI; using System; using System.Collections; public class FoodClicker : MonoBehaviour { private static float BASE_FOOD_PER_CLICK = 1.0f; // Singleton Implementation public FoodClicker instance { get; private set; } void Awake() { instance = this; } // Text Prefab and Canvas for displaying clicked amount. public Text textPrefab; public Canvas canvas; // Food Per Click private float foodPerClick; // Use this for initialization void Start() { foodPerClick = BASE_FOOD_PER_CLICK; } void OnMouseDown() { // Increment counter ResourceTracker.instance.applyFoodImpulse(foodPerClick); // Display a HamText Prefab Text hamText = (Text)Instantiate (textPrefab); hamText.transform.SetParent (canvas.transform, false); hamText.text = String.Format ("+{0,5:N1} Ham", foodPerClick); } }
# Reddit Retractable Sidebar If you do a lot of split screen redditing, you'll quickly find that the sidebar can be a nuisance. Well, this script makes that sidebar retractable. It adds a FAB button to the right-hand side of the screen which allows you to hide or show the sidebar. It will add a cookie remembering the sidebar's last position so that you can browse the site without continually hiding it. You can install the script by going to [the script's page on GreasyFork](https://greasyfork.org/en/scripts/<API key>). As of version 0.4 you can toggle the sidebar by pressing "q".
using System; using System.Collections; using System.Collections.Generic; namespace Janglin.Glassdoor.Api { internal class PagedResult<C, I> : Result<C>, IEnumerable<I> where C : PagedTypedResponse<I>, IEnumerable<I> where I : class { string _Url; int _PageNumber = 0; public PagedResult(string url) { _Url = url; } public int PageSize { get; set; } = 1000; public IEnumerator<I> GetEnumerator() { return new <API key><C,I>(_Url,_PageNumber, PageSize); } IEnumerator IEnumerable.GetEnumerator() { return new <API key><C, I>(_Url,_PageNumber, PageSize); } } }
angular.module('App', ['LocationBar']);
// browser.js // This contains the client-side javascript code for jstdgame. // The code is split up into a model, view, and controller class, all contained // within a global parent object, following the MVC paradigm //This contains all of the data objects for the game var BrowserModel = function (parent) { var m_model = this; var m_parent = parent; var m_objects = {}; var m_mouse = {"xpos":-1,"ypos":-1,"radius":5}; var m_client_dimensions = {}; var m_server_dimensions = {}; var m_scale = {}; //public methods this.setMousePos = function(xpos, ypos) { m_mouse.xpos = xpos; m_mouse.ypos = ypos; } this.getMouse = function() { return m_mouse; } this.getObjects = function() { return m_objects; } this.getObjectById = function(object_id) { return m_objects[object_id]; } this.addObject = function(object) { m_objects[object._id] = object; return m_objects[object._id]; } this.removeObject = function(object) { delete m_objects[object._id]; } this.updateObjectPos = function(object) { if (m_objects[object._id]) { m_objects[object._id].xpos = object.xpos; m_objects[object._id].ypos = object.ypos; m_objects[object._id].xvel = object.xvel; m_objects[object._id].yvel = object.yvel; m_objects[object._id].lastUpdate = Date.now(); } } this.updateObjectHit = function(object) { if (m_objects[object._id]) { m_objects[object._id].hit_points = object.hit_points; } } this.translateObject = function(object_id, delta_x, delta_y, time) { if (m_objects[object_id]) { m_objects[object_id].xpos += delta_x; m_objects[object_id].ypos += delta_y; m_objects[object_id].lastUpdate = time; } } this.clearObjects = function() { m_objects = []; } this.setClientDimensions = function(width, height) { m_client_dimensions.width = width; m_client_dimensions.height = height; if (m_server_dimensions.width) { m_scale.x = m_client_dimensions.width/m_server_dimensions.width; } if (m_server_dimensions.height) { m_scale.y = m_client_dimensions.height/m_server_dimensions.height; } } this.setServerDimensions = function(width, height) { m_server_dimensions.width = width; m_server_dimensions.height = height; if (m_client_dimensions.width) { m_scale.x = m_client_dimensions.width/m_server_dimensions.width; } if (m_client_dimensions.height) { m_scale.y = m_client_dimensions.height/m_server_dimensions.height; } } this.getServerDimensions = function() { return m_server_dimensions; } this.getScale = function() { return m_scale; } } //Handles various events driven by browser or communication with server var BrowserController = function(parent) { // private members var m_controller = this; var m_parent = parent; var m_model = parent.model; var m_view = parent.view; var m_ws_url = 'ws://' + location.hostname + ':8889'; var m_session_id; var m_connection = new WebSocket(m_ws_url); //private methods // This starts an animation loop that cycles at browser refesh intervals var animate = function() { <API key>( animate ); var scale = m_model.getScale(); for (var model_index in m_model.getObjects()) { var object = m_model.getObjects()[model_index]; if (object.lastUpdate) { var current_time = Date.now(); var time_delta = (current_time - object.lastUpdate)/1000; var delta_x = object.xvel * time_delta; var delta_y = object.yvel * time_delta; m_model.translateObject(object._id, delta_x, delta_y, current_time); } } handleTick(); } var readCookies = function() { var cookies_array = document.cookie.split(';'); for(var cookie_index=0; cookie_index<cookies_array.length; cookie_index++) { var cookie = cookies_array[cookie_index].trim(); if (cookie.indexOf('session_id')==0) m_session_id = cookie.substring('session_id'.length+1,cookie.length); } } var writeCookies = function() { if (m_session_id != null) { var date_object = new Date(); date_object.setTime(date_object.getTime()+(365*24*60*60*1000)); var expires = "expires="+date_object.toGMTString(); document.cookie = "session_id=" + m_session_id + "; " + expires; } } var deleteCookies = function() { document.cookie = "session_id=;expires=Thu, 01 Jan 1970 00:00:01 GMT"; } //public methods var handleTick = function() { m_view.update(m_model); handleRedraw(); } var handleNewConnection = function(event) { if (m_session_id == null) { var setup_message = { method: 'SETUP', height: window.innerHeight, width: window.innerWidth }; m_connection.send(JSON.stringify(setup_message)); } else { var resume_message = { method: 'RESUME', session_id: m_session_id } m_connection.send(JSON.stringify(resume_message)); } } var handleMessage = function(event) { var message = JSON.parse(event.data); if (message.hasOwnProperty('action')) { //m_model.clearObjects(); var object = message; if (object.action == "setup" || object.action == "resume") { m_session_id = message.session_id; m_model.setServerDimensions(object.width, object.height); m_view.centerCamera(object.width, object.height); writeCookies(); } else if (object.action == "resume_fail") { deleteCookies(); var setup_message = { method: 'SETUP', height: window.innerHeight, width: window.innerWidth }; m_connection.send(JSON.stringify(setup_message)); } else if (object.action == "spawn" || object.action == "replace") { var new_object = m_model.addObject(object); m_view.addObjectView(new_object); } else if (object.action == "destroy") { var model_obj = m_model.getObjectById(object._id); if (model_obj) object.mesh = model_obj.mesh; m_model.removeObject(object); m_view.removeObjectView(object); } else if (object.action == "update_pos") { m_model.updateObjectPos(object); } else if (object.action == "update_hit") { m_model.updateObjectHit(object); } else { console.log(object); } } } var handleDisconnect = function(event) { console.log('connection closed'); if (event.code == 1006) { console.log('connection refused?'); } } var handleSocketError = function(event) { console.log('socket error'); console.log(event); } var handleRedraw = function() { m_view.draw(m_model); } // This is where key press events are handled var handleKey = function(KeyEvent) { var key_pressed = String.fromCharCode(KeyEvent.which) var message_string = "event_type=key_press&char=" + key_pressed; console.log(message_string); var key_press_message = { session_id: m_session_id, method: 'KEY', key: key_pressed }; m_connection.send(JSON.stringify(key_press_message)); } // This is where mouse click/touchscreen events are handled var handleMouse = function(MouseEvent) { var xpos; var ypos; if (!MouseEvent) MouseEvent = window.event; var elementClicked = MouseEvent.target; if (MouseEvent.offsetX || MouseEvent.offsetY) { xpos = MouseEvent.offsetX; ypos = MouseEvent.offsetY; } else if (MouseEvent.pageX || MouseEvent.pageY) { xpos = MouseEvent.<API key>.offsetLeft; ypos = MouseEvent.<API key>.offsetTop; } else if (MouseEvent.clientX || MouseEvent.clientY) { xpos = MouseEvent.<API key>.offsetLeft; ypos = MouseEvent.<API key>.offsetTop; } var scale = m_model.getScale(); xpos = xpos * elementClicked.width / elementClicked.offsetWidth; ypos = ypos * elementClicked.height / elementClicked.offsetHeight; xpos = Math.floor(xpos/scale.x); ypos = m_model.getServerDimensions().height - Math.floor(ypos/scale.y); var message_string = "event_type=" + MouseEvent.type + "&mouse_x=" + xpos + "&mouse_y=" +ypos; console.log(message_string); var mouse_message = { session_id: m_session_id, method: 'MOUSE', type: MouseEvent.type, button: MouseEvent.which, x: xpos, y: ypos }; m_connection.send(JSON.stringify(mouse_message)); m_model.setMousePos(xpos,ypos); } var handleResize = function(resize_event) { m_model.setClientDimensions(window.innerWidth, window.innerHeight); m_view.resize(window.innerWidth, window.innerHeight); handleRedraw(); } var handleDOMLoaded = function(loaded_event) { m_model.setClientDimensions(window.innerWidth, window.innerHeight); m_view.init(); waitForResources(); animate(); } var <API key> = function() { //user input handlers document.addEventListener('keydown', handleKey, false); document.addEventListener('mousedown', handleMouse, false); //disable context menu on right click document.oncontextmenu = function() {return false;}; document.addEventListener("DOMContentLoaded", handleDOMLoaded, false); //pass on resize events to appropriate screen window.onresize = handleResize; } var waitForResources = function() { //TODO: Wait for all resources (e.g. images, sounds) to finish loading before handling stuff // Display a "Loading..." splash screen while this is happening } m_connection.onopen = handleNewConnection; m_connection.onmessage = handleMessage; m_connection.onerror = handleSocketError; m_connection.onclose = handleDisconnect; <API key>(); readCookies(); } // Handles display of game in browser var BrowserView = function(parent) { // Initialize private members var m_view = this; var m_scene = new THREE.Scene(); var m_renderer = new THREE.WebGLRenderer(); var m_camera; var m_game_div; this.init = function() { m_game_div = document.getElementById("game_div"); if (!m_game_div) { m_game_div = document.createElement('div'); m_game_div.setAttribute("id", "game_div"); document.body.appendChild(m_game_div); } m_renderer.setSize( window.innerWidth, window.innerHeight ); m_game_div.appendChild( m_renderer.domElement ); } this.centerCamera = function(width, height) { var fov = 70 var dist = height/Math.tan(fov * Math.PI/180) * 2; var aspect_ratio = width / height; //m_camera = new THREE.PerspectiveCamera(fov, aspect_ratio, 0.1, 1000); m_camera = new THREE.OrthographicCamera(-width/2, width/2, height/2, -height/2, 0.1, 1000); m_camera.position.x = width/2; m_camera.position.y = height/2; m_camera.position.z = dist; var point_light = new THREE.PointLight(0xFFFFFF); point_light.position.x = width/2+50; point_light.position.y = height/2+50; point_light.position.z = 50; m_scene.add(point_light); var ambient_light = new THREE.AmbientLight( 0x404040 ); // soft white light m_scene.add( ambient_light ); } this.addObjectView = function(object) { var geometry; var material; if (object.image_file == 'sphere.png') { var radius = object.width/2. var segments = 32; var rings = 32; geometry = new THREE.SphereGeometry(radius, segments, rings); material = new THREE.MeshLambertMaterial( { color: 0xffffff }); } else { var width = object.width/2; var height = object.height/2; var depth = object.width/2; geometry = new THREE.BoxGeometry(width, height, depth); material = new THREE.MeshLambertMaterial( { color: 0x0033ff }); } //var material = new THREE.MeshBasicMaterial( { color: 0xffffff } ); object.mesh = new THREE.Mesh( geometry, material ); m_scene.add(object.mesh); } this.removeObjectView = function(object) { m_scene.remove(object.mesh); } this.update = function(model) { var objects = model.getObjects(); for (var object_id in objects) { var object_mesh = objects[object_id].mesh; object_mesh.position.x = objects[object_id].xpos; object_mesh.position.y = objects[object_id].ypos; object_mesh.rotation.x += 0.01; object_mesh.rotation.y += 0.01; //console.log(object_mesh.position.x, object_mesh.position.y); } } this.resize = function() { if (m_game_div) m_renderer.setSize(m_game_div.clientWidth, m_game_div.clientHeight); } this.draw = function() { if (m_camera) m_renderer.render(m_scene, m_camera); } } function BrowserGame() { this.model = new BrowserModel(this); this.view = new BrowserView(this); this.controller = new BrowserController(this); } // Global reference to top-level object var g_game = new BrowserGame();
from ..base import AST CLASS = "statements.skip" class SkipStatement(AST): def __init__(self): super().__init__(CLASS, "skip_statement")
module.exports = function(grunt) { 'use strict'; var fs = require('fs'); return { "getImageName": function(cssValue, prefix) { var urlRegExResult = /[?]*url\([\s\"\']*([\w\-_\/\.\?0-9]+)[\"\'\s]*\)/.exec(cssValue); var imageName = urlRegExResult && urlRegExResult[1] ? urlRegExResult[1] : undefined; if (imageName && prefix) { var nameParts = imageName.split('.'); nameParts[0] += prefix; imageName = nameParts.join('.'); } return imageName; }, "writeCSSFile": function(path, styles) { grunt.log.ok(path); grunt.file.write(path, styles, {"encoding": "utf8"}); }, "trim": function(str) { return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); }, "applyFileFilter": function(file, cwd) { return file.src.filter(function(filepath) { if (!grunt.file.exists(cwd + filepath)) { grunt.log.warn('Source file "' + cwd + filepath + '" not found.'); return false; } else { return true; } }); }, "withPrefix": function(cssValue, prefix) { return cssValue.replace( this.getImageName(cssValue), this.getImageName(cssValue, prefix) ); }, "isBackground": function(decl) { return !!decl && !!decl.prop && !!decl.value && !!~decl.prop.indexOf('background') && !!~decl.value.indexOf('url'); }, "imageExists": function(imageName) { return imageName && fs.existsSync(imageName.slice(1).split('?')[0]); } }; };
var request = require('request') , q = require('q') ; var NationalRail = function() { this.baseUrl = 'http://nationalrail.co.uk'; }; NationaRail.prototype.get = function(uri) { var deferred = q.defer(); this.promise = deferred.promise; console.log('GET:', { 'url': this.baseUrl + uri }); request({ url: this.baseUrl + uri }, function(error, response, body) { if (error) { console.log('ERROR', error); deferred.resolve(false); return this.promise; } deferred.resolve(null); }.bind(this)); return this.promise; }; module.exports = new NationalRail();
<?php require_once("php/controller/create-db.php"); ?> <html> <head> <title>melonJS Template</title> <link rel="stylesheet" type="text/css" media="screen" href="index.css"> <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="<API key>" content="yes"> <meta name="<API key>" content="yes"> <meta name="<API key>" content="black"> <link rel="apple-touch-icon" href="icons/<API key>.png"> <link rel="apple-touch-icon" sizes="76x76" href="icons/<API key>.png"> <link rel="apple-touch-icon" sizes="120x120" href="icons/<API key>.png"> <link rel="apple-touch-icon" sizes="152x152" href="icons/<API key>.png"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> </head> <body> <!-- Canvas placeholder --> <div id="screen"></div> <form id="input" method="post"> <div class="field"> <label for="uusername">Username</label> <input type='text' name='username' id='username' autocomplete='off'> </div> <div class='password'> <label form='password'>Password</label> <input type='password' name='password' id='password'> </div> <button type='button' id='register'>Register</button> <button type='button' id='load'>Load</button> <button type='button' id='mainmenu'>Main Menu</button> </form> <!-- melonJS Library --> <!-- build:js js/app.min.js --> <script type="text/javascript" src="lib/melonJS-1.1.0-min.js"></script> <!-- Plugin(s) --> <script type="text/javascript" src="lib/plugins/debugPanel.js"></script> <!-- Game Scripts --> <script type="text/javascript" src="js/game.js"></script> <script type="text/javascript" src="js/resources.js"></script> <script type="text/javascript" src="js/entities/entities.js"></script> <script type="text/javascript" src="js/entities/EnemyBaseEntity.js"></script> <script type="text/javascript" src="js/entities/PlayerBaseEntity.js"></script> <script type="text/javascript" src="js/gamemanagers/GameManager.js"></script> <script type="text/javascript" src="js/gamemanagers/GameTimeManager.js"></script> <script type="text/javascript" src="js/gamemanagers/SpendGold.js"></script> <script type="text/javascript" src="js/gamemanagers/HeroDeathManager.js"></script> <script type="text/javascript" src="js/entities/EnemyCreep.js"></script> <script type="text/javascript" src="js/entities/HUD.js"></script> <script type="text/javascript" src="js/screens/title.js"></script> <script type="text/javascript" src="js/screens/play.js"></script> <script type="text/javascript" src="js/screens/spendExp.js"></script> <script type="text/javascript" src="js/screens/loadProfile.js"></script> <script type="text/javascript" src="js/screens/newProfile.js"></script> <!-- /build --> <!-- Bootstrap & Mobile optimization tricks --> <script type="text/javascript"> window.onReady(function onReady() { game.onload(); // Mobile browser hacks if (me.device.isMobile && !navigator.isCocoonJS) { // Prevent the webview from moving on a swipe window.document.addEventListener("touchmove", function (e) { e.preventDefault(); window.scroll(0, 0); return false; }, false); // Scroll away mobile GUI (function () { window.scrollTo(0, 1); me.video.onresize(null); }).defer(); me.event.subscribe(me.event.WINDOW_ONRESIZE, function (e) { window.scrollTo(0, 1); }); } }); </script> <script> $("#mainmenu").bind("click", function(){ me.state.change(me.state.MENU); }); $("#register").bind("click", function(){ $.ajax({ type: "POST", url: "php/controller/create-user.php", data: { username: $('#username').val(), password: $('#password').val() }, dataType: "text" }) .success(function(response){ if(response === "true"){ me.state.change(me.state.PLAY); }else{ alert(response); } }) .fail(function(response){ alert("Fail"); }); }); $("#load").bind("click", function(){ $.ajax({ type: "POST", url: "php/controller/login-user.php", data: { username: $('#username').val(), password: $('#password').val() }, dataType: "text" }) .success(function(response){ if(response === "Invalid username and password."){ alert(response); }else{ var data = jQuery.parseJSON(response); game.data.exp = data["exp"]; game.data.exp1 = data["exp1"]; game.data.exp2 = data["exp2"]; game.data.exp3 = data["exp3"]; game.data.exp4 = data["exp4"]; me.state.change(me.state.SPENDEXP); } }) .fail(function(response){ alert("Fail"); }); }); </script> </body> </html>
class <API key> < ActiveRecord::Migration def change add_column :roles, :task_definition_id, :integer end end
<header> <md-toolbar> <div class="md-toolbar-tools" layout-align="center end"> <a ng-href="#/stream"><h1> angler</h1></a> <div flex></div> <a ng-href="#/search" class="material-icons" layout-margin>search</a> <a ng-href="#/user/{{currentUser.id}}" class="material-icons" layout-margin>person</a> </div> </md-toolbar> </header> <div class="container"> <p class="md-display-2 text-center">Edit your profile</p> <div ng-if="complete == false" layout="column"> <form role="form" ng-if="authenticated" name="userProfileForm" ng-submit="updateProfile(userProfileForm, model)" novalidate> <md-input-container flex> <label for="id_first_name">First Name</label> <input name="first_name" id="id_first_name" class="form-control" type="text" ng-model="model.first_name" /> </md-input-container> <div class="alert alert-danger" ng-repeat="error in errors.first_name">{{error}}</div> <md-input-container flex> <label for="id_last_name">Last Name</label> <input name="last_name" id="id_last_name" class="form-control" type="text" ng-model="model.last_name" /> </md-input-container> <div class="alert alert-danger" ng-repeat="error in errors.last_name">{{error}}</div> <md-input-container flex> <label for="id_email">Email</label> <input name="email" id="id_email" class="form-control" type="email" ng-model="model.email" required /> </md-input-container> <div class="alert alert-danger" ng-repeat="error in errors.email">{{error}}</div> <md-input-container flex> <label for="id_bio">Bio</label> <input name="bio" id="id_bio" class="form-control" type="text" ng-model="model.bio"/> </md-input-container> <div class="alert alert-danger" ng-repeat="error in errors.bio">{{error}}</div> <md-button type="submit" class="md-raised md-accent" ng-show="authenticated">Save</md-button> </form> <div class="alert alert-warning" ng-if="authenticated == false">You need to be logged in to do this.</div> </div> <div ng-if="complete == true"> <div class="alert alert-success">Your profile information has been saved!</div> </div> </div>
// System.Web.Security.<API key> // Authors: // Ben Maurer (bmaurer@users.sourceforge.net) // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // included in all copies or substantial portions of the Software. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #if NET_2_0 namespace System.Web.Security { public enum <API key> { Success = 0, UserNotFound = 1, InvalidPassword = 2, InvalidQuestion = 3, InvalidAnswer = 4, InvalidEmail = 5, DuplicateUsername = 6, DuplicateEmail = 7, UserRejected = 8, ProviderError = 9 } } #endif
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><API key>: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.13.2 / <API key> - 8.8.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> <API key> <small> 8.8.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2021-11-05 09:57:39 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-05 09:57:39 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq 8.13.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.12.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.12.0 Official release 4.12.0 ocaml-config 2 OCaml Switch Configuration <API key> 1 Ensure that OCaml is compiled with no special options enabled ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/<API key>&quot; license: &quot;Unknown&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/JordanCurveTheorem&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: combinatorial hypermaps&quot; &quot;keyword: genus&quot; &quot;keyword: planarity&quot; &quot;keyword: Euler formula&quot; &quot;keyword: Discrete Jordan Curve Theorem&quot; &quot;category: Mathematics/Geometry/General&quot; &quot;date: 2008&quot; ] authors: [ &quot;Jean-François Dufourd &lt;dufourd@lsiit.u-strasbg.fr&gt; [http://dpt-info.u-strasbg.fr/~jfd/]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/<API key>/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/<API key>.git&quot; synopsis: &quot;Hypermaps, planarity and discrete Jordan curve theorem&quot; description: &quot;&quot;&quot; http://dpt-info.u-strasbg.fr/~jfd/Downloads/JORDAN_Contrib_Coq.tar.gz Constructive formalization of the combinatorial hypermaps, characterization of the planarity, genus theorem, Euler formula, ring of faces, discrete Jordan curve theorem&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/<API key>/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.8.0 coq.8.13.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &lt; 8.9~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.8.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
var jsx = require('G:\\jsx-transpiler-tpls'); var fs = require('fs'); var generator = require('./generator.js'); var input = fs.readFileSync('./test.jsx'); var output = generator.generate('test', input); fs.writeFileSync('./test.js', output);
# This file is modified from import json import sys from msal_extensions import (<API key>, KeychainPersistence, <API key>, FilePersistence, PersistedTokenCache, CrossPlatLock) from msal_extensions.persistence import PersistenceNotFound from knack.log import get_logger from azure.cli.core.decorators import retry logger = get_logger(__name__) # Files extensions for encrypted and plaintext persistence file_extensions = {True: '.bin', False: '.json'} def <API key>(location, encrypt): persistence = build_persistence(location, encrypt) return PersistedTokenCache(persistence) def load_secret_store(location, encrypt): persistence = build_persistence(location, encrypt) return SecretStore(persistence) def build_persistence(location, encrypt): """Build a suitable persistence instance based your current OS""" location += file_extensions[encrypt] logger.debug("build_persistence: location=%r, encrypt=%r", location, encrypt) if encrypt: if sys.platform.startswith('win'): return <API key>(location) if sys.platform.startswith('darwin'): return KeychainPersistence(location, "my_service_name", "my_account_name") if sys.platform.startswith('linux'): return <API key>( location, schema_name="my_schema_name", attributes={"my_attr1": "foo", "my_attr2": "bar"} ) else: return FilePersistence(location) class SecretStore: def __init__(self, persistence): self._lock_file = persistence.get_location() + ".lockfile" self._persistence = persistence def save(self, content): with CrossPlatLock(self._lock_file): self._persistence.save(json.dumps(content, indent=4)) @retry() def load(self): try: return json.loads(self._persistence.load()) except PersistenceNotFound: return []
import aifc import sndhdr import utils class Aiff: def __init__(self, filename): assert sndhdr.what(filename).filetype == 'aiff' x = aifc.open(filename) data = x.readframes(x.getnframes()) self.nchannels = x.getnchannels() self.sampwidth = x.getsampwidth() self.framerate = x.getframerate() self.sig = utils.from_buffer(data).reshape(-1, x.getnchannels()) def save(self, filename): y = aifc.open(filename, 'wb') y.setnchannels(self.nchannels) y.setsampwidth(self.sampwidth) y.setframerate(self.framerate) y.writeframes(self.sig.flatten().tobytes()) def save_channel(self, filename, channel): y = aifc.open(filename, 'wb') y.setnchannels(1) y.setsampwidth(self.sampwidth) y.setframerate(self.framerate) y.writeframes(self.sig[:, channel].flatten().tobytes())
module.exports = [ { test: /\.jsx$/, loaders: [ // 'react-hot', 'jsx-loader?insertPragma=React.DOM&harmony'] }, { test: /\.js$/, loaders: [ // 'react-hot', 'jsx-loader?harmony'] }, { test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' }, { test: /\.css$/, loader: 'style-loader!css-loader' } ]
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>pocklington: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.11.2 / pocklington - 8.8.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> pocklington <small> 8.8.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-25 14:20:56 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-25 14:20:56 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.11.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/pocklington&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Pocklington&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: Pocklington&quot; &quot;keyword: number theory&quot; &quot;keyword: prime numbers&quot; &quot;keyword: primality&quot; &quot;keyword: Fermat&#39;s little theorem&quot; &quot;category: Mathematics/Arithmetic and Number Theory/Number theory&quot; &quot;date: 2000-11&quot; ] authors: [ &quot;Olga Caprotti&quot; &quot;Martijn Oostdijk&quot; ] bug-reports: &quot;https://github.com/coq-contribs/pocklington/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/pocklington.git&quot; synopsis: &quot;Pocklington&#39;s criterion&quot; description: &quot;&quot;&quot; Pocklington&#39;s criterion for checking primality for large natural numbers. Includes a proof of Fermat&#39;s little theorem.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/pocklington/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-pocklington.8.8.0 coq.8.11.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.2). The following dependencies couldn&#39;t be met: - coq-pocklington -&gt; coq &lt; 8.9~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-pocklington.8.8.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
## Changelog for autoNumeric 4.6.0 + Adds a new option `invalidClass`, which default to `an-invalid`, that defines the CSS class name to use when a <API key> element value is invalid + Adds a new option value `'invalid'` for the `<API key>` option, that will allow users to enter out-of-bound numbers + Fixes #543 Allow users to enter out-of-bound numbers, outside of the `minimumValue` and `maximumValue` range + This allows users to type temporary invalid numbers when the `minimumValue` is superior to `0`, or the `maximumValue` is inferior to `0` + While in this out-of-bound state, the element validity status is set to `invalid` + Users can then target the CSS `:invalid` and/or `:valid` state as they wish to display a visual feedback as needed + Do note that <API key> elements cannot have a validity state set, so AutoNumeric instead sets by default the `an-invalid` CSS class on such 'invalid' elements + Whenever the user type an invalid number (out of range), the new `'autoNumeric:invalidValue'` event is sent. When the value is corrected, the new `'autoNumeric:correctedValue'` event is sent. + Beware; To reduce complexity, the `'autoNumeric:invalidValue'` event as well as the `'autoNumeric:minExceeded'` or `'autoNumeric:maxExceeded'` events are now sent up to three times for a single input; on keypress, keyup and blur + From now on, whenever the user sets a `minimumValue` higher than `0`, or a `maximumValue` lower than `0`, a warning will be displayed in the console telling him to perhaps use the `<API key>` `invalid` option. For information, the `<API key>` `doNotOverride` is still the default behavior. + Simplify the min and max range tests with the new private `<API key>()` function + Fixes the bug where you could always clear the input even if the limit were preventing you to do so (the last valid value was then set back on blur). Now AutoNumeric correctly prevents you to clear the input if the resulting value is out-of-bound. + Fixes #676 36 errors in index.d.ts when using with typescript + TypeScript users should now remove the `declare module 'autonumeric';` line from their script (cf. PR #677) + Removes node 6 from the CI tests (cf. PR #678) + Fixes the detection of wheel events when using a touchpad/trackball (cf. PR #672) 4.5.13 + Fixes #675 The caret position is wrongly positioned when setting the raw value to zero on numbers with a prefix currency symbol (The bug was introduced in `v4.5.9` with the fix for #647) 4.5.12 + Synchronizes the AutoNumeric version with the published npm one 4.5.11 + Adds a typescript definitions file to the library + Fixes some errors in the typescript definitions file and fixes the indentation 4.5.10 + Fixes #656 Input value will undo on focusout when using only Ctrl+Backspace 4.5.9 + Fixes #647 Caret position is incorrectly set when the `currencySymbol` in prefix position contains the first value entered *(ie. a numeric value)* 4.5.8 + Fixes #652 On initialization, `allowDecimalPadding` option `'floats'` does not hide the decimal zeroes if set in the html attribute 4.5.7 + Fixes #621 The `autoNumeric:formatted` event should be triggered when the input field is cleared while continuously pressing the `Backspace` or `Delete` keys *(for real this time, see `v4.5.2`)* 4.5.6 + Fix #602 Numpad decimal separator does not work on IE11 with a keyboard whose numpad decimal key outputs a comma + Adds a reference for the Angular 4+ implementation `ng-angular` component in the README 4.5.5 + Update the dev dependencies, fix the unit and end-to-end tests + Update the Babel version and fix the related configuration files + Update the Karma version and fix the related configuration files + Update the Webdriver.io version and fix the related configuration files + Update the Webpack version and fix the related configuration files 4.5.4 + Fixes #626 Missing the `\u0092` digit group separator 4.5.3 + Fixes #622 `freezeOptions()` can create issues in some browsers 4.5.2 + Fixes #621 The `autoNumeric:formatted` event should be triggered when the input field is cleared while continuously pressing the `Backspace` or `Delete`keys 4.5.1 + Fixes #611 The html `readonly` attribute is ignored on initial load + Fix how readonly and disabled inputs should not process keyboard events + Fix the formula mode so that the custom decimal character set with `decimalCharacter` is used instead of the default `'.'` character when writing float numbers 4.5.0 + Closes #542 Allow basic calculations when entering expressions like `=12*78` + Introduces the *formula mode* which allows a user to enter a math expression in the element using the `=` key, then evaluate it with the `Enter` one + Adds the `formulaMode` option, set to `false` by default, that controls if the *formula mode* is enabled + Adds the `Lexer`, `Parser`, `Evaluator`, `ASTNode` and `Token` classes for managing math expressions + Fixes #612 Dist files contain eval + The webpack `devtool` option for the `development` configuration has been changed from `<API key>` to `cheap-source-map`; This removes any `eval()` from the generated `dist/autoNumeric.js` file, and makes the source maps works in all cases in the browsers + Merge the changes from `4.4.1` while making sure there is no regression with #609; this adds the `browser` field alongside the `main` one in `package.json` + Note: The `browser` option points to the minified library `dist/autoNumeric.min.js` + Update the `index.html` test file to use the un-minified `development` library `dist/autoNumeric.js` This allows to *temporarily* use forbidden functions like `console` or wrong formatting while debugging, using `yarn build:dev` + Fixes a call to `_reformatAltHovered()` even when the `unformatOnHover` option was set to `false` 4.4.3 + Fixes #598 The `unformatOnHover` config value isn't used when set to `false` 4.4.2 + Fixes #609 Uncaught Error: Cannot find module 'autonumeric' on v4.4.1 + Reverts the changes from `4.4.1` : "Modify the `package.json` configuration `main` field to `browser`" 4.4.1 + Modify the `package.json` configuration `main` field to `browser` + This is useful per npm's documentation when the module is using browser-specific features like the `window` object 4.4.0 + Closes #476 Add a feature where `emptyInputBehavior` could be set to the minimum or maximum value + `emptyInputBehavior` now accepts either a number (or a string representing a number), or the `'min'` or `'max'` option + Fix the `emptyInputBehavior` validation test when checking the value limits + Fixes #579 Allow `emptyInputBehavior` to be set to min, max, or a number 4.3.7 + Fixes #594 Currency at wrong position for empty fields with euro/french preset after typing minus sign + Fixes #565 Entering a single minus character in a `<API key>` input invert the currency sign and that minus sign 4.3.6 + Fixes #219 'Bug on form reset' that was re-opened + AutoNumeric now listens to the `reset` event on the parent form, and react accordingly if detected 4.3.5 + Really fixes issue #596 this time 4.3.4 + Fixes #596 Change event not firing depending on cursor movement 4.3.3 + Fixes #593 Pasting a negative value over a negative value that as a currency symbol and its numbers selected throws an error + Refactor the `_onPaste()` handler by removing duplicated parts + Fix the initialization call `new AutoNumeric()` where using as arguments a `string` (element selector), a `number` (initial value) and an `array` (array of options), in that particular order, would not be recognized 4.3.2 + Fixes #589 The `percentageUS*` predefined options do not have the `rawValueDivisor` option set 4.3.1 + Modify the `tenTrillions` and `oneBillion` limits to be exact + Remove the `maximumValue` and `minimumValue` `<API key>` option, and update `tenTrillions` so that it equals ten trillions + The `tenTrillions` sub-option is now equal to `'10000000000000'`, and the `oneBillion` sub-option is now equal to `'1000000000'` + This change was long overdue since we modified in `v4.0.0-beta.22` how the number of decimal places was defined by the user using the `decimalPlaces` options instead of adding a specific number of decimal to the min/max values. 4.3.0 + Fixes #559 Allow AutoNumeric to accept the decimal character input even when there is already one in the element + Add the new `<API key>` option set to `false` by default + Fixes AutoNumeric so that elements now correctly accepts entering a decimal char on the far left of a negative number 4.2.15 + Fixes #585 Internet Explorer 11 throws when freezing the options 4.2.14 + Fixes #526 Memory / speed improvement in options + Fixes #583 AutoNumeric `v4.2.13` forces the contenteditable attribute to `true` when set on the html source + Fixes #584 Event listeners are not set/reset on option updates 4.2.13 + Fixes #580 Allow non-input tags with the `readOnly` option to set the `contenteditable` attribute to `false` + Fix the `readonly` and `contenteditable` attributes so that they can be updated to read/write mode + Modify `_setReadOnly()` so that it *always* sets the element to read-only mode + Create a new `_setReadWrite()` function that sets the element to read-write mode + Create a new `<API key>()` function that sets the element read only/write mode according to the `readOnly` setting + Fix the urls to autonumeric.org in the readme 4.2.12 + Fixes #574 The fractional part is converted to an integer if the part on the cursor left-hand side is equal to 0 4.2.11 + Fixes #570 The minified version of AutoNumeric does not expose some of its static functions (ie. `AutoNumeric.getNumber()`) + Removing the standard `Function.name` feature fixes the bug in IE now. In the near future IE users will need to require a polyfill for this. + Reduce the size of the generated library by tuning the UglifyJs options + Fix the end-to-end tests so that they are run against AutoNumeric's minified version 4.2.10 + Fix various bugs regarding the incorrect static and instantiated function calls + Fix the polyfill so that `Array.from()` is correctly 'polyfilled' even if the `CustomEvent` object already exists + Fix the `CustomEvent` polyfill + Merges PR #572 Use `AutoNumericHelper.contains()` instead of `String.includes()` for the time being + Update the dev dependencies + Update the babel preset from `latest` to `env` 4.2.9 + Fixes #568 Using brackets for negative numbers in AutoNumeric.format returns "undefined" 4.2.8 + Fixes #566 Add the Turkish predefined currency 4.2.7 + Fixes #521 The `input` event is not fired on `paste` if the element is empty or is completely selected beforehand + Fixes #563 The `import AutoNumeric from 'AutoNumeric'` line in the readme does not work on case sensitive OS (like Linux) 4.2.6 + Fixes #561 Webpack bundles the already compiled library when imported in another project 4.2.5 + Fix issue #550 The `change` event is sent twice on change + Fix the bug when an input with the `<API key>` options was focused then blurred, it would dispatch a `change` event. 4.2.4 + Fix issue #558 Switch the webpack 4 4.2.3 + Fix issue #556 Modify the `update()` function so that it can accept an array of options 4.2.2 + Fix issue #555 The `update()` function does not accept predefined option names (ie. `'euro'`) 4.2.1 + Fix issue #553 Missing support for very small or very big numbers displayed by Javascript as scientific numbers + This adds support for using scientific notation for setting the input value (ie. `aNInput.set('6.1349392e-13');`, `<input value="7342.561e40">`) 4.2.0 + Fix issue #535 Prevent entering any decimal character when only positive numbers are accepted + Change how the decimal character can be entered: + Before, the comma `','` and dot `'.'` where always accepted + Now, only the characters defined in `decimalCharacter` and `<API key>` are accepted 4.1.3 + Fix the `.travis.yml` file so that the `dist` file are built on the CI server 4.1.2 + Fix the `.npmignore` file so that the npm autonumeric package can be installed 4.1.1 + Fix issue #554 Automatize the build and publishing process of releases with Travis CI + Remove the generated files from the git repository
// File: main.cpp #define STRICT #include <windows.h> #include <commctrl.h> #include <commdlg.h> #include <basetsd.h> #include <math.h> #include <stdio.h> #include <d3dx9.h> #include <dxerr9.h> #include <tchar.h> #include "DXUtil.h" #include "D3DEnumeration.h" #include "D3DSettings.h" #include "D3DApp.h" #include "D3DFont.h" #include "D3DFile.h" #include "D3DUtil.h" #include "resource.h" #include "main.h" #define MAP_WIDTH 512 #define MAP_HEIGHT 512 #define RS m_pd3dDevice->SetRenderState #define TSS m_pd3dDevice-><API key> #define SAMP m_pd3dDevice->SetSamplerState typedef struct { FLOAT p[4]; FLOAT tu, tv; } TVERTEX; CMyD3DApplication* g_pApp = NULL; HINSTANCE g_hInst = NULL; // Name: WinMain() INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT ) { CMyD3DApplication d3dApp; g_pApp = &d3dApp; g_hInst = hInst; InitCommonControls(); if( FAILED( d3dApp.Create( hInst ) ) ) return 0; return d3dApp.Run(); } // Name: CMyD3DApplication() CMyD3DApplication::CMyD3DApplication() { m_pMesh = new CD3DMesh(); m_pMeshBg = new CD3DMesh(); m_id = 0; m_pZ = NULL; m_pTex [0] = NULL; m_pSurf[0] = NULL; m_pTex [1] = NULL; m_pSurf[1] = NULL; m_pEffect = NULL; m_hTechnique = NULL; m_htSrcMap = NULL; m_fWorldRotX = -0.54f; m_fWorldRotY = 1.41f; m_fViewZoom = 4.0f; m_dwCreationWidth = 512; m_dwCreationHeight = 512; m_strWindowTitle = TEXT( "main" ); m_d3dEnumeration.AppUsesDepthBuffer = TRUE; m_bStartFullscreen = false; <API key> = false; m_pFont = new CD3DFont( _T("Arial"), 12, D3DFONT_BOLD ); m_bLoadingApp = TRUE; ZeroMemory( &m_UserInput, sizeof(m_UserInput) ); } // Name: ~CMyD3DApplication() CMyD3DApplication::~CMyD3DApplication() { } // Name: OneTimeSceneInit() HRESULT CMyD3DApplication::OneTimeSceneInit() { SendMessage( m_hWnd, WM_PAINT, 0, 0 ); m_bLoadingApp = FALSE; return S_OK; } // Name: ConfirmDevice() HRESULT CMyD3DApplication::ConfirmDevice( D3DCAPS9* pCaps, DWORD dwBehavior, D3DFORMAT Format ) { <API key>( Format ); <API key>( dwBehavior ); <API key>( pCaps ); if( pCaps->PixelShaderVersion < D3DPS_VERSION(1,1) ) return E_FAIL; if( pCaps->VertexShaderVersion < D3DVS_VERSION(1,1) && 0==(dwBehavior & <API key>) ) return E_FAIL; return S_OK; } // Name: InitDeviceObjects() HRESULT CMyD3DApplication::InitDeviceObjects() { HRESULT hr; if(FAILED(hr=m_pMesh ->Create( m_pd3dDevice, _T("ufo.x")))) return DXTRACE_ERR( "LoadCar", hr ); if(FAILED(hr=m_pMeshBg->Create( m_pd3dDevice, _T("map.x")))) return DXTRACE_ERR( "Load BG", hr ); LPD3DXBUFFER pErr; if( FAILED( hr = <API key>( m_pd3dDevice, "hlsl.fx", NULL, NULL, D3DXSHADER_DEBUG , NULL, &m_pEffect, &pErr ))){ MessageBox( NULL, (LPCTSTR)pErr->GetBufferPointer() , "ERROR", MB_OK); return DXTRACE_ERR( "<API key>", hr ); } m_hTechnique = m_pEffect->GetTechniqueByName( "TShader" ); m_htSrcMap = m_pEffect->GetParameterByName( NULL, "SrcMap" ); m_pFont->InitDeviceObjects( m_pd3dDevice ); return S_OK; } // Name: <API key>() HRESULT CMyD3DApplication::<API key>() { DWORD i; LPDIRECT3DSURFACE9 pOldBackBuffer, pOldZBuffer; m_pd3dDevice->GetRenderTarget(0, &pOldBackBuffer); m_pd3dDevice-><API key>(&pOldZBuffer); m_pMesh -><API key>( m_pd3dDevice ); m_pMeshBg-><API key>( m_pd3dDevice ); m_pEffect->OnResetDevice(); D3DMATERIAL9 mtrl; <API key>( mtrl, 1.0f, 0.0f, 0.0f ); m_pd3dDevice->SetMaterial( &mtrl ); RS( D3DRS_DITHERENABLE, FALSE ); RS( <API key>, FALSE ); RS( D3DRS_ZENABLE, TRUE ); RS( D3DRS_AMBIENT, 0x000F0F0F ); TSS( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); TSS( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); TSS( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); TSS( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 ); TSS( 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE ); SAMP( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR ); SAMP( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR ); SAMP( 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP ); SAMP( 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP ); D3DXMATRIX matIdentity; D3DXMatrixIdentity( &m_mWorld ); D3DXVECTOR3 vFromPt = D3DXVECTOR3( 0.0f, 0.0f, -5.0f ); D3DXVECTOR3 vLookatPt = D3DXVECTOR3( 0.0f, 0.0f, 0.0f ); D3DXVECTOR3 vUpVec = D3DXVECTOR3( 0.0f, 1.0f, 0.0f ); D3DXMatrixLookAtLH( &m_mView, &vFromPt, &vLookatPt, &vUpVec ); FLOAT fAspect = ((FLOAT)m_d3dsdBackBuffer.Width) / m_d3dsdBackBuffer.Height; <API key>( &m_mProj, D3DX_PI/4, fAspect, 1.0f, 100.0f ); m_pFont-><API key>(); if (FAILED(m_pd3dDevice-><API key>( MAP_WIDTH, MAP_HEIGHT, D3DFMT_D16, D3DMULTISAMPLE_NONE, 0, TRUE, &m_pZ, NULL))) return E_FAIL; m_pd3dDevice-><API key>(NULL); if( SUCCEEDED( m_pd3dDevice->BeginScene() ) ){ for( i=0; i<2; i++){ if (FAILED(m_pd3dDevice->CreateTexture( MAP_WIDTH, MAP_HEIGHT, 1, <API key>, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &m_pTex[i], NULL))) return E_FAIL; if (FAILED(m_pTex[i]->GetSurfaceLevel(0, &m_pSurf[i]))) return E_FAIL; m_pd3dDevice->SetRenderTarget(0, m_pSurf[i]); m_pd3dDevice->Clear(0L, NULL, D3DCLEAR_TARGET , 0xffffffff, 1.0f, 0L); } m_pd3dDevice->EndScene(); } m_pd3dDevice->SetRenderTarget(0, pOldBackBuffer); m_pd3dDevice-><API key>(pOldZBuffer); pOldBackBuffer->Release(); pOldZBuffer->Release(); return S_OK; } // Name: FrameMove() HRESULT CMyD3DApplication::FrameMove() { UpdateInput( &m_UserInput ); D3DXMATRIX matRotY; D3DXMATRIX matRotX; if( m_UserInput.bRotateLeft && !m_UserInput.bRotateRight ) m_fWorldRotY += m_fElapsedTime; else if( m_UserInput.bRotateRight && !m_UserInput.bRotateLeft ) m_fWorldRotY -= m_fElapsedTime; if( m_UserInput.bRotateUp && !m_UserInput.bRotateDown ) m_fWorldRotX += m_fElapsedTime; else if( m_UserInput.bRotateDown && !m_UserInput.bRotateUp ) m_fWorldRotX -= m_fElapsedTime; D3DXMatrixRotationX( &matRotX, m_fWorldRotX ); D3DXMatrixRotationY( &matRotY, m_fWorldRotY ); D3DXMatrixMultiply( &m_mWorld, &matRotY, &matRotX ); if( m_UserInput.bZoomIn && !m_UserInput.bZoomOut ) m_fViewZoom += m_fElapsedTime; else if( m_UserInput.bZoomOut && !m_UserInput.bZoomIn ) m_fViewZoom -= m_fElapsedTime; D3DXVECTOR3 vFromPt = D3DXVECTOR3( 0.0f, 0.0f, -m_fViewZoom ); D3DXVECTOR3 vLookatPt = D3DXVECTOR3( 0.0f, 0.0f, 0.0f ); D3DXVECTOR3 vUpVec = D3DXVECTOR3( 0.0f, 1.0f, 0.0f ); D3DXMatrixLookAtLH( &m_mView, &vFromPt, &vLookatPt, &vUpVec ); return S_OK; } // Name: UpdateInput() void CMyD3DApplication::UpdateInput( UserInput* pUserInput ) { pUserInput->bRotateUp = ( m_bActive && (GetAsyncKeyState( VK_UP ) & 0x8000) == 0x8000 ); pUserInput->bRotateDown = ( m_bActive && (GetAsyncKeyState( VK_DOWN ) & 0x8000) == 0x8000 ); pUserInput->bRotateLeft = ( m_bActive && (GetAsyncKeyState( VK_LEFT ) & 0x8000) == 0x8000 ); pUserInput->bRotateRight = ( m_bActive && (GetAsyncKeyState( VK_RIGHT ) & 0x8000) == 0x8000 ); pUserInput->bZoomIn = ( m_bActive && (GetAsyncKeyState( 'Z' ) & 0x8000) == 0x8000 ); pUserInput->bZoomOut = ( m_bActive && (GetAsyncKeyState( 'X' ) & 0x8000) == 0x8000 ); pUserInput->bDispersionUp = ( m_bActive && (GetAsyncKeyState( VK_PRIOR) & 0x8000) == 0x8000 ); pUserInput->bDispersionDown = ( m_bActive && (GetAsyncKeyState( VK_NEXT ) & 0x8000) == 0x8000 ); } // Name: Render() HRESULT CMyD3DApplication::Render() { D3DXMATRIX m, mT, mR, mView, mProj; LPDIRECT3DSURFACE9 pOldBackBuffer, pOldZBuffer; D3DVIEWPORT9 oldViewport; static FLOAT cnt = 0; m_pd3dDevice->GetViewport(&oldViewport); if( SUCCEEDED( m_pd3dDevice->BeginScene() ) ) { if(cnt < m_fTime){ cnt = m_fTime+1.0f/50.0f; m_id = 1-m_id; m_pd3dDevice->GetRenderTarget(0, &pOldBackBuffer); m_pd3dDevice-><API key>(&pOldZBuffer); m_pd3dDevice->SetRenderTarget(0, m_pSurf[m_id]); m_pd3dDevice-><API key>(m_pZ); D3DVIEWPORT9 viewport = {0,0 , MAP_WIDTH , MAP_HEIGHT , 0.0f,1.0f}; m_pd3dDevice->SetViewport(&viewport); m_pd3dDevice->Clear(0L, NULL , D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER , 0xffffffff, 1.0f, 0L); m_pd3dDevice->SetTransform( D3DTS_WORLD, &m_mWorld); m_pd3dDevice->SetTransform( D3DTS_VIEW, &m_mView ); m_pd3dDevice->SetTransform( D3DTS_PROJECTION, &m_mProj ); TSS( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 ); TSS( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); m_pMeshBg->Render( m_pd3dDevice ); TSS( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 ); TSS( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE ); RS( D3DRS_LIGHTING, TRUE ); RS( D3DRS_AMBIENT, 0 ); m_pd3dDevice->LightEnable( 0, TRUE ); <API key>( &m, 1.0f, 0.0f ,0.0f ); D3DXMatrixRotationY( &mR, m_fTime ); <API key>( &mT, 1.0f, 1.0f ,0.0f ); m = m * mR * mT * m_mWorld; m_pd3dDevice->SetTransform( D3DTS_WORLD, &m); m_pMesh ->Render( m_pd3dDevice ); RS( D3DRS_ZENABLE, FALSE ); RS( D3DRS_LIGHTING, FALSE ); TSS(0,D3DTSS_COLOROP, D3DTOP_SELECTARG1); TSS(0,D3DTSS_COLORARG1, D3DTA_TEXTURE); if( m_pEffect != NULL ) { m_pEffect->SetTechnique( m_hTechnique ); m_pEffect->Begin( NULL, 0 ); m_pEffect->Pass( 0 ); FLOAT du = 0.5f/MAP_WIDTH; FLOAT dv = 0.5f/MAP_HEIGHT; TVERTEX Vertex[4] = { // x y z w tu tv { 0.0f, 0.0f, 0.1f, 1.0f, 0+du, 0+dv,}, {MAP_WIDTH, 0.0f, 0.1f, 1.0f, 1+du, 0+dv,}, {MAP_WIDTH, MAP_HEIGHT, 0.1f, 1.0f, 1+du, 1+dv,}, { 0.0f, MAP_HEIGHT, 0.1f, 1.0f, 0+du, 1+dv,}, }; m_pd3dDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_TEX1 ); m_pd3dDevice->SetTexture(0, m_pTex[1-m_id]); m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN , 2, Vertex, sizeof( TVERTEX ) ); m_pEffect->End(); } m_pd3dDevice->SetRenderTarget(0, pOldBackBuffer); m_pd3dDevice-><API key>(pOldZBuffer); m_pd3dDevice->SetViewport(&oldViewport); pOldBackBuffer->Release(); pOldZBuffer->Release(); }else{ RS( D3DRS_ZENABLE, FALSE ); RS( D3DRS_LIGHTING, FALSE ); TSS(0,D3DTSS_COLOROP, D3DTOP_SELECTARG1); TSS(0,D3DTSS_COLORARG1, D3DTA_TEXTURE); } FLOAT w = (FLOAT)oldViewport.Width; FLOAT h = (FLOAT)oldViewport.Width; TVERTEX Vertex1[4] = { //x y z rhw tu tv { 0, 0, 0.1f, 1.0f, 0, 0,}, { w, 0, 0.1f, 1.0f, 1, 0,}, { w, h, 0.1f, 1.0f, 1, 1,}, { 0, h, 0.1f, 1.0f, 0, 1,}, }; m_pd3dDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_TEX1 ); m_pd3dDevice->SetTexture(0, m_pTex[m_id]); m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN , 2, Vertex1, sizeof( TVERTEX ) ); RS( D3DRS_ZENABLE, TRUE ); RS( D3DRS_LIGHTING, TRUE ); RenderText(); #if 0 { m_pd3dDevice-><API key>(0,D3DTSS_COLOROP, D3DTOP_SELECTARG1); m_pd3dDevice-><API key>(0,D3DTSS_COLORARG1, D3DTA_TEXTURE); m_pd3dDevice-><API key>(1,D3DTSS_COLOROP, D3DTOP_DISABLE); m_pd3dDevice->SetVertexShader(NULL); m_pd3dDevice->SetFVF( D3DFVF_XYZRHW | D3DFVF_TEX1 ); m_pd3dDevice->SetPixelShader(0); float scale = 128.0f; for(DWORD i=0; i<1; i++){ TVERTEX Vertex[4] = { // x y z rhw tu tv { 0,(i+0)*scale,0, 1, 0, 0,}, {scale,(i+0)*scale,0, 1, 1, 0,}, {scale,(i+1)*scale,0, 1, 1, 1,}, { 0,(i+1)*scale,0, 1, 0, 1,}, }; if(0==i) m_pd3dDevice->SetTexture( 0, m_pTex[0] ); m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN, 2, Vertex, sizeof( TVERTEX ) ); } } #endif m_pd3dDevice->EndScene(); } return S_OK; } // Name: RenderText() HRESULT CMyD3DApplication::RenderText() { D3DCOLOR fontColor = D3DCOLOR_ARGB(255,255,255,0); TCHAR szMsg[MAX_PATH] = TEXT(""); FLOAT fNextLine = 40.0f; fNextLine = (FLOAT) m_d3dsdBackBuffer.Height; lstrcpy( szMsg, TEXT("Press 'F2' to configure display") ); fNextLine -= 20.0f; m_pFont->DrawText( 2, fNextLine, fontColor, szMsg ); lstrcpy( szMsg, m_strDeviceStats ); fNextLine -= 20.0f; m_pFont->DrawText( 2, fNextLine, fontColor, szMsg ); lstrcpy( szMsg, m_strFrameStats ); fNextLine -= 20.0f; m_pFont->DrawText( 2, fNextLine, fontColor, szMsg ); return S_OK; } // Name: MsgProc() LRESULT CMyD3DApplication::MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { switch( msg ) { case WM_PAINT: { if( m_bLoadingApp ) { HDC hDC = GetDC( hWnd ); TCHAR strMsg[MAX_PATH]; wsprintf(strMsg, TEXT("Loading... Please wait")); RECT rct; GetClientRect( hWnd, &rct ); DrawText( hDC, strMsg, -1, &rct , DT_CENTER|DT_VCENTER|DT_SINGLELINE ); ReleaseDC( hWnd, hDC ); } break; } } return CD3DApplication::MsgProc( hWnd, msg, wParam, lParam ); } // Name: <API key>() HRESULT CMyD3DApplication::<API key>() { SAFE_RELEASE(m_pSurf[0]); SAFE_RELEASE(m_pTex[0]); SAFE_RELEASE(m_pSurf[1]); SAFE_RELEASE(m_pTex[1]); SAFE_RELEASE(m_pZ); m_pMesh -><API key>(); m_pMeshBg-><API key>(); m_pFont-><API key>(); if( m_pEffect != NULL ) m_pEffect->OnLostDevice(); return S_OK; } // Name: DeleteDeviceObjects() HRESULT CMyD3DApplication::DeleteDeviceObjects() { SAFE_RELEASE( m_pEffect ); m_pMesh ->Destroy(); m_pMeshBg->Destroy(); m_pFont->DeleteDeviceObjects(); return S_OK; } // Name: FinalCleanup() HRESULT CMyD3DApplication::FinalCleanup() { SAFE_DELETE( m_pMeshBg ); SAFE_DELETE( m_pMesh ); SAFE_DELETE( m_pFont ); return S_OK; }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><API key>: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">8.10.dev / <API key> - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> <API key> <small> 8.6.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-03-17 10:27:16 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-03-17 10:27:16 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.10.dev Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.0 Official release 4.09.0 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/<API key>&quot; license: &quot;GPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/IntuitionisticNuprl&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: Nuprl&quot; &quot;keyword: Computational Type Theory&quot; &quot;keyword: Extensional Type Theory&quot; &quot;keyword: Intuitionistic Type Theory&quot; &quot;keyword: Howe&#39;s computational equivalence relation&quot; &quot;keyword: Partial Equivalence Relation (PER) semantics&quot; &quot;keyword: Consistency&quot; &quot;keyword: Continuity&quot; &quot;keyword: Bar Induction&quot; &quot;category: Mathematics/Logic/Type theory&quot; ] authors: [ &quot;Vincent Rahli &lt;vincent.rahli@gmail.com&gt; [http: bug-reports: &quot;https://github.com/coq-contribs/<API key>/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/<API key>.git&quot; synopsis: &quot;An Impredicative Model of Nuprl&#39;s Constructive Type Theory&quot; description: &quot;&quot;&quot; http: This library formalizes Nuprl&#39;s Constructive Type Theory (CTT) as of 2015. CTT is an extensional type theory originally inspired by Martin-Lof&#39;s extensional type theory, and that has since then been extended with several new types such as: intersection types, union types, image types, partial types, set types, quotient types, partial equivalence relation (per) types, simulation and bisimulation types, an atom type, and the &quot;Base&quot; type. Our formalization includes a definition of Nuprl&#39;s computation system, a definition of Howe&#39;s computational equivalence relation and a proof that it is a congruence, an impredicative definition of Nuprl&#39;s type system using Allen&#39;s PER semantics (using Prop&#39;s impredicativity, we can formalize Nuprl&#39;s infinite hierarchy of universes), definitions of most (but not all) of Nuprl&#39;s inference rules and proofs that these rules are valid w.r.t. Allen&#39;s PER semantics, and a proof of Nuprl&#39;s consistency. In addition to the standard introduction and elimination rules for Nuprl&#39;s types, we have also proved several Brouwerian rules. Our computation system also contains: (1) free choice sequences that we used to prove Bar Induction rules; (2) named exceptions and a &quot;fresh&quot; operator to generate fresh names, that we used to prove a continuity rule. More information can be found here: http: Feel free to send questions to the authors or to nuprl@cs.cornell.edu&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/<API key>/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.6.0 coq.8.10.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.dev). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &lt; 8.7~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
/* TEMPLATE GENERATED TESTCASE FILE Filename: <API key>.cpp Label Definition File: <API key>.strings.label.xml Template File: sources-sink-72b.tmpl.cpp */ /* * @description * CWE: 78 OS Command Injection * BadSource: listen_socket Read data using a listen socket (server side) * GoodSource: Fixed string * Sinks: w32_execv * BadSink : execute command with wexecv * Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files * * */ #include "std_testcase.h" #include <vector> #include <wchar.h> #ifdef _WIN32 #define COMMAND_INT_PATH L"%WINDIR%\\system32\\cmd.exe" #define COMMAND_INT L"cmd.exe" #define COMMAND_ARG1 L"/c" #define COMMAND_ARG2 L"dir" #define COMMAND_ARG3 data #else /* NOT _WIN32 */ #include <unistd.h> #define COMMAND_INT_PATH L"/bin/sh" #define COMMAND_INT L"sh" #define COMMAND_ARG1 L"ls" #define COMMAND_ARG2 L"-la" #define COMMAND_ARG3 data #endif #include <process.h> #define EXECV _wexecv using namespace std; namespace <API key> { #ifndef OMITBAD void badSink(vector<wchar_t *> dataVector) { /* copy data out of dataVector */ wchar_t * data = dataVector[2]; { wchar_t *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL}; /* wexecv - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECV(COMMAND_INT_PATH, args); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(vector<wchar_t *> dataVector) { wchar_t * data = dataVector[2]; { wchar_t *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL}; /* wexecv - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECV(COMMAND_INT_PATH, args); } } #endif /* OMITGOOD */ } /* close namespace */
/* TEMPLATE GENERATED TESTCASE FILE Filename: <API key>.cpp Label Definition File: <API key>.label.xml Template File: sources-sink-72b.tmpl.cpp */ /* * @description * CWE: 195 Signed to Unsigned Conversion Error * BadSource: rand Set data to result of rand(), which may be zero * GoodSource: Positive integer * Sinks: malloc * BadSink : Allocate memory using malloc() with the size of data * Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files * * */ #include "std_testcase.h" #include <vector> using namespace std; namespace <API key> { #ifndef OMITBAD void badSink(vector<int> dataVector) { /* copy data out of dataVector */ int data = dataVector[2]; /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(vector<int> dataVector) { int data = dataVector[2]; /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } #endif /* OMITGOOD */ } /* close namespace */
<!DOCTYPE HTML> <html> <head> <title>100</title> </head> <body> <h2>100</h2> <p>A draw. The next Spiral sees him <em>recovering</em> to four heads and three tails. You have lost any advantage you may have had, because you have four heads - out of a total of four coins. You grit your teeth, determined to win back his gain in the next Spiral.</p> <p><a href="../Text/Episode_125.html">After choosing your number, turn to 125.</a></p> </body> </html>
using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using Sitecore.Data; using Sitecore.Data.Items; namespace Synthesis.FieldTypes.Adapters { <summary> Version of ItemAxes that returns strongly typed entities. It also moves the Item.GetChildren() and Item.Parent in here, since they are axes really. </summary> public class AxesAdapter : IAxesAdapter { private readonly ItemAxes _axes; private readonly Item _item; public AxesAdapter(Item item) { _item = item; _axes = new ItemAxes(item); } public <API key> Parent => _item.Parent.AsStronglyTyped(); public <API key>[] GetAncestors() { return _axes.GetAncestors().<API key>().ToArray(); } public <API key> GetChild(ID childId) { return _axes.GetChild(childId).AsStronglyTyped(); } public <API key> GetChild(string itemName) { return _axes.GetChild(itemName).AsStronglyTyped(); } public <API key> GetDescendant(string name) { return _axes.GetDescendant(name).AsStronglyTyped(); } [SuppressMessage("Microsoft.Design", "CA1024:<API key>", Justification = "Following Sitecore Axes naming")] public IEnumerable<<API key>> GetDescendants() { return _axes.GetDescendants().<API key>(); } public <API key> GetItem(string path) { return _axes.GetItem(path).AsStronglyTyped(); } [SuppressMessage("Microsoft.Design", "CA1024:<API key>", Justification = "Following Sitecore Axes naming")] public <API key> GetNextSibling() { return _axes.GetNextSibling().AsStronglyTyped(); } [SuppressMessage("Microsoft.Design", "CA1024:<API key>", Justification = "Following Sitecore Axes naming")] public <API key> GetPreviousSibling() { return _axes.GetPreviousSibling().AsStronglyTyped(); } public bool IsAncestorOf(<API key> item) { return _axes.IsAncestorOf(item.InnerItem); } public bool IsDescendantOf(<API key> item) { return _axes.IsDescendantOf(item.InnerItem); } public IEnumerable<<API key>> SelectItems(string query) { return _axes.SelectItems(query).<API key>(); } public <API key> SelectSingleItem(string query) { return _axes.SelectSingleItem(query).AsStronglyTyped(); } [SuppressMessage("Microsoft.Design", "CA1024:<API key>", Justification = "Following Sitecore Axes naming")] public IEnumerable<<API key>> GetChildren() { return _item.GetChildren().<API key>(); } } }
var sys = require("sys"); var tests = ["json", "hash", "errorthresh", "bitwise", "tofunction", "layers", "grow"]; for(var i = 0; i < tests.length; i++) { var test = tests[i]; try { require("./" + test); sys.puts("PASS " + test); } catch(e) { var msg = "FAIL " + test + ": " + e; if(e.expected != true) msg += ", expected: " + JSON.stringify(e.expected) + " actual: " + JSON.stringify(e.actual); sys.puts(msg); } }
<?php namespace Workflux\Transition; use Workflux\Param\InputInterface; use Workflux\Param\OutputInterface; use Workflux\Param\<API key>; use Workflux\Param\Settings; use Workflux\Transition\ConstraintInterface; use Workflux\Transition\TransitionInterface; final class Transition implements TransitionInterface { /** * @var string */ private $from; /** * @var string */ private $to; /** * @var <API key> $settings */ private $settings; /** * @var ConstraintInterface[] $constraints */ private $constraints; /** * @param string $from * @param string $to * @param <API key>|null $settings * @param ConstraintInterface[] $constraints */ public function __construct( string $from, string $to, <API key> $settings = null, array $constraints = [] ) { $this->from = $from; $this->to = $to; $this->settings = $settings ?? new Settings; $this->constraints = (function (ConstraintInterface ...$constraints) { return $constraints; })(...$constraints); } /** * @param InputInterface $input * @param OutputInterface $output * * @return bool */ public function isActivatedBy(InputInterface $input, OutputInterface $output): bool { foreach ($this->constraints as $constraint) { if (!$constraint->accepts($input, $output)) { return false; } } return true; } /** * @return string */ public function getFrom(): string { return $this->from; } /** * @return string */ public function getTo(): string { return $this->to; } /** * @return string */ public function getLabel(): string { return $this->settings->get('label') ?? ''; } /** * @return array */ public function getConstraints(): array { return $this->constraints; } /** * @return bool */ public function hasConstraints(): bool { return !empty($this->constraints); } /** * @return string */ public function __toString(): string { $label = implode("\nand ", $this->constraints); return empty($label) ? $this->getLabel() : $label; } /** * @param string $name * @param mixed $default * * @return mixed */ public function getSetting(string $name, $default = null) { return $this->settings->get($name) ?? $default; } /** * @param string $name * * @return bool */ public function hasSetting(string $name): bool { return $this->settings->has($name); } /** * @return <API key> */ public function getSettings(): <API key> { return $this->settings; } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>compcert: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.11.2 / compcert - 3.1.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> compcert <small> 3.1.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-25 14:20:56 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-25 14:20:56 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.11.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Matej Košík &lt;matej.kosik@inria.fr&gt;&quot; homepage: &quot;http://compcert.inria.fr/&quot; dev-repo: &quot;git+https://github.com/AbsInt/CompCert.git&quot; bug-reports: &quot;https://github.com/AbsInt/CompCert/issues&quot; license: &quot;INRIA Non-Commercial License Agreement&quot; build: [ [ &quot;./configure&quot; &quot;ia32-linux&quot; {os = &quot;linux&quot;} &quot;ia32-macosx&quot; {os = &quot;macos&quot;} &quot;ia32-cygwin&quot; {os = &quot;cygwin&quot;} &quot;-bindir&quot; &quot;%{bin}%&quot; &quot;-libdir&quot; &quot;%{lib}%/compcert&quot; &quot;-clightgen&quot; ] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] remove: [ [&quot;rm&quot; &quot;%{bin}%/ccomp&quot;] [&quot;rm&quot; &quot;%{bin}%/clightgen&quot;] [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/compcert&quot;] [&quot;rm&quot; &quot;%{share}%/compcert.ini&quot;] [&quot;rm&quot; &quot;%{share}%/man/man1/ccomp.1&quot;] [&quot;sh&quot; &quot;-c&quot; &quot;rmdir -p %{share}%/man/man1 || true&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} &quot;menhir&quot; {&gt;= &quot;20160303&quot; &amp; &lt; &quot;20180530&quot;} ] synopsis: &quot;The CompCert C compiler&quot; authors: &quot;Xavier Leroy &lt;xavier.leroy@inria.fr&gt;&quot; url { src: &quot;https://github.com/AbsInt/CompCert/archive/v3.1.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-compcert.3.1.0 coq.8.11.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.2). The following dependencies couldn&#39;t be met: - coq-compcert -&gt; coq &lt; 8.7~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-compcert.3.1.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>compcert: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.8.2 / compcert - 3.6+8.11</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> compcert <small> 3.6+8.11 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-01-01 19:32:40 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-01 19:32:40 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.8.2 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.04.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.04.2 Official 4.04.2 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; authors: &quot;Xavier Leroy &lt;xavier.leroy@inria.fr&gt;&quot; maintainer: &quot;Jacques-Henri Jourdan &lt;jacques-Henri.jourdan@normalesup.org&gt;&quot; homepage: &quot;http://compcert.inria.fr/&quot; dev-repo: &quot;git+https://github.com/AbsInt/CompCert.git&quot; bug-reports: &quot;https://github.com/AbsInt/CompCert/issues&quot; license: &quot;INRIA Non-Commercial License Agreement&quot; build: [ [&quot;./configure&quot; &quot;ia32-linux&quot; {os = &quot;linux&quot;} &quot;ia32-macosx&quot; {os = &quot;macos&quot;} &quot;ia32-cygwin&quot; {os = &quot;cygwin&quot;} &quot;-bindir&quot; &quot;%{bin}%&quot; &quot;-libdir&quot; &quot;%{lib}%/compcert&quot; &quot;-install-coqdev&quot; &quot;-clightgen&quot; &quot;-coqdevdir&quot; &quot;%{lib}%/coq/user-contrib/compcert&quot; &quot;-ignore-coq-version&quot;] [make &quot;-j%{jobs}%&quot; {ocaml:version &gt;= &quot;4.06&quot;}] ] patches: &quot;compat-8-11.patch&quot; extra-files: [&quot;compat-8-11.patch&quot; &quot;sha256=<SHA256-like>&quot;] install: [ [make &quot;install&quot;] [&quot;install&quot; &quot;-m&quot; &quot;0644&quot; &quot;VERSION&quot; &quot;%{lib}%/coq/user-contrib/compcert/&quot;] ] depends: [ # This are the release versions of Coq which include this version of compcert # See compcert_CI_REF in # See make_addon_compcert in &quot;coq&quot; {= &quot;8.11.0&quot;} &quot;menhir&quot; {&gt;= &quot;20190626&quot; &amp; &lt; &quot;20200123&quot;} &quot;ocaml&quot; {&gt;= &quot;4.05.0&quot;} ] synopsis: &quot;The CompCert C compiler (patched for Coq 8.11 compatibility)&quot; tags: [ &quot;category:Computer Science/Semantics and Compilation/Compilation&quot; &quot;category:Computer Science/Semantics and Compilation/Semantics&quot; &quot;keyword:C&quot; &quot;keyword:compiler&quot; &quot;logpath:compcert&quot; &quot;date:2019-10-02&quot; ] url { src: &quot;https://github.com/AbsInt/CompCert/archive/v3.6.tar.gz&quot; checksum: &quot;sha256=<SHA256-like>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-compcert.3.6+8.11 coq.8.8.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.8.2). The following dependencies couldn&#39;t be met: - coq-compcert -&gt; coq = 8.11.0 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-compcert.3.6+8.11</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
import os from subprocess import call from videogrep import videogrep filename = 'TEST_OUTPUT.mp4' def test_videogrep(): videogrep.videogrep('test_videos/test.mp4', filename, 'video', 'pos') files = os.listdir('.') assert filename in files def test_cli(): command = 'videogrep_cli.py -i test_videos/test.mp4 -s video -st pos' call(command.split()) files = os.listdir('.') assert 'supercut.mp4' in files def test_cleanup(): call(['rm', filename]) call(['rm', 'supercut.mp4'])
using System; using System.Collections.Generic; using System.Data.Linq; using System.Data; using System.Linq; using System.Reflection; using System.Dynamic; using System.Linq.Dynamic; using Maverick; using System.Data.SqlClient; namespace MavEntity { public class EntityContext : DataContext { public EntityContext(IDbConnection db) : base(db) { //validate(); } public EntityContext(string connectionStr) : base(connectionStr) { //validate(); } void validate() { if (!DatabaseExists()) { throw new <API key>("Invalid connection string."); } } public IQueryable<dynamic> this[string entityType] { get { return (IQueryable<dynamic>)GetTable(ServiceLocator.GetType(entityType)); } } public void Add(object obj) { GetTable(obj.GetType()).InsertOnSubmit(obj); } public void Remove(object obj) { GetTable(obj.GetType()).DeleteOnSubmit(obj); } } }
import numpy as np from .distribution import Distribution from scipy.stats import multivariate_normal from scipy.optimize import minimize class <API key>(Distribution): """ Gaussian distribution with fixed covariance matrix. The parameters vector represents only the mean. """ def __init__(self, mu, sigma): """ Constructor. Args: mu (np.ndarray): initial mean of the distribution; sigma (np.ndarray): covariance matrix of the distribution. """ self._mu = mu self._sigma = sigma self._inv_sigma = np.linalg.inv(sigma) self._add_save_attr( _mu='numpy', _sigma='numpy', _inv_sigma='numpy' ) def sample(self): return np.random.multivariate_normal(self._mu, self._sigma) def log_pdf(self, theta): return multivariate_normal.logpdf(theta, self._mu, self._sigma) def __call__(self, theta): return multivariate_normal.pdf(theta, self._mu, self._sigma) def entropy(self): n_dims = len(self._mu) sigma = self._sigma (sign_sigma, logdet_sigma) = np.linalg.slogdet(sigma) return <API key>._entropy(logdet_sigma, n_dims) def mle(self, theta, weights=None): if weights is None: self._mu = np.mean(theta, axis=0) else: self._mu = weights.dot(theta) / np.sum(weights) def con_wmle(self, theta, weights, eps, *args): n_dims = len(self._mu) mu =self._mu sigma = self._sigma eta_start = np.array([1000]) res = minimize(<API key>._lagrangian_eta, eta_start, bounds=((np.finfo(np.float32).eps, np.inf),), args=(weights, theta, mu, sigma, n_dims, eps), method='SLSQP') eta_opt = res.x[0] self._mu = <API key>.<API key>(weights, theta, mu, eta_opt) def diff_log(self, theta): delta = theta - self._mu g = self._inv_sigma.dot(delta) return g def get_parameters(self): return self._mu def set_parameters(self, rho): self._mu = rho @property def parameters_size(self): return len(self._mu) @staticmethod def <API key>(weights, theta, mu, eta): weights_sum = np.sum(weights) mu_new = (weights @ theta + eta * mu) / (weights_sum + eta) return mu_new @staticmethod def _kl_constraint(mu, mu_new, sigma, sigma_new, sigma_inv, sigma_new_inv, logdet_sigma, logdet_sigma_new, n_dims): return 0.5*(np.trace(sigma_new_inv@sigma) - n_dims + logdet_sigma_new - logdet_sigma + (mu_new - mu).T @ sigma_new_inv @ (mu_new - mu)) @staticmethod def _entropy(logdet_sigma, n_dims): c = n_dims * np.log(2*np.pi) return 0.5 * (logdet_sigma + c + n_dims) @staticmethod def _lagrangian_eta(lag_array, weights, theta, mu, sigma, n_dims, eps): eta = lag_array[0] mu_new = <API key>.<API key>(weights, theta, mu, eta) sigma_inv = np.linalg.inv(sigma) (sign_sigma, logdet_sigma) = np.linalg.slogdet(sigma) c = n_dims * np.log(2*np.pi) sum1 = np.sum([w_i * (-0.5 * (theta_i - mu_new)[:,np.newaxis].T @ sigma_inv @ (theta_i - mu_new)[:,np.newaxis] - 0.5 * logdet_sigma - 0.5 * c) for w_i, theta_i in zip(weights, theta)]) sum2 = eta * (eps - <API key>._kl_constraint(mu, mu_new, sigma, sigma, sigma_inv, sigma_inv, logdet_sigma, logdet_sigma, n_dims)) return sum1 + sum2 class <API key>(Distribution): """ Gaussian distribution with diagonal covariance matrix. The parameters vector represents the mean and the standard deviation for each dimension. """ def __init__(self, mu, std): """ Constructor. Args: mu (np.ndarray): initial mean of the distribution; std (np.ndarray): initial vector of standard deviations for each variable of the distribution. """ assert(len(std.shape) == 1) self._mu = mu self._std = std self._add_save_attr( _mu='numpy', _std='numpy' ) def sample(self): sigma = np.diag(self._std**2) return np.random.multivariate_normal(self._mu, sigma) def log_pdf(self, theta): sigma = np.diag(self._std ** 2) return multivariate_normal.logpdf(theta, self._mu, sigma) def __call__(self, theta): sigma = np.diag(self._std ** 2) return multivariate_normal.pdf(theta, self._mu, sigma) def entropy(self): n_dims = len(self._mu) sigma = np.diag(self._std**2) (sign_sigma, logdet_sigma) = np.linalg.slogdet(sigma) return <API key>._entropy(logdet_sigma, n_dims) def mle(self, theta, weights=None): if weights is None: self._mu = np.mean(theta, axis=0) self._std = np.std(theta, axis=0) else: sumD = np.sum(weights) sumD2 = np.sum(weights**2) Z = sumD - sumD2 / sumD self._mu = weights.dot(theta) / sumD delta2 = (theta - self._mu)**2 self._std = np.sqrt(weights.dot(delta2) / Z) def con_wmle(self, theta, weights, eps, kappa): n_dims = len(self._mu) mu = self._mu sigma = self._std eta_omg_start = np.array([1000, 0]) res = minimize(<API key>.<API key>, eta_omg_start, bounds=((np.finfo(np.float32).eps, np.inf),(np.finfo(np.float32).eps, np.inf)), args=(weights, theta, mu, sigma, n_dims, eps, kappa), method='SLSQP') eta_opt, omg_opt = res.x[0], res.x[1] self._mu, self._std = <API key>.<API key>(weights, theta, mu, sigma, eta_opt, omg_opt) def diff_log(self, theta): n_dims = len(self._mu) sigma = self._std**2 g = np.empty(self.parameters_size) delta = theta - self._mu g_mean = delta / sigma g_std = delta**2 / (self._std**3) - 1 / self._std g[:n_dims] = g_mean g[n_dims:] = g_std return g def get_parameters(self): rho = np.empty(self.parameters_size) n_dims = len(self._mu) rho[:n_dims] = self._mu rho[n_dims:] = self._std return rho def set_parameters(self, rho): n_dims = len(self._mu) self._mu = rho[:n_dims] self._std = rho[n_dims:] @property def parameters_size(self): return 2 * len(self._mu) @staticmethod def <API key>(weights, theta, mu, sigma, eta, omg): weights_sum = np.sum(weights) mu_new = (weights @ theta + eta * mu) / (weights_sum + eta) sigma_new = np.sqrt( ( np.sum([w_i * (theta_i-mu_new)**2 for theta_i, w_i in zip(theta, weights)], axis=0) + eta*sigma**2 + eta*(mu_new - mu)**2 ) / ( weights_sum + eta - omg ) ) return mu_new, sigma_new @staticmethod def _kl_constraint(mu, mu_new, sigma, sigma_new, sigma_inv, sigma_new_inv, logdet_sigma, logdet_sigma_new, n_dims): return 0.5*(np.trace(sigma_new_inv@sigma) - n_dims + logdet_sigma_new - logdet_sigma + (mu_new - mu).T @ sigma_new_inv @ (mu_new - mu)) @staticmethod def _entropy(logdet_sigma, n_dims): c = n_dims * np.log(2*np.pi) return 0.5 * (logdet_sigma + c + n_dims) @staticmethod def <API key>(lag_array, weights, theta, mu, sigma, n_dims, eps, kappa): eta, omg = lag_array[0], lag_array[1] mu_new, sigma_new = <API key>.<API key>(weights, theta, mu, sigma, eta, omg) sigma = np.diag(sigma**2) sigma_new = np.diag(sigma_new**2) sigma_inv = np.linalg.inv(sigma) sigma_new_inv = np.linalg.inv(sigma_new) (sign_sigma, logdet_sigma) = np.linalg.slogdet(sigma) (sign_sigma_new, logdet_sigma_new) = np.linalg.slogdet(sigma_new) c = n_dims * np.log(2*np.pi) sum1 = np.sum([w_i * (-0.5*(theta_i - mu_new)[:,np.newaxis].T @ sigma_new_inv @ (theta_i - mu_new)[:,np.newaxis] - 0.5 * logdet_sigma_new - c/2) for w_i, theta_i in zip(weights, theta)]) sum2 = eta * (eps - <API key>._kl_constraint(mu, mu_new, sigma, sigma_new, sigma_inv, sigma_new_inv, logdet_sigma, logdet_sigma_new, n_dims)) sum3 = omg * (<API key>._entropy(logdet_sigma_new, n_dims) - ( <API key>._entropy(logdet_sigma, n_dims) - kappa ) ) return sum1 + sum2 + sum3 class <API key>(Distribution): """ Gaussian distribution with full covariance matrix. The parameters vector represents the mean and the Cholesky decomposition of the covariance matrix. This parametrization enforce the covariance matrix to be positive definite. """ def __init__(self, mu, sigma): """ Constructor. Args: mu (np.ndarray): initial mean of the distribution; sigma (np.ndarray): initial covariance matrix of the distribution. """ self._mu = mu self._chol_sigma = np.linalg.cholesky(sigma) self._add_save_attr( _mu='numpy', _chol_sigma='numpy' ) def sample(self): sigma = self._chol_sigma.dot(self._chol_sigma.T) return np.random.multivariate_normal(self._mu, sigma) def log_pdf(self, theta): sigma = self._chol_sigma.dot(self._chol_sigma.T) return multivariate_normal.logpdf(theta, self._mu, sigma) def __call__(self, theta): sigma = self._chol_sigma.dot(self._chol_sigma.T) return multivariate_normal.pdf(theta, self._mu, sigma) def entropy(self): n_dims = len(self._mu) sigma = self._chol_sigma.dot(self._chol_sigma.T) (sign_sigma, logdet_sigma) = np.linalg.slogdet(sigma) return <API key>._entropy(logdet_sigma, n_dims) def mle(self, theta, weights=None): if weights is None: self._mu = np.mean(theta, axis=0) sigma = np.cov(theta, rowvar=False) else: sumD = np.sum(weights) sumD2 = np.sum(weights**2) Z = sumD - sumD2 / sumD self._mu = weights.dot(theta) / sumD delta = theta - self._mu sigma = delta.T.dot(np.diag(weights)).dot(delta) / Z self._chol_sigma = np.linalg.cholesky(sigma) def con_wmle(self, theta, weights, eps, kappa): n_dims = len(self._mu) mu =self._mu sigma = self._chol_sigma.dot(self._chol_sigma.T) eta_omg_start = np.array([1000, 0]) res = minimize(<API key>.<API key>, eta_omg_start, bounds=((np.finfo(np.float32).eps, np.inf),(np.finfo(np.float32).eps, np.inf)), args=(weights, theta, mu, sigma, n_dims, eps, kappa), method='SLSQP') eta_opt, omg_opt = res.x[0], res.x[1] mu_new, sigma_new = <API key>.<API key>(weights, theta, mu, sigma, eta_opt, omg_opt) self._mu, self._chol_sigma = mu_new, np.linalg.cholesky(sigma_new) def diff_log(self, theta): n_dims = len(self._mu) inv_chol = np.linalg.inv(self._chol_sigma) inv_sigma = inv_chol.T.dot(inv_chol) g = np.empty(self.parameters_size) delta = theta - self._mu g_mean = inv_sigma.dot(delta) delta_a = np.reshape(delta, (-1, 1)) delta_b = np.reshape(delta, (1, -1)) S = inv_chol.dot(delta_a).dot(delta_b).dot(inv_sigma) g_cov = S - np.diag(np.diag(inv_chol)) g[:n_dims] = g_mean g[n_dims:] = g_cov.T[np.tril_indices(n_dims)] return g def get_parameters(self): rho = np.empty(self.parameters_size) n_dims = len(self._mu) rho[:n_dims] = self._mu rho[n_dims:] = self._chol_sigma[np.tril_indices(n_dims)] return rho def set_parameters(self, rho): n_dims = len(self._mu) self._mu = rho[:n_dims] self._chol_sigma[np.tril_indices(n_dims)] = rho[n_dims:] @property def parameters_size(self): n_dims = len(self._mu) return 2 * n_dims + (n_dims * n_dims - n_dims) @staticmethod def <API key>(weights, theta, mu, sigma, eta, omg): weights_sum = np.sum(weights) mu_new = (weights @ theta + eta * mu) / (weights_sum + eta) sigmawa = (theta - mu_new).T @ np.diag(weights) @ (theta - mu_new) sigma_new = (sigmawa + eta * sigma + eta * (mu_new - mu)[:, np.newaxis] @ (mu_new - mu)[:, np.newaxis].T) / (weights_sum + eta - omg) return mu_new, sigma_new @staticmethod def _kl_constraint(mu, mu_new, sigma, sigma_new, sigma_inv, sigma_new_inv, logdet_sigma, logdet_sigma_new, n_dims): return 0.5*(np.trace(sigma_new_inv@sigma) - n_dims + logdet_sigma_new - logdet_sigma + (mu_new - mu).T @ sigma_new_inv @ (mu_new - mu)) @staticmethod def _entropy(logdet_sigma, n_dims): c = n_dims * np.log(2*np.pi) return 0.5 * (logdet_sigma + c + n_dims) @staticmethod def <API key>(lag_array, weights, theta, mu, sigma, n_dims, eps, kappa): eta, omg = lag_array[0], lag_array[1] mu_new, sigma_new = <API key>.<API key>(weights, theta, mu, sigma, eta, omg) sigma_inv = np.linalg.inv(sigma) sigma_new_inv = np.linalg.inv(sigma_new) (sign_sigma, logdet_sigma) = np.linalg.slogdet(sigma) (sign_sigma_new, logdet_sigma_new) = np.linalg.slogdet(sigma_new) c = n_dims * np.log(2*np.pi) sum1 = np.sum([w_i * (-0.5 * (theta_i - mu_new)[:,np.newaxis].T @ sigma_new_inv @ (theta_i - mu_new)[:,np.newaxis] - 0.5 * logdet_sigma_new - 0.5 * c) for w_i, theta_i in zip(weights, theta)]) sum2 = eta * (eps - <API key>._kl_constraint(mu, mu_new, sigma, sigma_new, sigma_inv, sigma_new_inv, logdet_sigma, logdet_sigma_new, n_dims)) sum3 = omg * (<API key>._entropy(logdet_sigma_new, n_dims) - ( <API key>._entropy(logdet_sigma, n_dims) - kappa ) ) return sum1 + sum2 + sum3
angular.module('ActivityController', []) // inject the Todo service factory into our controller .controller('mainController', ['$scope','$http','$location','Activities', function($scope, $http, $location, Activities) { $scope.formData = {}; $scope.activities = {}; $scope.loading = true; $scope.error = null; // when landing on the page, get all todos and show them // use the service to get all the activities Activities.get() .success(function(data) { $scope.activities = data; $scope.loading = false; }); // when submitting the add form, send the text to the node API $scope.createActivity = function() { if ($scope.formData.name != undefined && $scope.formData.date_begin != undefined && $scope.formData.date_end != undefined) { $scope.loading = true; // call the create function from our service (returns a promise object) Activities.create($scope.formData) // if successful creation, call our get function to get all the new todos .success(function(data) { $scope.loading = false; $scope.formData = {}; // clear the form so our user is ready to enter another $scope.activities = data; // assign our new list of activities }); } }; // delete a todo after checking it $scope.deleteActivity = function(id) { $scope.loading = true; Activities.delete(id) // if successful creation, call our get function to get all the new todos .success(function(data) { $scope.loading = false; $scope.activities = data; // assign our new list of todos }); }; }]);
class <API key> < ActiveRecord::Migration[4.2] def change create_table :<API key> do |t| t.integer :openstax_uid, null: false t.string :username, null: false t.string :access_token t.string :first_name t.string :last_name t.string :full_name t.string :title t.timestamps null: false end add_index :<API key>, :openstax_uid, unique: true add_index :<API key>, :username, unique: true add_index :<API key>, :access_token, unique: true add_index :<API key>, :first_name add_index :<API key>, :last_name add_index :<API key>, :full_name end end
package org.firstinspires.ftc.teamcode; public class VuMarkSettings { /* * Gray = true * Brown = false * * Frog = 0 && 1 * Bird = 2 && 3 * Snake = 4 && 5 */ public static final boolean[][][] layouts = new boolean[][][] { // Frog 0 { {true, false, true}, {false, true, false}, {true, false, true}, {false, true, false} }, // Frog 1 { {false, true, false}, {true, false, true}, {false, true, false}, {true, false, true} }, // Bird 2 { {true, false, true}, {false, true, false}, {false, true, false}, {true, false, true} }, // Bird 3 { {false, true, false}, {true, false, true}, {true, false, true}, {false, true, false} }, // Snake 4 { {false, true, true}, {false, false, true}, {true, false, false}, {true, true, false} }, // Snake 5 { {true, false, false}, {true, true, false}, {false, true, true}, {false, false, true} } }; /* * 'l' -> left * 'c' -> center * 'r' -> right */ public VuMarkSettings(char mark) { } }
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using PubSubHub.Models; namespace PubSubHub { public class MessageCollection : Collection<IPubSubMessage> { public MessageCollection() { } public MessageCollection(IEnumerable<IPubSubMessage> messages) { foreach (IPubSubMessage message in messages) { this.Add(message); } } public DateTime SinceDate { get; set; } } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>elpi: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.5.0~camlp4 / elpi - 1.3.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> elpi <small> 1.3.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-03-05 14:29:34 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-05 14:29:34 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler base-threads base base-unix base camlp4 4.02+7 Camlp4 is a system for writing extensible parsers for programming languages conf-findutils 1 Virtual package relying on findutils conf-which 1 Virtual package relying on which coq 8.5.0~camlp4 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.02.3 The OCaml compiler (virtual package) ocaml-base-compiler 4.02.3 Official 4.02.3 release ocaml-config 1 OCaml Switch Configuration ocamlbuild 0 Build system distributed with the OCaml compiler since OCaml 3.10.0 # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Enrico Tassi &lt;enrico.tassi@inria.fr&gt;&quot; authors: [ &quot;Enrico Tassi&quot; ] license: &quot;LGPL-2.1-or-later&quot; homepage: &quot;https://github.com/LPCIC/coq-elpi&quot; bug-reports: &quot;https://github.com/LPCIC/coq-elpi/issues&quot; dev-repo: &quot;git+https://github.com/LPCIC/coq-elpi&quot; build: [ make &quot;COQBIN=%{bin}%/&quot; &quot;ELPIDIR=%{prefix}%/lib/elpi&quot; ] install: [ make &quot;install&quot; &quot;COQBIN=%{bin}%/&quot; &quot;ELPIDIR=%{prefix}%/lib/elpi&quot; ] depends: [ &quot;elpi&quot; {&gt;= &quot;1.10.2&quot; &amp; &lt; &quot;1.11.0~&quot;} &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.11~&quot;} ] synopsis: &quot;Elpi extension language for Coq&quot; description: &quot;&quot;&quot; Coq-elpi provides a Coq plugin that embeds ELPI. It also provides a way to embed Coq& the Higher-Order Abstract Syntax approach and a way to read terms back. In addition to that it exports to ELPI a set of Coq&#39;s primitives, e.g. printing a message, accessing the environment of theorems and data types, defining a new constant and so on. For convenience it also provides a quotation and anti-quotation for Coq&#39;s syntax in λProlog. E.g. `{{nat}}` is expanded to the type name of natural numbers, or `{{A -&gt; B}}` to the representation of a product by unfolding the `-&gt;` notation. Finally it provides a way to define new vernacular commands and new tactics.&quot;&quot;&quot; url { src: &quot;https://github.com/LPCIC/coq-elpi/archive/v1.3.0.tar.gz&quot; checksum: &quot;sha256=<SHA256-like>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-elpi.1.3.0 coq.8.5.0~camlp4</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.5.0~camlp4). The following dependencies couldn&#39;t be met: - coq-elpi -&gt; coq &gt;= 8.10 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-elpi.1.3.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
var Log = require('saram-core/system/log/index.js'); describe('Log', function() { it('#Debug', function() { Log.debug(null, "Debug Log"); }); it('#Info', function() { Log.info(null, "Info Log"); }); it('#Warning', function() { Log.warning(null, "Warning Log"); }); it('#Error', function() { Log.error(null, "Error Log"); }); });
<!DOCTYPE html> <html lang="zh"> <head> <title>carinaDockerShadowSocks</title> <meta charset="utf-8" /> <!-- Mobile viewport optimized: j.mp/bplateviewport --> <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1"> <link rel="stylesheet" type="text/css" href="/theme/gumby.css" /> <link rel="stylesheet" type="text/css" href="/theme/style.css" /> <link rel="stylesheet" type="text/css" href="/theme/pygment.css" /> <script src="/theme/js/libs/modernizr-2.6.2.min.js"></script> <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' ga('create', 'UA-77750244-1', 'auto'); ga('send', 'pageview'); </script> </head> <body id="index" class="home"> <div class="container"> <div class="row"> <header id="banner" class="body"> <h2><a href="/"> <strong></strong></a></h2> </header><!-- /#banner --> <div id="navigation" class="navbar row"> <a href="#" gumby-trigger="#navigation &gt; ul" class="toggle"><i class="icon-menu"></i></a> <ul class="columns"> <!-- <li><a href="/">Home</a></li> --> <li><a href="/"></a></li> <li><a href="/archives"></a></li> <li><a href="/categories"></a></li> <li><a href="/tags"></a></li> <li><a href="/aboutme"></a></li> </ul> </div> <section id="content" class="body"> <div class="row"> <div class="eleven columns"> <header> <h3 class="entry-title"> <a href="/carinaDockerShadowSocks.html" rel="bookmark" title="Permalink to carinaDockerShadowSocks">carinaDockerShadowSocks</a></h3> </header> <footer class="post-info"> <abbr class="published" title="2016-06-02T00:00:00+02:00"> 20160602 </abbr> <address class="vcard author"> <!-- admin </address> </footer><!-- /.post-info --> <div class="entry-content"> <p>CarinaRackspaceDockerDockershadowsocks</p> <p><strong></strong></p> <p>textnow.heywire</p> <p><a href="http: <p>facebook()<br /> (917) 636-7274</p> <p><strong>Boot2Docker</strong></p> <p>Boot2DockerDockerdockerdocker</p> <p>macboot2docker</p> <div class="highlight"><pre><span></span>brew install boot2docker </pre></div> <p></p> <p><strong>Docker CLI</strong></p> <p>clusterGet accessDocker</p> <p>source docker.envdocker</p> <div class="highlight"><pre><span></span>source docker.env </pre></div> <p></p> <div class="highlight"><pre><span></span> docker info Containers: 11 Images: 6 Role: primary Strategy: spread Filters: health, port, dependency, affinity, constraint Nodes: 1 <API key>: 104.130.22.24:42376 Status: Healthy Containers: 11 Reserved CPUs: 0 / 12 Reserved Memory: 0 B / 4.2 GiB Labels: com.docker.network.driver.overlay.bind_interface=eth1, executiondriver=native-0.2, kernelversion=3.18.21-2-rackos, operatingsystem=Debian GNU/Linux 7 (wheezy) (containerized), storagedriver=aufs Error: (none) UpdatedAt: 2016-04-15T11:53:04Z Kernel Version: 3.18.21-2-rackos Operating System: linux CPUs: 12 Total Memory: 4.2 GiB Name: <API key> </pre></div> <p>cluster</p> <p>Dockershadowsocks</p> <p>Dockershadowsocks</p> <div class="highlight"><pre><span></span>docker run -d --name shadowsocks -p 8989:8989 oddrationale/docker-shadowsocks -s 0.0.0.0 -p 8989 -k xxxxxx -m aes-256-cfb </pre></div> <p>-pshadowsocks-k</p> <p>docker ps</p> <div class="highlight"><pre><span></span> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3d21228c5ce1 oddrationale/docker-shadowsocks &quot;/usr/local/bin/ssser&quot; 8 seconds ago Up 7 seconds 172.99.70.21:8989-&gt;8989/tcp <API key>/shadowsocks 0dd57ba46081 carina/consul &quot;/entrypoint.sh agent&quot; 31 minutes ago Up 31 minutes <API key>/carina-svcd </pre></div> <p>shadowsocks</p> <p>portshadowsocksIP</p> <div class="highlight"><pre><span></span> docker port shadowsocks 8989/tcp -&gt; 172.99.70.21:8989 </pre></div> <p>shadowsocksIPshadowsocks</p> <p></p> <p><br /> 1<a href="http://zzsa.net/%E5%9B%BD%E5%86%85%E5%A4%96%E4%B8%80%E4%BA%9B%E5%85%8D%E8%B4%B9%E7%BD%91%E7%BB%9C%E8%99%9A%E6%8B%9F%E7%94%B5%E8%AF%9D-%E5%85%8D%E8%B4%B9%E7%9F%AD%E4%BF%A1%E6%94%B6%E5%8F%91-%E5%85%8D%E8%B4%B9%E4%BC%A0/"></a><br /> 2<a href="http: 3<a href="http: 4<a href="http://yansu.org/2014/04/10/<API key>.html">MacDocker</a><br /> 5<a href="http: </div><!-- /.entry-content --> <div class="comments"> <!-- <h3><b>Comments</b></h3> --> <br /> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_identifier = "carinaDockerShadowSocks.html"; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'https://davlu.disqus.com/embed.js'; (document.<API key>('head')[0] || document.<API key>('body')[0]).appendChild(dsq); })(); </script> </div> </div><!-- /.eleven.columns --> <div class="three columns"> <!-- <h4></h4> <ul> <li><a href="/"></a></li> <li><a href="/archives"></a></li> <li><a href="/categories"></a></li> <li><a href="/tags"></a></li> <li><a href="/aboutme"></a></li> </ul> <h4></h4> <ul class="blank"> <li><a href="/category/bash.html">bash</a>2</li> <li><a href="/category/ffmpeg.html">ffmpeg</a>3</li> <li><a href="/category/gong-ju.html"></a>2</li> <li><a href="/category/ios.html">iOS</a>16</li> <li><a href="/category/ke-xue-shang-wang.html"></a>1</li> <li><a href="/category/linux.html">linux</a>1</li> <li><a href="/category/markdown.html">markdown</a>1</li> <li><a href="/category/mysql.html">mysql</a>2</li> <li><a href="/category/nginx.html">nginx</a>1</li> <li><a href="/category/node.html">node</a>1</li> <li><a href="/category/pelican.html">pelican</a>2</li> <li><a href="/category/php.html">php</a>2</li> <li><a href="/category/python.html">python</a>5</li> <li><a href="/category/qi-ta.html"></a>3</li> </ul> <!-- <h4></h4> <ul class="blank"> </ul> <!-- <h4></h4> <ul class="blank"> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/ThinkPhpIBM Appscan.md"><a href="/<API key>.html">21 2019</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/pythongrub2nc.md"><a href="/<API key>.html">08 2019</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/.md"><a href="/<API key>.html">29 2019</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/pythonwindows.md"><a href="/<API key>.html">28 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/iOS.md"><a href="/<API key>.html">26 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/api.md"><a href="/some-fun-api.html">19 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/bash.md"><a href="/linux-bash-use-tips.html">23 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/nginx-.md"><a href="/linux-nginx-tips.html">12 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/linux-.md"><a href="/linux-bash-tips.html">16 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/linux-ssh.md"><a href="/linux-ssh-tips.html">15 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/pythonxcode.md"><a href="/<API key>.html">11 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/python-basemap.md"><a href="/<API key>.html">20 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/ffmpeg.md"><a href="/ffmpeg-use.html">08 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/pelicanhtml.md"><a href="/<API key>.html">03 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">16 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/iOS-universal-link.md"><a href="/iOS-Universal-Link.html">09 2018</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/test_socketIO.md"><a href="/Socket.ioiOS.html">11 2017</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">27 2017</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/sha1-encode.md"><a href="/<API key>.html">10 2017</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/mysql_time_format.html">25 2017</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/php-execl-export.md"><a href="/php-excel-export.html">17 2017</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/um_push_py.md"><a href="/um_push_py.html">10 2017</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/itc_error_20161017.md"><a href="/itunesConnect-.html">17 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/niceblogs.md"><a href="/someniceblogs.html">15 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/mac mysqlroot.md"><a href="/mac mysqlroot.html">22 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/MKMapViewbug.md"><a href="/MKMapViewbug.html">12 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/gifpc+app.md"><a href="/gifpc+app.html">02 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/carinaDockerShadowSocks.html">02 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/sometools.md"><a href="/sometools.html">25 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/fuckingblocks.md"><a href="/fuckingblocks.html">20 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/pelicanGithub pages.md"><a href="/pelicanGithub pages.html">26 2016</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/tools.md"><a href="/ios-mac-tools.html">29 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">10 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">27 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/ios-bugs-for-march.md"><a href="/iOS-bugs.html">16 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">05 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">04 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">22 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/ios-encode.md"><a href="/ios-encode.html">21 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/<API key>.md"><a href="/<API key>.html">19 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/Build-my-github.io-blog-from-0.md"><a href="/Build-my-github.io-blog-from-0.html">16 2015</a></li> <li class="article-/Users/ludawei/important/ludawei_blog_github/content/posts/.md"><a href="/pelican-install.html">08 2014</a></li> </ul> <nav class="widget"> <h4>about me</h4> <ul class="blank"> <li><a href="https://github.com/ludawei">github</a></li> <li><a href="http: </ul> </nav> </div> </div><!-- /.row --> </section> <!-- JiaThis Button BEGIN --> <! <aside> <nav> <div class="jiathis_style"> <span class="jiathis_txt"></span> <a class="<API key>"></a> <a class="<API key>"></a> <a class="<API key>"></a> <a class="<API key>"></a> <a href="http: <a class="<API key>"></a> </div> <script type="text/javascript"> var jiathis_config = {<API key>:'true'}; </script> <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=2003036" charset="utf-8"></script> </aside> </nav> <!-- JiaThis Button END --> <!-- Duoshuo Comment Begin--> <!-- <aside> <nav> <div class="comments"> <div class="ds-thread"></div> <script type="text/javascript"> var duoshuoQuery = {short_name:"davlu"}; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async = true; ds.src = 'http://static.duoshuo.com/embed.js'; ds.charset = 'UTF-8'; (document.<API key>('head')[0] || document.<API key>('body')[0]).appendChild(ds); })(); </script> <noscript>Please enable JavaScript to view the comments.</noscript> </nav> </aside> <!-- Duoshuo Comment End --> </div><!-- /.row --> </div><!-- /.container --> <div class="container.nopad bg"> <footer id="credits" class="row"> <div class="seven columns left-center"> <address id="about" class="vcard body"> Creared by dav@2016 and Proudly powered by <a href="http://getpelican.com/">Pelican</a> </address> </div> <div class="seven columns"> <div class="row"> <ul class="socbtns"> </ul> </div> </div> </footer> </div> <!-- <script type="text/javascript"> var disqus_shortname = 'davlu'; (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = 'http://' + disqus_shortname + '.disqus.com/count.js'; (document.<API key>('HEAD')[0] || document.<API key>('BODY')[0]).appendChild(s); }()); </script> <script src="/theme/js/libs/jquery-1.9.1.min.js"></script> <script src="/theme/js/libs/gumby.min.js"></script> <script src="/theme/js/plugins.js"></script> </body> </html>
;(function() { 'use strict'; const showdown = require('showdown'); module.exports = Extension => class Markdown extends Extension { _constructor() { this.parse.context = Extension.SECTION; } parse(ctx) { ctx.content = new showdown.Converter().makeHtml(ctx.section.content); return ctx.success(); } } })();
# Yet Another Python Apriori Algorithm Implementation The python implementation of Apriori Algorithm. Frequently used for association rule mining. e.g. People like coke, also like lime ## Installation $ sudo python setup.py install ## Getting started from yapa.apriori import NaiveApriori # Instantiate a apriori with universal set, and a bunch of parameters apriori = NaiveApriori(universal_set = set(range(1,10)), support_criterion=0.2, confident_criterion=0.7, maximum_cardinality=4) # Prepare the sample sets, AKA, training sets. data_sets = (set(1,2,5), set(2,3,4), set(1,2,3), set(2,10)) # Generate the rules apriori.generate_rules(data_sets) # Predict a associated element based on an input for result, confident in apriori.predict([0,1]): print set([0,1]),"->", result, confident set([1,2])->set([4]), 0.75 ## API Reference Please reference the docstrings ## Test $ nosetests test or $ python -m unittest test See LICENSE
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>hammer-tactics: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.9.0 / hammer-tactics - 1.3+8.11</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> hammer-tactics <small> 1.3+8.11 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-01 17:12:23 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-01 17:12:23 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.9.0 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.02.3 The OCaml compiler (virtual package) ocaml-base-compiler 4.02.3 Official 4.02.3 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/lukaszcz/coqhammer&quot; dev-repo: &quot;git+https://github.com/lukaszcz/coqhammer.git&quot; bug-reports: &quot;https://github.com/lukaszcz/coqhammer/issues&quot; license: &quot;LGPL-2.1-only&quot; synopsis: &quot;Reconstruction tactics for the hammer for Coq&quot; description: &quot;&quot;&quot; Collection of tactics that are used by the hammer for Coq to reconstruct proofs found by automated theorem provers. When the hammer has been successfully applied to a project, only this package needs to be installed; the hammer plugin is not required. &quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot; {ocaml:version &gt;= &quot;4.06&quot;} &quot;tactics&quot;] install: [ [make &quot;install-tactics&quot;] [make &quot;test-tactics&quot;] {with-test} ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.11&quot; &amp; &lt; &quot;8.12~&quot;} ] conflicts: [ &quot;coq-hammer&quot; {!= version} ] tags: [ &quot;keyword:automation&quot; &quot;keyword:hammer&quot; &quot;keyword:tactics&quot; &quot;logpath:Hammer.Tactics&quot; &quot;date:2020-07-28&quot; ] authors: [ &quot;Lukasz Czajka &lt;lukaszcz@mimuw.edu.pl&gt;&quot; ] url { src: &quot;https://github.com/lukaszcz/coqhammer/archive/v1.3-coq8.11.tar.gz&quot; checksum: &quot;sha512=f50e39145b772c38cc19b1be7d1d66bd3b1bee6cb685ea897165eaa89fa0b5a746e4ec97a774429ccf2cf9bd10d272331d1b4e2a4b9247080df4ef7fb9600a1d&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-hammer-tactics.1.3+8.11 coq.8.9.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.9.0). The following dependencies couldn&#39;t be met: - coq-hammer-tactics -&gt; coq &gt;= 8.11 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-hammer-tactics.1.3+8.11</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
from aredis.exceptions import RedisError from aredis.utils import b, nativestr def <API key>(response, **options): if options['store'] or options['store_dist']: # `store` and `store_diff` cant be combined # with other command arguments. return response if type(response) != list: response_list = [response] else: response_list = response if not options['withdist'] and not options['withcoord']\ and not options['withhash']: # just a bunch of places return [nativestr(r) for r in response_list] cast = { 'withdist': float, 'withcoord': lambda ll: (float(ll[0]), float(ll[1])), 'withhash': int } # zip all output results with each casting functino to get # the properly native Python value. f = [nativestr] f += [cast[o] for o in ['withdist', 'withhash', 'withcoord'] if options[o]] return [ list(map(lambda fv: fv[0](fv[1]), zip(f, r))) for r in response_list ] class GeoCommandMixin: RESPONSE_CALLBACKS = { 'GEOPOS': lambda r: list(map(lambda ll: (float(ll[0]), float(ll[1])) if ll is not None else None, r)), 'GEOHASH': lambda r: list(r), 'GEORADIUS': <API key>, 'GEORADIUSBYMEMBER': <API key>, 'GEODIST': float, 'GEOADD': int } # GEO COMMANDS async def geoadd(self, name, *values): """ Add the specified geospatial items to the specified key identified by the ``name`` argument. The Geospatial items are given as ordered members of the ``values`` argument, each item or place is formed by the triad latitude, longitude and name. """ if len(values) % 3 != 0: raise RedisError("GEOADD requires places with lon, lat and name" " values") return await self.execute_command('GEOADD', name, *values) async def geodist(self, name, place1, place2, unit=None): """ Return the distance between ``place1`` and ``place2`` members of the ``name`` key. The units must be one of the following : m, km mi, ft. By async default meters are used. """ pieces = [name, place1, place2] if unit and unit not in ('m', 'km', 'mi', 'ft'): raise RedisError("GEODIST invalid unit") elif unit: pieces.append(unit) return await self.execute_command('GEODIST', *pieces) async def geohash(self, name, *values): """ Return the geo hash string for each item of ``values`` members of the specified key identified by the ``name``argument. """ return await self.execute_command('GEOHASH', name, *values) async def geopos(self, name, *values): """ Return the positions of each item of ``values`` as members of the specified key identified by the ``name``argument. Each position is represented by the pairs lon and lat. """ return await self.execute_command('GEOPOS', name, *values) async def georadius(self, name, longitude, latitude, radius, unit=None, withdist=False, withcoord=False, withhash=False, count=None, sort=None, store=None, store_dist=None): """ Return the members of the specified key identified by the ``name`` argument which are within the borders of the area specified with the ``latitude`` and ``longitude`` location and the maximum distance from the center specified by the ``radius`` value. The units must be one of the following : m, km mi, ft. By default ``withdist`` indicates to return the distances of each place. ``withcoord`` indicates to return the latitude and longitude of each place. ``withhash`` indicates to return the geohash string of each place. ``count`` indicates to return the number of elements up to N. ``sort`` indicates to return the places in a sorted way, ASC for nearest to fairest and DESC for fairest to nearest. ``store`` indicates to save the places names in a sorted set named with a specific key, each element of the destination sorted set is populated with the score got from the original geo sorted set. ``store_dist`` indicates to save the places names in a sorted set named with a specific key, instead of ``store`` the sorted set destination score is set with the distance. """ return await self._georadiusgeneric('GEORADIUS', name, longitude, latitude, radius, unit=unit, withdist=withdist, withcoord=withcoord, withhash=withhash, count=count, sort=sort, store=store, store_dist=store_dist) async def georadiusbymember(self, name, member, radius, unit=None, withdist=False, withcoord=False, withhash=False, count=None, sort=None, store=None, store_dist=None): """ This command is exactly like ``georadius`` with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set. """ return await self._georadiusgeneric('GEORADIUSBYMEMBER', name, member, radius, unit=unit, withdist=withdist, withcoord=withcoord, withhash=withhash, count=count, sort=sort, store=store, store_dist=store_dist) async def _georadiusgeneric(self, command, *args, **kwargs): pieces = list(args) if kwargs['unit'] and kwargs['unit'] not in ('m', 'km', 'mi', 'ft'): raise RedisError("GEORADIUS invalid unit") elif kwargs['unit']: pieces.append(kwargs['unit']) else: pieces.append('m', ) for token in ('withdist', 'withcoord', 'withhash'): if kwargs[token]: pieces.append(b(token.upper())) if kwargs['count']: pieces.extend([b('COUNT'), kwargs['count']]) if kwargs['sort'] and kwargs['sort'] not in ('ASC', 'DESC'): raise RedisError("GEORADIUS invalid sort") elif kwargs['sort']: pieces.append(b(kwargs['sort'])) if kwargs['store'] and kwargs['store_dist']: raise RedisError("GEORADIUS store and store_dist cant be set" " together") if kwargs['store']: pieces.extend([b('STORE'), kwargs['store']]) if kwargs['store_dist']: pieces.extend([b('STOREDIST'), kwargs['store_dist']]) return await self.execute_command(command, *pieces, **kwargs)
using System; using System.Threading; namespace Zadanie1 { public class GraphGnp { private readonly int[,] _graph; private readonly int _size; private readonly Random _random; public static int Egdes; private readonly object _locker = new object(); public GraphGnp(int size) { _random = new Random(); _graph = new int[size, size]; _size = size; } public void GenerateGnpSync(double p) { for (int i = 0; i < _size; i++) { for (int j = i + 1; j < _size; j++) { if (p * 100 >= _random.Next(0, 100)) { _graph[i, j] = 1; _graph[j, i] = 1; continue; } _graph[i, j] = 0; _graph[j, i] = 0; } } } public void GenerateGnpAsync(double p) { Thread[] threads = new Thread[_size]; for (int i = 0; i < _size; i++) { var i1 = i; threads[i1] = new Thread(() => { GenerateGnpVertex(i1, p); }); threads[i].Start(); threads[i].Join(); } } private void GenerateGnpVertex(int i, double p) { for (int j = i + 1; j < _size; j++) { if (p * 100 >= _random.Next(0, 100)) { _graph[i, j] = 1; _graph[j, i] = 1; continue; } _graph[i, j] = 0; _graph[j, i] = 0; } } public void ShowGraph() { for (int i = 0; i < _size; i++) { for (int j = 0; j < _size; j++) { Console.Write(_graph[i, j]); } Console.WriteLine(); } } public int CountEdgesSync() { int result = 0; for (int i = 0; i < _size; i++) { for (int j = i + 1; j < _size; j++) { if (_graph[i, j] == 1) result++; } } return result; } public int CountEgdesAsync() { Thread[] threads = new Thread[_size]; for (int i = 0; i < _size; i++) { var i1 = i; threads[i1] = new Thread(() => { CountEdgesForVertex(i1); }); threads[i].Start(); threads[i].Join(); } return Egdes; } public void CountEdgesForVertex(int vertexNumber) { int sum = 0; for (int i = vertexNumber; i < _size; i++) { if (_graph[vertexNumber, i] != 1) continue; sum++; } lock (_locker) { Egdes += sum; } } } public class Zad3 { public static void Main(string[] args) { GraphGnp gnp = new GraphGnp(10); gnp.GenerateGnpSync(1); gnp.ShowGraph(); Console.WriteLine(); gnp.GenerateGnpAsync(1); gnp.ShowGraph(); Console.WriteLine($"Sum of edges sequentially {gnp.CountEdgesSync()}"); Console.WriteLine($"Sum of edges using threads {gnp.CountEgdesAsync()}"); Console.ReadLine(); } } }
#!/bin/bash if [ $# -lt 1 ] || [ $1 = -l ] && [ $# -lt 2 ] then echo error: not enough arguments 1>&2 exit 1 fi if [ $1 = -l ] then find "${@:3}" -type f -exec wc -c {} \; | cut -f1 -d' ' | sort -n | head -$2 else find "${@:2}" -type f -exec wc -c {} \; | sort -n | head -$1 fi
#ifndef PACKEDARRAY_H #define PACKEDARRAY_H #ifdef __cplusplus extern "C" { #endif #include <stdint.h> struct _PackedArray { uint32_t bitsPerItem; uint32_t count; uint32_t padding[2]; #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4200) #endif // #ifdef _MSC_VER uint32_t buffer[]; #ifdef _MSC_VER #pragma warning(pop) #endif // #ifdef _MSC_VER }; typedef struct _PackedArray PackedArray; // creation / destruction PackedArray* PackedArray_create(uint32_t bitsPerItem, uint32_t count); void PackedArray_destroy(PackedArray* a); // packing / unpacking // offset is expressed in number of elements void PackedArray_pack(PackedArray* a, const uint32_t offset, const uint32_t* in, uint32_t count); void PackedArray_unpack(const PackedArray* a, const uint32_t offset, uint32_t* out, uint32_t count); // single item access void PackedArray_set(PackedArray* a, const uint32_t offset, const uint32_t in); uint32_t PackedArray_get(const PackedArray* a, const uint32_t offset); // helpers uint32_t <API key>(const PackedArray* a); uint32_t <API key>(const uint32_t* in, uint32_t count); #ifdef __cplusplus } #endif #endif // #ifndef PACKEDARRAY_H
require '<API key>/paths' module Nesta module ContentFocus module Theme def register(name, paths = {}) if paths[:base] base_path = paths[:base] view_path = File.expand_path(base_path + '/views') stylesheet_path = File.expand_path(base_path + '/stylesheets') javascript_path = File.expand_path(base_path + '/javascripts') end stylesheet_path = paths[:styles] if paths[:styles] view_path = paths[:views] if paths[:views] javascript_path = paths[:scripts] if paths[:scripts] register_style_path(stylesheet_path) register_js_path(javascript_path) register_view_path(name, view_path) end def register_style_path(path) return unless path Paths.add_sass_path(path) Paths.add_view_path(path) end def register_js_path(path) return unless path Paths.add_js_path(path) end def register_view_path(name, path) return unless path Paths.add_view_path(path) Paths.add_view_path(File.expand_path(path + "/#{name}")) end end end end module Nesta module Theme extend Nesta::ContentFocus::Theme end end
package io.github.barandc.loginalert; import java.net.URL; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.java.JavaPlugin; public final class LoginAlert extends JavaPlugin implements ILoginHandler, Listener { /* NOTE: The initial idea is to make it possible to have different * classes implementing this interface, to enable different * notifications, e.g. sound, LED, IM, ... * For now, I implement it in this class, keeping it simple. */ //ILoginHandler loginHandler; @Override public void onEnable() { getLogger().info("LoginAlert is enabled."); getServer().getPluginManager().registerEvents(this, this); <API key>(getServer().getOnlinePlayers().length); } @Override public void onDisable() { getLogger().info("LoginAlert is disabled."); HandlerList.unregisterAll((Listener)this); <API key>(0); } @EventHandler(priority = EventPriority.LOW) public void onPlayerJoin(PlayerJoinEvent event) { //Player player = event.getPlayer(); //player.sendMessage("Hello Sir!"); <API key>(getServer().getOnlinePlayers().length); } @EventHandler(priority = EventPriority.LOW) public void onPlayerQuit(PlayerQuitEvent event) { /* For some odd reason, the PlayerQuitEvent seems to be thrown while the player * still is in the list of online players. I found no event thrown after a player * logged out. I might tackle it otherwise in a future implementation, but for now * I simply pass "the LoginHandler" the number of players excluding the one logging * out. */ Player[] players = getServer().getOnlinePlayers(); int <API key> = players.length; int numberOfPlayersLeft = 0; for (int i = 0; i < <API key>; i++) { // Count all those players whose name differs from the quitter's. if (players[i].getName() != event.getPlayer().getName()) { numberOfPlayersLeft++; } } <API key>(numberOfPlayersLeft); } @Override public void <API key>(int numberOfPlayers) { if (numberOfPlayers > 0) { getLogger().info("There are players online!"); <API key>(); } else { getLogger().info("There are NO players online!"); // TODO: Play "crickets" sound? } } private void <API key>() { try { URL soundURL = getClass().getClassLoader().getResource("doorbell2.wav"); AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(soundURL); Clip clip = AudioSystem.getClip(); clip.setFramePosition(0); clip.open(audioInputStream); clip.start(); } catch (Exception ex) { getLogger().info("ERROR: failed to play login sound 2: " + ex.getMessage()); } } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>shuffle: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.13.1 / shuffle - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> shuffle <small> 8.6.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-02 06:18:51 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-02 06:18:51 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 4 Virtual package relying on a GMP lib system installation coq 8.13.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/shuffle&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Shuffle&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: Gilbreath&#39;s card trick&quot; &quot;keyword: binary sequences&quot; &quot;category: Miscellaneous/Logical Puzzles and Entertainment&quot; ] authors: [ &quot;Gérard Huet&quot; ] bug-reports: &quot;https://github.com/coq-contribs/shuffle/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/shuffle.git&quot; synopsis: &quot;Gilbreath&#39;s card trick&quot; description: &quot;A full axiomatization and proof development of a non-trivial property of binary sequences, inspired from a card trick of N. Gilbreath.&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/shuffle/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-shuffle.8.6.0 coq.8.13.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.13.1). The following dependencies couldn&#39;t be met: - coq-shuffle -&gt; coq &lt; 8.7~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-shuffle.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
#include <iostream> #include <seqan/graph_types.h> #include <seqan/graph_algorithms.h> using namespace seqan; int main () { typedef unsigned int TCargo; typedef Graph<Undirected<TCargo> > TGraph; typedef VertexDescriptor<TGraph>::Type TVertexDescriptor; TGraph g; TVertexDescriptor vertBerlin = addVertex(g); TVertexDescriptor vertHamburg = addVertex(g); TVertexDescriptor vertHannover = addVertex(g); TVertexDescriptor vertMainz = addVertex(g); TVertexDescriptor vertMuenchen = addVertex(g); addEdge(g, vertBerlin, vertHamburg, 289); addEdge(g, vertBerlin, vertHannover, 286); addEdge(g, vertBerlin, vertMainz, 573); addEdge(g, vertBerlin, vertMuenchen, 586); addEdge(g, vertHannover, vertMuenchen, 572); addEdge(g, vertHamburg, vertMainz, 521); FILE* strmWrite = fopen("graph.dot", "w"); write(strmWrite, g, DotDrawing()); fclose(strmWrite); return 0; }
const tape = require('tape') const schedule = require('./schedule') const fixtures = require('./fixtures/schedule') tape('peak schedule', (t) => { const data = fixtures.schedule_templates.peak const day = schedule(data) t.equal(day.meta, data.meta, 'meta is the same') t.equal(day.blocks.length, data.blocks.length, 'blocks same length') t.equal(day.blocks[0].slots[0].price, data.merge.price, 'price was inherited') t.notEqual(day.blocks[3].slots[0].price, data.merge.price, 'overriden price was not inherited') t.equal(day.blocks[3].slots[0].price, data.blocks[3].slots[0].price, 'price was overridden') t.equal(day.blocks[0].name, data.blocks[0].name, 'block name carried forward') t.equal(day.blocks[2].slots[2].index, '2-2', 'slot index correct') t.end() })
package com.lieve.online.shiro.service; import com.lieve.online.shiro.entity.Role; public interface RoleService { public Role createRole(Role role); public void deleteRole(Long roleId); public void <API key>(Long roleId, Long... permissionIds); public void <API key>(Long roleId, Long... permissionIds); }
# <API key> A javascript solver for [regexcrossword.com](regexcrossword.com) Latest release only works via completely dumb brute-force until I have more time to experiment. This means that it is *hilariously slow!* It also doesn't work with hexagonal puzzles yet. # Quickstart On any puzzle page, type this into your console: var s = document.createElement("script"); s.type = "text/javascript"; s.src = "https://raw.githubusercontent.com/jlblatt/<API key>/master/rcs.js"; document.<API key>("head")[0].appendChild(s);
/* eslint-disable no-console */ const { <API key> } = require('@cardstack/test-support/env'); const JSONAPIFactory = require('@cardstack/test-support/jsonapi-factory'); const openAPIPatch = [ { op: "add", path: "/definitions/node:recipe/properties/attributes/properties/difficulty/enum", value: ["easy", "medium", "hard"] }, { op: "add", path: "/definitions/node:recipe/properties/type/enum", value: ["recipes"] }, { op: "add", path: "/definitions/node:article/properties/type/enum", value: ["articles"] }, { op: "add", path: "/definitions/node:page/properties/type/enum", value: ["pages"] }, { op: "add", path: "/definitions/node:tutorial/properties/type/enum", value: ["node--tutorial"] }, { op: "add", path: "/definitions/media:image/properties/type/enum", value: ["images"] }, { op: "replace", path: "/basePath", value: "/" } ]; async function go() { let factory = new JSONAPIFactory(); factory.addResource('data-sources').withAttributes({ 'source-type': '@cardstack/drupal', params: { url: 'http://localhost', authToken: process.env.DRUPAL_TOKEN, openAPIPatch } }); factory.addResource('plugin-configs').withAttributes({ module: '@cardstack/drupal' }); await <API key>(__dirname + '/../', factory.getModels()); } async function login() { let request = require('superagent'); let response = await request.post('http://localhost/oauth/token') .type('form') .send({ client_id: '<API key>', client_secret: 'contenta', grant_type: 'password', username: 'edward', password: 'contenta' }); process.stdout.write(`\n export DRUPAL_TOKEN=${response.body.access_token}\n\n`); } let main = go; if (process.argv.includes("login")) { main = login; } main().then(() => process.exit(0), err => { console.log(err); process.exit(-1); });
var options = require('config'); var carMileageResolver = require('../../../lib/resolver/vehicle/carMileageResolver'); var chai = require('chai'); var should = chai.should(); var expect = chai.expect; describe('car mileage resolver test', function () { it('should return valid mileage value and mileage type', function (done) { var map = { 'mileage.value': '13981', 'mileage.type': 'mile' }; carMileageResolver.resolve(map, options); should.exist(map['mileage.value']); map['mileage.value'].should.equal(13981); should.exist(map['mileage.type']); map['mileage.type'].should.equal('MILE'); done(); }); it('should return null for all null values', function (done) { var map = { 'mileage.value': null, 'mileage.type': null }; carMileageResolver.resolve(map, options); expect(map['mileage.value']).to.be.null; expect(map['mileage.type']).to.be.null; done(); }); it('should return object with some null values', function (done) { var map = { 'mileage.value': '13981', 'mileage.type': null }; carMileageResolver.resolve(map, options); should.exist(map['mileage.value']); map['mileage.value'].should.equal(13981); should.exist(map['mileage.type']); map['mileage.type'].should.equal('KM'); done(); }); it('should return default type for unknown value', function (done) { var map = { 'mileage.value': 111, 'mileage.type': 'unknown' }; carMileageResolver.resolve(map, options); should.exist(map['mileage.value']); map['mileage.value'].should.equal(111); should.exist(map['mileage.type']); map['mileage.type'].should.equal('KM'); done(); }); it('should return null object for null mileage value', function (done) { var map = { 'mileage.value': null, 'mileage.type': 'unknown' }; carMileageResolver.resolve(map, options); expect(map['mileage.value']).to.be.null; expect(map['mileage.type']).to.be.null; done(); }); it('should resolve type from value', function (done) { var map = { 'mileage.value': '13981 mile', 'mileage.type': null }; carMileageResolver.resolve(map, options); should.exist(map['mileage.value']); map['mileage.value'].should.equal(13981); should.exist(map['mileage.type']); map['mileage.type'].should.equal('MILE'); done(); }); });
//Write a method that returns the last digit of given integer as an English word. using System; class EnglishDigit { static string DigitAsWord(int number) { int lastDigit = number % 10; string digit = null; switch (lastDigit) { case 1: digit = "one"; break; case 2: digit = "two"; break; case 3: digit = "three"; break; case 4: digit = "four"; break; case 5: digit = "five"; break; case 6: digit = "six"; break; case 7: digit = "seven"; break; case 8: digit = "eight"; break; case 9: digit = "nine"; break; case 10: digit = "zero"; break; }; return digit; } static void Main() { Console.Write("Enter random number:"); int number = int.Parse(Console.ReadLine()); string digit = DigitAsWord(number); Console.WriteLine("Last digit of the number is {0}!", digit); } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mutual-exclusion: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">8.11.dev / mutual-exclusion - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mutual-exclusion <small> 8.6.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2020-07-18 17:11:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-07-18 17:11:19 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.11.dev Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/mutual-exclusion&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/MutualExclusion&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: mutual exclusion&quot; &quot;keyword: concurrency&quot; &quot;keyword: Peterson&#39;s algorithm&quot; &quot;keyword: co-inductive types&quot; &quot;keyword: co-induction&quot; &quot;category: Computer Science/Concurrent Systems and Protocols/Correctness of specific protocols&quot; &quot;category: Miscellaneous/Extracted Programs/Automata and protocols&quot; ] authors: [ &quot;Eduardo Giménez&quot; ] bug-reports: &quot;https://github.com/coq-contribs/mutual-exclusion/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/mutual-exclusion.git&quot; synopsis: &quot;A certification of Peterson&#39;s algorithm for managing mutual exclusion&quot; description: &quot;&quot;&quot; This is a proof of certification of Peterson&#39;s algorithm for managing mutual exclusion. The case of two processes is treated in the directory called ``binary&#39;&#39; (see the README file in this directory). The case of n processes will be available soon.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/mutual-exclusion/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.6.0 coq.8.11.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.dev). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &lt; 8.7~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<?php namespace goodizer\helpers; use Yii; use yii\db\ActiveRecord; use yii\db\Connection; /** * Class DbSyncHelper * @package goodizer\helpers */ class DbSyncHelper { const <API key> = 1; /** * @var Connection */ private $_db; /** * @var bool */ private $_isConsole; /** * @var string[] */ public $nameSpaces; /** * @var string[] */ public $tableNames; /** * Important - modelClass must have a public method "attributeTypes" * Example: * * ```php * public function attributeTypes() * { * return [ * 'id' => Schema::TYPE_PK, * 'owner_id' => Schema::TYPE_INTEGER, * 'name' => Schema::TYPE_STRING, * 'description' => Schema::TYPE_TEXT, * 'status' => Schema::TYPE_SMALLINT, * 'updated_at' => Schema::TYPE_TIMESTAMP, * 'created_at' => Schema::TYPE_DATETIME, * * // Set new index and foreign key example * // addForeignKey method params array: * // [$name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null] * // Warning! First arg "$name" will be auto generated * * DbSyncHelper::<API key> => [ * 'addForeignKey' => [static::tableName(), 'owner_id', Owner::tableName(), 'id', 'CASCADE'], * ], * ]; * } * ``` * * Example of use: * * ```php * (new DbSync([ * 'common\models\', // if namespace equivalent to path * 'Path to directory' => 'someName\models\', * ]))->run(); * ``` * * @param array $nameSpaces * @param null|Connection $db */ public function __construct(array $nameSpaces, $db = null) { foreach ($nameSpaces as $key => $nameSpace) { $this->nameSpaces[$key] = trim($nameSpace, '\\') . '\\'; } $this->_isConsole = Yii::$app instanceof yii\console\Application; $this->_db = $db ?: Yii::$app->getDb(); $this->tableNames = $this->_db->getSchema()->getTableNames(); } public function run() { $command = $this->_db->createCommand(); $changed = false; foreach ($this->nameSpaces as $key => $nameSpace) { if (is_integer($key)) { $alias = '@' . str_replace('\\', '/', $nameSpace); $path = Yii::getAlias($alias); } else { $path = $key; } if (!is_dir($path)) { $this->debug_msg("Directory not exist: "); $this->debug_msg("Path - '{$path}'"); $this->debug_msg("Namespace - '{$nameSpace}'"); echo PHP_EOL; break; } foreach (glob($path . '*.php') as $k => $file) { $info = pathinfo($file); $modelCls = $nameSpace . $info['filename']; /** * @var $model ActiveRecord|object */ $model = new $modelCls(); if (!$model instanceof ActiveRecord || !method_exists($model, 'attributeTypes')) { continue; } $tbl_name = $model->tableName(); $schema = $this->_db->getTableSchema($tbl_name, true); $field_types = array_filter($model->attributeTypes(), function ($v, $k) { return is_string($k) && is_string($v); }, <API key>); $stack_to_add = array_filter($model->attributeTypes(), function ($v, $k) { return is_int($k) && is_array($v); }, <API key>); if (null !== $schema && in_array($tbl_full_name = $schema ? $schema->fullName : null, $this->tableNames)) { $new_columns = array_filter(array_diff(array_keys($field_types), $schema->getColumnNames())); if (!empty($new_columns)) { $this->debug_msg("Add new column(s) to the table ':tbl_name'.", [ ':tbl_name' => $tbl_full_name, ]); foreach ($new_columns as $column) { $command->addColumn($tbl_name, $column, $field_types[$column]); $command->execute(); $this->debug_msg(" Column ':column' added with type [:type].", [ ':column' => $column, ':type' => $field_types[$column], ]); } $changed = true; $this->debug_msg("Done."); echo PHP_EOL; } $remove_columns = array_diff($schema->getColumnNames(), array_keys($field_types)); /** Remove columns */ if (!empty($remove_columns)) { $this->debug_msg("Remove column(s) from the table ':tbl_name'.", [':tbl_name' => $tbl_full_name]); foreach ($remove_columns as $column) { foreach ($schema->foreignKeys as $fk => $data) { if (isset($data[$column])) { $command->dropForeignKey($fk, $tbl_full_name); $command->execute(); $this->debug_msg(" ForeignKey ':fk' is removed.", [':fk' => $fk]); } } $command->dropColumn($tbl_name, $column); $command->execute(); $this->debug_msg(" Column ':column' is removed.", [':column' => $column]); } $changed = true; $this->debug_msg("Done."); echo PHP_EOL; } } else { $command->createTable($tbl_name, $field_types); $command->execute(); $changed = true; $this->debug_msg("New table ':tbl_name' is created.", [ ':tbl_name' => trim($this->_db->quoteSql($tbl_name)), ]); } /** Executing createIndex, addForeignKey for saved tables */ foreach ($stack_to_add as $method => $params) { switch ($method) { case static::<API key>: list($tbl, $col, $ref_tbl, $ref_col, $delete, $update) = $params; if (!$tbl || !$col || !$ref_tbl || !$ref_col) { $this->debug_msg("!Missing required args for Command::addForeignKey(): :args.", [ ':args' => '$tbl, $col, $ref_tbl, $ref_col' ]); break; } $idx_name = "{$tbl}_{$col}_idx_{$k}"; $fk_name = "{$tbl}_{$col}_fk_{$k}"; /** If foreign key already exist or not found in field types */ if (isset($schema->foreignKeys[$fk_name], $schema->foreignKeys[$fk_name][$col]) || !isset($field_types[$col]) ) { break; } $command->createIndex($idx_name, $tbl, $col); $command->execute(); $this->debug_msg("Create new index '{$idx_name}'."); $command->addForeignKey($fk_name, $tbl, $col, $ref_tbl, $ref_col, $delete, $update); $command->execute(); $this->debug_msg("Add new constraint fk ':column' -> ':fk_name' references to ':references'.", [ ':column' => $tbl . '.' . $col, ':fk_name' => $fk_name, ':references' => $ref_tbl . '.' . $ref_col, ]); break; } } } } if (!$changed) { $this->debug_msg('Changes not found.'); } else { $this->debug_msg('End.'); } } /** * @param $msg * @param array $params * @param bool $return * @return null|string */ protected function debug_msg($msg, $params = [], $return = false) { if ($this->_isConsole) { if (!empty($params)) { $msg = strtr($msg, $params); } if ($return === true) { return $msg; } echo $msg . "\r\n"; } return null; } }
var vows = require('vows'), assert = require('assert'), helper = require("../../data/manyToMany/hashKey"), patio = require("index"), comb = require("comb"), hitch = comb.hitch; var ret = module.exports = exports = new comb.Promise(); var gender = ["M", "F"]; helper.loadModels().then(function () { var Company = patio.getModel("company"), Employee = patio.getModel("employee"); var suite = vows.describe("Many to many Lazy association using a hash for the key "); suite.addBatch({ "A model":{ topic:function () { return Employee }, "should have associations":function () { assert.deepEqual(Employee.associations, ["companies"]); assert.deepEqual(Company.associations, ["employees"]); var emp = new Employee(); var company = new Company(); assert.deepEqual(emp.associations, ["companies"]); assert.deepEqual(company.associations, ["employees"]); } } }); suite.addBatch({ "When creating a company with employees":{ topic:function () { var c1 = new Company({ companyName:"Google", employees:[ { lastname:"last" + 1, firstname:"first" + 1, midinitial:"m", gender:gender[1 % 2], street:"Street " + 1, city:"City " + 1 }, { lastname:"last" + 2, firstname:"first" + 2, midinitial:"m", gender:gender[2 % 2], street:"Street " + 2, city:"City " + 2 } ] }); c1.save().then(hitch(this, "callback", null), hitch(this, "callback")); }, " the company should have employees ":{ topic:function (company) { company.employees.then(hitch(this, "callback", null), hitch(this, "callback")); }, " when querying the employees ":{ topic:function (emps, company) { assert.lengthOf(emps, 2); emps.forEach(function (emp, i) { assert.equal(i + 1, emp.id); }, this); comb.executeInOrder(assert, Employee, function (assert, Employee) { var emps = Employee.all() assert.lengthOf(emps, 2); assert.equal(1, emps[0].id); assert.equal(2, emps[1].id); return {companies1:emps[0].companies, companies2:emps[1].companies}; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the employees company should be loaded":function (ret) { assert.isTrue(ret.companies1.every(function (c) { return c.companyName == "Google" })); assert.isTrue(ret.companies2.every(function (c) { return c.companyName == "Google" })); } } } } }); suite.addBatch({ "When finding a company":{ topic:function () { Company.one().then(hitch(this, "callback", null), hitch(this, "callback")); }, " the companys employees should not be loaded ":{ topic:function (company) { company.employees.then(hitch(this, "callback", null), hitch(this, "callback")); }, " but after fetching them there should be two":function (emps) { assert.lengthOf(emps, 2); var ids = [1, 2]; emps.forEach(function (emp, i) { assert.equal(ids[i], emp.id); }); }, " and adding an employee":{ topic:function (i, company) { var emp = new Employee({ lastname:"last" + 3, firstname:"first" + 3, midinitial:"m", gender:gender[1 % 3], street:"Street " + 3, city:"City " + 3 }); comb.executeInOrder(company, function (company) { company.addEmployee(emp); return company.employees; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the company should have three employees ":function (emps) { assert.lengthOf(emps, 3); var ids = [1, 2, 3]; emps.forEach(function (emp, i) { assert.equal(emp.id, ids[i]); }); } } } } }); suite.addBatch({ "When finding a company and removing an employee and deleting the employee":{ topic:function () { comb.executeInOrder(Company, Employee, function (Company, Employee) { var company = Company.one(); var emps = company.employees; company.removeEmployee(emps[0], true); return {employees:company.employees, empCount:Employee.count()}; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the company should have two employees ":function (ret) { var emps = ret.employees; assert.lengthOf(emps, 2); var ids = [2, 3]; emps.forEach(function (emp, i) { assert.equal(ids[i], emp.id); }); assert.equal(ret.empCount, 2); } } }); suite.addBatch({ "When finding a company and removing multiple employees and deloting the employees":{ topic:function () { comb.executeInOrder(Company, Employee, function (Company, Employee) { var company = Company.one(); var emps = company.employees; company.removeEmployees(emps, true); return {employees:company.employees, empCount:Employee.count()}; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the company should have no employees ":function (ret) { assert.lengthOf(ret.employees, 0); assert.equal(ret.empCount, 0); } } }); suite.addBatch({ "When finding a company and adding employees":{ topic:function () { var employees = []; for (var i = 0; i < 3; i++) { employees.push({ lastname:"last" + i, firstname:"first" + i, midinitial:"m", gender:gender[i % 2], street:"Street " + i, city:"City " + i }); } comb.executeInOrder(Company, function (Company) { var company = Company.one(); company.addEmployees(employees); return company.employees; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the company should have three employees ":function (emps) { assert.lengthOf(emps, 3); emps.forEach(function (emp) { assert.instanceOf(emp, Employee); }); } } }); suite.addBatch({ "When finding a company and removing an employee and not deleting the employee":{ topic:function () { comb.executeInOrder(Company, Employee, function (Company, Employee) { var company = Company.one(); var emps = company.employees; company.removeEmployee(emps[0]); return {employees:company.employees, empCount:Employee.count()}; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the company should have two employees ":function (ret) { var emps = ret.employees; assert.lengthOf(emps, 2); assert.equal(ret.empCount, 3); } } }); suite.addBatch({ "When finding a company and removing multiple employees and not deleting the employees":{ topic:function () { comb.executeInOrder(Company, Employee, function (Company, Employee) { var company = Company.one(); var emps = company.employees; company.removeEmployees(emps); return {employees:company.employees, empCount:Employee.count()}; }).then(hitch(this, "callback", null), hitch(this, "callback")); }, "the company should have no employees ":function (ret) { assert.lengthOf(ret.employees, 0); assert.equal(ret.empCount, 3); } } }); suite.addBatch({ "When deleting a company":{ topic:function () { comb.executeInOrder(Company, Employee, function (Company, Employee) { var company = Company.one(); company.remove(); return Employee.count(); }).then(hitch(this, "callback", null), hitch(this, "callback")); }, " the company should no employees ":function (count) { assert.equal(count, 3); } } }); suite.run({reporter:require("vows").reporter.spec}, function () { helper.dropModels().then(comb.hitch(ret, "callback"), comb.hitch(ret, "errback")); }); });