code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
# dyndns-update PHP DynDns update script for bind dns server ## Requirements - PHP5 with mysqli - Mysql Server - configured Bind DNS Server - Tested on FreeBSD, can be modified for Linux easily ## Setup - Create a database account - Fill the missing data at the top of the script - Call the script with ?setup to create database table and procedure - in mysql use 'call create_account('dyndns.example.com', 'passwd');' to create an account ## Usage - Call script with get or post params domain, password and at least one of ipv4, ipv6, ip (where ip can be both types)
hc42/dyndns-update
README.md
Markdown
bsd-3-clause
571
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="Description" content="scikit-optimize: machine learning in Python"> <title>skopt.space.space.Categorical &mdash; scikit-optimize 0.8.1 documentation</title> <link rel="canonical" href="https://scikit-optimize.github.io/modules/generated/skopt.space.space.Categorical.html" /> <link rel="shortcut icon" href="../../_static/favicon.ico"/> <link rel="stylesheet" href="../../_static/css/vendor/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="../../_static/gallery.css" type="text/css" /> <link rel="stylesheet" href="../../_static/gallery-binder.css" type="text/css" /> <link rel="stylesheet" href="../../_static/gallery-dataframe.css" type="text/css" /> <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> <script src="../../_static/jquery.js"></script> </head> <body> <nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0"> <div class="container-fluid sk-docs-container px-0"> <a class="navbar-brand py-0" href="../../index.html"> <img class="sk-brand-img" src="../../_static/logo.png" alt="logo"/> </a> <button id="sk-navbar-toggler" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation" > <span class="navbar-toggler-icon"></span> </button> <div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav mr-auto"> <li class="nav-item"> <a class="sk-nav-link nav-link" href="../../install.html">Install</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link" href="../../user_guide.html">User Guide</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link" href="../classes.html">API</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link" href="../../auto_examples/index.html">Examples</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../getting_started.html">Getting Started</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../development.html">Development</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://github.com/scikit-optimize/scikit-optimize">GitHub</a> </li> <li class="nav-item"> <a class="sk-nav-link nav-link nav-more-item-mobile-items" href="https://scikit-optimize.github.io/dev/versions.html">Other Versions</a> </li> <li class="nav-item dropdown nav-more-item-dropdown"> <a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a> <div class="dropdown-menu" aria-labelledby="navbarDropdown"> <a class="sk-nav-dropdown-item dropdown-item" href="../../getting_started.html">Getting Started</a> <a class="sk-nav-dropdown-item dropdown-item" href="../../development.html">Development</a> <a class="sk-nav-dropdown-item dropdown-item" href="https://github.com/scikit-optimize/scikit-optimize">GitHub</a> <a class="sk-nav-dropdown-item dropdown-item" href="https://scikit-optimize.github.io/dev/versions.html">Other Versions</a> </div> </li> </ul> <div id="searchbox" role="search"> <div class="searchformwrapper"> <form class="search" action="../../search.html" method="get"> <input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" /> <input class="sk-search-text-btn" type="submit" value="Go" /> </form> </div> </div> </div> </div> </nav> <div class="d-flex" id="sk-doc-wrapper"> <input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox"> <label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label> <div id="sk-sidebar-wrapper" class="border-right"> <div class="sk-sidebar-toc-wrapper"> <div class="sk-sidebar-toc-logo"> <a href="../../index.html"> <img class="sk-brand-img" src="../../_static/logo.png" alt="logo"/> </a> </div> <div class="btn-group w-100 mb-2" role="group" aria-label="rellinks"> <a href="skopt.sampler.Hammersly.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="skopt.sampler.Hammersly">Prev</a><a href="../classes.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="API Reference">Up</a> <a href="skopt.space.space.Dimension.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="skopt.space.space.Dimension">Next</a> </div> <div class="alert alert-danger p-1 mb-2" role="alert"> <p class="text-center mb-0"> <strong>scikit-optimize 0.8.1</strong><br/> <a href="https://scikit-optimize.github.io/dev/versions.html">Other versions</a> </p> </div> <div class="sk-sidebar-toc"> <ul> <li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.space.space</span></code>.Categorical</a></li> </ul> </div> </div> </div> <div id="sk-page-content-wrapper"> <div class="sk-page-content container-fluid body px-md-3" role="main"> <div class="section" id="skopt-space-space-categorical"> <h1><a class="reference internal" href="../classes.html#module-skopt.space.space" title="skopt.space.space"><code class="xref py py-mod docutils literal notranslate"><span class="pre">skopt.space.space</span></code></a>.Categorical<a class="headerlink" href="#skopt-space-space-categorical" title="Permalink to this headline">¶</a></h1> <dl class="class"> <dt id="skopt.space.space.Categorical"> <em class="property">class </em><code class="sig-prename descclassname">skopt.space.space.</code><code class="sig-name descname">Categorical</code><span class="sig-paren">(</span><em class="sig-param">categories</em>, <em class="sig-param">prior=None</em>, <em class="sig-param">transform=None</em>, <em class="sig-param">name=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L571"><span class="viewcode-link">[source]</span></a><a class="reference internal" href="../../_modules/skopt/space/space.html#Categorical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical" title="Permalink to this definition">¶</a></dt> <dd><p>Search space dimension that can take on categorical values.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><dl class="simple"> <dt><strong>categories</strong><span class="classifier">list, shape=(n_categories,)</span></dt><dd><p>Sequence of possible categories.</p> </dd> <dt><strong>prior</strong><span class="classifier">list, shape=(categories,), default=None</span></dt><dd><p>Prior probabilities for each category. By default all categories are equally likely.</p> </dd> <dt><strong>transform</strong><span class="classifier">“onehot”, “string”, “identity”, “label”, default=”onehot”</span></dt><dd><ul class="simple"> <li><p>“identity”, the transformed space is the same as the original space.</p></li> <li><p>“string”, the transformed space is a string encoded representation of the original space.</p></li> <li><p>“label”, the transformed space is a label encoded representation (integer) of the original space.</p></li> <li><p>“onehot”, the transformed space is a one-hot encoded representation of the original space.</p></li> </ul> </dd> <dt><strong>name</strong><span class="classifier">str or None</span></dt><dd><p>Name associated with dimension, e.g., “colors”.</p> </dd> </dl> </dd> <dt class="field-even">Attributes</dt> <dd class="field-even"><dl class="simple"> <dt><strong>bounds</strong></dt><dd></dd> <dt><strong>is_constant</strong></dt><dd></dd> <dt><strong>name</strong></dt><dd></dd> <dt><strong>prior</strong></dt><dd></dd> <dt><strong>size</strong></dt><dd></dd> <dt><strong>transformed_bounds</strong></dt><dd></dd> <dt><strong>transformed_size</strong></dt><dd></dd> </dl> </dd> </dl> <p class="rubric">Methods</p> <table class="longtable docutils align-default"> <colgroup> <col style="width: 10%" /> <col style="width: 90%" /> </colgroup> <tbody> <tr class="row-odd"><td><p><a class="reference internal" href="#skopt.space.space.Categorical.distance" title="skopt.space.space.Categorical.distance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">distance</span></code></a>(a, b)</p></td> <td><p>Compute distance between category <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">b</span></code>.</p></td> </tr> <tr class="row-even"><td><p><a class="reference internal" href="#skopt.space.space.Categorical.inverse_transform" title="skopt.space.space.Categorical.inverse_transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">inverse_transform</span></code></a>(Xt)</p></td> <td><p>Inverse transform samples from the warped space back into the original space.</p></td> </tr> <tr class="row-odd"><td><p><a class="reference internal" href="#skopt.space.space.Categorical.rvs" title="skopt.space.space.Categorical.rvs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rvs</span></code></a>([n_samples, random_state])</p></td> <td><p>Draw random samples.</p></td> </tr> <tr class="row-even"><td><p><a class="reference internal" href="#skopt.space.space.Categorical.set_transformer" title="skopt.space.space.Categorical.set_transformer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_transformer</span></code></a>([transform])</p></td> <td><p>Define _rvs and transformer spaces.</p></td> </tr> <tr class="row-odd"><td><p><a class="reference internal" href="#skopt.space.space.Categorical.transform" title="skopt.space.space.Categorical.transform"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transform</span></code></a>(X)</p></td> <td><p>Transform samples form the original space to a warped space.</p></td> </tr> </tbody> </table> <dl class="method"> <dt id="skopt.space.space.Categorical.__init__"> <code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">categories</em>, <em class="sig-param">prior=None</em>, <em class="sig-param">transform=None</em>, <em class="sig-param">name=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L598"><span class="viewcode-link">[source]</span></a><a class="reference internal" href="../../_modules/skopt/space/space.html#Categorical.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical.__init__" title="Permalink to this definition">¶</a></dt> <dd><p>Initialize self. See help(type(self)) for accurate signature.</p> </dd></dl> <dl class="method"> <dt id="skopt.space.space.Categorical.distance"> <code class="sig-name descname">distance</code><span class="sig-paren">(</span><em class="sig-param">a</em>, <em class="sig-param">b</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L723"><span class="viewcode-link">[source]</span></a><a class="reference internal" href="../../_modules/skopt/space/space.html#Categorical.distance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical.distance" title="Permalink to this definition">¶</a></dt> <dd><p>Compute distance between category <code class="docutils literal notranslate"><span class="pre">a</span></code> and <code class="docutils literal notranslate"><span class="pre">b</span></code>.</p> <p>As categories have no order the distance between two points is one if a != b and zero otherwise.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><dl class="simple"> <dt><strong>a</strong><span class="classifier">category</span></dt><dd><p>First category.</p> </dd> <dt><strong>b</strong><span class="classifier">category</span></dt><dd><p>Second category.</p> </dd> </dl> </dd> </dl> </dd></dl> <dl class="method"> <dt id="skopt.space.space.Categorical.inverse_transform"> <code class="sig-name descname">inverse_transform</code><span class="sig-paren">(</span><em class="sig-param">Xt</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L673"><span class="viewcode-link">[source]</span></a><a class="reference internal" href="../../_modules/skopt/space/space.html#Categorical.inverse_transform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical.inverse_transform" title="Permalink to this definition">¶</a></dt> <dd><p>Inverse transform samples from the warped space back into the original space.</p> </dd></dl> <dl class="method"> <dt id="skopt.space.space.Categorical.rvs"> <code class="sig-name descname">rvs</code><span class="sig-paren">(</span><em class="sig-param">n_samples=None</em>, <em class="sig-param">random_state=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L684"><span class="viewcode-link">[source]</span></a><a class="reference internal" href="../../_modules/skopt/space/space.html#Categorical.rvs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical.rvs" title="Permalink to this definition">¶</a></dt> <dd><p>Draw random samples.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><dl class="simple"> <dt><strong>n_samples</strong><span class="classifier">int or None</span></dt><dd><p>The number of samples to be drawn.</p> </dd> <dt><strong>random_state</strong><span class="classifier">int, RandomState instance, or None (default)</span></dt><dd><p>Set random state to something other than None for reproducible results.</p> </dd> </dl> </dd> </dl> </dd></dl> <dl class="method"> <dt id="skopt.space.space.Categorical.set_transformer"> <code class="sig-name descname">set_transformer</code><span class="sig-paren">(</span><em class="sig-param">transform='onehot'</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L617"><span class="viewcode-link">[source]</span></a><a class="reference internal" href="../../_modules/skopt/space/space.html#Categorical.set_transformer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical.set_transformer" title="Permalink to this definition">¶</a></dt> <dd><p>Define _rvs and transformer spaces.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><dl class="simple"> <dt><strong>transform</strong><span class="classifier">str</span></dt><dd><p>Can be ‘normalize’, ‘onehot’, ‘string’, ‘label’, or ‘identity’</p> </dd> </dl> </dd> </dl> </dd></dl> <dl class="method"> <dt id="skopt.space.space.Categorical.transform"> <code class="sig-name descname">transform</code><span class="sig-paren">(</span><em class="sig-param">X</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/scikit-optimize/scikit-optimize/blob/de32b5f/skopt/space/space.py#L160"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#skopt.space.space.Categorical.transform" title="Permalink to this definition">¶</a></dt> <dd><p>Transform samples form the original space to a warped space.</p> </dd></dl> </dd></dl> <div class="clearer"></div></div> </div> <div class="container"> <footer class="sk-content-footer"> &copy; 2017 - 2020, scikit-optimize contributors (BSD License). <a href="../../_sources/modules/generated/skopt.space.space.Categorical.rst.txt" rel="nofollow">Show this page source</a> </footer> </div> </div> </div> <script src="../../_static/js/vendor/bootstrap.min.js"></script> <script> $(document).ready(function() { /* Add a [>>>] button on the top-right corner of code sampler to hide * the >>> and ... prompts and the output and thus make the code * copyable. */ var div = $('.highlight-python .highlight,' + '.highlight-python3 .highlight,' + '.highlight-pycon .highlight,' + '.highlight-default .highlight') var pre = div.find('pre'); // get the styles from the current theme pre.parent().parent().css('position', 'relative'); var hide_text = 'Hide prompts and outputs'; var show_text = 'Show prompts and outputs'; // create and add the button to all the code blocks that contain >>> div.each(function(index) { var jthis = $(this); if (jthis.find('.gp').length > 0) { var button = $('<span class="copybutton">&gt;&gt;&gt;</span>'); button.attr('title', hide_text); button.data('hidden', 'false'); jthis.prepend(button); } // tracebacks (.gt) contain bare text elements that need to be // wrapped in a span to work with .nextUntil() (see later) jthis.find('pre:has(.gt)').contents().filter(function() { return ((this.nodeType == 3) && (this.data.trim().length > 0)); }).wrap('<span>'); }); // define the behavior of the button when it's clicked $('.copybutton').click(function(e){ e.preventDefault(); var button = $(this); if (button.data('hidden') === 'false') { // hide the code output button.parent().find('.go, .gp, .gt').hide(); button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); button.css('text-decoration', 'line-through'); button.attr('title', show_text); button.data('hidden', 'true'); } else { // show the code output button.parent().find('.go, .gp, .gt').show(); button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); button.css('text-decoration', 'none'); button.attr('title', hide_text); button.data('hidden', 'false'); } }); /*** Add permalink buttons next to glossary terms ***/ $('dl.glossary > dt[id]').append(function() { return ('<a class="headerlink" href="#' + this.getAttribute('id') + '" title="Permalink to this term">¶</a>'); }); /*** Hide navbar when scrolling down ***/ // Returns true when headerlink target matches hash in url (function() { hashTargetOnTop = function() { var hash = window.location.hash; if ( hash.length < 2 ) { return false; } var target = document.getElementById( hash.slice(1) ); if ( target === null ) { return false; } var top = target.getBoundingClientRect().top; return (top < 2) && (top > -2); }; // Hide navbar on load if hash target is on top var navBar = document.getElementById("navbar"); var navBarToggler = document.getElementById("sk-navbar-toggler"); var navBarHeightHidden = "-" + navBar.getBoundingClientRect().height + "px"; var $window = $(window); hideNavBar = function() { navBar.style.top = navBarHeightHidden; }; showNavBar = function() { navBar.style.top = "0"; } if (hashTargetOnTop()) { hideNavBar() } var prevScrollpos = window.pageYOffset; hideOnScroll = function(lastScrollTop) { if (($window.width() < 768) && (navBarToggler.getAttribute("aria-expanded") === 'true')) { return; } if (lastScrollTop > 2 && (prevScrollpos <= lastScrollTop) || hashTargetOnTop()){ hideNavBar() } else { showNavBar() } prevScrollpos = lastScrollTop; }; /*** high performance scroll event listener***/ var raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame; var lastScrollTop = $window.scrollTop(); if (raf) { loop(); } function loop() { var scrollTop = $window.scrollTop(); if (lastScrollTop === scrollTop) { raf(loop); return; } else { lastScrollTop = scrollTop; hideOnScroll(lastScrollTop); raf(loop); } } })(); }); </script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> <script src="https://scikit-optimize.github.io/versionwarning.js"></script> </body> </html>
scikit-optimize/scikit-optimize.github.io
0.8/modules/generated/skopt.space.space.Categorical.html
HTML
bsd-3-clause
22,247
/* $This file is distributed under the terms of the license in LICENSE$ */ package edu.cornell.mannlib.vitro.webapp.beans; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; /** * Reflects a collection of Permissions that can be made available to a user. * Similar to the concept of a Role. */ public class PermissionSet { /** This may be empty, but it should never be null. */ private String uri = ""; /** This may be empty, but it should never be null. */ private String label = ""; private boolean forNewUsers; private boolean forPublic; /** This may be empty, but it should never be null. */ private Set<String> permissionUris = Collections.emptySet(); public String getUri() { return uri; } public void setUri(String uri) { this.uri = (uri == null) ? "" : uri; } public String getLabel() { return label; } public void setLabel(String label) { this.label = (label == null) ? "" : label; } public boolean isForNewUsers() { return forNewUsers; } public void setForNewUsers(Boolean forNewUsers) { this.forNewUsers = (forNewUsers != null) && forNewUsers.booleanValue(); } public boolean isForPublic() { return forPublic; } public void setForPublic(Boolean forPublic) { this.forPublic = (forPublic != null) && forPublic.booleanValue(); } public Set<String> getPermissionUris() { return permissionUris; } public void setPermissionUris(Collection<String> permissionUris) { if (permissionUris == null) { throw new NullPointerException("permissionUris may not be null."); } this.permissionUris = new HashSet<String>(permissionUris); } }
vivo-project/Vitro
api/src/main/java/edu/cornell/mannlib/vitro/webapp/beans/PermissionSet.java
Java
bsd-3-clause
1,663
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Realtime &#8212; MNE 0.23.4 documentation</title> <link href="_static/css/theme.css" rel="stylesheet" /> <link href="_static/css/index.c5995385ac14fb8791e8eb36b4908be2.css" rel="stylesheet" /> <link rel="stylesheet" href="_static/vendor/fontawesome/5.13.0/css/all.min.css"> <link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2"> <link rel="preload" as="font" type="font/woff2" crossorigin href="_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2"> <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="_static/basic.css" /> <link rel="stylesheet" type="text/css" href="_static/graphviz.css" /> <link rel="stylesheet" type="text/css" href="_static/bootstrap_divs.css" /> <link rel="stylesheet" type="text/css" href="_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="_static/gallery.css" /> <link rel="stylesheet" type="text/css" href="_static/gallery-binder.css" /> <link rel="stylesheet" type="text/css" href="_static/gallery-dataframe.css" /> <link rel="stylesheet" type="text/css" href="_static/gallery-rendered-html.css" /> <link rel="stylesheet" type="text/css" href="_static/style.css" /> <link rel="preload" as="script" href="_static/js/index.1c5a1a01449ed65a7b51.js"> <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script> <script src="_static/jquery.js"></script> <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/bootstrap_divs.js"></script> <script src="_static/clipboard.min.js"></script> <script src="_static/copybutton.js"></script> <link rel="shortcut icon" href="_static/favicon.ico"/> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="MNE-Report" href="report.html" /> <link rel="prev" title="mne.decoding.get_coef" href="generated/mne.decoding.get_coef.html" /> <link rel="canonical" href="https://mne.tools/stable/index.html" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="docsearch:language" content="en" /> </head> <body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80"> <div class="container-fluid" id="banner"></div> <nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main"><div class="container-xl"> <div id="navbar-start"> <a class="navbar-brand" href="index.html"> <img src="_static/mne_logo_small.svg" class="logo" alt="logo"> </a> </div> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapsible" aria-controls="navbar-collapsible" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div id="navbar-collapsible" class="col-lg-9 collapse navbar-collapse"> <div id="navbar-center" class="mr-auto"> <div class="navbar-center-item"> <ul id="navbar-main-elements" class="navbar-nav"> <li class="toctree-l1 nav-item"> <a class="reference internal nav-link" href="install/index.html"> Install </a> </li> <li class="toctree-l1 nav-item"> <a class="reference internal nav-link" href="overview/index.html"> Documentation </a> </li> <li class="toctree-l1 current active nav-item"> <a class="reference internal nav-link" href="python_reference.html"> API Reference </a> </li> <li class="toctree-l1 nav-item"> <a class="reference internal nav-link" href="overview/get_help.html"> Get help </a> </li> <li class="toctree-l1 nav-item"> <a class="reference internal nav-link" href="overview/development.html"> Development </a> </li> </ul> </div> </div> <div id="navbar-end"> <div class="navbar-end-item"> <div class="dropdown"> <button type="button" class="btn btn-primary btn-sm navbar-btn dropdown-toggle" id="dLabelMore" data-toggle="dropdown"> v0.23.4 <span class="caret"></span> </button> <div class="dropdown-menu list-group-flush py-0" aria-labelledby="dLabelMore"> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/dev/index.html">v0.24 (devel)</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/stable/index.html">v0.23 (stable)</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.22/index.html">v0.22</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.21/index.html">v0.21</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.20/index.html">v0.20</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.19/index.html">v0.19</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.18/index.html">v0.18</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.17/index.html">v0.17</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.16/index.html">v0.16</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.15/index.html">v0.15</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.14/index.html">v0.14</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.13/index.html">v0.13</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.12/index.html">v0.12</a> <a class="list-group-item list-group-item-action py-1" href="https://mne-tools.github.io/0.11/index.html">v0.11</a> </div> </div> </div> <div class="navbar-end-item"> <ul id="navbar-icon-links" class="navbar-nav" aria-label="Quick Links"> <li class="nav-item"> <a class="nav-link" href="https://github.com/mne-tools/mne-python" rel="noopener" target="_blank" title="GitHub"> <span><i class="fab fa-github-square"></i></span> <label class="sr-only">GitHub</label> </a> </li> <li class="nav-item"> <a class="nav-link" href="https://twitter.com/mne_python" rel="noopener" target="_blank" title="Twitter"> <span><i class="fab fa-twitter-square"></i></span> <label class="sr-only">Twitter</label> </a> </li> <li class="nav-item"> <a class="nav-link" href="https://mne.discourse.group/" rel="noopener" target="_blank" title="Discourse"> <span><i class="fab fa-discourse"></i></span> <label class="sr-only">Discourse</label> </a> </li> <li class="nav-item"> <a class="nav-link" href="https://discord.gg/rKfvxTuATa" rel="noopener" target="_blank" title="Discord"> <span><i class="fab fa-discord"></i></span> <label class="sr-only">Discord</label> </a> </li> </ul> </div> </div> </div> </div> </nav> <div class="container-xl"> <div class="row"> <!-- Only show if we have sidebars configured, else just a small margin --> <div class="col-12 col-md-3 bd-sidebar"><form class="bd-search d-flex align-items-center" action="search.html" method="get"> <i class="icon fas fa-search"></i> <input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" > </form><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation"> <div class="bd-toc-item active"> <ul class="current nav bd-sidenav"> <li class="toctree-l1 has-children"> <a class="reference internal" href="most_used_classes.html"> Most-used classes </a> <input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/> <label for="toctree-checkbox-1"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.Raw.html"> mne.io.Raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Epochs.html"> mne.Epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Evoked.html"> mne.Evoked </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Info.html"> mne.Info </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="reading_raw_data.html"> Reading raw data </a> <input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/> <label for="toctree-checkbox-2"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.anonymize_info.html"> mne.io.anonymize_info </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw.html"> mne.io.read_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_artemis123.html"> mne.io.read_raw_artemis123 </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_bti.html"> mne.io.read_raw_bti </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_cnt.html"> mne.io.read_raw_cnt </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_ctf.html"> mne.io.read_raw_ctf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_curry.html"> mne.io.read_raw_curry </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_edf.html"> mne.io.read_raw_edf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_bdf.html"> mne.io.read_raw_bdf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_gdf.html"> mne.io.read_raw_gdf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_kit.html"> mne.io.read_raw_kit </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_nedf.html"> mne.io.read_raw_nedf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_nicolet.html"> mne.io.read_raw_nicolet </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_nirx.html"> mne.io.read_raw_nirx </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_snirf.html"> mne.io.read_raw_snirf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_eeglab.html"> mne.io.read_raw_eeglab </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_brainvision.html"> mne.io.read_raw_brainvision </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_egi.html"> mne.io.read_raw_egi </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_fif.html"> mne.io.read_raw_fif </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_eximia.html"> mne.io.read_raw_eximia </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_fieldtrip.html"> mne.io.read_raw_fieldtrip </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_boxy.html"> mne.io.read_raw_boxy </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_persyst.html"> mne.io.read_raw_persyst </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_raw_nihon.html"> mne.io.read_raw_nihon </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.BaseRaw.html"> mne.io.BaseRaw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.kit.read_mrk.html"> mne.io.kit.read_mrk </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="file_io.html"> File I/O </a> <input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox"/> <label for="toctree-checkbox-3"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channel_type.html"> mne.channel_type </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channel_indices_by_type.html"> mne.channel_indices_by_type </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.get_head_surf.html"> mne.get_head_surf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.get_meg_helmet_surf.html"> mne.get_meg_helmet_surf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.get_volume_labels_from_aseg.html"> mne.get_volume_labels_from_aseg </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.get_volume_labels_from_src.html"> mne.get_volume_labels_from_src </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.parse_config.html"> mne.parse_config </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_labels_from_annot.html"> mne.read_labels_from_annot </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_bem_solution.html"> mne.read_bem_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_bem_surfaces.html"> mne.read_bem_surfaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_cov.html"> mne.read_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_dipole.html"> mne.read_dipole </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_epochs.html"> mne.read_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_epochs_kit.html"> mne.read_epochs_kit </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_epochs_eeglab.html"> mne.read_epochs_eeglab </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_epochs_fieldtrip.html"> mne.read_epochs_fieldtrip </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_events.html"> mne.read_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_evokeds.html"> mne.read_evokeds </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_evoked_fieldtrip.html"> mne.read_evoked_fieldtrip </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_evokeds_mff.html"> mne.read_evokeds_mff </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_freesurfer_lut.html"> mne.read_freesurfer_lut </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_forward_solution.html"> mne.read_forward_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_label.html"> mne.read_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_morph_map.html"> mne.read_morph_map </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_proj.html"> mne.read_proj </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_reject_parameters.html"> mne.read_reject_parameters </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_selection.html"> mne.read_selection </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_source_estimate.html"> mne.read_source_estimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_source_spaces.html"> mne.read_source_spaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_surface.html"> mne.read_surface </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_trans.html"> mne.read_trans </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_tri.html"> mne.read_tri </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_labels_to_annot.html"> mne.write_labels_to_annot </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_bem_solution.html"> mne.write_bem_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_bem_surfaces.html"> mne.write_bem_surfaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_head_bem.html"> mne.write_head_bem </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_cov.html"> mne.write_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_events.html"> mne.write_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_evokeds.html"> mne.write_evokeds </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_forward_solution.html"> mne.write_forward_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_label.html"> mne.write_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_proj.html"> mne.write_proj </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_source_spaces.html"> mne.write_source_spaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_surface.html"> mne.write_surface </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_trans.html"> mne.write_trans </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.what.html"> mne.what </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.read_info.html"> mne.io.read_info </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.show_fiff.html"> mne.io.show_fiff </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.BaseEpochs.html"> mne.BaseEpochs </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="creating_from_arrays.html"> Creating data objects from arrays </a> <input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/> <label for="toctree-checkbox-4"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.EvokedArray.html"> mne.EvokedArray </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.EpochsArray.html"> mne.EpochsArray </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.io.RawArray.html"> mne.io.RawArray </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.create_info.html"> mne.create_info </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="datasets.html"> Datasets </a> <input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" type="checkbox"/> <label for="toctree-checkbox-5"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.brainstorm.bst_auditory.data_path.html"> mne.datasets.brainstorm.bst_auditory.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.brainstorm.bst_resting.data_path.html"> mne.datasets.brainstorm.bst_resting.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.brainstorm.bst_raw.data_path.html"> mne.datasets.brainstorm.bst_raw.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.eegbci.load_data.html"> mne.datasets.eegbci.load_data </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.eegbci.standardize.html"> mne.datasets.eegbci.standardize </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.fetch_aparc_sub_parcellation.html"> mne.datasets.fetch_aparc_sub_parcellation </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.fetch_fsaverage.html"> mne.datasets.fetch_fsaverage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.fetch_hcp_mmp_parcellation.html"> mne.datasets.fetch_hcp_mmp_parcellation </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.fetch_infant_template.html"> mne.datasets.fetch_infant_template </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.fnirs_motor.data_path.html"> mne.datasets.fnirs_motor.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.hf_sef.data_path.html"> mne.datasets.hf_sef.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.kiloword.data_path.html"> mne.datasets.kiloword.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.limo.load_data.html"> mne.datasets.limo.load_data </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.misc.data_path.html"> mne.datasets.misc.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.mtrf.data_path.html"> mne.datasets.mtrf.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.multimodal.data_path.html"> mne.datasets.multimodal.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.opm.data_path.html"> mne.datasets.opm.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.sleep_physionet.age.fetch_data.html"> mne.datasets.sleep_physionet.age.fetch_data </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.sleep_physionet.temazepam.fetch_data.html"> mne.datasets.sleep_physionet.temazepam.fetch_data </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.sample.data_path.html"> mne.datasets.sample.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.somato.data_path.html"> mne.datasets.somato.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.spm_face.data_path.html"> mne.datasets.spm_face.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.visual_92_categories.data_path.html"> mne.datasets.visual_92_categories.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.phantom_4dbti.data_path.html"> mne.datasets.phantom_4dbti.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.refmeg_noise.data_path.html"> mne.datasets.refmeg_noise.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.ssvep.data_path.html"> mne.datasets.ssvep.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.erp_core.data_path.html"> mne.datasets.erp_core.data_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.datasets.epilepsy_ecog.data_path.html"> mne.datasets.epilepsy_ecog.data_path </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="visualization.html"> Visualization </a> <input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" type="checkbox"/> <label for="toctree-checkbox-6"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.Brain.html"> mne.viz.Brain </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.ClickableImage.html"> mne.viz.ClickableImage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.add_background_image.html"> mne.viz.add_background_image </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.centers_to_edges.html"> mne.viz.centers_to_edges </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.compare_fiff.html"> mne.viz.compare_fiff </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.circular_layout.html"> mne.viz.circular_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.iter_topography.html"> mne.viz.iter_topography </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.mne_analyze_colormap.html"> mne.viz.mne_analyze_colormap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_bem.html"> mne.viz.plot_bem </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_brain_colorbar.html"> mne.viz.plot_brain_colorbar </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_connectivity_circle.html"> mne.viz.plot_connectivity_circle </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_cov.html"> mne.viz.plot_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_csd.html"> mne.viz.plot_csd </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_dipole_amplitudes.html"> mne.viz.plot_dipole_amplitudes </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_dipole_locations.html"> mne.viz.plot_dipole_locations </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_drop_log.html"> mne.viz.plot_drop_log </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_epochs.html"> mne.viz.plot_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_epochs_psd_topomap.html"> mne.viz.plot_epochs_psd_topomap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_events.html"> mne.viz.plot_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked.html"> mne.viz.plot_evoked </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked_image.html"> mne.viz.plot_evoked_image </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked_topo.html"> mne.viz.plot_evoked_topo </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked_topomap.html"> mne.viz.plot_evoked_topomap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked_joint.html"> mne.viz.plot_evoked_joint </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked_field.html"> mne.viz.plot_evoked_field </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_evoked_white.html"> mne.viz.plot_evoked_white </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_filter.html"> mne.viz.plot_filter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_head_positions.html"> mne.viz.plot_head_positions </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_ideal_filter.html"> mne.viz.plot_ideal_filter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_compare_evokeds.html"> mne.viz.plot_compare_evokeds </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_ica_sources.html"> mne.viz.plot_ica_sources </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_ica_components.html"> mne.viz.plot_ica_components </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_ica_properties.html"> mne.viz.plot_ica_properties </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_ica_scores.html"> mne.viz.plot_ica_scores </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_ica_overlay.html"> mne.viz.plot_ica_overlay </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_epochs_image.html"> mne.viz.plot_epochs_image </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_layout.html"> mne.viz.plot_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_montage.html"> mne.viz.plot_montage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_projs_topomap.html"> mne.viz.plot_projs_topomap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_raw.html"> mne.viz.plot_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_raw_psd.html"> mne.viz.plot_raw_psd </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_sensors.html"> mne.viz.plot_sensors </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_sensors_connectivity.html"> mne.viz.plot_sensors_connectivity </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_snr_estimate.html"> mne.viz.plot_snr_estimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_source_estimates.html"> mne.viz.plot_source_estimates </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.link_brains.html"> mne.viz.link_brains </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_volume_source_estimates.html"> mne.viz.plot_volume_source_estimates </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_vector_source_estimates.html"> mne.viz.plot_vector_source_estimates </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_sparse_source_estimates.html"> mne.viz.plot_sparse_source_estimates </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_tfr_topomap.html"> mne.viz.plot_tfr_topomap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_topo_image_epochs.html"> mne.viz.plot_topo_image_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_topomap.html"> mne.viz.plot_topomap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_alignment.html"> mne.viz.plot_alignment </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.snapshot_brain_montage.html"> mne.viz.snapshot_brain_montage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.plot_arrowmap.html"> mne.viz.plot_arrowmap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.set_3d_backend.html"> mne.viz.set_3d_backend </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.get_3d_backend.html"> mne.viz.get_3d_backend </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.use_3d_backend.html"> mne.viz.use_3d_backend </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.set_3d_options.html"> mne.viz.set_3d_options </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.set_3d_view.html"> mne.viz.set_3d_view </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.set_3d_title.html"> mne.viz.set_3d_title </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.create_3d_figure.html"> mne.viz.create_3d_figure </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.viz.get_brain_class.html"> mne.viz.get_brain_class </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="preprocessing.html"> Preprocessing </a> <input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" type="checkbox"/> <label for="toctree-checkbox-7"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Projection.html"> mne.Projection </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_proj_epochs.html"> mne.compute_proj_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_proj_evoked.html"> mne.compute_proj_evoked </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_proj_raw.html"> mne.compute_proj_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_proj.html"> mne.read_proj </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_proj.html"> mne.write_proj </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.Layout.html"> mne.channels.Layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.DigMontage.html"> mne.channels.DigMontage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.compute_native_head_t.html"> mne.channels.compute_native_head_t </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.fix_mag_coil_types.html"> mne.channels.fix_mag_coil_types </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_polhemus_fastscan.html"> mne.channels.read_polhemus_fastscan </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.get_builtin_montages.html"> mne.channels.get_builtin_montages </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.make_dig_montage.html"> mne.channels.make_dig_montage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_dig_polhemus_isotrak.html"> mne.channels.read_dig_polhemus_isotrak </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_dig_captrak.html"> mne.channels.read_dig_captrak </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_dig_dat.html"> mne.channels.read_dig_dat </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_dig_egi.html"> mne.channels.read_dig_egi </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_dig_fif.html"> mne.channels.read_dig_fif </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_dig_hpts.html"> mne.channels.read_dig_hpts </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.make_standard_montage.html"> mne.channels.make_standard_montage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_custom_montage.html"> mne.channels.read_custom_montage </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.compute_dev_head_t.html"> mne.channels.compute_dev_head_t </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_layout.html"> mne.channels.read_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.find_layout.html"> mne.channels.find_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.make_eeg_layout.html"> mne.channels.make_eeg_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.make_grid_layout.html"> mne.channels.make_grid_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.find_ch_adjacency.html"> mne.channels.find_ch_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_ch_adjacency.html"> mne.channels.read_ch_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.equalize_channels.html"> mne.channels.equalize_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.rename_channels.html"> mne.channels.rename_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.generate_2d_layout.html"> mne.channels.generate_2d_layout </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.make_1020_channel_selections.html"> mne.channels.make_1020_channel_selections </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.combine_channels.html"> mne.channels.combine_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.ICA.html"> mne.preprocessing.ICA </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.Xdawn.html"> mne.preprocessing.Xdawn </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.annotate_flat.html"> mne.preprocessing.annotate_flat </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.annotate_movement.html"> mne.preprocessing.annotate_movement </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.annotate_muscle_zscore.html"> mne.preprocessing.annotate_muscle_zscore </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.compute_average_dev_head_t.html"> mne.preprocessing.compute_average_dev_head_t </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.compute_current_source_density.html"> mne.preprocessing.compute_current_source_density </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.compute_fine_calibration.html"> mne.preprocessing.compute_fine_calibration </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.compute_maxwell_basis.html"> mne.preprocessing.compute_maxwell_basis </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.compute_proj_ecg.html"> mne.preprocessing.compute_proj_ecg </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.compute_proj_eog.html"> mne.preprocessing.compute_proj_eog </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.create_ecg_epochs.html"> mne.preprocessing.create_ecg_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.create_eog_epochs.html"> mne.preprocessing.create_eog_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.find_bad_channels_maxwell.html"> mne.preprocessing.find_bad_channels_maxwell </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.find_ecg_events.html"> mne.preprocessing.find_ecg_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.find_eog_events.html"> mne.preprocessing.find_eog_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.fix_stim_artifact.html"> mne.preprocessing.fix_stim_artifact </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.ica_find_ecg_events.html"> mne.preprocessing.ica_find_ecg_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.ica_find_eog_events.html"> mne.preprocessing.ica_find_eog_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.infomax.html"> mne.preprocessing.infomax </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.equalize_bads.html"> mne.preprocessing.equalize_bads </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.maxwell_filter.html"> mne.preprocessing.maxwell_filter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.oversampled_temporal_projection.html"> mne.preprocessing.oversampled_temporal_projection </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.peak_finder.html"> mne.preprocessing.peak_finder </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.read_ica.html"> mne.preprocessing.read_ica </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.realign_raw.html"> mne.preprocessing.realign_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.regress_artifact.html"> mne.preprocessing.regress_artifact </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.corrmap.html"> mne.preprocessing.corrmap </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.read_ica_eeglab.html"> mne.preprocessing.read_ica_eeglab </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.read_fine_calibration.html"> mne.preprocessing.read_fine_calibration </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.write_fine_calibration.html"> mne.preprocessing.write_fine_calibration </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.nirs.optical_density.html"> mne.preprocessing.nirs.optical_density </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.nirs.beer_lambert_law.html"> mne.preprocessing.nirs.beer_lambert_law </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.nirs.source_detector_distances.html"> mne.preprocessing.nirs.source_detector_distances </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.nirs.short_channels.html"> mne.preprocessing.nirs.short_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.nirs.scalp_coupling_index.html"> mne.preprocessing.nirs.scalp_coupling_index </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.preprocessing.nirs.temporal_derivative_distribution_repair.html"> mne.preprocessing.nirs.temporal_derivative_distribution_repair </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.add_reference_channels.html"> mne.add_reference_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.set_bipolar_reference.html"> mne.set_bipolar_reference </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.set_eeg_reference.html"> mne.set_eeg_reference </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.filter.construct_iir_filter.html"> mne.filter.construct_iir_filter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.filter.create_filter.html"> mne.filter.create_filter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.filter.estimate_ringing_samples.html"> mne.filter.estimate_ringing_samples </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.filter.filter_data.html"> mne.filter.filter_data </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.filter.notch_filter.html"> mne.filter.notch_filter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.filter.resample.html"> mne.filter.resample </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.compute_chpi_amplitudes.html"> mne.chpi.compute_chpi_amplitudes </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.compute_chpi_locs.html"> mne.chpi.compute_chpi_locs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.compute_head_pos.html"> mne.chpi.compute_head_pos </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.extract_chpi_locs_ctf.html"> mne.chpi.extract_chpi_locs_ctf </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.extract_chpi_locs_kit.html"> mne.chpi.extract_chpi_locs_kit </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.filter_chpi.html"> mne.chpi.filter_chpi </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.head_pos_to_trans_rot_t.html"> mne.chpi.head_pos_to_trans_rot_t </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.read_head_pos.html"> mne.chpi.read_head_pos </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.chpi.write_head_pos.html"> mne.chpi.write_head_pos </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.transforms.Transform.html"> mne.transforms.Transform </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.transforms.quat_to_rot.html"> mne.transforms.quat_to_rot </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.transforms.rot_to_quat.html"> mne.transforms.rot_to_quat </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.transforms.read_ras_mni_t.html"> mne.transforms.read_ras_mni_t </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="events.html"> Events </a> <input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" type="checkbox"/> <label for="toctree-checkbox-8"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Annotations.html"> mne.Annotations </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.AcqParserFIF.html"> mne.AcqParserFIF </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.concatenate_events.html"> mne.concatenate_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.find_events.html"> mne.find_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.find_stim_steps.html"> mne.find_stim_steps </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_fixed_length_events.html"> mne.make_fixed_length_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_fixed_length_epochs.html"> mne.make_fixed_length_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.merge_events.html"> mne.merge_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.parse_config.html"> mne.parse_config </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_events.html"> mne.pick_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_annotations.html"> mne.read_annotations </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_events.html"> mne.read_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_events.html"> mne.write_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.concatenate_epochs.html"> mne.concatenate_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.events_from_annotations.html"> mne.events_from_annotations </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.annotations_from_events.html"> mne.annotations_from_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.event.define_target_events.html"> mne.event.define_target_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.event.shift_time_events.html"> mne.event.shift_time_events </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.epochs.add_channels_epochs.html"> mne.epochs.add_channels_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.epochs.average_movements.html"> mne.epochs.average_movements </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.epochs.combine_event_ids.html"> mne.epochs.combine_event_ids </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.epochs.equalize_epoch_counts.html"> mne.epochs.equalize_epoch_counts </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.epochs.make_metadata.html"> mne.epochs.make_metadata </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="sensor_space.html"> Sensor Space Data </a> <input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" type="checkbox"/> <label for="toctree-checkbox-9"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.combine_evoked.html"> mne.combine_evoked </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.concatenate_raws.html"> mne.concatenate_raws </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.equalize_channels.html"> mne.equalize_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.grand_average.html"> mne.grand_average </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_channels.html"> mne.pick_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_channels_cov.html"> mne.pick_channels_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_channels_forward.html"> mne.pick_channels_forward </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_channels_regexp.html"> mne.pick_channels_regexp </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_types.html"> mne.pick_types </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_types_forward.html"> mne.pick_types_forward </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.pick_info.html"> mne.pick_info </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_epochs.html"> mne.read_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_reject_parameters.html"> mne.read_reject_parameters </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_vectorview_selection.html"> mne.read_vectorview_selection </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.rename_channels.html"> mne.rename_channels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.baseline.rescale.html"> mne.baseline.rescale </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="covariance.html"> Covariance computation </a> <input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" type="checkbox"/> <label for="toctree-checkbox-10"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Covariance.html"> mne.Covariance </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_covariance.html"> mne.compute_covariance </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_raw_covariance.html"> mne.compute_raw_covariance </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.cov.compute_whitener.html"> mne.cov.compute_whitener </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.cov.prepare_noise_cov.html"> mne.cov.prepare_noise_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.cov.regularize.html"> mne.cov.regularize </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_rank.html"> mne.compute_rank </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_ad_hoc_cov.html"> mne.make_ad_hoc_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_cov.html"> mne.read_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_cov.html"> mne.write_cov </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="mri.html"> MRI Processing </a> <input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" type="checkbox"/> <label for="toctree-checkbox-11"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.coreg.get_mni_fiducials.html"> mne.coreg.get_mni_fiducials </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.gui.coregistration.html"> mne.gui.coregistration </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.gui.fiducials.html"> mne.gui.fiducials </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.create_default_subject.html"> mne.create_default_subject </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.scale_mri.html"> mne.scale_mri </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.scale_bem.html"> mne.scale_bem </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.scale_labels.html"> mne.scale_labels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.scale_source_space.html"> mne.scale_source_space </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="forward.html"> Forward Modeling </a> <input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" type="checkbox"/> <label for="toctree-checkbox-12"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Forward.html"> mne.Forward </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.SourceSpaces.html"> mne.SourceSpaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.add_source_space_distances.html"> mne.add_source_space_distances </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.apply_forward.html"> mne.apply_forward </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.apply_forward_raw.html"> mne.apply_forward_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.average_forward_solutions.html"> mne.average_forward_solutions </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.convert_forward_solution.html"> mne.convert_forward_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decimate_surface.html"> mne.decimate_surface </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.dig_mri_distances.html"> mne.dig_mri_distances </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.forward.compute_depth_prior.html"> mne.forward.compute_depth_prior </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.forward.compute_orient_prior.html"> mne.forward.compute_orient_prior </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.forward.restrict_forward_to_label.html"> mne.forward.restrict_forward_to_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.forward.restrict_forward_to_stc.html"> mne.forward.restrict_forward_to_stc </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_bem_model.html"> mne.make_bem_model </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_bem_solution.html"> mne.make_bem_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_forward_dipole.html"> mne.make_forward_dipole </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_forward_solution.html"> mne.make_forward_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_field_map.html"> mne.make_field_map </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.make_sphere_model.html"> mne.make_sphere_model </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.morph_source_spaces.html"> mne.morph_source_spaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_bem_surfaces.html"> mne.read_bem_surfaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_forward_solution.html"> mne.read_forward_solution </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_trans.html"> mne.read_trans </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_source_spaces.html"> mne.read_source_spaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_surface.html"> mne.read_surface </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.sensitivity_map.html"> mne.sensitivity_map </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.setup_source_space.html"> mne.setup_source_space </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.setup_volume_source_space.html"> mne.setup_volume_source_space </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.surface.complete_surface_info.html"> mne.surface.complete_surface_info </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.surface.read_curvature.html"> mne.surface.read_curvature </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.use_coil_def.html"> mne.use_coil_def </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_bem_surfaces.html"> mne.write_bem_surfaces </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_trans.html"> mne.write_trans </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.bem.ConductorModel.html"> mne.bem.ConductorModel </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.bem.fit_sphere_to_headshape.html"> mne.bem.fit_sphere_to_headshape </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.bem.get_fitting_dig.html"> mne.bem.get_fitting_dig </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.bem.make_watershed_bem.html"> mne.bem.make_watershed_bem </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.bem.make_flash_bem.html"> mne.bem.make_flash_bem </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.bem.convert_flash_mris.html"> mne.bem.convert_flash_mris </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="inverse.html"> Inverse Solutions </a> <input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" type="checkbox"/> <label for="toctree-checkbox-13"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.InverseOperator.html"> mne.minimum_norm.InverseOperator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.apply_inverse.html"> mne.minimum_norm.apply_inverse </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.apply_inverse_cov.html"> mne.minimum_norm.apply_inverse_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.apply_inverse_epochs.html"> mne.minimum_norm.apply_inverse_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.apply_inverse_raw.html"> mne.minimum_norm.apply_inverse_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.compute_source_psd.html"> mne.minimum_norm.compute_source_psd </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.compute_source_psd_epochs.html"> mne.minimum_norm.compute_source_psd_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.compute_rank_inverse.html"> mne.minimum_norm.compute_rank_inverse </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.estimate_snr.html"> mne.minimum_norm.estimate_snr </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.make_inverse_operator.html"> mne.minimum_norm.make_inverse_operator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.prepare_inverse_operator.html"> mne.minimum_norm.prepare_inverse_operator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.read_inverse_operator.html"> mne.minimum_norm.read_inverse_operator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.source_band_induced_power.html"> mne.minimum_norm.source_band_induced_power </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.source_induced_power.html"> mne.minimum_norm.source_induced_power </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.write_inverse_operator.html"> mne.minimum_norm.write_inverse_operator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.make_inverse_resolution_matrix.html"> mne.minimum_norm.make_inverse_resolution_matrix </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.resolution_metrics.html"> mne.minimum_norm.resolution_metrics </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.get_cross_talk.html"> mne.minimum_norm.get_cross_talk </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.minimum_norm.get_point_spread.html"> mne.minimum_norm.get_point_spread </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.inverse_sparse.mixed_norm.html"> mne.inverse_sparse.mixed_norm </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.inverse_sparse.tf_mixed_norm.html"> mne.inverse_sparse.tf_mixed_norm </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.inverse_sparse.gamma_map.html"> mne.inverse_sparse.gamma_map </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.inverse_sparse.make_stc_from_dipoles.html"> mne.inverse_sparse.make_stc_from_dipoles </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.Beamformer.html"> mne.beamformer.Beamformer </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.read_beamformer.html"> mne.beamformer.read_beamformer </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.make_lcmv.html"> mne.beamformer.make_lcmv </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_lcmv.html"> mne.beamformer.apply_lcmv </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_lcmv_epochs.html"> mne.beamformer.apply_lcmv_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_lcmv_raw.html"> mne.beamformer.apply_lcmv_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_lcmv_cov.html"> mne.beamformer.apply_lcmv_cov </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.make_dics.html"> mne.beamformer.make_dics </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_dics.html"> mne.beamformer.apply_dics </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_dics_csd.html"> mne.beamformer.apply_dics_csd </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.apply_dics_epochs.html"> mne.beamformer.apply_dics_epochs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.rap_music.html"> mne.beamformer.rap_music </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.tf_dics.html"> mne.beamformer.tf_dics </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.beamformer.make_lcmv_resolution_matrix.html"> mne.beamformer.make_lcmv_resolution_matrix </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Dipole.html"> mne.Dipole </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.DipoleFixed.html"> mne.DipoleFixed </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.fit_dipole.html"> mne.fit_dipole </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.dipole.get_phantom_dipoles.html"> mne.dipole.get_phantom_dipoles </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="source_space.html"> Source Space Data </a> <input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" type="checkbox"/> <label for="toctree-checkbox-14"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.BiHemiLabel.html"> mne.BiHemiLabel </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Label.html"> mne.Label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.MixedSourceEstimate.html"> mne.MixedSourceEstimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.MixedVectorSourceEstimate.html"> mne.MixedVectorSourceEstimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.SourceEstimate.html"> mne.SourceEstimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.VectorSourceEstimate.html"> mne.VectorSourceEstimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.VolSourceEstimate.html"> mne.VolSourceEstimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.VolVectorSourceEstimate.html"> mne.VolVectorSourceEstimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.SourceMorph.html"> mne.SourceMorph </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.compute_source_morph.html"> mne.compute_source_morph </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.head_to_mni.html"> mne.head_to_mni </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.head_to_mri.html"> mne.head_to_mri </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.extract_label_time_course.html"> mne.extract_label_time_course </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.grade_to_tris.html"> mne.grade_to_tris </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.grade_to_vertices.html"> mne.grade_to_vertices </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.label.select_sources.html"> mne.label.select_sources </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.grow_labels.html"> mne.grow_labels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.label_sign_flip.html"> mne.label_sign_flip </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.labels_to_stc.html"> mne.labels_to_stc </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.morph_labels.html"> mne.morph_labels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.random_parcellation.html"> mne.random_parcellation </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_labels_from_annot.html"> mne.read_labels_from_annot </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_dipole.html"> mne.read_dipole </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_label.html"> mne.read_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_source_estimate.html"> mne.read_source_estimate </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_source_morph.html"> mne.read_source_morph </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.read_talxfm.html"> mne.read_talxfm </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.split_label.html"> mne.split_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stc_to_label.html"> mne.stc_to_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stc_near_sensors.html"> mne.stc_near_sensors </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.transform_surface_to.html"> mne.transform_surface_to </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.vertex_to_mni.html"> mne.vertex_to_mni </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_labels_to_annot.html"> mne.write_labels_to_annot </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.write_label.html"> mne.write_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.source_space.compute_distance_to_sensors.html"> mne.source_space.compute_distance_to_sensors </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="time_frequency.html"> Time-Frequency </a> <input class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" type="checkbox"/> <label for="toctree-checkbox-15"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.AverageTFR.html"> mne.time_frequency.AverageTFR </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.EpochsTFR.html"> mne.time_frequency.EpochsTFR </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.CrossSpectralDensity.html"> mne.time_frequency.CrossSpectralDensity </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.csd_fourier.html"> mne.time_frequency.csd_fourier </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.csd_multitaper.html"> mne.time_frequency.csd_multitaper </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.csd_morlet.html"> mne.time_frequency.csd_morlet </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.pick_channels_csd.html"> mne.time_frequency.pick_channels_csd </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.read_csd.html"> mne.time_frequency.read_csd </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.fit_iir_model_raw.html"> mne.time_frequency.fit_iir_model_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.psd_welch.html"> mne.time_frequency.psd_welch </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.psd_multitaper.html"> mne.time_frequency.psd_multitaper </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr_morlet.html"> mne.time_frequency.tfr_morlet </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr_multitaper.html"> mne.time_frequency.tfr_multitaper </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr_stockwell.html"> mne.time_frequency.tfr_stockwell </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.read_tfrs.html"> mne.time_frequency.read_tfrs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.write_tfrs.html"> mne.time_frequency.write_tfrs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.csd_array_fourier.html"> mne.time_frequency.csd_array_fourier </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.csd_array_multitaper.html"> mne.time_frequency.csd_array_multitaper </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.csd_array_morlet.html"> mne.time_frequency.csd_array_morlet </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.dpss_windows.html"> mne.time_frequency.dpss_windows </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.morlet.html"> mne.time_frequency.morlet </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.stft.html"> mne.time_frequency.stft </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.istft.html"> mne.time_frequency.istft </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.stftfreq.html"> mne.time_frequency.stftfreq </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.psd_array_multitaper.html"> mne.time_frequency.psd_array_multitaper </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.psd_array_welch.html"> mne.time_frequency.psd_array_welch </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr_array_morlet.html"> mne.time_frequency.tfr_array_morlet </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr_array_multitaper.html"> mne.time_frequency.tfr_array_multitaper </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr_array_stockwell.html"> mne.time_frequency.tfr_array_stockwell </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr.cwt.html"> mne.time_frequency.tfr.cwt </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.time_frequency.tfr.morlet.html"> mne.time_frequency.tfr.morlet </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="connectivity.html"> Connectivity Estimation </a> <input class="toctree-checkbox" id="toctree-checkbox-16" name="toctree-checkbox-16" type="checkbox"/> <label for="toctree-checkbox-16"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.connectivity.degree.html"> mne.connectivity.degree </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.connectivity.envelope_correlation.html"> mne.connectivity.envelope_correlation </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.connectivity.phase_slope_index.html"> mne.connectivity.phase_slope_index </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.connectivity.seed_target_indices.html"> mne.connectivity.seed_target_indices </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.connectivity.spectral_connectivity.html"> mne.connectivity.spectral_connectivity </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="statistics.html"> Statistics </a> <input class="toctree-checkbox" id="toctree-checkbox-17" name="toctree-checkbox-17" type="checkbox"/> <label for="toctree-checkbox-17"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.ttest_1samp_no_p.html"> mne.stats.ttest_1samp_no_p </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.ttest_ind_no_p.html"> mne.stats.ttest_ind_no_p </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.f_oneway.html"> mne.stats.f_oneway </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.f_mway_rm.html"> mne.stats.f_mway_rm </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.f_threshold_mway_rm.html"> mne.stats.f_threshold_mway_rm </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.linear_regression.html"> mne.stats.linear_regression </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.linear_regression_raw.html"> mne.stats.linear_regression_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.bonferroni_correction.html"> mne.stats.bonferroni_correction </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.fdr_correction.html"> mne.stats.fdr_correction </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.combine_adjacency.html"> mne.stats.combine_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.permutation_cluster_test.html"> mne.stats.permutation_cluster_test </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.permutation_cluster_1samp_test.html"> mne.stats.permutation_cluster_1samp_test </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.permutation_t_test.html"> mne.stats.permutation_t_test </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.spatio_temporal_cluster_test.html"> mne.stats.spatio_temporal_cluster_test </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.spatio_temporal_cluster_1samp_test.html"> mne.stats.spatio_temporal_cluster_1samp_test </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.summarize_clusters_stc.html"> mne.stats.summarize_clusters_stc </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.stats.bootstrap_confidence_interval.html"> mne.stats.bootstrap_confidence_interval </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.find_ch_adjacency.html"> mne.channels.find_ch_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.channels.read_ch_adjacency.html"> mne.channels.read_ch_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatial_dist_adjacency.html"> mne.spatial_dist_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatial_src_adjacency.html"> mne.spatial_src_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatial_tris_adjacency.html"> mne.spatial_tris_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatial_inter_hemi_adjacency.html"> mne.spatial_inter_hemi_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatio_temporal_src_adjacency.html"> mne.spatio_temporal_src_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatio_temporal_tris_adjacency.html"> mne.spatio_temporal_tris_adjacency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.spatio_temporal_dist_adjacency.html"> mne.spatio_temporal_dist_adjacency </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="simulation.html"> Simulation </a> <input class="toctree-checkbox" id="toctree-checkbox-18" name="toctree-checkbox-18" type="checkbox"/> <label for="toctree-checkbox-18"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.add_chpi.html"> mne.simulation.add_chpi </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.add_ecg.html"> mne.simulation.add_ecg </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.add_eog.html"> mne.simulation.add_eog </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.add_noise.html"> mne.simulation.add_noise </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.simulate_evoked.html"> mne.simulation.simulate_evoked </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.simulate_raw.html"> mne.simulation.simulate_raw </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.simulate_stc.html"> mne.simulation.simulate_stc </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.simulate_sparse_stc.html"> mne.simulation.simulate_sparse_stc </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.select_source_in_label.html"> mne.simulation.select_source_in_label </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.simulation.SourceSimulator.html"> mne.simulation.SourceSimulator </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="decoding.html"> Decoding </a> <input class="toctree-checkbox" id="toctree-checkbox-19" name="toctree-checkbox-19" type="checkbox"/> <label for="toctree-checkbox-19"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.CSP.html"> mne.decoding.CSP </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.EMS.html"> mne.decoding.EMS </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.FilterEstimator.html"> mne.decoding.FilterEstimator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.LinearModel.html"> mne.decoding.LinearModel </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.PSDEstimator.html"> mne.decoding.PSDEstimator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.Scaler.html"> mne.decoding.Scaler </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.TemporalFilter.html"> mne.decoding.TemporalFilter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.TimeFrequency.html"> mne.decoding.TimeFrequency </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.UnsupervisedSpatialFilter.html"> mne.decoding.UnsupervisedSpatialFilter </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.Vectorizer.html"> mne.decoding.Vectorizer </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.ReceptiveField.html"> mne.decoding.ReceptiveField </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.TimeDelayingRidge.html"> mne.decoding.TimeDelayingRidge </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.SlidingEstimator.html"> mne.decoding.SlidingEstimator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.GeneralizingEstimator.html"> mne.decoding.GeneralizingEstimator </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.SPoC.html"> mne.decoding.SPoC </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.SSD.html"> mne.decoding.SSD </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.compute_ems.html"> mne.decoding.compute_ems </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.cross_val_multiscore.html"> mne.decoding.cross_val_multiscore </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.decoding.get_coef.html"> mne.decoding.get_coef </a> </li> </ul> </li> <li class="toctree-l1 current active"> <a class="current reference internal" href="#"> Realtime </a> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="report.html"> MNE-Report </a> <input class="toctree-checkbox" id="toctree-checkbox-20" name="toctree-checkbox-20" type="checkbox"/> <label for="toctree-checkbox-20"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.Report.html"> mne.Report </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.open_report.html"> mne.open_report </a> </li> </ul> </li> <li class="toctree-l1 has-children"> <a class="reference internal" href="logging.html"> Logging and Configuration </a> <input class="toctree-checkbox" id="toctree-checkbox-21" name="toctree-checkbox-21" type="checkbox"/> <label for="toctree-checkbox-21"> <i class="fas fa-chevron-down"> </i> </label> <ul> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.get_config_path.html"> mne.get_config_path </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.get_config.html"> mne.get_config </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.open_docs.html"> mne.open_docs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.set_log_level.html"> mne.set_log_level </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.set_log_file.html"> mne.set_log_file </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.set_config.html"> mne.set_config </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.set_cache_dir.html"> mne.set_cache_dir </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.sys_info.html"> mne.sys_info </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.verbose.html"> mne.verbose </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.utils.deprecated.html"> mne.utils.deprecated </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.utils.warn.html"> mne.utils.warn </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.cuda.get_cuda_memory.html"> mne.cuda.get_cuda_memory </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.cuda.init_cuda.html"> mne.cuda.init_cuda </a> </li> <li class="toctree-l2"> <a class="reference internal" href="generated/mne.cuda.set_cuda_device.html"> mne.cuda.set_cuda_device </a> </li> </ul> </li> </ul> </div> </nav> </div> <div class="d-none d-xl-block col-xl-2 bd-toc"> <div class="toc-item"> <nav id="bd-toc-nav"> </nav> </div> <div class="toc-item"> </div> </div> <main class="col-12 col-md-9 col-xl-7 py-md-5 pl-md-5 pr-md-4 bd-content" role="main"> <div> <div class="section" id="realtime"> <h1>Realtime<a class="headerlink" href="#realtime" title="Permalink to this headline">¶</a></h1> <p>Realtime functionality has moved to the standalone module <a class="reference external" href="https://mne.tools/mne-realtime/api.html#module-mne_realtime" title="(in MNE-Realtime v0.1.dev0)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mne_realtime</span></code></a>.</p> </div> </div> <div class='prev-next-bottom'> <a class='left-prev' id="prev-link" href="generated/mne.decoding.get_coef.html" title="previous page">mne.decoding.get_coef</a> <a class='right-next' id="next-link" href="report.html" title="next page">MNE-Report</a> </div> </main> </div> </div> <script src="https://mne.tools/versionwarning.js"></script> <script src="_static/js/index.1c5a1a01449ed65a7b51.js"></script> <!-- Google Analytics --> <script> window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', 'UA-37225609-1', 'auto'); ga('set', 'anonymizeIp', true); ga('send', 'pageview'); </script> <script async src='https://www.google-analytics.com/analytics.js'></script> <!-- End Google Analytics --> <footer class="footer mt-5 mt-md-0"> <div class="container"> <div class="footer-item"> <p class="text-center text-muted small">&copy; Copyright 2012–2021, MNE Developers. Last updated <time datetime="2021-09-09T20:05:58.201206+00:00" class="localized">2021-09-09 20:05 UTC</time> <script type="text/javascript">$(function () { $("time.localized").each(function () { var el = $(this); el.text(new Date(el.attr("datetime")).toLocaleString([], {dateStyle: "medium", timeStyle: "long"})); }); } )</script></p> </div> </div> </footer> </body> </html>
mne-tools/mne-tools.github.io
0.23/realtime.html
HTML
bsd-3-clause
105,009
<?php /** * Copyright (c) 2015 Onxshop Ltd (https://onxshop.com) * Licensed under the New BSD License. See the file LICENSE.txt for details. * */ require_once('controllers/component/teaser.php'); class Onxshop_Controller_Component_Teaser_Grid extends Onxshop_Controller_Component_Teaser { }
chrisblackni/onxshop
controllers/component/teaser_grid.php
PHP
bsd-3-clause
300
<?php namespace ZfeggAdmin\V1\Rest\Resources; class ResourcesEntity { }
zfegg/apigility-lab
module/ZfeggAdmin/src/V1/Rest/Resources/ResourcesEntity.php
PHP
bsd-3-clause
73
Template: painting Title: UFO 02 Tags: painting Description: Oil on Canvas Img: ../images/700-limited/IMG_0006-MAX.png Date: 2016-08-30 Size: 18x24 SourceURL:
ecurtin/framebit
content/pages/paintings/ufo-02.md
Markdown
bsd-3-clause
165
<?php use yii\helpers\Html; use yii\helpers\Url; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\models\CcontentSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Code Contents'; $this->params['breadcrumbs'][] = $this->title; // echo time(); ?> <div class="code-content-index"> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ 'id', [ 'attribute' => 'code_type', 'label' => '所属', 'value' => function ($model){ return $model->codeType->name; } ], [ 'attribute' => 'title', 'label' => '标题', // 'type' => 'html', 'format' => 'raw', 'value' => function ($model){ return Html::a($model->title, Url::toRoute(['/ccontent/view', 'id' => $model->id])); } ], 'create_time', 'modify_time', ['class' => 'yii\grid\ActionColumn'], //'content:ntext', ], ]); ?> </div>
liangxiaobo/icode
views/ccontent/index.php
PHP
bsd-3-clause
1,185
# Ember CP Validations # [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/offirgolan/ember-cp-validations?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build Status](https://travis-ci.org/offirgolan/ember-cp-validations.svg)](https://travis-ci.org/offirgolan/ember-cp-validations) [![npm version](https://badge.fury.io/js/ember-cp-validations.svg)](http://badge.fury.io/js/ember-cp-validations) [![Code Climate](https://codeclimate.com/github/offirgolan/ember-cp-validations/badges/gpa.svg)](https://codeclimate.com/github/offirgolan/ember-cp-validations) [![Test Coverage](https://codeclimate.com/github/offirgolan/ember-cp-validations/badges/coverage.svg)](https://codeclimate.com/github/offirgolan/ember-cp-validations/coverage) [![Dependency Status](https://david-dm.org/offirgolan/ember-cp-validations.svg)](https://david-dm.org/offirgolan/ember-cp-validations) [![devDependency Status](https://david-dm.org/offirgolan/ember-cp-validations/dev-status.svg)](https://david-dm.org/offirgolan/ember-cp-validations#info=devDependencies) A Ruby on Rails inspired model validation framework that is completely and utterly computed property based. ## Features ## __No observers were used nor harmed while developing and testing this addon.__ * Lazily computed validations * Ruby on rails inspired validators * Support for both Ember Data Models and Objects * Synchronous and asynchronous support for both validators and validations * Dirty tracking * Support for nested models via `belongs-to` and `hasMany` relationships * No observers. Seriously... there are none. Like absolutely zero.... * ~~Integrated with Ember Data's DS.Errors API~~ waiting on [#3707](https://github.com/emberjs/data/issues/3707) to be resolved * Meta data based cycle tracking to detect cycles within your model relationships which could break the CP chain * Custom validators * Ember CLI generator to create custom validators with a unit test ## Installation ## ```shell ember install ember-cp-validations ``` ## Changelog ## Changelog can be found [here](https://github.com/offirgolan/ember-cp-validations/blob/master/CHANGELOG.md) ## Live Demo ## A live demo can be found [here](http://offirgolan.github.io/ember-cp-validations) ## Looking for help? ## If it is a bug [please open an issue on GitHub](http://github.com/offirgolan/ember-cp-validations/issues). ## Basic Usage ## The first thing we need to do it build our validation rules. This will then generate a Mixin that you will be able to incorporate into your model or object. ```javascript // models/user.js import Ember from 'ember'; import DS from 'ember-data'; import { validator, buildValidations } from 'ember-cp-validations'; var Validations = buildValidations({ username: validator('presence', true), password: [ validator('presence', true), validator('length', { min: 4, max: 8 }) ], email: [ validator('presence', true), validator('format', { type: 'email' }) ], emailConfirmation: [ validator('presence', true), validator('confirmation', { on: 'email', message: 'do not match', attributeDescription: 'Email addresses' }) ] }); ``` Once our rules are created and our Mixin is generated, all we have to do is add it to our model. ```javascript // models/user.js export default DS.Model.extend(Validations, { 'username': attr('string'), 'password': attr('string'), 'email': attr('string') }); ``` You can also use the generated `Validations` mixin on any `Ember.Object` or child of `Ember.Object`, like `Ember.Component`. For example: ```javascript // components/x-foo.js import Ember from 'ember'; import { validator, buildValidations } from 'ember-cp-validations'; var Validations = buildValidations({ bar: validator('presence', true) }); export default Ember.Component.extend(Validations, { bar: null }); ``` ## Validators ## ### Common Options ### #### attributeDescription #### A descriptor for your attribute used in generating the error messages. Defaults to `This field'` ```javascript // Examples validator('date', { attributeDescription: 'Date of birth' }) // If validation is run and the attribute is empty, the error returned will be: // 'Date of birth can't be blank' ``` #### message #### This option can take two forms. It can either be a `string` or a `function`. If a string is used, then it will overwrite all error message types for the specified validator. Some messages are passed values such as the `confirmation` validator and can be accessed via `%@`. To overwrite this, we can simply do ```javascript // Example: String validator('confirmation', { message: 'does not match %@. What are you even thinking?!' }) ``` We can pass a `function` into our message option for even more customization capabilities. ```javascript // Example: Function validator('date', { message: function(type, options, value) { if (type === 'before') { return 'should really be before %@'; } if (type === 'after') { return 'should really be after %@'; } } }) ``` The message function is given the following arguments: * `type` (**String**): The error message type * `options` (**Object**): The validator options that were defined in the model * `value`: The current value being evaluated The return value must be a `string`. If nothing is returned (`undefined`), defaults to the default error message of the specified type. Within this function, the context is set to that of the current validator. This gives you access to the model, defaultMessages, options and more. ### Presence ### If `true` validates that the given value is not empty, if `false`, validates that the given value is empty. ```javascript // Examples validator('presence', true) validator('presence', false) validator('presence', { presence: true, message: 'should not be empty' }) ``` ### Inclusion ### Validates that the attributes’ values are included in a given list. All comparisons are done using strict equality so type matters! For range, the value type is checked against both lower and upper bounds for type equality. #### Options #### * `allowBlank` (**Boolean**): If true, skips validation if the value is empty * `in` (**Array**): The list of values this attribute could be * `range` (**Array**): The range in which the attribute's value should reside in ```javascript // Examples validator('inclusion', { in: ['User', 'Admin'] }) validator('inclusion', { range: [0, 5] // Must be between 0 (inclusive) to 5 (inclusive) }) ``` Because of the strict equality comparisons, you can use this validator in many different ways. ```javascript // Examples validator('inclusion', { in: ['Admin'] // Input must be equal to 'Admin' }) validator('inclusion', { range: [0, Infinity] // Input must be positive number }) validator('inclusion', { range: [-Infinity, Infinity] // Input must be a number }) ``` ### Exclusion ### Validates that the attributes’ values are not included in a given list. All comparisons are done using strict equality so type matters! For range, the value type is checked against both lower and upper bounds for type equality. #### Options #### * `allowBlank` (**Boolean**): If true, skips validation if the value is empty * `in` (**Array**): The list of values this attribute should not be * `range` (**Array**): The range in which the attribute's value should not reside in ```javascript // Examples validator('exclusion', { in: ['Admin', 'Super Admin'] }) validator('exclusion', { range: [0, 5] // Cannot be between 0 (inclusive) to 5 (inclusive) }) ``` ### Length ### Validates the length of the attributes’ values. #### Options #### * `allowBlank` (**Boolean**): If true, skips validation if the value is empty * `is` (**Number**): The exact length the value can be * `min` (**Number**): The minimum length the value can be * `max` (**Number**): The maximum length the value can be ```javascript // Examples validator('length', { is: 15 }) validator('length', { min: 5, max: 10 }) ``` ### Date ### Validate over a date range. Uses [MomentJS](http://momentjs.com/) for date mathematics and calculations. #### Options #### * `allowBlank` (**Boolean**): If true, skips validation if the value is empty * `before` (**String**): The specified date must be before this date * `after` (**String**): The specified date must be after this date * `format` (**String**): Input value date format * `errorFormat` (**String**): Error output date format. Defaults to `MMM Do, YYYY` ```javascript // Example validator('date', { after: 'now', before: '1/1/2020', format: 'M/D/YYY', errorFormat: 'M/D/YYY' }) // If before or after is set to 'now', the value given to the validator will be tested against the current date and time. ``` ### Format ### Validate over a predefined or custom regular expression. #### Options #### * `allowBlank` (**Boolean**): If true, skips validation if the value is empty * `type` (**String**): Can be the one of the following options [`email`, `phone`, `url`] * `regex` (**RegExp**): The regular expression to test against ```javascript // Examples validator('format', { type: 'email' }) validator('format', { allowBlank: true type: 'phone' }) validator('format', { type: 'url' }) validator('format', { regex: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$/, message: 'Password must include at least one upper case letter, one lower case letter, and a number' }) ``` If you do not want to use the predefined regex for a specific type, you can do something like this ```javascript // Example validator('format', { type: 'email', regex: /My Better Email Regexp/ }) ``` This allows you to still keep the email error message but with your own custom regex. ### Dependent ### Defines an attribute as valid only if its dependents are valid. #### Options #### * `on` (**Array**): Attributes this field is dependent on ```javascript // Example // Full name will only be valid if firstName and lastName are filled in validator('dependent', { on: ['firstName', 'lastName'], }) ``` ### Confirmation ### You should use this validator when you have two text fields that should receive exactly the same content. For example, you may want to confirm an email address or a password. This validator doesnt have to be created on an attribute defined in your model. This means that when you save your model, in this case, `verfiedEmail` will not be part of the payload. ```javascript // Example email: validator('format', { type: 'email' }) verifiedEmail: validator('confirmation', { on: 'email' message: 'do not match' attributeDescription: 'Email addresses' }) ``` ### Collection ### If `true` validates that the given value is a valid collection and will add `<ATTRIUTE>.[]` as a dependent key to the CP. If `false`, validates that the given value is singular. Use this validator if you want validation to occur when the content of your collection changes. ```javascript // Examples validator('collection', true) validator('collection', false) validator('collection', { collection: true, message: 'must be a collection' }) ``` ### Belongs To ### Identifies a `belongs-to` relationship in an Ember Data Model. This is used to create a deeper validation across all of your nested models. ```javascript // Example validator('belongs-to') ``` ### Has Many ### Identifies a `has-many` relationship in an Ember Data Model. This is used to create a deeper validation across all of your nested models. ```javascript // Example validator('has-many') ``` ### Function ### A validator can also be declared with a function. The function will be then wrapped in the `Base Validator` class and used just like any other pre-defined validator. ```javascript // Example validator(function(value, options /*, model, attribute*/) { return value === options.username ? true : `must be ${options.username}`; } , { username: 'John' // Any options can be passed here }) ``` ## Custom Validators ## Creating custom validators is very simple. To generate a validator named `unique-username` in Ember CLI ```bash ember generate validator unique-username ``` This will create the following files * `app/validators/unique-username.js` * `tests/unit/validators/unique-username-test.js` ```javascript // app/validators/unique-username.js import Ember from 'ember'; import BaseValidator from 'ember-cp-validations/validators/base'; export default BaseValidator.extend({ validate(value, options /*, model, attribute*/) { return true; }) } }); ``` The validate method is where all of your logic should go. It will get passed in the current value of the attribute this validator is attached to. Within the validator object, you will have access to the following properties: * `model` (**Model**): The current model being validated * `options` (**Object**): The options that were passed in to the validator definition in the model * `attribute` (**String**): The current attribute being validated * `defaultMessages`(**Object**): The default error messages The `validate` method has the following signature: ```javascript function validate(value, options, model, attribute) { } ``` The `validate` method should return one of three types * `Boolean`: `true` if the current value passed the validation * `String`: The error message * `Promise`: A promise that will either resolve or reject, and will finally return either `true` or the final error message string. If you want to interact with the `store` within your validator, you can simply inject the service like you would a component. Since you have access to your model and the current value, you should be able to send the server the right information to determine if this username is unique. ```javascript // app/validators/unique-username.js import Ember from 'ember'; import BaseValidator from 'ember-cp-validations/validators/base'; export default BaseValidator.extend({ store: Ember.inject.service(), validate(value, options /*, model, attribute*/) { return this.get('store').findRecord('user', value).then((user) => { if(user && user.id === value) { let message = `The username '${value}' already exists.`; let meta = user.get('meta'); if(options.showSuggestions && meta && meta.suggestions) { message += "What about one of the these: " + meta.suggestions.join(', '); } return message; } else { return true; } }) } }); ``` To use our unique-username validator we just have to add it to the model definition ```javascript var Validations = buildValidations({ username: validator('unique-username', { showSuggestions: true }), }); export default DS.Model.extend(Validations, { 'username': DS.attr('string'), }); ``` #### Testing #### As mentioned before, the generator created a unit test for your new custom validator. ```javascript // tests/unit/validators/unique-username-test.js import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; moduleFor('validator:unique-username', 'Unit | Validator | unique-username', { needs: ['validator:messages'] }); test('it works', function(assert) { var validator = this.subject(); assert.ok(validator); }); ``` A simple test for our validation method can be as such ```javascript test('username is unique', function(assert) { assert.expect(1); let validator = this.subject(); let done = assert.async(); validator.validate('johndoe42').then((message) => { assert.equal(message, true); done(); }); }); ``` ## Overwriting and Extending ## All predefined validators are imported into your application under `app/validators`. This means that if you want to __overwrite__ the predefined length validator, all you have to do is create validator `app/validators/length.js` and put in your own logic. On the other hand, if you just want to __extend__ a predefined validator, you can do something like this ```javascript // app/validators/better-format,js import Ember from 'ember'; import Format from './format'; export default Format.extend({ validate(value, options, model /*, attribute*/) { // Do some custom logic here return this._super(...arguments); } }); ``` ## Custom Error Messages ## The default validation error messages are imported in your app's `validators` folder. If you want to overwrite them, all you need to do is create a `messages.js` file under `app/validators`. All default error messages can be found [here](app/validators/messages.js). ## Running Manual Validations ## Although validations are lazily computed, there are times where we might want to force all or specific validations to happen. For this reason we have exposed two methods: * `validateSync`: Should only be used if all validations are synchronous. It will throw an error if any of the validations are asynchronous * `validate`: Will always return a promise and should be used if asynchronous validations are present Both methods have the same signature: ```javascript function validateSync(options) {} function validate(options) {} ``` #### Options #### * `on` (**Array**): Only validate the given attributes. If empty, will validate over all validatable attribute * `excludes` (**Array**): Exclude validation on the given attributes ```javascript // Examples const { m, validations } = model.validateSync(); validations.get('isValid') // true or false model.validate({ on: ['username', 'email'] }).then(({m, validations}) => { // all validations pass validations.get('isValid'); // true or false validations.get('isValidating'); // false let usernameValidations = m.get('validations.attrs.username'); usernameValidations.get('isValid') // true or false }); ``` ## Inspecting Validations ## All validations can be accessed via the `validations` object created on your model/object. Each attribute also has its own validation which has the same properties. An attribute validation can be accessed via `validations.attrs.<ATTRIBUTE>`. If you want to use [Ember Data's Errors API](http://emberjs.com/api/data/classes/DS.Errors.html), check out their docs on how to access everything you might need. #### isValid #### ```javascript // Examples get(user, 'validations.isValid') get(user, 'validations.attrs.username.isValid') ``` #### isInvalid #### ```javascript // Examples get(user, 'validations.isInvalid') get(user, 'validations.attrs.username.isInvalid') ``` #### isValidating #### This property is toggled only if there is an async validation ```javascript // Examples get(user, 'validations.isValidating') get(user, 'validations.attrs.username.isValidating') ``` #### isTruelyValid #### Will be true only if isValid is `true` and isValidating is `false` ```javascript // Examples get(user, 'validations.isTruelyValid') get(user, 'validations.attrs.username.isTruelyValid') ``` #### isDirty #### Will be true is the attribute in question is not `null` or `undefined`. If the object being validated is an Ember Data Model and you have a `defaultValue` specified, then it will use that for comparison. ```javascript // Examples // 'username' : DS.attr('string', { defaultValue: 'johndoe' }) get(user, 'validations.isDirty') get(user, 'validations.attrs.username.isDirty') ``` #### isAsync #### Will be `true` only if a validation returns a promise ```javascript // Examples get(user, 'validations.isAsync') get(user, 'validations.attrs.username.isAsync') ``` #### messages #### A collection of all error messages on the object in question ```javascript // Examples get(user, 'validations.messages') get(user, 'validations.attrs.username.messages') ``` #### message #### An alias to the first message in the messages collection. ```javascript // Example get(user, 'validations.message') get(user, 'validations.attrs.username.message') ``` ## Templating Example ## Accessing validation information in your templates is really simple. This addon provides a `v-get` helper to bypass the long validation pathing. Instead of doing this: ```handlebars {{model.validations.attrs.username.message}} ``` You can do this: ```handlebars {{v-get model 'username' 'message'}} ``` What's awesome about this is that you can pass in bound properties! ```handlebars {{v-get model attr prop}} {{v-get model prop}} ``` Here is a more extensive example: ```handlebars <form> {{input value=model.username placeholder="Username"}} {{#if (v-get model 'username' 'isInvalid')}} <div class="error"> {{v-get model 'username' 'message'}} </div> {{/if}} <button type="submit" disabled={{v-get model 'isInvalid'}}>Submit</button> </form> ```
rwjblue/ember-cp-validations
README.md
Markdown
bsd-3-clause
20,767
{% extends 'base.html' %} {% load crispy_forms_tags %} {% block content %} <h1>Edit {{ chapter.fraternity_title }} Information</h1> <hr> {% crispy form %} {% endblock content %} {% block angular %} {% endblock angular %}
goldhand/onegreek
onegreek/chapters/templates/chapters/chapter_form.html
HTML
bsd-3-clause
230
# The set of languages for which implicit dependencies are needed: set(CMAKE_DEPENDS_LANGUAGES "CXX" ) # The set of files for implicit dependencies of each language: set(CMAKE_DEPENDS_CHECK_CXX "/home/evelina/Downloads/eigen-eigen-b30b87236a1b/test/conservative_resize.cpp" "/home/evelina/Downloads/eigen-eigen-b30b87236a1b/build/test/CMakeFiles/conservative_resize_6.dir/conservative_resize.cpp.o" ) set(CMAKE_CXX_COMPILER_ID "GNU") # Preprocessor definitions for this target. set(CMAKE_TARGET_DEFINITIONS "QT_CORE_LIB" "QT_GUI_LIB" "QT_NO_DEBUG" ) # Targets to which this target links. set(CMAKE_TARGET_LINKED_INFO_FILES ) # The include file search paths: set(CMAKE_C_TARGET_INCLUDE_PATH "test" "../test" ".." "." "/usr/include/qt4" "/usr/include/qt4/QtGui" "/usr/include/qt4/QtCore" ) set(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH}) set(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH}) set(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
evelinad/eigen
build/test/CMakeFiles/conservative_resize_6.dir/DependInfo.cmake
CMake
bsd-3-clause
1,027
<?php namespace Helloworld; class Module { public function getConfig() { return include __DIR__ . '/config/module.config.php'; } public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } }
crysthianophp/zf2-testes
module/Helloworld/Module.php
PHP
bsd-3-clause
347
<?php use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model app\models\KompensasiDanBenefitBulanan */ $this->title = 'Update Kompensasi Dan Benefit Bulanan: ' . ' ' . $model->Id_Komben; $this->params['breadcrumbs'][] = ['label' => 'Kompensasi Dan Benefit Bulanans', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => $model->Id_Komben, 'url' => ['view', 'id' => $model->Id_Komben]]; $this->params['breadcrumbs'][] = 'Update'; ?> <div class="kompensasi-dan-benefit-bulanan-update"> <h1><?= Html::encode($this->title) ?></h1> <?= $this->render('_form', [ 'model' => $model, ]) ?> </div>
propensic7/propensic7
backend/views/kompensasidanbenefitbulanan/update.php
PHP
bsd-3-clause
639
--- layout: documentation title: Overview id: overview section: documentation --- ## Introduction We believe that working with data, whether they're simple blog posts or something much more complex, is the most critical part of building any application. It's also the most difficult and frustrating, because the current generation of data access frameworks don't do enough to provide you with all the information necessary to let you be productive as possible. Dari was created at [PERFECT SENSE digital](http://www.perfectsensedigital.com/) to make our work in handling data for a variety of clients in different industries easier and more efficient. We wanted to create a comprehensive toolset that spans every aspect of how data flows throughout your application. This is the fruit of our work so far, and we wanted to share it with the world. We hope you enjoy working with it as much as we do. ### Getting Started Dari provides a Maven archetype to help you quickly set up a new web application. Replace the value for `groupId` with your company name, and the value for `artifactId` with your project's name. *Note, your `artifactId` should not contain spaces.* After running the following command in a terminal, you'll have a project directory named after the `artifactId` you provided. mvn archetype:generate -B \ -DarchetypeRepository=http://public.psddev.com/maven \ -DarchetypeGroupId=com.psddev \ -DarchetypeArtifactId=dari-app-archetype \ -DarchetypeVersion=2.0-SNAPSHOT \ -DgroupId=com.yourcompany \ -DartifactId=yourproject You can run the application using [Apache Tomcat](http://tomcat.apache.org) through the [Cargo Maven plugin](http://cargo.codehaus.org/Maven2+plugin): mvn package cargo:run After the web server starts up, you'll see the default welcome page when you visit [http://localhost:8080/](http://localhost:8080/). The directory generated by the archetype is a standard Maven web project: pom.xml src/main/resources/settings.properties src/main/webapp/WEB-INF/web.xml Dari reads all its configuration information from the `settings.properties` file, and it's pre-configured to use the [H2 database engine](http://www.h2database.com/html/main.html) as its default database. ### Tutorial As part of the Dari distribution you are provided with a suite of debugging tools that will aide you in the development process. They can all be accessed from your browser at **http://localhost:8080/_debug/** and individually by appending the tool name to the end of the URL. A few key ones referenced in this tutorial are outlined below. To get back to the debugging tools landing page, click the Dari logo in the top left corner of page. code : Execute arbitrary blocks of code, create new Java files, and edit existing Java and JSP files. db-bulk : Run bulk operations such as copying one database to another and index existing databases. db-schema : A visualization of the object model. query : Database agnostic query interface, coupled with an object data editor. task : Background task monitoring with controls to stop, start, and pause taks. #### Writing Your First Dari Application Now let's build a simple Polls application. At the end of this tutorial you should have a basic understanding of how to model and query data using Dari, as well as some of the web-based tools available that make it easy to work with Dari. We're going to model a simple Poll application that allows users to take a poll and view the polls results. Dari differs from a traditional ORM in that it does not map Java classes to individual database tables. Instead it stores data in a schema-less format that is appropriate for the underlying database. For RDBMS this format is a JSON blob. Storing data as a JSON blob frees Dari from needing to manage schema evolution which allows for rapid data model changes. This is a very powerful feature. Let's start off by creating a few simple Java classes that we will need for our Polls application. <div class="alert alert-block"> <strong>TIP:</strong> <p>You can create new Java classes directly from your browser by using the <strong>code</strong> debug tool, selecting <strong>NEW CLASS</strong> from the dropdown in the header, pasting the code into the editor and clicking Save.</p> </div> {% highlight java %} package demo.poll; import com.psddev.dari.db.*; import com.psddev.dari.util.*; import java.util.*; public class Answer extends Record { private String answer; public String getAnswer() { return answer; } public void setAnswer(String answer) { this.answer = answer; } } {% endhighlight %} --- {% highlight java %} package demo.poll; import com.psddev.dari.db.*; import com.psddev.dari.util.*; import java.util.*; public class Poll extends Record { private String question; private List<Answer> answers; public String getQuestion() { return question; } public void setQuestion(String question) { this.question = question; } public List<Answer> getAnswers() { return answers; } public void setAnswers(List<Answer> answers) { this.answers = answers; } } {% endhighlight %} --- {% highlight java %} package demo.poll; import com.psddev.dari.db.*; import com.psddev.dari.util.*; import java.util.*; public class User extends Record { private String userName; private String firstName; private String lastName; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } } {% endhighlight %} All Dari objects must extend `com.psddev.dari.db.Record`. This is all that is needed to start persisting object data. Lets see the visual representation of it using the **db-schema** debug tool. Once there select `demo.poll.Poll` and `demo.poll.User` from the dropdown and click View. This is exactly what we expect so lets move on. ![Poll Example 1](img/tutorial/poll01.png) As part of our Poll application we need the ability to create new users as well as fetch existing ones. Let's add a some static methods to the User class to do just that. <div class="alert alert-block"> <strong>TIP:</strong> <p>You can also edit existing Java classes directly from your browser by using the <strong>code</strong> debug tool. Select the class you want to edit from the dropdown, make changes, and click Save.</p> </div> {% highlight java %} public class User extends Record { // ... fields, getters, setters... public static User createUser(String userName) { if (userName == null || "".equals(userName = userName.trim())) { return null; } else { User user = new User(); user.setUserName(userName); user.save(); return user; } } public static User getUser(String userName) { return Query.from(User.class) .where("userName = ?", userName) .first(); } } {% endhighlight %} Here we introduce the `save()` API which is inherited from `Record` and the `com.psddev.dari.db.Query` API. Calling `save()` on an instantiated object is all that it takes to persist objects in Dari. Similarly, the `Query` API provides all the necessary methods to retrieve persisted objects. The `Query` syntax is based on <a href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx">LINQ</a> and <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Predicates/predicates.html">Cocoa Predicates</a>. For more information on querying refer to the [Querying section](querying.html) of the documentation. If you haven't tried the `code` editor debug tool already, we'll use it now to save some users. Paste the following snippet into the **code** debug tool editor ensuring **PLAYGROUND** is selected in the dropdown and click **Run**: <div class="alert alert-block"> <strong>TIP:</strong> <p>When executing arbitrary code within the code servlet always make sure PLAYGROUND is selected from the dropdown menu, to ensure you are not editing a file.</p> </div> {% highlight java %} import com.psddev.dari.db.*; import com.psddev.dari.util.*; import demo.poll.*; import java.util.*; public class Code { public static Object main() throws Throwable { String[] names = {"Hyoo", "Jeremy", "Kelly", "Dan", "David"}; for (String name : names) { User.createUser(name); } return Query.from(User.class).selectAll(); } } {% endhighlight %} We return a query result for the object we just created and the **code** editor outputs the internal representation of each of the items as seen below: ![Poll Example 2](img/tutorial/poll02.png) Let's test the other method we wrote and query for a specific user. Paste the following snippet into the code editor and click **Run**. {% highlight java %} public class Code { public static Object main() throws Throwable { return User.getUser("David"); } } {% endhighlight %} ![Poll Example 3](img/tutorial/poll03.png) Oops! We get an error! Let's take a step back from our code and use the `query` debug tool to try the same query. Once inside the **query** debug tool, select User (demo.poll.User) from the TYPES dropdown. Then in the text area right below type: userName = "David" and then click **Run**: ![Poll Example 4](img/tutorial/poll04.png) Indeed we get the same error. Specifically, it says `Can't query [demo.poll.User/userName] because it's not indexed!` In Dari, any time you query on a specific field or fields, those fields must be annotated with `@Indexed`. Let's go back and update all of our classes to have this annotation. {% highlight java %} public class Poll extends Record { @Indexed private String question; private List<Answer> answers; // ... getters, setters ... } public class Answer extends Record { @Indexed private String answer; // ... getters, setters ... } public class User extends Record { @Indexed private String userName; private String firstName; private String lastName; // ... getters, setters ... } {% endhighlight %} <div class="alert alert-block"> <strong>TIP:</strong> <p>It is a common mistake to get carried away and add the @Indexed annotation to all the fields on every class you create. Doing so creates extra potentially unnecessary rows in the underlying database and can lead to poor performance in systems with large amounts of data. Only add the annotation to fields that you think you will query on.</p> </div> Now let's try to re-run our query. (Don't forget to select User from dropdown first!). ![Poll Example 5](img/tutorial/poll05.png) Ooops! No results were found. This happens because our User objects were saved prior to adding the `@Indexed` annotation, so it only applies to new objects that we create. The **db-bulk** debug tool can help us here. We will use the **Indexer** to fix the indexes on the objects that are missing them. Select `demo.poll.User` from the dropdown leaving the other fields as their defaults for now, and click Start. This kicks off a background task that we can monitor in yet another Dari debug tool, **task**, by clicking the link generated under **Ongoing Tasks**. ![Poll Example 6](img/tutorial/poll06.png) We won't go into detail about the **task** tool now, instead lets retry our query to make sure our fields are indexed (AGAIN, making sure User is selected from the dropdown first). Voila!! 1 result found for "David". We can verify the same using our code snippet from earlier. ![Poll Example 7](img/tutorial/poll07.png) Before moving on, let's take a quick look at some of the additional features the **query** tool has to offer. Clicking a result hyperlink yields a popup that lets us view and edit the raw JSON representation of the object, as well as a tab presenting an auto-generated UI where we can easily change the field values on the object and save them. Cool! ![Poll Example 8](img/tutorial/poll08.png) ![Poll Example 9](img/tutorial/poll09.png) Now that we've got the basics of querying down, lets get back to creating that Poll application. We're going to create a new method on Poll `createPoll(String, List<String>)` and also go back and merge our two User methods into one method `getOrCreateUser(String)`. {% highlight java %} public class Poll extends Record { // ... fields, getters, setters ... public static Poll createPoll(String question, List<String> answerStrings) { Poll poll = new Poll(); poll.setQuestion(question); List<Answer> answers = new ArrayList<Answer>(); if (answerStrings != null) for (String answerString : answerStrings) { Answer answer = new Answer(); answer.setAnswer(answerString); answer.save(); answers.add(answer); } poll.setAnswers(answers); poll.save(); return poll; } } {% endhighlight %} --- {% highlight java %} public class User extends Record { // ... fields, getters, setters ... public static User getOrCreateUser(String userName) { User user = Query.from(User.class) .where("userName = ?", userName) .first(); if (user == null) { if (userName == null || "".equals(userName = userName.trim())) { return null; } else { user = new User(); user.setUserName(userName); user.save(); return user; } } else { return user; } } } {% endhighlight %} Additionally, we need a way to store a user's response to the poll so we'll create a brand new object `UserResponse` remembering this time to include the `@Indexed` annotation. Then create an instance method on Poll called `submit(User, Answer)`. {% highlight java %} package demo.poll; import com.psddev.dari.db.*; import com.psddev.dari.util.*; import java.util.*; public class UserResponse extends Record { @Indexed private User user; @Indexed private Answer answer; public User getUser() { return user; } public void setUser(User user) { this.user = user; } public Answer getAnswer() { return answer; } public void setAnswer(Answer answer) { this.answer = answer; } } {% endhighlight %} --- {% highlight java %} public class Poll extends Record { // ... fields, getters, setters, other methods ... public UserResponse submit(User user, Answer answer) { if (user != null && this.getAnswers().contains(answer)) { UserResponse response = new UserResponse(); response.setUser(user); response.setAnswer(answer); response.save(); return response; } else { return null; } } } {% endhighlight %} Let's check out our updated model with the **db-schema** tool. Select `Poll` and `User Response` from the dropdown. ![Poll Example 10](img/tutorial/poll10.png) Now that we have a full working model lets create some polls and responses that we can play with. Back to the **code** editor! Execute the following code in the PLAYGROUND: {% highlight java %} public class Code { public static Object main() throws Throwable { List<Object> createdObjects = new ArrayList<Object>(); Poll poll = Poll.createPoll("What is Dari?", java.util.Arrays.asList( "A content management system", "A Java development framework", "A bridge")); createdObjects.add(poll); List<Answer> answers = poll.getAnswers(); createdObjects.addAll(answers); // Randomly assign an answer for the users int counter = 0; for (User user : Query.from(User.class).selectAll()) { UserResponse response = poll.submit(user, answers.get(counter % 3)); createdObjects.add(response); counter++; } return createdObjects; } } {% endhighlight %} The output from the **code** editor shows us all 9 objects that we just created. ![Poll Example 11](img/tutorial/poll11.png) The last thing we need to do is write a query that tells us how many responses we got for our poll as well as the distribution of answers. We'll start with the first one and try to get the total count, which in our example should be 5. {% highlight java %} public class Code { public static Object main() throws Throwable { Poll poll = Query.from(Poll.class) .where("question = ?", "What is Dari?") .first(); List<Answer> answers = poll.getAnswers(); long responseCount = Query.from(UserResponse.class) .where("answer = ?", answers) .count(); return responseCount; } } {% endhighlight %} Perfect, 5 responses as expected. This query is particularly interesting though because we pass a `List<Answer>` into the query's predicate. In our simple Poll application this works just fine because we don't expect the size of the List to be large. But suppose we were working in a different problem space where the list could grow to be hundreds or thousands of records. This query is no longer feasible because it is similar to the SQL `IN` clause where you have `id IN (answerId1, answerId2, answerId3)`. As the list grows larger as does the query execution time, and more bytes are needed to transfer the query. Let's try to alter our model to avoid this situation and still be able to answer our question. We'll remove the answers List from the Poll object and instead place a Poll field on the Answer class. We also need to update our Poll helper methods to accomodate the new model. Here are the updated methods along with a new `getAnswers()` method that relies on a query instead of the instance variable we just removed. Here are the updated class files. {% highlight java %} public class Poll extends Record { @Indexed private String question; public String getQuestion() { return question; } public void setQuestion(String question) { this.question = question; } public static Poll createPoll(String question, List<String> answerStrings) { Poll poll = new Poll(); poll.setQuestion(question); poll.save(); if (answerStrings != null) for (String answerString : answerStrings) { Answer answer = new Answer(); answer.setPoll(poll); answer.setAnswer(answerString); answer.save(); } return poll; } public List<Answer> getAnswers() { return Query.from(Answer.class).where("poll = ?", this).selectAll(); } public UserResponse submit(User user, Answer answer) { if (user != null && answer != null && this.equals(answer.getPoll())) { UserResponse response = new UserResponse(); response.setUser(user); response.setAnswer(answer); response.save(); return response; } else { return null; } } } {% endhighlight %} --- {% highlight java %} public class Answer extends Record { private String answer; @Indexed Poll poll; public String getAnswer() { return answer; } public void setAnswer(String answer) { this.answer = answer; } public Poll getPoll() { return poll; } public void setPoll(Poll poll) { this.poll = poll; } } {% endhighlight %} Let's take one last look at our schema by selecting just `UserResponse` from the **db-schema** tool dropdown. All of our objects are accessible now from the `UserResponse` object. ![Poll Example 12](img/tutorial/poll12.png) Before we rewrite our response count query we need to wipe our poll data and recreate it because the curent data is in an inconsistent state after we changed the model. Dari provides a convenient way to recover the data with the new model but that is covered in a later tutorial. Run the code below to delete and re-create our poll data. {% highlight java %} public class Code { public static Object main() throws Throwable { // delete the data (minus users) for (UserResponse response : Query.from(UserResponse.class).selectAll()) { response.delete(); } for (Poll poll : Query.from(Poll.class).selectAll()) { poll.delete(); } for (Answer answer : Query.from(Answer.class).selectAll()) { answer.delete(); } // recreate the data List<Object> createdObjects = new ArrayList<Object>(); Poll poll = Poll.createPoll("What is Dari?", java.util.Arrays.asList( "A content management system", "A Java development framework", "A bridge")); createdObjects.add(poll); List<Answer> answers = poll.getAnswers(); createdObjects.addAll(answers); // Randomly assign an answer for the users int counter = 0; for (User user : Query.from(User.class).selectAll()) { UserResponse response = poll.submit(user, answers.get(counter % 3)); createdObjects.add(response); counter++; } return createdObjects; } } {% endhighlight %} Notice we used `delete()` API that is also inherited from Record and it works exactly as you would expect. Lets write our response count query again. To do so, we'll make use of Dari sub-queries like so: {% highlight java %} public class Code { public static Object main() throws Throwable { Poll poll = Query.from(Poll.class) .where("question = ?", "What is Dari?") .first(); Query<Answer> answersQuery = Query.from(Answer.class) .where("poll = ?", poll); long responseCount = Query.from(UserResponse.class) .where("answer = ?", answersQuery) .count(); return responseCount; } } {% endhighlight %} This looks very similar to our old query with the key difference being that we're passing in a `Query` object to the predicate and NOT a `List`, AND we never actually execute the `answersQuery`. Dari optimizes the resulting sub-query for execution on the underlying database. Dealing with sub-queries like this often times makes our code difficult to read so Dari provides a clean, concise syntax that we can use to achieve the same effect. {% highlight java %} public class Code { public static Object main() throws Throwable { Poll poll = Query.from(Poll.class) .where("question = ?", "What is Dari?") .first(); long responseCount = Query.from(UserResponse.class) .where("answer/poll = ?", poll) .count(); return responseCount; } } {% endhighlight %} We're at the home stretch! The last question we need to answer is what the distribution of answers are for the poll. This is done using `Query.groupBy()` method, which is discussed in more detail in the [Querying section](querying.html) of the documentation. Let's roll this method, along with our previous one into our Poll class to complete the example. {% highlight java %} public class Poll extends Record { // ... fields, getters, setters... public Map<String, Long> getPollResults() { Map<String, Long> pollResults = new HashMap<String, Long>(); Query<UserResponse> responseQuery = Query.from(UserResponse.class) .where("answer/poll = ?", this); for (Grouping<UserResponse> grouping : responseQuery.groupBy("answer")) { List<Object> keys = grouping.getKeys(); Object key0 = keys.get(0); if (key0 instanceof Answer) { Answer answer = (Answer) key0; long answerCount = grouping.getCount(); pollResults.put(answer.getAnswer(), answerCount); } } return pollResults; } public long getPollResponseCount() { return Query.from(UserResponse.class) .where("answer/poll = ?", this) .count(); } } {% endhighlight %} Finally, let's test it out in the **code** tool playground. {% highlight java %} public class Code { public static Object main() throws Throwable { Poll poll = Query.from(Poll.class) .where("question = ?", "What is Dari?") .first(); return poll.getPollResults(); } } {% endhighlight %} ![Poll Example 13](img/tutorial/poll13.png) Tada! We're done! And in case you were wondering, Dari is NOT a content management system, it is a Java development framework and the word "Dari" is "bridge" in Korean. :) You can download the [full demo here](/assets/dari-poll-demo1.tar.gz). To install and run, simply uncompress the tarball: tar -xzf dari-poll-demo1.tar.gz Change to the directory: ls cd dari-poll-demo1 And run the application with: mvn package cargo:run In our next tutorial we will expand on our Poll example to introduce more Dari concepts such as validation and transactions. Stay Tuned! For more information on Dari please refer to the rest of the documentation. Thanks! Enjoy!
iamedu/dari
docs/documentation/documentation.md
Markdown
bsd-3-clause
25,653
/*========================================================================= Program: Visualization Toolkit Module: vtkQuadraticEdge.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ // .NAME vtkQuadraticEdge - cell represents a parabolic, isoparametric edge // .SECTION Description // vtkQuadraticEdge is a concrete implementation of vtkNonLinearCell to // represent a one-dimensional, 3-nodes, isoparametric parabolic line. The // interpolation is the standard finite element, quadratic isoparametric // shape function. The cell includes a mid-edge node. The ordering of the // three points defining the cell is point ids (0,1,2) where id #2 is the // midedge node. // .SECTION See Also // vtkQuadraticTriangle vtkQuadraticTetra vtkQuadraticWedge // vtkQuadraticQuad vtkQuadraticHexahedron vtkQuadraticPyramid #ifndef __vtkQuadraticEdge_h #define __vtkQuadraticEdge_h #include "vtkNonLinearCell.h" class vtkLine; class VTK_FILTERING_EXPORT vtkQuadraticEdge : public vtkNonLinearCell { public: static vtkQuadraticEdge *New(); vtkTypeRevisionMacro(vtkQuadraticEdge,vtkNonLinearCell); void PrintSelf(ostream& os, vtkIndent indent); // Description: // Implement the vtkCell API. See the vtkCell API for descriptions // of these methods. int GetCellType() {return VTK_QUADRATIC_EDGE;}; int GetCellDimension() {return 1;} int GetNumberOfEdges() {return 0;} int GetNumberOfFaces() {return 0;} vtkCell *GetEdge(int) {return 0;} vtkCell *GetFace(int) {return 0;} int CellBoundary(int subId, double pcoords[3], vtkIdList *pts); void Contour(double value, vtkDataArray *cellScalars, vtkPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd); int EvaluatePosition(double x[3], double* closestPoint, int& subId, double pcoords[3], double& dist2, double *weights); void EvaluateLocation(int& subId, double pcoords[3], double x[3], double *weights); int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts); void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs); virtual double *GetParametricCoords(); // Description: // Clip this edge using scalar value provided. Like contouring, except // that it cuts the edge to produce linear line segments. void Clip(double value, vtkDataArray *cellScalars, vtkPointLocator *locator, vtkCellArray *lines, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut); // Description: // Line-edge intersection. Intersection has to occur within [0,1] parametric // coordinates and with specified tolerance. int IntersectWithLine(double p1[3], double p2[3], double tol, double& t, double x[3], double pcoords[3], int& subId); // Description: // Return the center of the quadratic tetra in parametric coordinates. int GetParametricCenter(double pcoords[3]); // Description: // Quadratic edge specific methods. static void InterpolationFunctions(double pcoords[3], double weights[3]); static void InterpolationDerivs(double pcoords[3], double derivs[3]); protected: vtkQuadraticEdge(); ~vtkQuadraticEdge(); vtkLine *Line; vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping private: vtkQuadraticEdge(const vtkQuadraticEdge&); // Not implemented. void operator=(const vtkQuadraticEdge&); // Not implemented. }; //---------------------------------------------------------------------------- inline int vtkQuadraticEdge::GetParametricCenter(double pcoords[3]) { pcoords[0] = 0.5; pcoords[1] = pcoords[2] = 0.; return 0; } #endif
sgh/vtk
Filtering/vtkQuadraticEdge.h
C
bsd-3-clause
4,330
# Конфигурация приложения /etc/surok/conf.d/app.json ``` { "services": [ { "name": "kioskservice", "group": "production.romania", "tcp": ["web", "socket"], "ipsec": ["ipsec", "tnat"] } ], "discovery": "mesos_dns", "store": "mesos_dns", "group": "dev.web", "conf_name": "kiosk", "files": { "/файл/назначения/1":"{{ Jinja2 шаблон 1}}", "/файл/назначения/2":"{{ Jinja2 шаблон 2}}", "/файл/назначения/N":"{{ Jinja2 шаблон N}}" }, "environments": { "/файл/назначения/1":"{{ Jinja2 шаблон 1}}", "/файл/назначения/2":"{{ Jinja2 шаблон 2}}", "/файл/назначения/N":"{{ Jinja2 шаблон N}}" }, "reload_cmd": "/sbin/nginx -t && /bin/systemctl reload nginx", } ``` Давайте разберем конфигурационный файл по опциям * **services** - *array. Не обязательный. По умолчанию [].* Список хэшей с описанием сервисов * **name** - *string. Обязательный.* Имя сервиса. Это имя приложения в marathon * **group** - *string. Не обязательный. По умолчению заполняется из переменных среды(см. ниже)* Группа в которой находится сервис. Группу можно узнать в marathon. Записывается в обратном порядке. Т.е. если у нас есть группа /webapps/php, то записывать её следует, как php.webapps. Если группа не указана, то сурок ожидает группу в переменной окружения SUROK_DISCOVERY_GROUP, если и SUROK_DISCOVERY_GROUP нет, то берется группа marathon. * **tcp** - *array. Не обязательный.* Список имен TCP портов сервиса. * **udp** - *array. Не обязательный.* Список имен UDP портов сервиса. * **conf_name** - string. Не обязательный. По умолчанию базовое имя файла конфигурации. Название конфига. Должен быть уникальным значением. * **reload_cmd** - string. Обязательный. Команда, которая будет выполнена в случае обновления файлов или переменных из "files" или "environments". В reload_cmd можно использовать переменные окружения: ```"reload_cmd": "/usr/bin/killall -9 calc || true && /usr/local/bin/calc -c /app/calc.conf ${CALC_NUM}"``` * **discovery** - Не обязательный. Переопределяет метод обнаружения сервисов для приложения. * **group** - Не обязательный. Группа по-умолчанию. * **store** - Не обязательный. По умолчанию "default_store" из основного файла конфигурации. Хранилище по-умолчанию. * **files** - *dict. Не обязательный. По умолчанию [].* * **ключ** - Файл назначения. * **значение** - Jinja2 шаблон * **environments** - *dict. Не обязательный. По умолчанию [].* * **ключ** - Переменная среды назначения. * **значение** - Jinja2 шаблон В предыдущих версиях использовался только один источник данных для записи в файл назначения. Сейчас благодаря используемым модулям мы можем использовать разные источники данных. Загрузка из файла сейчас делается при помощи модула from_file, а генерация данных из шаблона при помощи модуля template. Пример: ``` "{{ mod.template(mod.from_file('/template/file/name')) }}" ``` Устаревшие параметры: * template - string. Абсолютный путь к файлу шаблона. * dest - string. Абсолютный путь к файлу в который запишется результат генерации шаблона. при наличии "template" и "dest" дополняется dict "files" * run_cmd(v0.6) - array. Список с командой на выполнение. Используется внутри контейнера вместо reload_cmd. * **services** * ports - array. Список имен портов сервиса. Не обязательная опция.
Difrex/surok
docs/ru/ru.app.configuration.md
Markdown
bsd-3-clause
5,007
<?php /** * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Application; class Module { const VERSION = '3.0.2dev'; public function getConfig() { return include __DIR__ . '/../config/module.config.php'; } public function getControllerConfig() { return include __DIR__ . '/../config/controller.config.php'; } }
janthonycampos/zfsimulation
module/Application/src/Module.php
PHP
bsd-3-clause
596
// ----------------------------------------------------------------------- // <copyright file="RootSymbolsWindow.xaml.cs" company=""> // Copyright 2013 Alexander Soffronow Pagonidis // </copyright> // ----------------------------------------------------------------------- using MahApps.Metro.Controls; using MahApps.Metro.Controls.Dialogs; using QDMS; using QDMSApp.ViewModels; using System.Reactive.Linq; namespace QDMSApp { /// <summary> /// Interaction logic for RootSymbolsWindow.xaml /// </summary> public partial class RootSymbolsWindow : MetroWindow { public UnderlyingSymbolsViewModel ViewModel { get; } public RootSymbolsWindow(IDataClient client) { InitializeComponent(); ViewModel = new UnderlyingSymbolsViewModel(client, DialogCoordinator.Instance); DataContext = ViewModel; } private async void MetroWindow_Loaded(object sender, System.Windows.RoutedEventArgs e) { await ViewModel.Load.Execute(); } } }
qusma/qdms
QDMSApp/Windows/RootSymbolsWindow.xaml.cs
C#
bsd-3-clause
1,051
<!doctype html> <!-- title: Headers and Footers order: 4 layout: page --> <html> <head> <title>vaadin-grid Code Examples – Headers and Footers</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="common.html"> <style> #page:invalid { border: 1px solid red; } </style> </head> <body unresolved> <section> <h1><a href="./">vaadin-grid</a> <span>Headers and Footers</span> </h1> <table-of-contents select="h3" class="toc"></table-of-contents> </section> <section> <h3>Customizing headers and footers</h3> <p>Headers and footer can be customized in the <code>thead</code> element and footers respectively in the <code>tfoot</code> section</p> <p>JavaScript API exposes the <code>header</code> and <code>footer</code> objects for same functionality. Excluding the <code>default row</code> property headers and footers share the same exact API.</p> <code-example source> <vaadin-grid demo> <table> <colgroup> <col> <col> <col> <col> </colgroup> <thead> <tr> <th colspan=2>Employee</th> <th colspan=2>Responsibility</th> </tr> <tr> <th>First Name</th> <th>Last Name</th> <th>Operation</th> <th>Product</th> </tr> </thead> <tfoot> <tr></tr> </tfoot> </table> </vaadin-grid> <code hidden> var employees = []; var names = ["Artur", "Patrik", "Henrik", "Teemu"]; var surnames = ["Signell","Lehtinen","Ahlroos","Paul"]; var activities = ["Design","Implement","Polish","Deliver"]; var targets = ["soup","Vaadin","dog","world peace"]; for (var i = 0; i < 400; i++){ var row = []; [names, surnames, activities, targets].forEach(function(array){ row.push(array[Math.floor(Math.random()*array.length)]); }); employees.push(row); } </code> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); HTMLImports.whenReady(function() { grid.items = employees; // code // Adding and removing headers and footers in JavaScript grid.header.addRow(1, ["First Name", "Last Name", "Operation", "Product"]); grid.header.removeRow(2); grid.footer.addRow(); grid.footer.removeRow(0); // end-code }); </code> </code-example> </section> <section> <h3>Cell colspan</h3> <p>Colspan property defines the count of columns a single header/footer cell should span.</p> <p>The value can be set either declaratively trough the lightDom API or programmatically with the cell API <code>header.getCell(rowIndex, colIndex).colspan</code>.</p> <code-example source> <vaadin-grid demo> <table> <colgroup> <col> <col> <col> <col> </colgroup> <thead> <tr> <th colspan=2>Employee</th> <th colspan=2>Responsibility</th> </tr> </thead> <tfoot> <tr></tr> </tfoot> </table> </vaadin-grid> <code hidden> var employees = []; var names = ["Artur", "Patrik", "Henrik", "Teemu"]; var surnames = ["Signell","Lehtinen","Ahlroos","Paul"]; var activities = ["Design","Implement","Polish","Deliver"]; var targets = ["soup","Vaadin","dog","world peace"]; for (var i = 0; i < 400; i++){ var row = []; [names, surnames, activities, targets].forEach(function(array){ row.push(array[Math.floor(Math.random()*array.length)]); }); employees.push(row); } </code> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); HTMLImports.whenReady(function() { grid.items = employees; // code // Cell API can be used to define cell colspans. grid.header.getCell(0, 0).colspan = 2; grid.header.getCell(0, 2).colspan = 2; // end-code }); </code> </code-example> </section> <section> <h3>Cell content</h3> <p>Typically header/footer cells contain plain text but also HTML or even custom elements may be wrapped in the cells.</p> <p>Cell content can be placed declaratively using the <code>table</code> element's <code>thead</code> section or in JavaScript by modifying <code>header.getCell(rowIndex, colIndex).content</code> property.</p> <code-example source> <vaadin-grid demo> <table> <colgroup> <col> <col> <col> </colgroup> <thead> <tr> <th colspan=2><b>Employee</b></th> <th>Activity</th> </tr> <tr> <th colspan=3></th> </tr> </thead> </table> </vaadin-grid> <code hidden> var employees = []; var names = ["Artur", "Patrik", "Henrik", "Teemu"]; var surnames = ["Signell","Lehtinen","Ahlroos","Paul"]; var activities = ["Design","Implement","Polish","Deliver"]; var targets = ["soup","Vaadin","dog","world peace"]; for (var i = 0; i < 400; i++){ var row = []; [names, surnames, activities, targets].forEach(function(array){ row.push(array[Math.floor(Math.random()*array.length)]); }); employees.push(row); } </code> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); var filterElement = document.createElement("input"); filterElement.setAttribute("type", "search"); filterElement.setAttribute("placeholder", "Filter..."); filterElement.style.width = "100%"; var timer = 0; function filter(){ clearTimeout(timer); timer = setTimeout(grid.refreshItems.bind(grid), 500); } filterElement.addEventListener("keyup", filter); filterElement.addEventListener("click", filter); HTMLImports.whenReady(function() { grid.items = function(params, callback) { var filterValue = filterElement.value.toLowerCase(); var data = employees.filter(function(val){ return (val.toString().toLowerCase()).indexOf(filterValue) != -1 } ); var slice = data.slice(params.index, params.index + params.count); callback(slice, data.length); }; grid.then(function(){ // code grid.header.getCell(1, 0).content = filterElement; // end-code }); }); </code> </code-example> </section> <section> <h3>Custom styles</h3> <p>Class names for header/footer rows and cells can be assigned with either the <code>class</code> attribute in the lightDom API or <code>header.setRowClassName</code> and <code>cell.className</code> in the JavaScript API.</p> <code-example source> <vaadin-grid demo> <table> <colgroup> <col> <col> </colgroup> <thead> <tr class="firstrow"> <th>First Name</th> <th class="lastcell">Last Name</th> </tr> </thead> </table> </vaadin-grid> <code hidden> var employees = []; var names = ["Artur", "Patrik", "Henrik", "Teemu"]; var surnames = ["Signell","Lehtinen","Ahlroos","Paul"]; var activities = ["Design","Implement","Polish","Deliver"]; var targets = ["soup","Vaadin","dog","world peace"]; for (var i = 0; i < 400; i++){ var row = []; [names, surnames, activities, targets].forEach(function(array){ row.push(array[Math.floor(Math.random()*array.length)]); }); employees.push(row); } </code> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); HTMLImports.whenReady(function() { grid.items = employees; // code // Set the class names using JavaScript API grid.header.setRowClassName(0, "firstrow"); grid.header.getCell(0, 1).className = "lastcell"; // end-code }); </code> </code-example> </section> <section> <h3>Default row</h3> <p>Default row in the grid header is the row that contains sort-indicators if sorting rules are applied and the "select all" checkbox on multi-select mode.</p> <code-example source> <vaadin-grid selection-mode="multi" demo> <table> <colgroup> <col sortable sort-direction="asc"> <col sortable sort-direction="desc"> <col> <col> </colgroup> <thead> <tr> <th colspan=2>Employee</th> <th colspan=2>Responsibility</th> </tr> <tr> <th>First</th> <th>Last</th> <th>Operation</th> <th>Product</th> </tr> </thead> </table> </vaadin-grid> <code hidden> var employees = []; var names = ["Artur", "Patrik", "Henrik", "Teemu"]; var surnames = ["Signell","Lehtinen","Ahlroos","Paul"]; var activities = ["Design","Implement","Polish","Deliver"]; var targets = ["soup","Vaadin","dog","world peace"]; for (var i = 0; i < 400; i++){ var row = []; [names, surnames, activities, targets].forEach(function(array){ row.push(array[Math.floor(Math.random()*array.length)]); }); employees.push(row); } </code> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); HTMLImports.whenReady(function() { grid.items = employees; // code // Set the default row using JavaScript API grid.header.defaultRow = 1; // end-code }); </code> </code-example> </section> <section> <h3>Footer with dynamic text content</h3> <p></p> <code-example source> <vaadin-grid demo selection-mode="multi"> <table> <colgroup> <col> <col> <col> </colgroup> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Score</th> </tr> </thead> <tfoot> <tr> <th colspan=2>Number of selected rows: <span id="selected-counter">0</span> </th> <th> <span id="total-score">total</span> </th> </tr> </tfoot> </table> </vaadin-grid> <code hidden> var employees = []; var names = ["Artur", "Patrik", "Henrik", "Teemu"]; var surnames = ["Signell","Lehtinen","Ahlroos","Paul"]; for (var i = 0; i < 400; i++){ var row = []; [names, surnames].forEach(function(array){ row.push(array[Math.floor(Math.random()*array.length)]); }); row.push(Math.floor(Math.random()*100)); employees.push(row); } </code> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); function totalScore(employees) { var initialValue = employees[0][2]; return employees.reduce(function (prev, curr, index, array) { return prev + curr[2]; }, initialValue); } HTMLImports.whenReady(function() { grid.items = employees; // code grid.addEventListener("selected-items-changed", function(e) { grid.$$("#selected-counter").textContent = grid.selection.size; }); grid.$$("#total-score").textContent = totalScore(employees); // end-code }); </code> </code-example> </section> <section> <h3>Pagination</h3> <p></p> <code-example source> <vaadin-grid demo> <table> <colgroup> <col name="index" width="60"> <col name="user.picture.thumbnail" width="100"> <col name="user.name.first" > <col name="user.name.last"> <col name="user.email" flex=""> </colgroup> <thead> <tr> <th>#</th> <th></th> <th>First Name</th> <th>Last Name</th> <th>Email</th> </tr> </thead> <tfoot> <tr> <th colspan=5> <button class="demo-button" id="prev">Prev</button> <input id="page" type="number" min="1" max="10" value="1" required/> /10 <button class="demo-button" id="next">Next</button> </th> </tr> </tfoot> </table> </vaadin-grid> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); function loadData(page, count) { // Fetch the JSON data from a URL var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState == XMLHttpRequest.DONE) { if (xhr.status == 200) { var json = JSON.parse(xhr.responseText); json.results.forEach(function(row, index){ row.index = (page - 1) * count + index + 1; }); grid.items = json.results; } } }; xhr.open("GET", randomUserUrl + "?results=" + count, true); xhr.send(); } HTMLImports.whenReady(function() { var count = 10; loadData(1, count); // code grid.$$("#prev").addEventListener('click', function(e) { var input = grid.$$("#page"); var value = parseInt(input.value); if (value > parseInt(input.min)) { var page = value - 1; input.value = page; loadData(page, count); } e.stopPropagation(); }); grid.$$("#next").addEventListener('click', function(e) { var input = grid.$$("#page"); var value = parseInt(input.value); if (value < parseInt(input.max)) { var page = value + 1; input.value = page; loadData(page, count); } e.stopPropagation(); }); grid.$$("#page").addEventListener('input', function(e) { if (this.validity.valid) { loadData(parseInt(this.value), count); } }); // end-code grid.$$("#page").addEventListener('click', function(e) { e.stopPropagation(); }); // Add a renderer for the index column grid.columns[0].renderer = function(cell) { cell.element.innerHTML = cell.row.data.index; }; // Add a renderer for the picture column grid.columns[1].renderer = function(cell) { cell.element.innerHTML = ""; var img = document.createElement("img"); img.style.width = "24px"; img.setAttribute("src", cell.data); cell.element.appendChild(img); }; }); </code> </code-example> </section> <section> <h3>Auto generated header text</h3> When the content of a header cell on the default header row hasn't content defined, it falls back to the column name (if available) converted to human-readable form. <p></p> <code-example source> <vaadin-grid demo> <table> <colgroup> <col name="index"> <col name="user.name.firstName"> <col name="user.name.surname"> <col name="user.email"> <col name="user.job_info"> </colgroup> </table> </vaadin-grid> <code demo-var="grid"> var grid = grid || document.querySelector("vaadin-grid"); HTMLImports.whenReady(function() { grid.items = [{ index: 1, user: { name: { firstName: "Manolo", surname: "Pirolo" }, email: "manu@foo.com", job_info: "Developer" } },{ index: 1, user: { name: { firstName: "Julián", surname: "Gañán" }, email: "juli@bar.com", job_info: "Designer" } }]; }); </code> </code-example> </section> </body> </html>
jahglow/MaterialPolymer
bower_components/vaadin-grid/demo/headers.html
HTML
bsd-3-clause
17,435
using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using Google.ProtocolBuffers.Descriptors; //Disable CS3011: only CLS-compliant members can be abstract #pragma warning disable 3011 namespace Google.ProtocolBuffers.Serialization { /// <summary> /// Provides a base class for writers that performs some basic type dispatching /// </summary> public abstract class AbstractWriter : ICodedOutputStream { /// <summary> /// Completes any pending write operations /// </summary> public virtual void Flush() { } /// <summary> /// Writes the message to the the formatted stream. /// </summary> public abstract void WriteMessage(IMessageLite message); /// <summary> /// Used to write any nessary root-message preamble. After this call you can call /// IMessageLite.MergeTo(...) and complete the message with a call to WriteMessageEnd(). /// These three calls are identical to just calling WriteMessage(message); /// </summary> /// <example> /// AbstractWriter writer; /// writer.WriteMessageStart(); /// message.WriteTo(writer); /// writer.WriteMessageEnd(); /// // ... or, but not both ... /// writer.WriteMessage(message); /// </example> public abstract void WriteMessageStart(); /// <summary> /// Used to complete a root-message previously started with a call to WriteMessageStart() /// </summary> public abstract void WriteMessageEnd(); /// <summary> /// Writes a Boolean value /// </summary> protected abstract void Write(string field, Boolean value); /// <summary> /// Writes a Int32 value /// </summary> protected abstract void Write(string field, Int32 value); /// <summary> /// Writes a UInt32 value /// </summary> [CLSCompliant(false)] protected abstract void Write(string field, UInt32 value); /// <summary> /// Writes a Int64 value /// </summary> protected abstract void Write(string field, Int64 value); /// <summary> /// Writes a UInt64 value /// </summary> [CLSCompliant(false)] protected abstract void Write(string field, UInt64 value); /// <summary> /// Writes a Single value /// </summary> protected abstract void Write(string field, Single value); /// <summary> /// Writes a Double value /// </summary> protected abstract void Write(string field, Double value); /// <summary> /// Writes a String value /// </summary> protected abstract void Write(string field, String value); /// <summary> /// Writes a set of bytes /// </summary> protected abstract void Write(string field, ByteString value); /// <summary> /// Writes a message or group as a field /// </summary> protected abstract void WriteMessageOrGroup(string field, IMessageLite message); /// <summary> /// Writes a System.Enum by the numeric and textual value /// </summary> protected abstract void WriteEnum(string field, int number, string name); /// <summary> /// Writes a field of the type determined by field.FieldType /// </summary> protected virtual void WriteField(FieldType fieldType, string field, object value) { switch (fieldType) { case FieldType.Bool: Write(field, (bool) value); break; case FieldType.Int64: case FieldType.SInt64: case FieldType.SFixed64: Write(field, (long) value); break; case FieldType.UInt64: case FieldType.Fixed64: Write(field, (ulong) value); break; case FieldType.Int32: case FieldType.SInt32: case FieldType.SFixed32: Write(field, (int) value); break; case FieldType.UInt32: case FieldType.Fixed32: Write(field, (uint) value); break; case FieldType.Float: Write(field, (float) value); break; case FieldType.Double: Write(field, (double) value); break; case FieldType.String: Write(field, (string) value); break; case FieldType.Bytes: Write(field, (ByteString) value); break; case FieldType.Group: WriteMessageOrGroup(field, (IMessageLite) value); break; case FieldType.Message: WriteMessageOrGroup(field, (IMessageLite) value); break; case FieldType.Enum: { if (value is IEnumLite) { WriteEnum(field, ((IEnumLite) value).Number, ((IEnumLite) value).Name); } else if (value is IConvertible) { WriteEnum(field, ((IConvertible)value).ToInt32(FrameworkPortability.InvariantCulture), ((IConvertible)value).ToString(FrameworkPortability.InvariantCulture)); } else { throw new ArgumentException("Expected an Enum type for field " + field); } break; } default: throw InvalidProtocolBufferException.InvalidTag(); } } /// <summary> /// Writes an array of field values /// </summary> protected virtual void WriteArray(FieldType fieldType, string field, IEnumerable items) { foreach (object obj in items) { WriteField(fieldType, field, obj); } } /// <summary> /// Writes a numeric unknown field of wire type: Fixed32, Fixed64, or Variant /// </summary> [CLSCompliant(false)] protected virtual void WriteUnknown(WireFormat.WireType wireType, int fieldNumber, ulong value) { } /// <summary> /// Writes an unknown field, Expect WireType of GroupStart or LengthPrefix /// </summary> [CLSCompliant(false)] protected virtual void WriteUnknown(WireFormat.WireType wireType, int fieldNumber, ByteString value) { } #region ICodedOutputStream Members void ICodedOutputStream.WriteUnknownGroup(int fieldNumber, IMessageLite value) { } void ICodedOutputStream.WriteUnknownBytes(int fieldNumber, ByteString value) { } void ICodedOutputStream.WriteUnknownField(int fieldNumber, WireFormat.WireType type, ulong value) { } void ICodedOutputStream.WriteMessageSetExtension(int fieldNumber, string fieldName, IMessageLite value) { } void ICodedOutputStream.WriteMessageSetExtension(int fieldNumber, string fieldName, ByteString value) { } void ICodedOutputStream.WriteField(FieldType fieldType, int fieldNumber, string fieldName, object value) { WriteField(fieldType, fieldName, value); } void ICodedOutputStream.WriteDouble(int fieldNumber, string fieldName, double value) { Write(fieldName, value); } void ICodedOutputStream.WriteFloat(int fieldNumber, string fieldName, float value) { Write(fieldName, value); } void ICodedOutputStream.WriteUInt64(int fieldNumber, string fieldName, ulong value) { Write(fieldName, value); } void ICodedOutputStream.WriteInt64(int fieldNumber, string fieldName, long value) { Write(fieldName, value); } void ICodedOutputStream.WriteInt32(int fieldNumber, string fieldName, int value) { Write(fieldName, value); } void ICodedOutputStream.WriteFixed64(int fieldNumber, string fieldName, ulong value) { Write(fieldName, value); } void ICodedOutputStream.WriteFixed32(int fieldNumber, string fieldName, uint value) { Write(fieldName, value); } void ICodedOutputStream.WriteBool(int fieldNumber, string fieldName, bool value) { Write(fieldName, value); } void ICodedOutputStream.WriteString(int fieldNumber, string fieldName, string value) { Write(fieldName, value); } void ICodedOutputStream.WriteGroup(int fieldNumber, string fieldName, IMessageLite value) { WriteMessageOrGroup(fieldName, value); } void ICodedOutputStream.WriteMessage(int fieldNumber, string fieldName, IMessageLite value) { WriteMessageOrGroup(fieldName, value); } void ICodedOutputStream.WriteBytes(int fieldNumber, string fieldName, ByteString value) { Write(fieldName, value); } void ICodedOutputStream.WriteUInt32(int fieldNumber, string fieldName, uint value) { Write(fieldName, value); } void ICodedOutputStream.WriteEnum(int fieldNumber, string fieldName, int value, object rawValue) { WriteEnum(fieldName, value, rawValue.ToString()); } void ICodedOutputStream.WriteSFixed32(int fieldNumber, string fieldName, int value) { Write(fieldName, value); } void ICodedOutputStream.WriteSFixed64(int fieldNumber, string fieldName, long value) { Write(fieldName, value); } void ICodedOutputStream.WriteSInt32(int fieldNumber, string fieldName, int value) { Write(fieldName, value); } void ICodedOutputStream.WriteSInt64(int fieldNumber, string fieldName, long value) { Write(fieldName, value); } void ICodedOutputStream.WriteArray(FieldType fieldType, int fieldNumber, string fieldName, IEnumerable list) { WriteArray(fieldType, fieldName, list); } void ICodedOutputStream.WriteGroupArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list) { WriteArray(FieldType.Group, fieldName, list); } void ICodedOutputStream.WriteMessageArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list) { WriteArray(FieldType.Message, fieldName, list); } void ICodedOutputStream.WriteStringArray(int fieldNumber, string fieldName, IEnumerable<string> list) { WriteArray(FieldType.String, fieldName, list); } void ICodedOutputStream.WriteBytesArray(int fieldNumber, string fieldName, IEnumerable<ByteString> list) { WriteArray(FieldType.Bytes, fieldName, list); } void ICodedOutputStream.WriteBoolArray(int fieldNumber, string fieldName, IEnumerable<bool> list) { WriteArray(FieldType.Bool, fieldName, list); } void ICodedOutputStream.WriteInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list) { WriteArray(FieldType.Int32, fieldName, list); } void ICodedOutputStream.WriteSInt32Array(int fieldNumber, string fieldName, IEnumerable<int> list) { WriteArray(FieldType.SInt32, fieldName, list); } void ICodedOutputStream.WriteUInt32Array(int fieldNumber, string fieldName, IEnumerable<uint> list) { WriteArray(FieldType.UInt32, fieldName, list); } void ICodedOutputStream.WriteFixed32Array(int fieldNumber, string fieldName, IEnumerable<uint> list) { WriteArray(FieldType.Fixed32, fieldName, list); } void ICodedOutputStream.WriteSFixed32Array(int fieldNumber, string fieldName, IEnumerable<int> list) { WriteArray(FieldType.SFixed32, fieldName, list); } void ICodedOutputStream.WriteInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list) { WriteArray(FieldType.Int64, fieldName, list); } void ICodedOutputStream.WriteSInt64Array(int fieldNumber, string fieldName, IEnumerable<long> list) { WriteArray(FieldType.SInt64, fieldName, list); } void ICodedOutputStream.WriteUInt64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list) { WriteArray(FieldType.UInt64, fieldName, list); } void ICodedOutputStream.WriteFixed64Array(int fieldNumber, string fieldName, IEnumerable<ulong> list) { WriteArray(FieldType.Fixed64, fieldName, list); } void ICodedOutputStream.WriteSFixed64Array(int fieldNumber, string fieldName, IEnumerable<long> list) { WriteArray(FieldType.SFixed64, fieldName, list); } void ICodedOutputStream.WriteDoubleArray(int fieldNumber, string fieldName, IEnumerable<double> list) { WriteArray(FieldType.Double, fieldName, list); } void ICodedOutputStream.WriteFloatArray(int fieldNumber, string fieldName, IEnumerable<float> list) { WriteArray(FieldType.Float, fieldName, list); } void ICodedOutputStream.WriteEnumArray<T>(int fieldNumber, string fieldName, IEnumerable<T> list) { WriteArray(FieldType.Enum, fieldName, list); } void ICodedOutputStream.WritePackedArray(FieldType fieldType, int fieldNumber, string fieldName, IEnumerable list) { WriteArray(fieldType, fieldName, list); } void ICodedOutputStream.WritePackedBoolArray(int fieldNumber, string fieldName, int computedSize, IEnumerable<bool> list) { WriteArray(FieldType.Bool, fieldName, list); } void ICodedOutputStream.WritePackedInt32Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<int> list) { WriteArray(FieldType.Int32, fieldName, list); } void ICodedOutputStream.WritePackedSInt32Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<int> list) { WriteArray(FieldType.SInt32, fieldName, list); } void ICodedOutputStream.WritePackedUInt32Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<uint> list) { WriteArray(FieldType.UInt32, fieldName, list); } void ICodedOutputStream.WritePackedFixed32Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<uint> list) { WriteArray(FieldType.Fixed32, fieldName, list); } void ICodedOutputStream.WritePackedSFixed32Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<int> list) { WriteArray(FieldType.SFixed32, fieldName, list); } void ICodedOutputStream.WritePackedInt64Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<long> list) { WriteArray(FieldType.Int64, fieldName, list); } void ICodedOutputStream.WritePackedSInt64Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<long> list) { WriteArray(FieldType.SInt64, fieldName, list); } void ICodedOutputStream.WritePackedUInt64Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<ulong> list) { WriteArray(FieldType.UInt64, fieldName, list); } void ICodedOutputStream.WritePackedFixed64Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<ulong> list) { WriteArray(FieldType.Fixed64, fieldName, list); } void ICodedOutputStream.WritePackedSFixed64Array(int fieldNumber, string fieldName, int computedSize, IEnumerable<long> list) { WriteArray(FieldType.SFixed64, fieldName, list); } void ICodedOutputStream.WritePackedDoubleArray(int fieldNumber, string fieldName, int computedSize, IEnumerable<double> list) { WriteArray(FieldType.Double, fieldName, list); } void ICodedOutputStream.WritePackedFloatArray(int fieldNumber, string fieldName, int computedSize, IEnumerable<float> list) { WriteArray(FieldType.Float, fieldName, list); } void ICodedOutputStream.WritePackedEnumArray<T>(int fieldNumber, string fieldName, int computedSize, IEnumerable<T> list) { WriteArray(FieldType.Enum, fieldName, list); } #endregion } }
igorgatis/protobuf-csharp-port
src/ProtocolBuffers.Serialization/AbstractWriter.cs
C#
bsd-3-clause
18,253
#region Copyright (c) 2003-2005, Luke T. Maxon /******************************************************************************************************************** ' ' Copyright (c) 2003-2005, Luke T. Maxon ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, are permitted provided ' that the following conditions are met: ' ' * Redistributions of source code must retain the above copyright notice, this list of conditions and the ' following disclaimer. ' ' * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and ' the following disclaimer in the documentation and/or other materials provided with the distribution. ' ' * Neither the name of the author nor the names of its contributors may be used to endorse or ' promote products derived from this software without specific prior written permission. ' ' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED ' WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ' PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ' LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ' INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ' OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ' IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ' '*******************************************************************************************************************/ #endregion using Xunit.Extensions.Forms.TestApplications; using Xunit; using System.ComponentModel; namespace Xunit.Extensions.Forms.Recorder.Test { [Category("Recorder")] public class NameResolverTest : XunitFormTest { [Fact] public void AmbiguousButton() { AmbiguousNameForm form = new AmbiguousNameForm(); form.Show(); Censor.Add("XunitFormsTestApplicationsCustomTesters"); TestWriter writer = new TestWriter(form); Assert.Equal("", writer.Test); ButtonTester button = new ButtonTester("myControl2.myButton", form); button.Click(); Assert.Equal( @"[Fact] public void Test() { ButtonTester myControl2_myButton = new ButtonTester(""myControl2.myButton""); myControl2_myButton.Click(); }", writer.Test); Censor.Remove("XunitFormsTestApplicationsCustomTesters"); } [Fact] public void UnderscoreButton() { UnderscoreNameForm form = new UnderscoreNameForm(); form.Show(); TestWriter writer = new TestWriter(form); Assert.Equal(string.Empty, writer.Test); ButtonTester button = new ButtonTester("_button", form); button.Click(); Assert.Equal( @"[Fact] public void Test() { ButtonTester _button = new ButtonTester(""_button""); _button.Click(); }", writer.Test); } } }
ChrisPelatari/XunitForms
source/XunitForms.Test/Recorder/NameResolverTest.cs
C#
bsd-3-clause
3,475
namespace AjScript { using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using AjScript.Expressions; using AjScript.Language; public static class ExpressionUtilities { public static void SetValue(IExpression expression, object value, IContext context) { if (expression is VariableExpression) { SetValue((VariableExpression)expression, value, context); return; } if (expression is DotExpression) { SetValue((DotExpression)expression, value, context); return; } throw new InvalidOperationException("Invalid left value"); } public static object ResolveToObject(IExpression expression, IContext context) { if (expression is VariableExpression) return ResolveToObject((VariableExpression)expression, context); if (expression is DotExpression) return ResolveToObject((DotExpression)expression, context); return expression.Evaluate(context); } public static object ResolveToList(IExpression expression, IContext context) { if (expression is VariableExpression) return ResolveToList((VariableExpression)expression, context); if (expression is DotExpression) return ResolveToList((DotExpression)expression, context); return expression.Evaluate(context); } public static IDictionary ResolveToDictionary(IExpression expression, IContext context) { if (expression is VariableExpression) return ResolveToDictionary((VariableExpression)expression, context); if (expression is DotExpression) return ResolveToDictionary((DotExpression)expression, context); return (IDictionary)expression.Evaluate(context); } private static void SetValue(VariableExpression expression, object value, IContext context) { context.SetValue(expression.Name, value); } private static void SetValue(DotExpression expression, object value, IContext context) { if (expression.Arguments != null) throw new InvalidOperationException("Invalid left value"); object obj = ResolveToObject(expression.Expression, context); ObjectUtilities.SetValue(obj, expression.Name, value); } private static object ResolveToObject(VariableExpression expression, IContext context) { string name = expression.Name; object obj = context.GetValue(name); if (obj == null || obj == Undefined.Instance) { obj = new DynamicObject(); // TODO Review if Local or not context.SetValue(name, obj); } return obj; } private static object ResolveToObject(DotExpression expression, IContext context) { object obj = ResolveToObject(expression.Expression, context); if (obj is DynamicObject) { DynamicObject dynobj = (DynamicObject)obj; obj = dynobj.GetValue(expression.Name); if (obj == null || obj == Undefined.Instance) { obj = new DynamicObject(); dynobj.SetValue(expression.Name, obj); } return obj; } return ObjectUtilities.GetValue(obj, expression.Name); } private static object ResolveToList(VariableExpression expression, IContext context) { string name = expression.Name; object obj = context.GetValue(name); if (obj == null || obj == Undefined.Instance) { obj = new ArrayList(); // TODO Review if Local or not context.SetValue(name, obj); } return obj; } private static IList ResolveToList(DotExpression expression, IContext context) { object obj = ResolveToObject(expression.Expression, context); if (obj is DynamicObject) { DynamicObject dynobj = (DynamicObject)obj; obj = dynobj.GetValue(expression.Name); if (obj == null || obj == Undefined.Instance) { obj = new ArrayList(); dynobj.SetValue(expression.Name, obj); } return (IList) obj; } return (IList) ObjectUtilities.GetValue(obj, expression.Name); } private static IDictionary ResolveToDictionary(VariableExpression expression, IContext context) { string name = expression.Name; object obj = context.GetValue(name); if (obj == null || obj == Undefined.Instance) { obj = new Hashtable(); // TODO Review if Local or not context.SetValue(name, obj); } return (IDictionary)obj; } private static IDictionary ResolveToDictionary(DotExpression expression, IContext context) { object obj = ResolveToObject(expression.Expression, context); if (obj is DynamicObject) { DynamicObject dynobj = (DynamicObject)obj; obj = dynobj.GetValue(expression.Name); if (obj == null || obj == Undefined.Instance) { obj = new Hashtable(); dynobj.SetValue(expression.Name, obj); } return (IDictionary)obj; } return (IDictionary)ObjectUtilities.GetValue(obj, expression.Name); } } }
tario/AjScript-migrated
Src/AjScript/ExpressionUtilities.cs
C#
bsd-3-clause
6,245
<div class="slide-generic slide slide-mobilized"> <img class="backdrop" src="{{ static('img/home/promo-backdrop-mobilized.jpg') }}" alt=""> <div class="slide-desc"> <h2>{{ _('Tips for <br>winning flicks') }}</h2> <p> {% trans %} Take an in-depth look at the creative brief and get advice from the Flicks team to give your flick the best shot at the Grand Prize. {% endtrans %} </p> <p class="act"> <a href="http://firefoxflicks.tumblr.com/post/49510500329/what-does-get-mobilized-mean-to-us" class="go" rel="external">{{ _('Read the blog post') }}</a> <span>* {{ _('English only') }}</span> </p> </div> </div>
mozilla/firefox-flicks
flicks/base/templates/carousel/blogpost_getmobilized.html
HTML
bsd-3-clause
677
{-# LANGUAGE BangPatterns #-} module Network.HPACK.Table.DoubleHashMap ( DoubleHashMap , empty , insert , delete , fromList , deleteList , Res(..) , search ) where import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as H import Data.List (foldl') import Network.HPACK.Types newtype DoubleHashMap a = DoubleHashMap (HashMap HeaderName (HashMap HeaderValue a)) deriving Show empty :: DoubleHashMap a empty = DoubleHashMap H.empty insert :: Ord a => Header -> a -> DoubleHashMap a -> DoubleHashMap a insert (k,v) p (DoubleHashMap m) = case H.lookup k m of Nothing -> let inner = H.singleton v p in DoubleHashMap $ H.insert k inner m Just inner -> let inner' = H.insert v p inner in DoubleHashMap $ H.adjust (const inner') k m delete :: Ord a => Header -> DoubleHashMap a -> DoubleHashMap a delete (k,v) dhm@(DoubleHashMap outer) = case H.lookup k outer of Nothing -> dhm -- Non-smart implementation makes duplicate keys. -- It is likely to happen to delete the same key -- in multiple times. Just inner -> case H.lookup v inner of Nothing -> dhm -- see above _ -> delete' inner where delete' inner | H.null inner' = DoubleHashMap $ H.delete k outer | otherwise = DoubleHashMap $ H.adjust (const inner') k outer where inner' = H.delete v inner fromList :: Ord a => [(a,Header)] -> DoubleHashMap a fromList alist = hashinner where ins !hp (!a,!dhm) = insert dhm a hp !hashinner = foldl' ins empty alist deleteList :: Ord a => [Header] -> DoubleHashMap a -> DoubleHashMap a deleteList hs hp = foldl' (flip delete) hp hs data Res a = N | K a | KV a search :: Ord a => Header -> DoubleHashMap a -> Res a search (k,v) (DoubleHashMap outer) = case H.lookup k outer of Nothing -> N Just inner -> case H.lookup v inner of Nothing -> case top inner of Nothing -> error "DoubleHashMap.search" Just a -> K a Just a -> KV a -- | Take an arbitrary entry. O(1) thanks to lazy evaluation. top :: HashMap k v -> Maybe v top = H.foldr (\v _ -> Just v) Nothing
bergmark/http2
Network/HPACK/Table/DoubleHashMap.hs
Haskell
bsd-3-clause
2,210
/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _mitkSurfaceToImageFilter_h__ #define _mitkSurfaceToImageFilter_h__ #include "MitkCoreExports.h" #include "mitkCommon.h" #include "mitkImageSource.h" #include "mitkSurface.h" class vtkPolyData; namespace mitk { /** * * @brief Converts surface data to pixel data. Requires a surface and an * image, which header information defines the output image. * * The resulting image has the same dimension, size, and Geometry3D * as the input image. The image is cut using a vtkStencil. * The user can decide if he wants to keep the original values or create a * binary image by setting MakeBinaryOutputOn (default is \a false). If * set to \a true all voxels inside the surface are set to one and all * outside voxel are set to zero. * * NOTE: Since the reference input image is passed to the vtkStencil in * any case, the image needs to be initialized with pixel values greater than * the numerical minimum of the used pixel type (e.g. at least -127 for * unsigned char images, etc.) to produce a correct binary image * representation of the surface in MakeOutputBinary mode. * * @ingroup SurfaceFilters * @ingroup Process */ class MITKCORE_EXPORT SurfaceToImageFilter : public ImageSource { public: mitkClassMacro(SurfaceToImageFilter, ImageSource); itkFactorylessNewMacro(Self); itkCloneMacro(Self); itkSetMacro(MakeOutputBinary, bool); itkGetMacro(MakeOutputBinary, bool); itkBooleanMacro(MakeOutputBinary); itkSetMacro(UShortBinaryPixelType, bool); itkGetMacro(UShortBinaryPixelType, bool); itkBooleanMacro(UShortBinaryPixelType); itkGetConstMacro(BackgroundValue, float); itkSetMacro(BackgroundValue, float); itkGetConstMacro(Tolerance, double); itkSetMacro(Tolerance, double); void GenerateInputRequestedRegion() override; void GenerateOutputInformation() override; void GenerateData() override; const mitk::Surface *GetInput(void); using itk::ProcessObject::SetInput; virtual void SetInput(const mitk::Surface *surface); void SetImage(const mitk::Image *source); const mitk::Image *GetImage(void); protected: SurfaceToImageFilter(); ~SurfaceToImageFilter() override; void Stencil3DImage(int time = 0); bool m_MakeOutputBinary; bool m_UShortBinaryPixelType; float m_BackgroundValue; double m_Tolerance; }; } // namespace mitk #endif /* MITKCOONSPATCHFILTER_H_HEADER_INCLUDED_C10B22CD */
MITK/MITK
Modules/Core/include/mitkSurfaceToImageFilter.h
C
bsd-3-clause
2,880
#include <apps_sfdl_gen/bounded_loop_v_inp_gen.h> #include <apps_sfdl_hw/bounded_loop_v_inp_gen_hw.h> #include <apps_sfdl_gen/bounded_loop_cons.h> //This file will NOT be overwritten by the code generator, if it already //exists. make clean will also not remove this file. bounded_loopVerifierInpGenHw::bounded_loopVerifierInpGenHw(Venezia* v_) { v = v_; compiler_implementation.v = v_; } //Refer to apps_sfdl_gen/bounded_loop_cons.h for constants to use when generating input. void bounded_loopVerifierInpGenHw::create_input(mpq_t* input_q, int num_inputs) { //Default implementation is provided by compiler compiler_implementation.create_input(input_q, num_inputs); }
srinathtv/pepper
pepper/apps_sfdl_hw/bounded_loop_v_inp_gen_hw.cpp
C++
bsd-3-clause
681
<?php /** * Copyright (c) 2012 Jurian Sluiman. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the names of the copyright holders nor the names of the * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * @package SlmIdealPayment * @subpackage Response * @author Jurian Sluiman <jurian@juriansluiman.nl> * @copyright 2012 Jurian Sluiman. * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @link http://juriansluiman.nl */ namespace SlmIdealPayment\Response; use SlmIdealPayment\Model\Transaction; class StatusResponse extends AbstractResponse { protected $transaction; public function getTransaction() { return $this->transaction; } public function setTransaction(Transaction $transaction) { $this->transaction = $transaction; return $this; } }
juriansluiman/SlmIdealPayment
src/SlmIdealPayment/Response/StatusResponse.php
PHP
bsd-3-clause
2,269
/* $OpenBSD: uyap_firmware.h,v 1.1 2001/12/17 01:39:08 deraadt Exp $ */ /* $NetBSD: uyap_firmware.h,v 1.2 2001/01/16 03:10:09 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Silicon Portals. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ {0x10,0x146C, "\xC2\x00\x90\x7F\xA5\xE0\x54\x18\xFF\x13\x13\x13\x54\x1F\x44\x50"}, {0x10,0x147C, "\xF5\x1C\x13\x92\x01\xD2\xE8\x90\x7F\xAB\x74\xFF\xF0\x90\x7F\xA9"}, {0x10,0x148C, "\xF0\x90\x7F\xAA\xF0\x53\x91\xEF\x90\x7F\x95\xE0\x44\xC0\xF0\x90"}, {0x10,0x149C, "\x7F\xAF\xE0\x44\x01\xF0\x90\x7F\xAE\xE0\x44\x05\xF0\xD2\xAF\x12"}, {0x0D,0x14AC, "\x17\x5F\x30\x00\xFD\x12\x11\x00\xC2\x00\x80\xF6\x22"}, {0x10,0x1100, "\x90\x7F\xE9\xE0\x24\x5D\x60\x0D\x14\x70\x03\x02\x12\x44\x24\x02"}, {0x10,0x1110, "\x60\x03\x02\x12\x4A\x90\x7F\xEA\xE0\x75\x08\x00\xF5\x09\xA3\xE0"}, {0x10,0x1120, "\xFE\xE4\x25\x09\xF5\x09\xEE\x35\x08\xF5\x08\x90\x7F\xEE\xE0\x75"}, {0x10,0x1130, "\x0A\x00\xF5\x0B\xA3\xE0\xFE\xE4\x25\x0B\xF5\x0B\xEE\x35\x0A\xF5"}, {0x10,0x1140, "\x0A\x90\x7F\xE8\xE0\x64\xC0\x60\x03\x02\x11\xD4\xE5\x0B\x45\x0A"}, {0x10,0x1150, "\x70\x03\x02\x12\x4A\xC3\xE5\x0B\x94\x40\xE5\x0A\x94\x00\x50\x08"}, {0x10,0x1160, "\x85\x0A\x0C\x85\x0B\x0D\x80\x06\x75\x0C\x00\x75\x0D\x40\x90\x7F"}, {0x10,0x1170, "\xE9\xE0\xB4\xA3\x25\xAE\x0C\xAF\x0D\xAA\x08\xA9\x09\x7B\x01\xC0"}, {0x10,0x1180, "\x03\xC0\x02\xC0\x01\x7A\x7F\x79\x00\x78\x00\x7C\x7F\xAD\x03\xD0"}, {0x10,0x1190, "\x01\xD0\x02\xD0\x03\x12\x13\x56\x80\x0F\xAF\x09\xAE\x08\xAD\x0D"}, {0x10,0x11A0, "\x7A\x7F\x79\x00\x7B\x00\x12\x15\xA4\x90\x7F\xB5\xE5\x0D\xF0\xE5"}, {0x10,0x11B0, "\x0D\x25\x09\xF5\x09\xE5\x0C\x35\x08\xF5\x08\xC3\xE5\x0B\x95\x0D"}, {0x10,0x11C0, "\xF5\x0B\xE5\x0A\x95\x0C\xF5\x0A\x90\x7F\xB4\xE0\x20\xE2\x03\x02"}, {0x10,0x11D0, "\x11\x4C\x80\xF4\x90\x7F\xE8\xE0\x64\x40\x70\x6E\xE5\x0B\x45\x0A"}, {0x10,0x11E0, "\x60\x68\xE4\x90\x7F\xC5\xF0\x90\x7F\xB4\xE0\x20\xE3\xF9\x90\x7F"}, {0x10,0x11F0, "\xC5\xE0\x75\x0C\x00\xF5\x0D\x90\x7F\xE9\xE0\xB4\xA3\x15\xAE\x0C"}, {0x10,0x1200, "\xAF\x0D\xA8\x09\xAC\x08\x7D\x01\x7B\x01\x7A\x7E\x79\xC0\x12\x13"}, {0x10,0x1210, "\x56\x80\x0F\xAF\x09\xAE\x08\xAD\x0D\x7A\x7F\x79\x00\x7B\x00\x12"}, {0x10,0x1220, "\x14\xB9\xE5\x0D\x25\x09\xF5\x09\xE5\x0C\x35\x08\xF5\x08\xC3\xE5"}, {0x10,0x1230, "\x0B\x95\x0D\xF5\x0B\xE5\x0A\x95\x0C\xF5\x0A\x90\x7F\xB4\xE0\x44"}, {0x0A,0x1240, "\x02\xF0\x80\x98\x90\x7F\xEA\xE0\xF5\x1C"}, {0x01,0x124A, "\x22"}, {0x06,0x1558, "\xAB\x07\xAA\x06\xAC\x05"}, {0x10,0x155E, "\xE4\xFD\x30\x01\x11\xEA\xFF\xAE\x05\x0D\xEE\x24\x00\xF5\x82\xE4"}, {0x10,0x156E, "\x34\xE0\xF5\x83\xEF\xF0\xEB\xAE\x05\x0D\x74\x00\x2E\xF5\x82\xE4"}, {0x10,0x157E, "\x34\xE0\xF5\x83\xEB\xF0\xAF\x05\x0D\x74\x00\x2F\xF5\x82\xE4\x34"}, {0x10,0x158E, "\xE0\xF5\x83\xEC\xF0\xAF\x1C\x7A\xE0\x7B\x00\x12\x17\x20\x7F\x0A"}, {0x05,0x159E, "\x7E\x00\x12\x17\x3C"}, {0x01,0x15A3, "\x22"}, {0x0A,0x14B9, "\x8E\x0E\x8F\x0F\x8D\x10\x8A\x11\x8B\x12"}, {0x10,0x14C3, "\xE4\xF5\x13\xE5\x13\xC3\x95\x10\x50\x20\x05\x0F\xE5\x0F\xAE\x0E"}, {0x10,0x14D3, "\x70\x02\x05\x0E\x14\xFF\xE5\x12\x25\x13\xF5\x82\xE4\x35\x11\xF5"}, {0x0A,0x14E3, "\x83\xE0\xFD\x12\x15\x58\x05\x13\x80\xD9"}, {0x01,0x14ED, "\x22"}, {0x0A,0x15A4, "\x8E\x0E\x8F\x0F\x8D\x10\x8A\x11\x8B\x12"}, {0x10,0x15AE, "\xE4\xFD\x30\x01\x12\xE5\x0E\xFF\xAE\x05\x0D\xEE\x24\x03\xF5\x82"}, {0x10,0x15BE, "\xE4\x34\xE0\xF5\x83\xEF\xF0\xE5\x0F\xAE\x05\x0D\x74\x03\x2E\xF5"}, {0x10,0x15CE, "\x82\xE4\x34\xE0\xF5\x83\xE5\x0F\xF0\xAF\x1C\x7A\xE0\x7B\x03\x12"}, {0x0D,0x15DE, "\x17\x20\xAF\x1C\xAD\x10\xAB\x12\xAA\x11\x12\x17\x04"}, {0x01,0x15EB, "\x22"}, {0x10,0x166E, "\xC0\xE0\xC0\x83\xC0\x82\xC0\x85\xC0\x84\xC0\x86\x75\x86\x00\xD2"}, {0x10,0x167E, "\x00\x53\x91\xEF\x90\x7F\xAB\x74\x01\xF0\xD0\x86\xD0\x84\xD0\x85"}, {0x07,0x168E, "\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x10,0x1644, "\xC0\xE0\xC0\x83\xC0\x82\xC0\x85\xC0\x84\xC0\x86\x75\x86\x00\x90"}, {0x10,0x1654, "\x7F\xC4\xE4\xF0\x53\x91\xEF\x90\x7F\xAB\x74\x04\xF0\xD0\x86\xD0"}, {0x0A,0x1664, "\x84\xD0\x85\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x10,0x1695, "\xC0\xE0\xC0\x83\xC0\x82\xC0\x85\xC0\x84\xC0\x86\x75\x86\x00\x53"}, {0x10,0x16A5, "\x91\xEF\x90\x7F\xAB\x74\x02\xF0\xD0\x86\xD0\x84\xD0\x85\xD0\x82"}, {0x05,0x16B5, "\xD0\x83\xD0\xE0\x32"}, {0x10,0x16BA, "\xC0\xE0\xC0\x83\xC0\x82\xC0\x85\xC0\x84\xC0\x86\x75\x86\x00\x53"}, {0x10,0x16CA, "\x91\xEF\x90\x7F\xAB\x74\x10\xF0\xD0\x86\xD0\x84\xD0\x85\xD0\x82"}, {0x05,0x16DA, "\xD0\x83\xD0\xE0\x32"}, {0x01,0x14FF, "\x32"}, {0x10,0x16DF, "\xC0\xE0\xC0\x83\xC0\x82\xC0\x85\xC0\x84\xC0\x86\x75\x86\x00\x53"}, {0x10,0x16EF, "\x91\xEF\x90\x7F\xAB\x74\x08\xF0\xD0\x86\xD0\x84\xD0\x85\xD0\x82"}, {0x05,0x16FF, "\xD0\x83\xD0\xE0\x32"}, {0x01,0x1767, "\x32"}, {0x01,0x1768, "\x32"}, {0x01,0x1769, "\x32"}, {0x01,0x176A, "\x32"}, {0x01,0x176B, "\x32"}, {0x01,0x176C, "\x32"}, {0x01,0x176D, "\x32"}, {0x01,0x176E, "\x32"}, {0x01,0x176F, "\x32"}, {0x01,0x1770, "\x32"}, {0x01,0x1771, "\x32"}, {0x01,0x1772, "\x32"}, {0x01,0x1773, "\x32"}, {0x01,0x1774, "\x32"}, {0x01,0x1775, "\x32"}, {0x01,0x1776, "\x32"}, {0x03,0x0043, "\x02\x15\x00"}, {0x10,0x1500, "\x02\x16\x6E\x00\x02\x16\x95\x00\x02\x16\x44\x00\x02\x16\xDF\x00"}, {0x10,0x1510, "\x02\x16\xBA\x00\x02\x14\xFF\x00\x02\x17\x67\x00\x02\x17\x68\x00"}, {0x10,0x1520, "\x02\x17\x69\x00\x02\x17\x6A\x00\x02\x17\x6B\x00\x02\x17\x6C\x00"}, {0x10,0x1530, "\x02\x17\x6D\x00\x02\x17\x6E\x00\x02\x17\x6F\x00\x02\x17\x70\x00"}, {0x10,0x1540, "\x02\x17\x71\x00\x02\x17\x72\x00\x02\x17\x73\x00\x02\x17\x74\x00"}, {0x08,0x1550, "\x02\x17\x75\x00\x02\x17\x76\x00"}, {0x10,0x173C, "\x8E\x14\x8F\x15\xE5\x15\x15\x15\xAE\x14\x70\x02\x15\x14\x4E\x60"}, {0x07,0x174C, "\x05\x12\x14\xEE\x80\xEE\x22"}, {0x08,0x175F, "\xE4\xF5\x1B\xD2\xE9\xD2\xAF\x22"}, {0x10,0x1619, "\xA9\x07\xE5\x1B\x70\x23\x90\x7F\xA5\xE0\x44\x80\xF0\xE9\x25\xE0"}, {0x10,0x1629, "\x90\x7F\xA6\xF0\x8D\x16\xAF\x03\xA9\x07\x75\x17\x01\x8A\x18\x89"}, {0x0B,0x1639, "\x19\xE4\xF5\x1A\x75\x1B\x01\xD3\x22\xC3\x22"}, {0x10,0x15EC, "\xA9\x07\xE5\x1B\x70\x25\x90\x7F\xA5\xE0\x44\x80\xF0\xE9\x25\xE0"}, {0x10,0x15FC, "\x44\x01\x90\x7F\xA6\xF0\x8D\x16\xAF\x03\xA9\x07\x75\x17\x01\x8A"}, {0x0D,0x160C, "\x18\x89\x19\xE4\xF5\x1A\x75\x1B\x03\xD3\x22\xC3\x22"}, {0x03,0x004B, "\x02\x13\x7F"}, {0x10,0x137F, "\xC0\xE0\xC0\x83\xC0\x82\xC0\x85\xC0\x84\xC0\x86\x75\x86\x00\xC0"}, {0x10,0x138F, "\xD0\x75\xD0\x00\xC0\x00\xC0\x01\xC0\x02\xC0\x03\xC0\x06\xC0\x07"}, {0x10,0x139F, "\x90\x7F\xA5\xE0\x30\xE2\x06\x75\x1B\x06\x02\x14\x4E\x90\x7F\xA5"}, {0x10,0x13AF, "\xE0\x20\xE1\x0C\xE5\x1B\x64\x02\x60\x06\x75\x1B\x07\x02\x14\x4E"}, {0x10,0x13BF, "\xAF\x1B\xEF\x24\xFE\x60\x48\x14\x60\x2C\x24\xFE\x60\x77\x24\x04"}, {0x10,0x13CF, "\x60\x03\x02\x14\x4E\xAB\x17\xAA\x18\xA9\x19\xAF\x1A\x05\x1A\x8F"}, {0x10,0x13DF, "\x82\x75\x83\x00\x12\x12\x4B\x90\x7F\xA6\xF0\xE5\x1A\x65\x16\x70"}, {0x10,0x13EF, "\x5E\x75\x1B\x05\x80\x59\x90\x7F\xA6\xE0\xAB\x17\xAA\x18\xA9\x19"}, {0x10,0x13FF, "\xAE\x1A\x8E\x82\x75\x83\x00\x12\x12\x78\x75\x1B\x02\x80\x40\xE5"}, {0x10,0x140F, "\x16\x24\xFE\xB5\x1A\x07\x90\x7F\xA5\xE0\x44\x20\xF0\xE5\x16\x14"}, {0x10,0x141F, "\xB5\x1A\x0A\x90\x7F\xA5\xE0\x44\x40\xF0\x75\x1B\x00\x90\x7F\xA6"}, {0x10,0x142F, "\xE0\xAB\x17\xAA\x18\xA9\x19\xAE\x1A\x8E\x82\x75\x83\x00\x12\x12"}, {0x10,0x143F, "\x78\x05\x1A\x80\x0A\x90\x7F\xA5\xE0\x44\x40\xF0\x75\x1B\x00\x53"}, {0x10,0x144F, "\x91\xDF\xD0\x07\xD0\x06\xD0\x03\xD0\x02\xD0\x01\xD0\x00\xD0\xD0"}, {0x0D,0x145F, "\xD0\x86\xD0\x84\xD0\x85\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x10,0x1704, "\x12\x15\xEC\xE5\x1B\x24\xFA\x60\x0E\x14\x60\x06\x24\x07\x70\xF3"}, {0x0C,0x1714, "\xD3\x22\xE4\xF5\x1B\xD3\x22\xE4\xF5\x1B\xD3\x22"}, {0x10,0x1720, "\x12\x16\x19\xE5\x1B\x24\xFA\x60\x0E\x14\x60\x06\x24\x07\x70\xF3"}, {0x0C,0x1730, "\xD3\x22\xE4\xF5\x1B\xD3\x22\xE4\xF5\x1B\xD3\x22"}, {0x10,0x14EE, "\x74\x00\xF5\x86\x90\xFD\xA5\x7C\x05\xA3\xE5\x82\x45\x83\x70\xF9"}, {0x01,0x14FE, "\x22"}, {0x03,0x0000, "\x02\x17\x53"}, {0x0C,0x1753, "\x78\x7F\xE4\xF6\xD8\xFD\x75\x81\x20\x02\x14\x6C"}, {0x10,0x124B, "\xBB\x01\x0C\xE5\x82\x29\xF5\x82\xE5\x83\x3A\xF5\x83\xE0\x22\x50"}, {0x10,0x125B, "\x06\xE9\x25\x82\xF8\xE6\x22\xBB\xFE\x06\xE9\x25\x82\xF8\xE2\x22"}, {0x0D,0x126B, "\xE5\x82\x29\xF5\x82\xE5\x83\x3A\xF5\x83\xE4\x93\x22"}, {0x10,0x1278, "\xF8\xBB\x01\x0D\xE5\x82\x29\xF5\x82\xE5\x83\x3A\xF5\x83\xE8\xF0"}, {0x10,0x1288, "\x22\x50\x06\xE9\x25\x82\xC8\xF6\x22\xBB\xFE\x05\xE9\x25\x82\xC8"}, {0x02,0x1298, "\xF2\x22"}, {0x10,0x129A, "\xE7\x09\xF6\x08\xDF\xFA\x80\x46\xE7\x09\xF2\x08\xDF\xFA\x80\x3E"}, {0x10,0x12AA, "\x88\x82\x8C\x83\xE7\x09\xF0\xA3\xDF\xFA\x80\x32\xE3\x09\xF6\x08"}, {0x10,0x12BA, "\xDF\xFA\x80\x6E\xE3\x09\xF2\x08\xDF\xFA\x80\x66\x88\x82\x8C\x83"}, {0x10,0x12CA, "\xE3\x09\xF0\xA3\xDF\xFA\x80\x5A\x89\x82\x8A\x83\xE0\xA3\xF6\x08"}, {0x10,0x12DA, "\xDF\xFA\x80\x4E\x89\x82\x8A\x83\xE0\xA3\xF2\x08\xDF\xFA\x80\x42"}, {0x10,0x12EA, "\x80\xD2\x80\xFA\x80\xC6\x80\xD4\x80\x55\x80\xF2\x80\x29\x80\x10"}, {0x10,0x12FA, "\x80\xA6\x80\xEA\x80\x9A\x80\xA8\x80\xDA\x80\xE2\x80\xCA\x80\x29"}, {0x10,0x130A, "\x88\x84\x8C\x85\x89\x82\x8A\x83\xE4\x93\xA3\x05\x86\xF0\xA3\x05"}, {0x10,0x131A, "\x86\xDF\xF5\xDE\xF3\x80\x0B\x89\x82\x8A\x83\xE4\x93\xA3\xF6\x08"}, {0x10,0x132A, "\xDF\xF9\xEC\xFA\xA9\xF0\xED\xFB\x22\x88\x84\x8C\x85\x89\x82\x8A"}, {0x10,0x133A, "\x83\xE0\xA3\x05\x86\xF0\xA3\x05\x86\xDF\xF6\xDE\xF4\x80\xE3\x89"}, {0x10,0x134A, "\x82\x8A\x83\xE4\x93\xA3\xF2\x08\xDF\xF9\x80\xD6\x88\xF0\xED\x24"}, {0x10,0x135A, "\x02\xB4\x04\x00\x50\xCC\xF5\x82\xEB\x24\x02\xB4\x04\x00\x50\xC2"}, {0x10,0x136A, "\x23\x23\x45\x82\xF5\x82\xEF\x4E\x60\xB8\xEF\x60\x01\x0E\xE5\x82"}, {0x05,0x137A, "\x23\x90\x12\xEA\x73"}, {0x01,0x7F92, "\x00"}, {0x01,0x7F92, "\x01"}, {0x03,0x0043, "\x02\x03\x00"}, {0x10,0x0300, "\x02\x0D\xF8\x00\x02\x0E\x2D\x00\x02\x0E\x12\x00\x02\x0E\x9B\x00"}, {0x10,0x0310, "\x02\x0E\x78\x00\x02\x02\xFA\x00\x02\x02\xFB\x00\x02\x02\xFC\x00"}, {0x10,0x0320, "\x02\x0E\xB3\x00\x02\x02\xFD\x00\x02\x02\xFE\x00\x02\x02\xFF\x00"}, {0x10,0x0330, "\x02\x0E\xC9\x00\x02\x0E\xCA\x00\x02\x0E\xCB\x00\x02\x0E\xCC\x00"}, {0x10,0x0340, "\x02\x0E\xCD\x00\x02\x0E\xCE\x00\x02\x0E\xCF\x00\x02\x0E\xD0\x00"}, {0x08,0x0350, "\x02\x0E\xD1\x00\x02\x0E\xD2\x00"}, {0x10,0x02DD, "\xC1\x12\xC1\x1B\xC1\x10\xC1\x17\x01\x53\x00\x01\x54\x00\x01\x52"}, {0x04,0x02ED, "\x64\x01\x50\x00"}, {0x03,0x000B, "\x02\x03\x58"}, {0x10,0x0358, "\xC0\xE0\xC0\xF0\xC0\x83\xC0\x82\xC0\xD0\xC0\x00\xC0\x05\xC0\x06"}, {0x10,0x0368, "\xC0\x07\x90\x7F\x9B\xE0\xF5\x20\x74\x29\x25\x54\xF8\xE6\x75\x4E"}, {0x10,0x0378, "\x00\xF5\x4F\x75\x4F\x00\xF5\x4E\x74\x28\x25\x54\xF8\xE6\x42\x4F"}, {0x10,0x0388, "\xE4\xE5\x4E\xC4\xF8\x54\xF0\xC8\x68\xF5\x4E\xE5\x4F\xC4\x54\x0F"}, {0x10,0x0398, "\x48\xF5\x4F\xE5\x4E\x20\xE3\x15\x53\x4E\x07\x74\xD3\x25\x4F\xF5"}, {0x10,0x03A8, "\x82\xE5\x4E\x34\x10\xF5\x83\xE4\x93\xF5\x25\x80\x28\xE5\x4F\xF4"}, {0x10,0x03B8, "\xFF\xE5\x4E\xF4\x54\x07\xF5\x4E\x8F\x4F\x05\x4F\xE5\x4F\x70\x02"}, {0x10,0x03C8, "\x05\x4E\x74\xD3\x25\x4F\xF5\x82\xE5\x4E\x34\x10\xF5\x83\xE4\x93"}, {0x10,0x03D8, "\xF5\x25\x53\x25\xFE\x05\x54\x05\x54\xE5\x54\xC3\x94\x10\x40\x03"}, {0x10,0x03E8, "\x75\x54\x0E\xD2\x02\x90\x7F\x98\xE5\x20\xF0\xD2\x9C\xC2\x02\xD2"}, {0x10,0x03F8, "\x03\x30\x98\xFD\xC2\x98\xC2\x9C\x85\x99\x24\x90\x7F\x98\xE5\x20"}, {0x10,0x0408, "\xF0\x85\x25\x99\xC2\x03\x30\x99\xFD\xC2\x99\x90\x7F\x98\xE5\x20"}, {0x10,0x0418, "\xF0\x74\x38\x25\x53\xF8\xA6\x24\x05\x53\x30\x19\x36\x20\x17\x33"}, {0x10,0x0428, "\xC2\x19\xE4\xFD\x74\x38\x2D\xF8\xE6\xF5\x26\x75\xF0\x02\xA4\x24"}, {0x10,0x0438, "\xD3\xF5\x82\xE5\xF0\x34\x0E\xF5\x83\xE4\x93\xFE\x74\x01\x93\x8E"}, {0x10,0x0448, "\x44\xF5\x45\x90\x7F\x68\xF0\xE5\x44\xF0\x0D\xBD\x08\xD6\xE4\xF5"}, {0x10,0x0458, "\x53\x80\x0A\xE5\x53\xD3\x94\x07\x40\x03\x75\x53\x07\xD0\x07\xD0"}, {0x10,0x0468, "\x06\xD0\x05\xD0\x00\xD0\xD0\xD0\x82\xD0\x83\xD0\xF0\xD0\xE0\x32"}, {0x10,0x0478, "\xE4\xF5\x0E\xF5\x0F\x90\x7F\x99\xE0\x20\xE0\x20\x75\x0E\x80\x75"}, {0x10,0x0488, "\x0F\x00\xE0\x30\xE4\x03\x02\x05\x18\x7F\xE8\x7E\x03\x12\x19\x19"}, {0x10,0x0498, "\x90\x7F\x99\xE0\x54\x11\x70\x78\xD2\x10\x80\x74\x90\x7F\x99\xE0"}, {0x10,0x04A8, "\x20\xE1\x08\x75\x0E\x80\x75\x0F\x02\x80\x65\x90\x7F\x99\xE0\x20"}, {0x10,0x04B8, "\xE2\x08\x75\x0E\x80\x75\x0F\x01\x80\x56\x90\x7F\x99\xE0\x20\xE4"}, {0x10,0x04C8, "\x08\x75\x0E\x80\x75\x0F\x03\x80\x47\x90\x7F\x99\xE0\x20\xE5\x08"}, {0x10,0x04D8, "\x75\x0E\x80\x75\x0F\x04\x80\x38\x7D\x08\xED\xD3\x94\x00\x40\x30"}, {0x10,0x04E8, "\xED\xF4\x90\x7F\x97\xF0\x90\x7F\x9A\xE0\xFC\xC4\x54\x0F\xFC\xE5"}, {0x10,0x04F8, "\x0F\xC4\xF8\x54\x0F\xC8\x68\xFF\xE5\x0E\xC4\x54\xF0\x48\xFE\xEC"}, {0x10,0x0508, "\x54\x0F\xFB\xEE\xF5\x0E\xEF\x4B\xF5\x0F\xED\xC3\x13\xFD\x80\xCA"}, {0x10,0x0518, "\xE5\x0F\xB4\xFF\x0A\xE5\x0E\xB4\xFF\x05\xE4\xF5\x42\xF5\x43\xE5"}, {0x10,0x0528, "\x0F\x65\x4B\x70\x04\xE5\x0E\x65\x4A\x60\x06\xAE\x0E\xAF\x0F\x80"}, {0x0C,0x0538, "\x04\x7E\x00\x7F\x00\x85\x0E\x4A\x85\x0F\x4B\x22"}, {0x10,0x0544, "\xC2\x1D\xD2\x1E\x75\x89\x12\xE4\xF5\x8E\x75\x8C\x05\x75\x8B\x5F"}, {0x10,0x0554, "\x75\x8D\xFE\xD2\xA9\xC2\xAC\xC2\xAB\x90\x7F\x93\x74\x40\xF0\x90"}, {0x10,0x0564, "\x7F\x9C\x74\x88\xF0\x90\x7F\x96\xE0\x54\x7F\xF0\x7F\xE8\x7E\x03"}, {0x10,0x0574, "\x12\x19\x19\x90\x7F\x96\xE0\x44\x80\xF0\x90\x1C\x06\x74\x01\xF0"}, {0x10,0x0584, "\xE4\x90\x7F\x94\xF0\x90\x7F\x9D\x74\x0F\xF0\x90\x7F\x95\x74\x03"}, {0x10,0x0594, "\xF0\x90\x7F\x9E\x74\x0C\xF0\xE4\xF5\x98\xC2\x1C\xC2\x13\xC2\x1A"}, {0x10,0x05A4, "\xC2\x14\x12\x0B\x8D\xD2\xE8\x43\xD8\x20\x90\x7F\xAB\x74\xFF\xF0"}, {0x10,0x05B4, "\x90\x7F\xA9\xF0\x90\x7F\xAA\xF0\x53\x91\xEF\x90\x7F\xAF\xE0\x44"}, {0x10,0x05C4, "\x01\xF0\x7F\xD0\x7E\x07\x12\x19\x19\x53\x91\xEF\x90\x7F\x96\xE0"}, {0x10,0x05D4, "\x54\x7F\xF0\xE4\x90\x1C\x06\xF0\x53\xD8\xDF\x90\x7F\x92\xE0\x54"}, {0x10,0x05E4, "\xFD\xF0\xD2\xAF\x20\x14\x4C\x75\x0D\x00\x75\x0C\x00\x75\x0B\x00"}, {0x10,0x05F4, "\x75\x0A\x00\x7F\x48\x7E\x92\x7D\x00\x7C\x00\xAB\x0D\xAA\x0C\xA9"}, {0x10,0x0604, "\x0B\xA8\x0A\xC3\x12\x1A\xCA\x50\x20\x20\x14\x1D\x7A\x00\x79\x00"}, {0x10,0x0614, "\x78\x00\xE5\x0D\x24\x01\xF5\x0D\xEA\x35\x0C\xF5\x0C\xE9\x35\x0B"}, {0x10,0x0624, "\xF5\x0B\xE8\x35\x0A\xF5\x0A\x80\xCA\x20\x14\xB8\xD2\x1F\x12\x18"}, {0x10,0x0634, "\xF4\x80\xB1\x30\x14\x08\x12\x07\xA6\xC2\x14\x02\x07\x48\x12\x04"}, {0x10,0x0644, "\x78\x8E\x4C\x8F\x4D\xE5\x4D\x45\x4C\x70\x03\x02\x07\x11\x90\x1C"}, {0x10,0x0654, "\x07\xE5\x4C\xF0\xA3\xE5\x4D\xF0\x75\x0D\x00\x75\x0C\x00\x75\x0B"}, {0x10,0x0664, "\x00\x75\x0A\x00\x7F\xC8\x7E\x00\x7D\x00\x7C\x00\xAB\x0D\xAA\x0C"}, {0x10,0x0674, "\xA9\x0B\xA8\x0A\xC3\x12\x1A\xCA\x50\x1D\x7A\x00\x79\x00\x78\x00"}, {0x10,0x0684, "\xE5\x0D\x24\x01\xF5\x0D\xEA\x35\x0C\xF5\x0C\xE9\x35\x0B\xF5\x0B"}, {0x10,0x0694, "\xE8\x35\x0A\xF5\x0A\x80\xCD\x12\x04\x78\x8E\x4C\x8F\x4D\xE5\x4D"}, {0x10,0x06A4, "\x45\x4C\x70\x0B\x90\x1C\x07\xE0\xFE\xA3\xE0\xFF\x12\x0A\x6B\x20"}, {0x10,0x06B4, "\x16\x03\x02\x07\x48\xC2\x16\x90\x1C\x04\xE0\x65\x42\x70\x04\xA3"}, {0x10,0x06C4, "\xE0\x65\x43\x70\x03\x02\x07\x48\x12\x0B\xC3\xE4\xF5\x40\xF5\x41"}, {0x10,0x06D4, "\xC2\x18\xF5\x0D\xF5\x0C\xF5\x0B\xF5\x0A\x7F\xE8\x7E\x03\x7D\x00"}, {0x10,0x06E4, "\x7C\x00\xAB\x0D\xAA\x0C\xA9\x0B\xA8\x0A\xC3\x12\x1A\xCA\x50\x54"}, {0x10,0x06F4, "\x7A\x00\x79\x00\x78\x00\xE5\x0D\x24\x01\xF5\x0D\xEA\x35\x0C\xF5"}, {0x10,0x0704, "\x0C\xE9\x35\x0B\xF5\x0B\xE8\x35\x0A\xF5\x0A\x80\xCD\x30\x10\x07"}, {0x10,0x0714, "\xC2\x10\xD2\x1F\x12\x18\xF4\x30\x18\x1D\xE5\x52\x60\x26\x75\xF0"}, {0x10,0x0724, "\x04\xA4\xFF\xC3\xE5\x41\x9F\xE5\x40\x95\xF0\x40\x17\x12\x0B\xC3"}, {0x10,0x0734, "\xE4\xF5\x40\xF5\x41\x80\x0D\xC3\xE5\x41\x94\xE8\xE5\x40\x94\x03"}, {0x10,0x0744, "\x40\x02\xD2\x18\x30\x11\x37\xC2\x11\xC2\xAF\xE5\x51\x54\x01\xFF"}, {0x10,0x0754, "\xBF\x01\x0F\x90\x7F\x96\xE0\x44\x80\xF0\x90\x1C\x06\x74\x01\xF0"}, {0x10,0x0764, "\x80\x0C\x90\x7F\x96\xE0\x54\x7F\xF0\xE4\x90\x1C\x06\xF0\xE5\x51"}, {0x10,0x0774, "\x54\x02\xFF\xBF\x02\x04\xD2\x17\x80\x02\xC2\x17\xD2\xAF\x20\x1C"}, {0x10,0x0784, "\x03\x02\x06\x37\x90\x7F\x96\xE0\x54\x7F\xF0\x12\x18\xD3\x90\x1C"}, {0x0E,0x0794, "\x06\xE0\xB4\x01\x07\x90\x7F\x96\xE0\x44\x80\xF0\xC2\x1C"}, {0x04,0x07A2, "\x02\x06\x37\x22"}, {0x10,0x07A6, "\x90\x7F\xE8\xE0\x54\x60\xFF\xC4\x13\x54\x07\x60\x03\x02\x0A\x1D"}, {0x10,0x07B6, "\xA3\xE0\x70\x03\x02\x08\xC1\x14\x70\x03\x02\x09\x3D\x24\xFE\x70"}, {0x10,0x07C6, "\x03\x02\x09\xB3\x24\xFB\x70\x03\x02\x08\xB2\x14\x70\x03\x02\x08"}, {0x10,0x07D6, "\x93\x14\x70\x03\x02\x08\x87\x14\x70\x03\x02\x08\x8D\x24\x05\x60"}, {0x10,0x07E6, "\x03\x02\x0A\x0F\x12\x02\xF2\x40\x03\x02\x0A\x63\x90\x7F\xEB\xE0"}, {0x10,0x07F6, "\x24\xFE\x60\x1A\x14\x60\x53\x24\xE1\x60\x40\x24\x21\x70\x78\x74"}, {0x10,0x0806, "\x01\x90\x7F\xD4\xF0\x74\x14\x90\x7F\xD5\xF0\x02\x0A\x63\x90\x7F"}, {0x10,0x0816, "\xEA\xE0\xFF\x12\x19\x71\x8B\x0E\x8A\x0F\x89\x10\xEA\x49\x60\x11"}, {0x10,0x0826, "\xAE\x02\xEE\x90\x7F\xD4\xF0\xAF\x01\xEF\x90\x7F\xD5\xF0\x02\x0A"}, {0x10,0x0836, "\x63\x90\x7F\xB4\xE0\x44\x01\xF0\x02\x0A\x63\x74\x01\x90\x7F\xD4"}, {0x10,0x0846, "\xF0\x74\xED\x90\x7F\xD5\xF0\x02\x0A\x63\x90\x7F\xEA\xE0\xFF\x12"}, {0x10,0x0856, "\x19\x30\x8B\x0E\x8A\x0F\x89\x10\xEA\x49\x60\x11\xAE\x02\xEE\x90"}, {0x10,0x0866, "\x7F\xD4\xF0\xAF\x01\xEF\x90\x7F\xD5\xF0\x02\x0A\x63\x90\x7F\xB4"}, {0x10,0x0876, "\xE0\x44\x01\xF0\x02\x0A\x63\x90\x7F\xB4\xE0\x44\x01\xF0\x02\x0A"}, {0x10,0x0886, "\x63\x12\x0B\xF9\x02\x0A\x63\x12\x0B\xE3\x02\x0A\x63\x90\x7F\xEA"}, {0x10,0x0896, "\xE0\xF5\x50\xE4\x90\x1C\x00\xF0\xA3\xF0\xA3\xF0\xA3\xF0\xD2\x1B"}, {0x10,0x08A6, "\x90\x7F\xAE\xE0\x44\x02\xF0\xD2\x8C\x02\x0A\x63\x90\x7F\x00\xE5"}, {0x10,0x08B6, "\x50\xF0\x90\x7F\xB5\x74\x01\xF0\x02\x0A\x63\x12\x02\xF4\x40\x03"}, {0x10,0x08C6, "\x02\x0A\x63\x90\x7F\xE8\xE0\x24\x7F\x60\x24\x14\x60\x31\x24\x02"}, {0x10,0x08D6, "\x70\x5B\xA2\x13\xE4\x33\xFF\x25\xE0\xFF\xA2\x1A\xE4\x33\x4F\x90"}, {0x10,0x08E6, "\x7F\x00\xF0\xE4\xA3\xF0\x90\x7F\xB5\x74\x02\xF0\x02\x0A\x63\xE4"}, {0x10,0x08F6, "\x90\x7F\x00\xF0\xA3\xF0\x90\x7F\xB5\x74\x02\xF0\x02\x0A\x63\x90"}, {0x10,0x0906, "\x7F\xEC\xE0\xF4\x54\x80\xFF\xC4\x54\x0F\xFF\xE0\x54\x07\x2F\x25"}, {0x10,0x0916, "\xE0\x24\xB4\xF5\x82\xE4\x34\x7F\xF5\x83\xE0\x54\xFD\x90\x7F\x00"}, {0x10,0x0926, "\xF0\xE4\xA3\xF0\x90\x7F\xB5\x74\x02\xF0\x02\x0A\x63\x90\x7F\xB4"}, {0x10,0x0936, "\xE0\x44\x01\xF0\x02\x0A\x63\x12\x02\xF6\x40\x03\x02\x0A\x63\x90"}, {0x10,0x0946, "\x7F\xE8\xE0\x24\xFE\x60\x1D\x24\x02\x60\x03\x02\x0A\x63\x90\x7F"}, {0x10,0x0956, "\xEA\xE0\xB4\x01\x05\xC2\x13\x02\x0A\x63\x90\x7F\xB4\xE0\x44\x01"}, {0x10,0x0966, "\xF0\x02\x0A\x63\x90\x7F\xEA\xE0\x70\x39\x90\x7F\xEC\xE0\xF4\x54"}, {0x10,0x0976, "\x80\xFF\xC4\x54\x0F\xFF\xE0\x54\x07\x2F\x25\xE0\x24\xB4\xF5\x82"}, {0x10,0x0986, "\xE4\x34\x7F\xF5\x83\xE4\xF0\x90\x7F\xEC\xE0\x54\x80\xFF\x13\x13"}, {0x10,0x0996, "\x13\x54\x1F\xFF\xE0\x54\x07\x2F\x90\x7F\xD7\xF0\xE0\x44\x20\xF0"}, {0x10,0x09A6, "\x02\x0A\x63\x90\x7F\xB4\xE0\x44\x01\xF0\x02\x0A\x63\x12\x02\xF8"}, {0x10,0x09B6, "\x40\x03\x02\x0A\x63\x90\x7F\xE8\xE0\x24\xFE\x60\x1D\x24\x02\x60"}, {0x10,0x09C6, "\x03\x02\x0A\x63\x90\x7F\xEA\xE0\xB4\x01\x05\xD2\x13\x02\x0A\x63"}, {0x10,0x09D6, "\x90\x7F\xB4\xE0\x44\x01\xF0\x02\x0A\x63\x90\x7F\xEA\xE0\x70\x20"}, {0x10,0x09E6, "\x90\x7F\xEC\xE0\xF4\x54\x80\xFF\xC4\x54\x0F\xFF\xE0\x54\x07\x2F"}, {0x10,0x09F6, "\x25\xE0\x24\xB4\xF5\x82\xE4\x34\x7F\xF5\x83\x74\x01\xF0\x80\x5D"}, {0x10,0x0A06, "\x90\x7F\xB4\xE0\x44\x01\xF0\x80\x54\x12\x0C\x13\x50\x4F\x90\x7F"}, {0x10,0x0A16, "\xB4\xE0\x44\x01\xF0\x80\x46\x90\x7F\xE8\xE0\x54\x60\xFF\xC4\x13"}, {0x10,0x0A26, "\x54\x07\xFF\xBF\x02\x0E\x12\x0C\x13\x50\x32\x90\x7F\xB4\xE0\x44"}, {0x10,0x0A36, "\x01\xF0\x80\x29\x90\x7F\xE8\xE0\x54\x60\xFF\xC4\x13\x54\x07\xFF"}, {0x10,0x0A46, "\xBF\x01\x0E\x12\x0C\x13\x50\x15\x90\x7F\xB4\xE0\x44\x01\xF0\x80"}, {0x10,0x0A56, "\x0C\x12\x0C\x13\x50\x07\x90\x7F\xB4\xE0\x44\x01\xF0\x90\x7F\xB4"}, {0x05,0x0A66, "\xE0\x44\x02\xF0\x22"}, {0x10,0x0A6B, "\x8E\x0E\x8F\x0F\xE5\x0F\xF4\x70\x03\xE5\x0E\xF4\x70\x03\x02\x0B"}, {0x10,0x0A7B, "\x76\xD2\x15\xD2\x16\xE5\x0F\x85\x0E\xF0\x12\x1A\xDB\x0B\x49\x7F"}, {0x10,0x0A8B, "\xFF\x0B\x50\x80\x00\x0B\x57\x80\x01\x0B\x5E\x80\x02\x0B\x65\x80"}, {0x10,0x0A9B, "\x03\x0B\x6C\x80\x04\x0B\x42\xBF\xFF\x0B\x3B\xDF\xFF\x0B\x34\xEF"}, {0x10,0x0AAB, "\xFF\x0B\x2D\xF7\xFF\x0B\x26\xFB\xFF\x0B\x1F\xFD\xFF\x0B\x18\xFE"}, {0x10,0x0ABB, "\xFF\x0B\x11\xFF\x7F\x0B\x0A\xFF\xBF\x0B\x03\xFF\xDF\x0A\xFC\xFF"}, {0x10,0x0ACB, "\xEF\x0A\xF5\xFF\xF7\x0A\xEE\xFF\xFB\x0A\xE7\xFF\xFD\x0A\xE0\xFF"}, {0x10,0x0ADB, "\xFE\x00\x00\x0B\x73\x75\x42\x00\x75\x43\x20\x22\x75\x42\x00\x75"}, {0x10,0x0AEB, "\x43\x30\x22\x75\x42\x02\x75\x43\x00\x22\x75\x42\x00\x75\x43\x0B"}, {0x10,0x0AFB, "\x22\x75\x42\x00\x75\x43\x01\x22\x75\x42\x00\x75\x43\x0C\x22\x75"}, {0x10,0x0B0B, "\x42\x00\x75\x43\x08\x22\x75\x42\x00\x75\x43\x09\x22\x75\x42\x00"}, {0x10,0x0B1B, "\x75\x43\x0A\x22\x75\x42\x00\x75\x43\x05\x22\x75\x42\x00\x75\x43"}, {0x10,0x0B2B, "\x06\x22\x75\x42\x00\x75\x43\x07\x22\x75\x42\x00\x75\x43\x02\x22"}, {0x10,0x0B3B, "\x75\x42\x00\x75\x43\x03\x22\x75\x42\x00\x75\x43\x04\x22\x75\x42"}, {0x10,0x0B4B, "\x00\x75\x43\x10\x22\x75\x42\x00\x75\x43\x80\x22\x75\x42\x01\x75"}, {0x10,0x0B5B, "\x43\x00\x22\x75\x42\x01\x75\x43\x80\x22\x75\x42\x00\x75\x43\x40"}, {0x10,0x0B6B, "\x22\x75\x42\x04\x75\x43\x00\x22\xC2\x16\x22\xE5\x0F\xB4\xFF\x11"}, {0x10,0x0B7B, "\xE5\x0E\xB4\xFF\x0C\xE4\xF5\x42\xF5\x43\x30\x15\x04\xC2\x15\xD2"}, {0x02,0x0B8B, "\x16\x22"}, {0x10,0x0B8D, "\x90\x7F\xAE\x74\x1D\xF0\x90\x7F\xDE\x74\x02\xF0\x90\x7F\xAC\xF0"}, {0x10,0x0B9D, "\x90\x7F\xE0\xE0\x44\x01\xF0\x90\x7F\xF8\x74\x08\xF0\x90\x7F\xE1"}, {0x10,0x0BAD, "\xE0\x44\x01\xF0\xE4\x90\x7F\xF0\xF0\xC2\x13\x90\x1C\x00\xF0\xA3"}, {0x06,0x0BBD, "\xF0\xA3\xF0\xA3\xF0\x22"}, {0x10,0x0BC3, "\x90\x1C\x04\xE5\x42\xF0\xA3\xE5\x43\xF0\x85\x42\x46\xF5\x47\x90"}, {0x10,0x0BD3, "\x7E\x80\xE5\x47\xF0\xE5\x46\xA3\xF0\x90\x7F\xB7\x74\x02\xF0\x22"}, {0x02,0x02F2, "\xD3\x22"}, {0x10,0x0BE3, "\x90\x7F\xEA\xE0\xFF\x90\x7F\xEC\xE0\x24\x00\xF5\x82\xE4\x34\x1C"}, {0x06,0x0BF3, "\xF5\x83\xEF\xF0\xD3\x22"}, {0x10,0x0BF9, "\x90\x7F\xEC\xE0\x24\x00\xF5\x82\xE4\x34\x1C\xF5\x83\xE0\x90\x7F"}, {0x0A,0x0C09, "\x00\xF0\x90\x7F\xB5\x74\x01\xF0\xD3\x22"}, {0x02,0x02F4, "\xD3\x22"}, {0x02,0x02F6, "\xD3\x22"}, {0x02,0x02F8, "\xD3\x22"}, {0x10,0x0C13, "\x90\x7F\xA5\xE0\x54\x10\xFF\xC4\x54\x0F\x44\x50\xF5\x08\x13\xE4"}, {0x10,0x0C23, "\x33\xF5\x09\x90\x7F\xEA\xE0\x75\x11\x00\xF5\x12\xA3\xE0\xFE\xE4"}, {0x10,0x0C33, "\xEE\x42\x11\x90\x7F\xEE\xE0\xFD\x7C\x00\xA3\xE0\xFE\xE4\xEE\xFC"}, {0x10,0x0C43, "\x90\x7F\xE8\xE0\x30\xE7\x04\x7F\x01\x80\x02\x7F\x00\xEF\x64\x01"}, {0x10,0x0C53, "\x60\x03\x02\x0D\x1C\xED\x4C\x70\x03\x02\x0D\xF6\xC3\xED\x94\x40"}, {0x10,0x0C63, "\xEC\x94\x00\x50\x06\x8C\x13\x8D\x14\x80\x06\x75\x13\x00\x75\x14"}, {0x10,0x0C73, "\x40\x90\x7F\xE9\xE0\xB4\x01\x12\x85\x42\x46\x85\x43\x47\x90\x7F"}, {0x10,0x0C83, "\x00\xE5\x47\xF0\xE5\x46\xA3\xF0\x80\x46\x90\x7F\xE9\xE0\xB4\x02"}, {0x10,0x0C93, "\x20\xE4\xFA\xFB\xC3\xEB\x95\x14\xEA\x95\x13\x50\x33\x74\x00\x2B"}, {0x10,0x0CA3, "\xF5\x82\xE4\x34\x7F\xF5\x83\xE5\x52\xF0\x0B\xBB\x00\x01\x0A\x80"}, {0x10,0x0CB3, "\xE3\xE4\xFA\xFB\xC3\xEB\x95\x14\xEA\x95\x13\x50\x13\x74\x00\x2B"}, {0x10,0x0CC3, "\xF5\x82\xE4\x34\x7F\xF5\x83\xE4\xF0\x0B\xBB\x00\x01\x0A\x80\xE4"}, {0x10,0x0CD3, "\x90\x7F\xB5\xE5\x14\xF0\xE5\x14\x25\x12\xF5\x12\xE5\x13\x35\x11"}, {0x10,0x0CE3, "\xF5\x11\xC3\xED\x95\x14\xFD\xEC\x95\x13\xFC\x90\x7F\x92\xE0\xFF"}, {0x10,0x0CF3, "\xC4\x54\x0F\x75\x15\x00\xF5\x16\xD3\x94\x00\xE5\x15\x94\x00\x50"}, {0x10,0x0D03, "\x0C\x90\x7F\xB4\xE0\x20\xE1\x03\x02\x0C\x58\x80\xF4\x90\x7F\xB4"}, {0x10,0x0D13, "\xE0\x20\xE2\x03\x02\x0C\x58\x80\xF4\x90\x7F\xE8\xE0\x30\xE7\x04"}, {0x10,0x0D23, "\x7F\x01\x80\x02\x7F\x00\xEF\x60\x03\x02\x0D\xF6\xED\x4C\x70\x03"}, {0x10,0x0D33, "\x02\x0D\xF6\xE4\x90\x7F\xC5\xF0\x90\x7F\x92\xE0\xFF\xC4\x54\x0F"}, {0x10,0x0D43, "\x75\x15\x00\xF5\x16\xD3\x94\x00\xE5\x15\x94\x00\x50\x09\x90\x7F"}, {0x10,0x0D53, "\xC4\xE0\x30\xE1\x09\x80\xF7\x90\x7F\xB4\xE0\x20\xE3\xF9\x90\x7F"}, {0x10,0x0D63, "\xC5\xE0\x75\x13\x00\xF5\x14\x90\x7F\xE9\xE0\xB4\x09\x24\xE4\xFA"}, {0x10,0x0D73, "\xFB\xC3\xEB\x95\x14\xEA\x95\x13\x50\x14\x74\xC0\x2B\xF5\x82\xE4"}, {0x10,0x0D83, "\x34\x7E\xF5\x83\xE0\xF5\x51\x0B\xBB\x00\x01\x0A\x80\xE3\xD2\x11"}, {0x10,0x0D93, "\x80\x49\x90\x7F\xE9\xE0\xB4\x0A\x20\xE4\xFA\xFB\xC3\xEB\x95\x14"}, {0x10,0x0DA3, "\xEA\x95\x13\x50\x36\x74\xC0\x2B\xF5\x82\xE4\x34\x7E\xF5\x83\xE0"}, {0x10,0x0DB3, "\xF5\x52\x0B\xBB\x00\x01\x0A\x80\xE3\xE4\xFA\xFB\xC3\xEB\x95\x14"}, {0x10,0x0DC3, "\xEA\x95\x13\x50\x16\x74\xC0\x2B\xF5\x82\xE4\x34\x7E\xF5\x83\xE0"}, {0x10,0x0DD3, "\x90\x1C\x09\xF0\x0B\xBB\x00\x01\x0A\x80\xE1\xE5\x14\x25\x12\xF5"}, {0x10,0x0DE3, "\x12\xE5\x13\x35\x11\xF5\x11\xC3\xED\x95\x14\xFD\xEC\x95\x13\xFC"}, {0x05,0x0DF3, "\x02\x0D\x2F\xC3\x22"}, {0x10,0x0DF8, "\xC0\xE0\xC0\x83\xC0\x82\xD2\x14\x53\x91\xEF\x90\x7F\xAB\x74\x01"}, {0x0A,0x0E08, "\xF0\xC2\x12\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x10,0x0E12, "\xC0\xE0\xC0\x83\xC0\x82\xE4\x90\x7F\xC4\xF0\x53\x91\xEF\x90\x7F"}, {0x0B,0x0E22, "\xAB\x74\x04\xF0\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x10,0x0E2D, "\xC0\xE0\xC0\x83\xC0\x82\xC0\xD0\xC0\x00\xC0\x06\xC0\x07\x53\x91"}, {0x10,0x0E3D, "\xEF\x90\x7F\xAB\x74\x02\xF0\xD2\x19\xC2\xAF\xE4\xFF\x90\x7F\x60"}, {0x10,0x0E4D, "\xE0\xFE\x74\x28\x2F\xF8\xA6\x06\x0F\xBF\x10\xF1\xE4\xF5\x54\x75"}, {0x10,0x0E5D, "\x8A\xFF\xD2\xAF\x05\x41\xE5\x41\x70\x02\x05\x40\xD0\x07\xD0\x06"}, {0x0B,0x0E6D, "\xD0\x00\xD0\xD0\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x10,0x0E78, "\xC0\xE0\xC0\x83\xC0\x82\x53\x91\xEF\x90\x7F\xAB\x74\x10\xF0\x90"}, {0x10,0x0E88, "\x7F\xAE\xE0\x54\xFD\xF0\xC2\x8C\xC2\x1B\xC2\x12\xD0\x82\xD0\x83"}, {0x03,0x0E98, "\xD0\xE0\x32"}, {0x01,0x02FA, "\x32"}, {0x10,0x0E9B, "\xC0\xE0\xC0\x83\xC0\x82\xD2\x1C\x53\x91\xEF\x90\x7F\xAB\x74\x08"}, {0x08,0x0EAB, "\xF0\xD0\x82\xD0\x83\xD0\xE0\x32"}, {0x01,0x02FB, "\x32"}, {0x01,0x02FC, "\x32"}, {0x10,0x0EB3, "\xC0\xE0\xC0\x83\xC0\x82\x53\x91\xEF\x90\x7F\xA9\x74\x02\xF0\xD0"}, {0x06,0x0EC3, "\x82\xD0\x83\xD0\xE0\x32"}, {0x01,0x02FD, "\x32"}, {0x01,0x02FE, "\x32"}, {0x01,0x02FF, "\x32"}, {0x01,0x0EC9, "\x32"}, {0x01,0x0ECA, "\x32"}, {0x01,0x0ECB, "\x32"}, {0x01,0x0ECC, "\x32"}, {0x01,0x0ECD, "\x32"}, {0x01,0x0ECE, "\x32"}, {0x01,0x0ECF, "\x32"}, {0x01,0x0ED0, "\x32"}, {0x01,0x0ED1, "\x32"}, {0x01,0x0ED2, "\x32"}, {0x10,0x0ED3, "\xEA\x80\x15\x80\xFE\xA8\x01\x58\xAA\x00\x56\x00\xFA\xA0\x05\x60"}, {0x10,0x0EE3, "\xF5\x40\x0A\xC0\xFF\xA8\x00\x58\xD5\x00\x2B\x00\xFD\x50\x02\xB0"}, {0x10,0x0EF3, "\xE2\x80\x1D\x80\xFE\x28\x01\xD8\x8A\x00\x76\x00\xF8\xA0\x07\x60"}, {0x10,0x0F03, "\xF1\x40\x0E\xC0\xFF\x28\x00\xD8\xC5\x00\x3B\x00\xFC\x50\x03\xB0"}, {0x10,0x0F13, "\xEE\x80\x11\x80\xFE\xE8\x01\x18\xBA\x00\x46\x00\xFB\xA0\x04\x60"}, {0x10,0x0F23, "\xF7\x40\x08\xC0\xFF\xE8\x00\x18\xDD\x00\x23\x00\xFD\xD0\x02\x30"}, {0x10,0x0F33, "\xE6\x80\x19\x80\xFE\x68\x01\x98\x9A\x00\x66\x00\xF9\xA0\x06\x60"}, {0x10,0x0F43, "\xF3\x40\x0C\xC0\xFF\x68\x00\x98\xCD\x00\x33\x00\xFC\xD0\x03\x30"}, {0x10,0x0F53, "\xE8\x80\x17\x80\xFE\x88\x01\x78\xA2\x00\x5E\x00\xFA\x20\x05\xE0"}, {0x10,0x0F63, "\xF4\x40\x0B\xC0\xFF\x88\x00\x78\xD1\x00\x2F\x00\xFD\x10\x02\xF0"}, {0x10,0x0F73, "\xE0\x80\x1F\x80\xFE\x08\x01\xF8\x82\x00\x7E\x00\xF8\x20\x07\xE0"}, {0x10,0x0F83, "\xF0\x40\x0F\xC0\xFF\x08\x00\xF8\xC1\x00\x3F\x00\xFC\x10\x03\xF0"}, {0x10,0x0F93, "\xEC\x80\x13\x80\xFE\xC8\x01\x38\xB2\x00\x4E\x00\xFB\x20\x04\xE0"}, {0x10,0x0FA3, "\xF6\x40\x09\xC0\xFF\xC8\x00\x38\xD9\x00\x27\x00\xFD\x90\x02\x70"}, {0x10,0x0FB3, "\xE4\x80\x1B\x80\xFE\x48\x01\xB8\x92\x00\x6E\x00\xF9\x20\x06\xE0"}, {0x10,0x0FC3, "\xF2\x40\x0D\xC0\xFF\x48\x00\xB8\xC9\x00\x37\x00\xFC\x90\x03\x70"}, {0x10,0x0FD3, "\xEB\x80\x14\x80\xFE\xB8\x01\x48\xAE\x00\x52\x00\xFA\xE0\x05\x20"}, {0x10,0x0FE3, "\xF5\xC0\x0A\x40\xFF\xB8\x00\x48\xD7\x00\x29\x00\xFD\x70\x02\x90"}, {0x10,0x0FF3, "\xE3\x80\x1C\x80\xFE\x38\x01\xC8\x8E\x00\x72\x00\xF8\xE0\x07\x20"}, {0x10,0x1003, "\xF1\xC0\x0E\x40\xFF\x38\x00\xC8\xC7\x00\x39\x00\xFC\x70\x03\x90"}, {0x10,0x1013, "\xEF\x80\x10\x80\xFE\xF8\x01\x08\xBE\x00\x42\x00\xFB\xE0\x04\x20"}, {0x10,0x1023, "\xF7\xC0\x08\x40\xFF\xF8\x00\x08\xDF\x00\x21\x00\xFD\xF0\x02\x10"}, {0x10,0x1033, "\xE7\x80\x18\x80\xFE\x78\x01\x88\x9E\x00\x62\x00\xF9\xE0\x06\x20"}, {0x10,0x1043, "\xF3\xC0\x0C\x40\xFF\x78\x00\x88\xCF\x00\x31\x00\xFC\xF0\x03\x10"}, {0x10,0x1053, "\xE9\x80\x16\x80\xFE\x98\x01\x68\xA6\x00\x5A\x00\xFA\x60\x05\xA0"}, {0x10,0x1063, "\xF4\xC0\x0B\x40\xFF\x98\x00\x68\xD3\x00\x2D\x00\xFD\x30\x02\xD0"}, {0x10,0x1073, "\xE1\x80\x1E\x80\xFE\x18\x01\xE8\x86\x00\x7A\x00\xF8\x60\x07\xA0"}, {0x10,0x1083, "\xF0\xC0\x0F\x40\xFF\x18\x00\xE8\xC3\x00\x3D\x00\xFC\x30\x03\xD0"}, {0x10,0x1093, "\xED\x80\x12\x80\xFE\xD8\x01\x28\xB6\x00\x4A\x00\xFB\x60\x04\xA0"}, {0x10,0x10A3, "\xF6\xC0\x09\x40\xFF\xD8\x00\x28\xDB\x00\x25\x00\xFD\xB0\x02\x50"}, {0x10,0x10B3, "\xE5\x80\x1A\x80\xFE\x58\x01\xA8\x96\x00\x6A\x00\xF9\x60\x06\xA0"}, {0x10,0x10C3, "\xF2\xC0\x0D\x40\xFF\x58\x00\xA8\xCB\x00\x35\x00\xFC\xB0\x03\x50"}, {0x10,0x10D3, "\xAB\x2B\xEB\x6B\x8B\x0B\xCB\x4B\xBB\x3B\xFB\x7B\x9B\x1B\xDB\x5B"}, {0x10,0x10E3, "\xA3\x23\xE3\x63\x83\x03\xC3\x43\xB3\x33\xF3\x73\x93\x13\xD3\x53"}, {0x10,0x10F3, "\xAF\xAF\x2F\x2F\xEF\xEF\x6F\x6F\x8F\x8F\x0F\x0F\xCF\xCF\x4F\x4F"}, {0x10,0x1103, "\xBF\xBF\x3F\x3F\xFF\xFF\x7F\x7F\x9F\x9F\x1F\x1F\xDF\xDF\x5F\x5F"}, {0x10,0x1113, "\xA7\xA7\xA7\xA7\x27\x27\x27\x27\xE7\xE7\xE7\xE7\x67\x67\x67\x67"}, {0x10,0x1123, "\x87\x87\x87\x87\x07\x07\x07\x07\xC7\xC7\xC7\xC7\x47\x47\x47\x47"}, {0x10,0x1133, "\xB7\xB7\xB7\xB7\x37\x37\x37\x37\xF7\xF7\xF7\xF7\x77\x77\x77\x77"}, {0x10,0x1143, "\x97\x97\x97\x97\x17\x17\x17\x17\xD7\xD7\xD7\xD7\x57\x57\x57\x57"}, {0x10,0x1153, "\xA9\xA9\xA9\xA9\xA9\xA9\xA9\xA9\x29\x29\x29\x29\x29\x29\x29\x29"}, {0x10,0x1163, "\xE9\xE9\xE9\xE9\xE9\xE9\xE9\xE9\x69\x69\x69\x69\x69\x69\x69\x69"}, {0x10,0x1173, "\x89\x89\x89\x89\x89\x89\x89\x89\x09\x09\x09\x09\x09\x09\x09\x09"}, {0x10,0x1183, "\xC9\xC9\xC9\xC9\xC9\xC9\xC9\xC9\x49\x49\x49\x49\x49\x49\x49\x49"}, {0x10,0x1193, "\xB9\xB9\xB9\xB9\xB9\xB9\xB9\xB9\x39\x39\x39\x39\x39\x39\x39\x39"}, {0x10,0x11A3, "\xF9\xF9\xF9\xF9\xF9\xF9\xF9\xF9\x79\x79\x79\x79\x79\x79\x79\x79"}, {0x10,0x11B3, "\x99\x99\x99\x99\x99\x99\x99\x99\x19\x19\x19\x19\x19\x19\x19\x19"}, {0x10,0x11C3, "\xD9\xD9\xD9\xD9\xD9\xD9\xD9\xD9\x59\x59\x59\x59\x59\x59\x59\x59"}, {0x10,0x11D3, "\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1\xA1"}, {0x10,0x11E3, "\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21\x21"}, {0x10,0x11F3, "\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1\xE1"}, {0x10,0x1203, "\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61"}, {0x10,0x1213, "\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81\x81"}, {0x10,0x1223, "\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01"}, {0x10,0x1233, "\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1\xC1"}, {0x10,0x1243, "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41"}, {0x10,0x1253, "\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1\xB1"}, {0x10,0x1263, "\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31"}, {0x10,0x1273, "\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1\xF1"}, {0x10,0x1283, "\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71\x71"}, {0x10,0x1293, "\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91\x91"}, {0x10,0x12A3, "\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11"}, {0x06,0x12B3, "\xD1\xD1\xD1\xD1\xD1\xD1"}, {0x10,0x12B9, "\xD1\xD1\xD1\xD1\xD1\xD1\xD1\xD1\xD1\xD1\x51\x51\x51\x51\x51\x51"}, {0x10,0x12C9, "\x51\x51\x51\x51\x51\x51\x51\x51\x51\x51\xAD\xAD\xAD\xAD\xAD\xAD"}, {0x10,0x12D9, "\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD"}, {0x10,0x12E9, "\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\xAD\x2D\x2D\x2D\x2D\x2D\x2D"}, {0x10,0x12F9, "\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D"}, {0x10,0x1309, "\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\x2D\xED\xED\xED\xED\xED\xED"}, {0x10,0x1319, "\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED"}, {0x10,0x1329, "\xED\xED\xED\xED\xED\xED\xED\xED\xED\xED\x6D\x6D\x6D\x6D\x6D\x6D"}, {0x10,0x1339, "\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D"}, {0x10,0x1349, "\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x6D\x8D\x8D\x8D\x8D\x8D\x8D"}, {0x10,0x1359, "\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D"}, {0x10,0x1369, "\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x8D\x0D\x0D\x0D\x0D\x0D\x0D"}, {0x10,0x1379, "\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D"}, {0x10,0x1389, "\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\x0D\xCD\xCD\xCD\xCD\xCD\xCD"}, {0x10,0x1399, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD"}, {0x10,0x13A9, "\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\x4D\x4D\x4D\x4D\x4D\x4D"}, {0x10,0x13B9, "\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D"}, {0x10,0x13C9, "\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\x4D\xBD\xBD\xBD\xBD\xBD\xBD"}, {0x10,0x13D9, "\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD"}, {0x10,0x13E9, "\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\xBD\x3D\x3D\x3D\x3D\x3D\x3D"}, {0x10,0x13F9, "\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D"}, {0x10,0x1409, "\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\xFD\xFD\xFD\xFD\xFD\xFD"}, {0x10,0x1419, "\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD"}, {0x10,0x1429, "\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\xFD\x7D\x7D\x7D\x7D\x7D\x7D"}, {0x10,0x1439, "\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D"}, {0x10,0x1449, "\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x7D\x9D\x9D\x9D\x9D\x9D\x9D"}, {0x10,0x1459, "\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D"}, {0x10,0x1469, "\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x9D\x1D\x1D\x1D\x1D\x1D\x1D"}, {0x10,0x1479, "\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D"}, {0x10,0x1489, "\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\x1D\xDD\xDD\xDD\xDD\xDD\xDD"}, {0x10,0x1499, "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD"}, {0x10,0x14A9, "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD\x5D\x5D\x5D\x5D\x5D\x5D"}, {0x10,0x14B9, "\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D"}, {0x10,0x14C9, "\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\x5D\xA5\xA5\xA5\xA5\xA5\xA5"}, {0x10,0x14D9, "\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5"}, {0x10,0x14E9, "\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5"}, {0x10,0x14F9, "\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5"}, {0x10,0x1509, "\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\x25\x25\x25\x25\x25\x25"}, {0x10,0x1519, "\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25"}, {0x10,0x1529, "\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25"}, {0x10,0x1539, "\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25"}, {0x10,0x1549, "\x25\x25\x25\x25\x25\x25\x25\x25\x25\x25\xE5\xE5\xE5\xE5\xE5\xE5"}, {0x10,0x1559, "\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5"}, {0x10,0x1569, "\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5"}, {0x10,0x1579, "\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5"}, {0x10,0x1589, "\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\xE5\x65\x65\x65\x65\x65\x65"}, {0x10,0x1599, "\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65"}, {0x10,0x15A9, "\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65"}, {0x10,0x15B9, "\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65"}, {0x10,0x15C9, "\x65\x65\x65\x65\x65\x65\x65\x65\x65\x65\x85\x85\x85\x85\x85\x85"}, {0x10,0x15D9, "\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85"}, {0x10,0x15E9, "\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85"}, {0x10,0x15F9, "\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85"}, {0x10,0x1609, "\x85\x85\x85\x85\x85\x85\x85\x85\x85\x85\x05\x05\x05\x05\x05\x05"}, {0x10,0x1619, "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05"}, {0x10,0x1629, "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05"}, {0x10,0x1639, "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05"}, {0x10,0x1649, "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\xC5\xC5\xC5\xC5\xC5\xC5"}, {0x10,0x1659, "\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5"}, {0x10,0x1669, "\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5"}, {0x10,0x1679, "\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5"}, {0x10,0x1689, "\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\xC5\x45\x45\x45\x45\x45\x45"}, {0x06,0x1699, "\x45\x45\x45\x45\x45\x45"}, {0x10,0x169F, "\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45"}, {0x10,0x16AF, "\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45"}, {0x10,0x16BF, "\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45\x45"}, {0x10,0x16CF, "\x45\x45\x45\x45\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5"}, {0x10,0x16DF, "\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5"}, {0x10,0x16EF, "\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5"}, {0x10,0x16FF, "\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5\xB5"}, {0x10,0x170F, "\xB5\xB5\xB5\xB5\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35"}, {0x10,0x171F, "\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35"}, {0x10,0x172F, "\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35"}, {0x10,0x173F, "\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35\x35"}, {0x10,0x174F, "\x35\x35\x35\x35\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5"}, {0x10,0x175F, "\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5"}, {0x10,0x176F, "\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5"}, {0x10,0x177F, "\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5\xF5"}, {0x10,0x178F, "\xF5\xF5\xF5\xF5\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75"}, {0x10,0x179F, "\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75"}, {0x10,0x17AF, "\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75"}, {0x10,0x17BF, "\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75\x75"}, {0x10,0x17CF, "\x75\x75\x75\x75\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95"}, {0x10,0x17DF, "\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95"}, {0x10,0x17EF, "\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95"}, {0x10,0x17FF, "\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95\x95"}, {0x10,0x180F, "\x95\x95\x95\x95\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15"}, {0x10,0x181F, "\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15"}, {0x10,0x182F, "\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15"}, {0x10,0x183F, "\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15\x15"}, {0x10,0x184F, "\x15\x15\x15\x15\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5"}, {0x10,0x185F, "\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5"}, {0x10,0x186F, "\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5"}, {0x10,0x187F, "\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5\xD5"}, {0x10,0x188F, "\xD5\xD5\xD5\xD5\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55"}, {0x10,0x189F, "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55"}, {0x10,0x18AF, "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55"}, {0x10,0x18BF, "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55"}, {0x04,0x18CF, "\x55\x55\x55\x55"}, {0x10,0x0100, "\x59\x40\x70\x50\x68\x6F\x6E\x65\x20\x56\x31\x2E\x30\x20\x30\x33"}, {0x10,0x0110, "\x31\x33\x30\x30\x12\x01\x00\x01\x00\x00\x00\x40\x27\x15\x01\x02"}, {0x10,0x0120, "\x00\x01\x01\x02\x00\x01\x09\x02\xC7\x00\x04\x01\x00\x80\x32\x09"}, {0x10,0x0130, "\x04\x00\x00\x00\x01\x01\x00\x00\x0A\x24\x01\x00\x01\x34\x00\x02"}, {0x10,0x0140, "\x01\x02\x0C\x24\x02\x01\x01\x01\x04\x01\x00\x00\x00\x00\x0C\x24"}, {0x10,0x0150, "\x02\x02\x01\x02\x03\x01\x00\x00\x00\x00\x09\x24\x03\x03\x01\x03"}, {0x10,0x0160, "\x02\x01\x00\x09\x24\x03\x04\x01\x01\x01\x02\x00\x09\x04\x01\x00"}, {0x10,0x0170, "\x00\x01\x02\x00\x00\x09\x04\x01\x01\x01\x01\x02\x00\x00\x07\x24"}, {0x10,0x0180, "\x01\x01\x00\x01\x00\x0B\x24\x02\x01\x01\x02\x10\x01\x40\x1F\x00"}, {0x10,0x0190, "\x09\x05\x08\x09\x10\x00\x01\x00\x00\x07\x25\x01\x00\x00\x00\x00"}, {0x10,0x01A0, "\x09\x04\x02\x00\x00\x01\x02\x00\x00\x09\x04\x02\x01\x01\x01\x02"}, {0x10,0x01B0, "\x00\x00\x07\x24\x01\x04\x00\x01\x00\x0B\x24\x02\x01\x01\x02\x10"}, {0x10,0x01C0, "\x01\x40\x1F\x00\x09\x05\x88\x09\x10\x00\x01\x00\x00\x07\x25\x01"}, {0x10,0x01D0, "\x00\x00\x00\x00\x09\x04\x03\x00\x01\x03\x00\x00\x02\x09\x21\x00"}, {0x10,0x01E0, "\x01\x00\x01\x22\x5A\x00\x07\x05\x81\x03\x08\x00\x0A\x05\x0B\x09"}, {0x10,0x01F0, "\x04\xA1\x01\x09\x06\xA1\x02\x19\xB0\x29\xBB\x15\x01\x25\x0C\x95"}, {0x10,0x0200, "\x01\x75\x04\x81\x00\xC0\x05\x0B\x09\x20\x09\x2F\x09\x24\x09\x31"}, {0x10,0x0210, "\x25\x04\x75\x03\x81\x00\x05\x07\x09\x52\x09\x51\x09\x28\x09\x2A"}, {0x10,0x0220, "\x25\x04\x75\x03\x81\x00\x05\x09\x09\x01\x75\x01\x25\x01\x81\x02"}, {0x10,0x0230, "\x95\x01\x75\x05\x81\x03\x05\x08\x09\x17\x25\x01\x75\x01\x91\x02"}, {0x10,0x0240, "\x95\x07\x75\x01\x91\x03\xC0\x04\x03\x09\x04\x3C\x03\x52\x00\x46"}, {0x10,0x0250, "\x00\x43\x00\x20\x00\x44\x00\x69\x00\x73\x00\x74\x00\x72\x00\x69"}, {0x10,0x0260, "\x00\x62\x00\x75\x00\x74\x00\x69\x00\x6F\x00\x6E\x00\x20\x00\x28"}, {0x10,0x0270, "\x00\x53\x00\x29\x00\x20\x00\x50\x00\x74\x00\x65\x00\x20\x00\x4C"}, {0x10,0x0280, "\x00\x74\x00\x64\x00\x2E\x00\x54\x03\x20\x00\x59\x00\x40\x00\x70"}, {0x10,0x0290, "\x00\x50\x00\x68\x00\x6F\x00\x6E\x00\x65\x00\x20\x00\x2D\x00\x20"}, {0x10,0x02A0, "\x00\x54\x00\x68\x00\x65\x00\x20\x00\x77\x00\x61\x00\x79\x00\x20"}, {0x10,0x02B0, "\x00\x74\x00\x6F\x00\x20\x00\x63\x00\x68\x00\x61\x00\x74\x00\x2E"}, {0x10,0x02C0, "\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20"}, {0x0D,0x02D0, "\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x00\x00"}, {0x10,0x18D3, "\x90\x7F\xD6\xE0\x44\x80\xF0\x43\x87\x01\x00\x00\x00\x00\x00\x22"}, {0x10,0x18F4, "\x90\x7F\xD6\xE0\x54\xFB\xF0\xE0\x44\x08\xF0\x30\x1F\x04\xE0\x44"}, {0x10,0x1904, "\x02\xF0\x7F\xDC\x7E\x05\x12\x19\x19\x90\x7F\xD6\xE0\x54\xF7\xF0"}, {0x05,0x1914, "\xE0\x44\x04\xF0\x22"}, {0x10,0x1919, "\x8E\x10\x8F\x11\xE5\x11\x15\x11\xAE\x10\x70\x02\x15\x10\x4E\x60"}, {0x07,0x1929, "\x05\x12\x18\xE3\x80\xEE\x22"}, {0x02,0x1930, "\x8F\x11"}, {0x10,0x1932, "\xE4\xF5\x12\x75\x13\xFF\x75\x14\x02\x75\x15\x47\xAB\x13\xAA\x14"}, {0x10,0x1942, "\xA9\x15\x90\x00\x01\x12\x1A\x65\xB4\x03\x1D\xAF\x12\x05\x12\xEF"}, {0x10,0x1952, "\xB5\x11\x01\x22\x12\x1A\x4C\x7E\x00\x29\xFF\xEE\x3A\xA9\x07\x75"}, {0x0E,0x1962, "\x13\xFF\xF5\x14\x89\x15\x80\xD4\x7B\x00\x7A\x00\x79\x00"}, {0x01,0x1970, "\x22"}, {0x10,0x1971, "\xE4\xFE\x75\x13\xFF\x75\x14\x01\x75\x15\x26\xAB\x13\xAA\x14\xA9"}, {0x10,0x1981, "\x15\x90\x00\x01\x12\x1A\x65\x64\x02\x70\x2D\xAD\x06\x0E\xED\xB5"}, {0x10,0x1991, "\x07\x01\x22\x90\x00\x02\x12\x1A\x92\x85\xF0\x11\xF5\x12\x62\x11"}, {0x10,0x19A1, "\xE5\x11\x62\x12\xE5\x12\x62\x11\x29\xFD\xE5\x11\x3A\xA9\x05\x75"}, {0x0E,0x19B1, "\x13\xFF\xF5\x14\x89\x15\x80\xC3\x7B\x00\x7A\x00\x79\x00"}, {0x01,0x19BF, "\x22"}, {0x10,0x18E3, "\x74\x00\xF5\x86\x90\xFD\xA5\x7C\x05\xA3\xE5\x82\x45\x83\x70\xF9"}, {0x01,0x18F3, "\x22"}, {0x03,0x0000, "\x02\x19\xC0"}, {0x0C,0x19C0, "\x78\x7F\xE4\xF6\xD8\xFD\x75\x81\x54\x02\x1A\x07"}, {0x10,0x1A4C, "\xBB\x01\x06\x89\x82\x8A\x83\xE0\x22\x50\x02\xE7\x22\xBB\xFE\x02"}, {0x09,0x1A5C, "\xE3\x22\x89\x82\x8A\x83\xE4\x93\x22"}, {0x10,0x1A65, "\xBB\x01\x0C\xE5\x82\x29\xF5\x82\xE5\x83\x3A\xF5\x83\xE0\x22\x50"}, {0x10,0x1A75, "\x06\xE9\x25\x82\xF8\xE6\x22\xBB\xFE\x06\xE9\x25\x82\xF8\xE2\x22"}, {0x0D,0x1A85, "\xE5\x82\x29\xF5\x82\xE5\x83\x3A\xF5\x83\xE4\x93\x22"}, {0x10,0x1A92, "\xBB\x01\x10\xE5\x82\x29\xF5\x82\xE5\x83\x3A\xF5\x83\xE0\xF5\xF0"}, {0x10,0x1AA2, "\xA3\xE0\x22\x50\x09\xE9\x25\x82\xF8\x86\xF0\x08\xE6\x22\xBB\xFE"}, {0x10,0x1AB2, "\x0A\xE9\x25\x82\xF8\xE2\xF5\xF0\x08\xE2\x22\xE5\x83\x2A\xF5\x83"}, {0x08,0x1AC2, "\xE9\x93\xF5\xF0\xA3\xE9\x93\x22"}, {0x10,0x1ACA, "\xEB\x9F\xF5\xF0\xEA\x9E\x42\xF0\xE9\x9D\x42\xF0\xE8\x9C\x45\xF0"}, {0x01,0x1ADA, "\x22"}, {0x10,0x1ADB, "\xD0\x83\xD0\x82\xF8\xE4\x93\x70\x12\x74\x01\x93\x70\x0D\xA3\xA3"}, {0x10,0x1AEB, "\x93\xF8\x74\x01\x93\xF5\x82\x88\x83\xE4\x73\x74\x02\x93\xB5\xF0"}, {0x0D,0x1AFB, "\x06\x74\x03\x93\x68\x60\xE9\xA3\xA3\xA3\xA3\x80\xD8"}, {0x10,0x19CC, "\x02\x05\x44\xE4\x93\xA3\xF8\xE4\x93\xA3\x40\x03\xF6\x80\x01\xF2"}, {0x10,0x19DC, "\x08\xDF\xF4\x80\x29\xE4\x93\xA3\xF8\x54\x07\x24\x0C\xC8\xC3\x33"}, {0x10,0x19EC, "\xC4\x54\x0F\x44\x20\xC8\x83\x40\x04\xF4\x56\x80\x01\x46\xF6\xDF"}, {0x10,0x19FC, "\xE4\x80\x0B\x01\x02\x04\x08\x10\x20\x40\x80\x90\x02\xDD\xE4\x7E"}, {0x10,0x1A0C, "\x01\x93\x60\xBC\xA3\xFF\x54\x3F\x30\xE5\x09\x54\x1F\xFE\xE4\x93"}, {0x10,0x1A1C, "\xA3\x60\x01\x0E\xCF\x54\xC0\x25\xE0\x60\xA8\x40\xB8\xE4\x93\xA3"}, {0x10,0x1A2C, "\xFA\xE4\x93\xA3\xF8\xE4\x93\xA3\xC8\xC5\x82\xC8\xCA\xC5\x83\xCA"}, {0x10,0x1A3C, "\xF0\xA3\xC8\xC5\x82\xC8\xCA\xC5\x83\xCA\xDF\xE9\xDE\xE7\x80\xBE"}, {0x01,0x02F1, "\x00"}, {0x00,0x0000,""}
MarginC/kame
openbsd/sys/dev/microcode/uyap/uyap_firmware.h
C
bsd-3-clause
47,416
package io.compgen.common.progress; public interface Progress { public void start(long size); public void update(long current); public void update(long current, String msg); public void done(); public void setName(String name); }
compgen-io/compgen-common
src/java/io/compgen/common/progress/Progress.java
Java
bsd-3-clause
251
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/service/cloud_print/printer_job_queue_handler.h" #include <math.h> #include <algorithm> #include "base/values.h" namespace cloud_print { class TimeProviderImpl : public PrinterJobQueueHandler::TimeProvider { public: base::Time GetNow(); }; base::Time TimeProviderImpl::GetNow() { return base::Time::Now(); } JobDetails::JobDetails() {} JobDetails::~JobDetails() {} void JobDetails::Clear() { job_id_.clear(); job_title_.clear(); print_ticket_.clear(); print_data_mime_type_.clear(); print_data_file_path_ = base::FilePath(); print_data_url_.clear(); print_ticket_url_.clear(); tags_.clear(); time_remaining_ = base::TimeDelta(); } // static bool JobDetails::ordering(const JobDetails& first, const JobDetails& second) { return first.time_remaining_ <= second.time_remaining_; } PrinterJobQueueHandler::PrinterJobQueueHandler(TimeProvider* time_provider) : time_provider_(time_provider) {} PrinterJobQueueHandler::PrinterJobQueueHandler() : time_provider_(new TimeProviderImpl()) {} PrinterJobQueueHandler::~PrinterJobQueueHandler() {} void PrinterJobQueueHandler::ConstructJobDetailsFromJson( const DictionaryValue* job_data, JobDetails* job_details) { job_details->Clear(); job_data->GetString(kIdValue, &job_details->job_id_); job_data->GetString(kTitleValue, &job_details->job_title_); job_data->GetString(kTicketUrlValue, &job_details->print_ticket_url_); job_data->GetString(kFileUrlValue, &job_details->print_data_url_); // Get tags for print job. const ListValue* tags = NULL; if (job_data->GetList(kTagsValue, &tags)) { for (size_t i = 0; i < tags->GetSize(); i++) { std::string value; if (tags->GetString(i, &value)) job_details->tags_.push_back(value); } } } base::TimeDelta PrinterJobQueueHandler::ComputeBackoffTime( const std::string& job_id) { FailedJobMap::const_iterator job_location = failed_job_map_.find(job_id); if (job_location == failed_job_map_.end()) { return base::TimeDelta(); } base::TimeDelta backoff_time = base::TimeDelta::FromSeconds(kJobFirstWaitTimeSecs); backoff_time *= // casting argument to double and result to uint64 to avoid compilation // issues static_cast<int64>(pow( static_cast<long double>(kJobWaitTimeExponentialMultiplier), job_location->second.retries_) + 0.5); base::Time scheduled_retry = job_location->second.last_retry_ + backoff_time; base::Time now = time_provider_->GetNow(); base::TimeDelta time_remaining; if (scheduled_retry < now) { return base::TimeDelta(); } return scheduled_retry - now; } void PrinterJobQueueHandler::GetJobsFromQueue(const DictionaryValue* json_data, std::vector<JobDetails>* jobs) { std::vector<JobDetails> jobs_with_timeouts; jobs->clear(); const ListValue* job_list = NULL; if (!json_data->GetList(kJobListValue, &job_list)) { return; } size_t list_size = job_list->GetSize(); for (size_t cur_job = 0; cur_job < list_size; cur_job++) { const DictionaryValue* job_data = NULL; if (job_list->GetDictionary(cur_job, &job_data)) { JobDetails job_details_current; ConstructJobDetailsFromJson(job_data, &job_details_current); job_details_current.time_remaining_ = ComputeBackoffTime(job_details_current.job_id_); if (job_details_current.time_remaining_ == base::TimeDelta()) { jobs->push_back(job_details_current); } else { jobs_with_timeouts.push_back(job_details_current); } } } sort(jobs_with_timeouts.begin(), jobs_with_timeouts.end(), &JobDetails::ordering); jobs->insert(jobs->end(), jobs_with_timeouts.begin(), jobs_with_timeouts.end()); } void PrinterJobQueueHandler::JobDone(const std::string& job_id) { failed_job_map_.erase(job_id); } void PrinterJobQueueHandler::JobFetchFailed(const std::string& job_id) { FailedJobMetadata metadata; metadata.retries_ = 0; metadata.last_retry_ = time_provider_->GetNow(); std::pair<FailedJobMap::iterator, bool> job_found = failed_job_map_.insert(FailedJobPair(job_id, metadata)); // If the job has already failed once, increment the number of retries if (!job_found.second) { job_found.first->second.retries_ += 1; job_found.first->second.last_retry_ = time_provider_->GetNow(); } } } // namespace cloud_print
zcbenz/cefode-chromium
chrome/service/cloud_print/printer_job_queue_handler.cc
C++
bsd-3-clause
4,627
import {DataRenderer, DataRendererView} from "./data_renderer" import {LineView} from "../glyphs/line" import {Glyph, GlyphView} from "../glyphs/glyph" import {ColumnarDataSource} from "../sources/columnar_data_source" import {Scale} from "../scales/scale" import {CDSView} from "../sources/cds_view" import {Color} from "core/types" import {Class} from "core/class" import {logger} from "core/logging" import * as p from "core/properties" import {indexOf} from "core/util/arrayable" import {difference, includes, range} from "core/util/array" import {extend, clone} from "core/util/object" import * as hittest from "core/hittest" import {Geometry} from "core/geometry" import {SelectionManager} from "core/selection_manager" import {Context2d} from "core/util/canvas" import {FactorRange} from '../ranges/factor_range' type Defaults = { fill: {fill_alpha?: number, fill_color?: Color} line: {line_alpha?: number, line_color?: Color} } const selection_defaults: Defaults = { fill: {}, line: {}, } const decimated_defaults: Defaults = { fill: {fill_alpha: 0.3, fill_color: "grey"}, line: {line_alpha: 0.3, line_color: "grey"}, } const nonselection_defaults: Defaults = { fill: {fill_alpha: 0.2}, line: {}, } export class GlyphRendererView extends DataRendererView { model: GlyphRenderer glyph: GlyphView selection_glyph: GlyphView nonselection_glyph: GlyphView hover_glyph?: GlyphView muted_glyph?: GlyphView decimated_glyph: GlyphView xscale: Scale yscale: Scale protected all_indices: number[] protected decimated: number[] set_data_timestamp: number protected last_dtrender: number initialize(): void { super.initialize() const base_glyph = this.model.glyph const has_fill = includes(base_glyph.mixins, "fill") const has_line = includes(base_glyph.mixins, "line") const glyph_attrs = clone(base_glyph.attributes) delete glyph_attrs.id function mk_glyph(defaults: Defaults): typeof base_glyph { const attrs = clone(glyph_attrs) if (has_fill) extend(attrs, defaults.fill) if (has_line) extend(attrs, defaults.line) return new (base_glyph.constructor as any)(attrs) } this.glyph = this.build_glyph_view(base_glyph) let {selection_glyph} = this.model if (selection_glyph == null) selection_glyph = mk_glyph({fill: {}, line: {}}) else if (selection_glyph === "auto") selection_glyph = mk_glyph(selection_defaults) this.selection_glyph = this.build_glyph_view(selection_glyph) let {nonselection_glyph} = this.model if ((nonselection_glyph == null)) nonselection_glyph = mk_glyph({fill: {}, line: {}}) else if (nonselection_glyph === "auto") nonselection_glyph = mk_glyph(nonselection_defaults) this.nonselection_glyph = this.build_glyph_view(nonselection_glyph) const {hover_glyph} = this.model if (hover_glyph != null) this.hover_glyph = this.build_glyph_view(hover_glyph) const {muted_glyph} = this.model if (muted_glyph != null) this.muted_glyph = this.build_glyph_view(muted_glyph) const decimated_glyph = mk_glyph(decimated_defaults) this.decimated_glyph = this.build_glyph_view(decimated_glyph) this.xscale = this.plot_view.frame.xscales[this.model.x_range_name] this.yscale = this.plot_view.frame.yscales[this.model.y_range_name] this.set_data(false) } build_glyph_view<T extends Glyph>(model: T): GlyphView { return new model.default_view({model, parent: this}) as GlyphView // XXX } connect_signals(): void { super.connect_signals() this.connect(this.model.change, () => this.request_render()) this.connect(this.model.glyph.change, () => this.set_data()) this.connect(this.model.data_source.change, () => this.set_data()) this.connect(this.model.data_source.streaming, () => this.set_data()) this.connect(this.model.data_source.patching, (indices: number[] /* XXX: WHY? */) => this.set_data(true, indices)) this.connect(this.model.data_source.selected.change, () => this.request_render()) this.connect(this.model.data_source._select, () => this.request_render()) if (this.hover_glyph != null) this.connect(this.model.data_source.inspect, () => this.request_render()) this.connect(this.model.properties.view.change, () => this.set_data()) this.connect(this.model.view.change, () => this.set_data()) const {x_ranges, y_ranges} = this.plot_view.frame for (const name in x_ranges) { const rng = x_ranges[name] if (rng instanceof FactorRange) this.connect(rng.change, () => this.set_data()) } for (const name in y_ranges) { const rng = y_ranges[name] if (rng instanceof FactorRange) this.connect(rng.change, () => this.set_data()) } this.connect(this.model.glyph.transformchange, () => this.set_data()) } have_selection_glyphs(): boolean { return this.selection_glyph != null && this.nonselection_glyph != null } // in case of partial updates like patching, the list of indices that actually // changed may be passed as the "indices" parameter to afford any optional optimizations set_data(request_render: boolean = true, indices: number[] | null = null): void { const t0 = Date.now() const source = this.model.data_source this.all_indices = this.model.view.indices // TODO (bev) this is a bit clunky, need to make sure glyphs use the correct ranges when they call // mapping functions on the base Renderer class this.glyph.model.setv({x_range_name: this.model.x_range_name, y_range_name: this.model.y_range_name}, {silent: true}) this.glyph.set_data(source, this.all_indices, indices) this.glyph.set_visuals(source) this.decimated_glyph.set_visuals(source) if (this.have_selection_glyphs()) { this.selection_glyph.set_visuals(source) this.nonselection_glyph.set_visuals(source) } if (this.hover_glyph != null) this.hover_glyph.set_visuals(source) if (this.muted_glyph != null) this.muted_glyph.set_visuals(source) const {lod_factor} = this.plot_model this.decimated = [] for (let i = 0, end = Math.floor(this.all_indices.length/lod_factor); i < end; i++) { this.decimated.push(i*lod_factor) } const dt = Date.now() - t0 logger.debug(`${this.glyph.model.type} GlyphRenderer (${this.model.id}): set_data finished in ${dt}ms`) this.set_data_timestamp = Date.now() if (request_render) this.request_render() } render(): void { if (!this.model.visible) return const t0 = Date.now() const glsupport = this.glyph.glglyph this.glyph.map_data() const dtmap = Date.now() - t0 const tmask = Date.now() // all_indices is in full data space, indices is converted to subset space // either by mask_data (that uses the spatial index) or manually let indices = this.glyph.mask_data(this.all_indices) if (indices.length === this.all_indices.length) { indices = range(0, this.all_indices.length) } const dtmask = Date.now() - tmask const {ctx} = this.plot_view.canvas_view ctx.save() // selected is in full set space const {selected} = this.model.data_source let selected_full_indices: number[] if (!selected || selected.is_empty()) { selected_full_indices = [] } else { if (this.glyph instanceof LineView && selected.selected_glyph === this.glyph.model) { selected_full_indices = this.model.view.convert_indices_from_subset(indices) } else { selected_full_indices = selected.indices } } // inspected is in full set space const {inspected} = this.model.data_source let inspected_full_indices: number[] if (!inspected || (inspected.length === 0)) { inspected_full_indices = [] } else { if (inspected['0d'].glyph) { inspected_full_indices = this.model.view.convert_indices_from_subset(indices) } else if (inspected['1d'].indices.length > 0) { inspected_full_indices = inspected['1d'].indices } else { inspected_full_indices = ((() => { const result = [] for (const i of Object.keys(inspected["2d"].indices)) { result.push(parseInt(i)) } return result })()) } } // inspected is transformed to subset space const inspected_subset_indices: number[] = ((() => { const result = [] for (const i of indices) { if (includes(inspected_full_indices, this.all_indices[i])) result.push(i) } return result })()) const {lod_threshold} = this.plot_model let glyph: GlyphView let nonselection_glyph: GlyphView let selection_glyph: GlyphView if ((this.model.document != null ? this.model.document.interactive_duration() > 0 : false) && !glsupport && lod_threshold != null && this.all_indices.length > lod_threshold) { // Render decimated during interaction if too many elements and not using GL indices = this.decimated glyph = this.decimated_glyph nonselection_glyph = this.decimated_glyph selection_glyph = this.selection_glyph } else { glyph = this.model.muted && this.muted_glyph != null ? this.muted_glyph : this.glyph nonselection_glyph = this.nonselection_glyph selection_glyph = this.selection_glyph } if (this.hover_glyph != null && inspected_subset_indices.length) indices = difference(indices, inspected_subset_indices) // Render with no selection let dtselect: number | null = null let trender: number if (!(selected_full_indices.length && this.have_selection_glyphs())) { trender = Date.now() if (this.glyph instanceof LineView) { if (this.hover_glyph && inspected_subset_indices.length) this.hover_glyph.render(ctx, this.model.view.convert_indices_from_subset(inspected_subset_indices), this.glyph) else glyph.render(ctx, this.all_indices, this.glyph) } else { glyph.render(ctx, indices, this.glyph) if (this.hover_glyph && inspected_subset_indices.length) this.hover_glyph.render(ctx, inspected_subset_indices, this.glyph) } // Render with selection } else { // reset the selection mask const tselect = Date.now() const selected_mask: {[key: number]: boolean} = {} for (const i of selected_full_indices) { selected_mask[i] = true } // intersect/different selection with render mask const selected_subset_indices: number[] = new Array() const nonselected_subset_indices: number[] = new Array() // now, selected is changed to subset space, except for Line glyph if (this.glyph instanceof LineView) { for (const i of this.all_indices) { if (selected_mask[i] != null) selected_subset_indices.push(i) else nonselected_subset_indices.push(i) } } else { for (const i of indices) { if (selected_mask[this.all_indices[i]] != null) selected_subset_indices.push(i) else nonselected_subset_indices.push(i) } } dtselect = Date.now() - tselect trender = Date.now() nonselection_glyph.render(ctx, nonselected_subset_indices, this.glyph) selection_glyph.render(ctx, selected_subset_indices, this.glyph) if (this.hover_glyph != null) { if (this.glyph instanceof LineView) this.hover_glyph.render(ctx, this.model.view.convert_indices_from_subset(inspected_subset_indices), this.glyph) else this.hover_glyph.render(ctx, inspected_subset_indices, this.glyph) } } const dtrender = Date.now() - trender this.last_dtrender = dtrender const dttot = Date.now() - t0 logger.debug(`${this.glyph.model.type} GlyphRenderer (${this.model.id}): render finished in ${dttot}ms`) logger.trace(` - map_data finished in : ${dtmap}ms`) logger.trace(` - mask_data finished in : ${dtmask}ms`) if (dtselect != null) { logger.trace(` - selection mask finished in : ${dtselect}ms`) } logger.trace(` - glyph renders finished in : ${dtrender}ms`) return ctx.restore() } draw_legend(ctx: Context2d, x0: number, x1: number, y0: number, y1: number, field: string | null, label: string, index: number | null): void { if (index == null) index = this.model.get_reference_point(field, label) this.glyph.draw_legend_for_index(ctx, {x0, x1, y0, y1}, index) } hit_test(geometry: Geometry): hittest.HitTestResult { if (!this.model.visible) return null const hit_test_result = this.glyph.hit_test(geometry) // glyphs that don't have hit-testing implemented will return null if (hit_test_result == null) return null return this.model.view.convert_selection_from_subset(hit_test_result) } } export namespace GlyphRenderer { export type Attrs = p.AttrsOf<Props> export type Props = DataRenderer.Props & { data_source: p.Property<ColumnarDataSource> view: p.Property<CDSView> glyph: p.Property<Glyph> hover_glyph: p.Property<Glyph> nonselection_glyph: p.Property<Glyph | "auto"> selection_glyph: p.Property<Glyph | "auto"> muted_glyph: p.Property<Glyph> muted: p.Property<boolean> } } export interface GlyphRenderer extends GlyphRenderer.Attrs {} export class GlyphRenderer extends DataRenderer { properties: GlyphRenderer.Props default_view: Class<GlyphRendererView> constructor(attrs?: Partial<GlyphRenderer.Attrs>) { super(attrs) } static initClass(): void { this.prototype.type = 'GlyphRenderer' this.prototype.default_view = GlyphRendererView this.define<GlyphRenderer.Props>({ data_source: [ p.Instance ], view: [ p.Instance, () => new CDSView() ], glyph: [ p.Instance ], hover_glyph: [ p.Instance ], nonselection_glyph: [ p.Any, 'auto' ], // Instance or "auto" selection_glyph: [ p.Any, 'auto' ], // Instance or "auto" muted_glyph: [ p.Instance ], muted: [ p.Boolean, false ], }) } initialize(): void { super.initialize() if (this.view.source == null) { this.view.source = this.data_source this.view.compute_indices() } } get_reference_point(field: string | null, value?: any): number { let index = 0 if (field != null) { const data = this.data_source.get_column(field) if (data != null) { const i = indexOf(data, value) if (i != -1) index = i } } return index } get_selection_manager(): SelectionManager { return this.data_source.selection_manager } } GlyphRenderer.initClass()
stonebig/bokeh
bokehjs/src/lib/models/renderers/glyph_renderer.ts
TypeScript
bsd-3-clause
14,935
/*L * Copyright 5AM Solutions, Inc. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/prot-express/LICENSE.txt for details. */ package gov.nih.nci.protexpress.domain.register; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import com.fiveamsolutions.nci.commons.data.persistent.PersistentObject; /** * @author Akhil Bhaskar (Amentra, Inc.) * */ @Entity @org.hibernate.annotations.Entity(mutable = false) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) public class State implements PersistentObject { private static final long serialVersionUID = 5622159437616247967L; private Long id; private String code; private String name; /** * {@inheritDoc} */ @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return id; } @SuppressWarnings({"PMD.UnusedPrivateMethod", "unused" }) private void setId(Long id) { this.id = id; } /** * @return the code */ @Column(unique = true) public String getCode() { return code; } /** * @param code the code to set */ public void setCode(String code) { this.code = code; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } }
NCIP/prot-express
software/src/main/java/gov/nih/nci/protexpress/domain/register/State.java
Java
bsd-3-clause
1,693
var $ = require("jquery"); var _ = require("underscore"); var Backbone = require("backbone"); var User = require("../user"); var app = require("../app").app; var SettingsView = Backbone.View.extend({ template : _.template($("#tmpl-settings-view").html()), render : function(data){ data.user = User.current(); this.$el.html(this.template(data)); }, events : { "click #change" : "changepassword", "click #reset" : "reset", "click #save" : "save" }, reset : function(){ this.$el.find("#oldpassword").val(""); this.$el.find("#newpassword").val(""); this.$el.find("#repassword").val(""); }, changepassword : function(){ User.changePassword(this.$el.find("#oldpassword").val(), this.$el.find("#newpassword").val(), this.$el.find("#repassword").val(), function(){ app.alert("密码修改成功!","恭喜"); }, function(error){ app.alert(error, "修改失败"); }) }, save : function(){ User.saveBasic(this.$el.find("#realname").val(), this.$el.find("#telephone").val(), this.$el.find("#qqnumber").val(), this.$el.find("#wxnumber").val(), function(){ app.alert("修改成功", "基本信息"); AV.User.current().fetch(); }, function(error){ app.alert("修改失败","基本信息"); }); } }); module.exports = SettingsView;
sjtug/bkr
app/javascript/views/settingsView.js
JavaScript
bsd-3-clause
1,299
# Papers 0. L. R. Anderson and C. A. Holt (1997), "[Information Cascades in the Laboratory](http://www.jstor.org/stable/2951328)," American Economic Review 87, 847-862. ([Dataset 1](http://www.people.virginia.edu/~cah2k/casdata.pdf), [Dataset 2](http://www.people.virginia.edu/~cah2k/casdata2.pdf)) 0. A. Ambrus and B. Greiner (2012). "[Imperfect Public Monitoring with Costly Punishment: An Experimental Study](https://www.aeaweb.org/articles.php?doi=10.1257/aer.102.7.3317)," American Economic Review 102, 3317-32. 0. J. Andreoni and C. Sprenger (2012). "[Estimating Time Preferences from Convex Budgets](https://www.aeaweb.org/articles.php?doi=10.1257/aer.102.7.3333)," American Economic Review 102, 3333-56. 0. J. Andreoni and C. Sprenger (2012). "[Risk Preferences Are Not Time Preferences](https://www.aeaweb.org/articles.php?doi=10.1257/aer.102.7.3357)," American Economic Review 102, 3357-76. * S. L. Cheung (2015). "[Risk Preferences Are Not Time Preferences: On the Elicitation of Time Preference under Conditions of Risk: Comment](https://www.aeaweb.org/articles.php?doi=10.1257/aer.20120946)," American Economic Review 105, 2242-60. * T. Epper and H. Fehr-Duda (2015). "[Risk Preferences Are Not Time Preferences: Balancing on a Budget Line: Comment](https://www.aeaweb.org/articles.php?doi=10.1257/aer.20130420)," American Economic Review 105, 2261-71. * B. Miao and S. Zhong (2015). "[Risk Preferences Are Not Time Preferences: Separating Risk and Time Preference: Comment](https://www.aeaweb.org/articles.php?doi=10.1257/aer.20131183)," American Economic Review 105, 2272-86. * J. Andreoni and C. Sprenger (2015). "[Risk Preferences Are Not Time Preferences: Reply](https://www.aeaweb.org/articles.php?doi=10.1257/aer.20150311&fnd=s)," American Economic Review 105, 2287-93. 0. M. O. Jackson and L. Yariv (2014). "[Present Bias and Collective Dynamic Choice in the Lab](https://www.aeaweb.org/articles.php?doi=10.1257/aer.104.12.4184)," American Economic Review 104, 4184-4204. 0. G. Charness, F. Feri, M. A. Melendez-Jimenez, and M. Sutter (2014), "[Experimental Games on Networks: Underpinnings of Behavior and Equilibrium Selection](http://onlinelibrary.wiley.com/doi/10.3982/ECTA11781/abstract)," Econometrica 82, 1615-1670. ([Supplement 1](https://www.econometricsociety.org/content/supplement-experimental-games-networks-underpinnings-behavior-and-equilibrium-selection-0), [Supplement 2](https://www.econometricsociety.org/content/supplement-experimental-games-networks-underpinnings-behavior-and-equilibrium-selection)) 0. G. Charness, R. Luca, and R. Aldo (2007). "[Individual Behavior and Group Membership](https://www.aeaweb.org/articles.php?doi=10.1257/aer.97.4.1340)," American Economic Review 97, 1340-1352. 0. Y. Chen and S. X. Li (2009). "[Group Identity and Social Preferences](https://www.aeaweb.org/articles.php?doi=10.1257/aer.99.1.431)," American Economic Review 99, 431-457. 0. T. Kneeland (2015). "[Identifying Higher-Order Rationality](http://terri.microeconomics.ca/research/hor.pdf)," forthcoming in Econometrica. ([Supplement](https://www.econometricsociety.org/content/supplement-identifying-higher-order-rationality)) 0. R. Selten and T. Chmura (2008). "[Stationary Concepts for Experimental 2x2-Games](https://www.aeaweb.org/articles.php?doi=10.1257/aer.98.3.938)," American Economic Review 98, 938-66. * [Papers and data/instructions by Charles A. Holt](http://people.virginia.edu/~cah2k/datapage.html) Some comments (by Yamagishi) * Papers regarding the behavior of groups ([survey](https://www.aeaweb.org/articles.php?doi=10.1257/jep.26.3.157)): Charness, Luca, and Aldo (2007), Chen and Li (2009) * An interesting test about players' rationality: Kneeland (2015) ## Matching 0. J. Paisa and Á. Pintér (2008). "[School choice and information: An experimental study on matching mechanisms](http://www.sciencedirect.com/science/article/pii/S0899825608000286)," Games and Economic Behavior 64, 303-328. 0. F. Klijn, J. Pais, and M. Vorsatz (2013). "[Preference intensities and risk aversion in school choice: a laboratory experiment](http://link.springer.com/article/10.1007%2Fs10683-012-9329-5)," Experimental Economics 16, 1-22. 0. C. R. Featherstonea and M. Niederl (2014), "[Improving on Strategy-proof School Choice Mechanisms: An Experimental Investigation](http://assets.wharton.upenn.edu/~claytonf/IncInfo14-02-01-2014.pdf)." 0. F. Echenique, A. J. Wilson, and L. Yariv (2016). "[Clearinghouses for two-sided matching: An experimental study](http://qeconomics.org/ojs/index.php/qe/article/view/374)," Quantitative Economics 7, 449-482. (Reference リストに matching 実験の論文が多数載っているのでそれも参照のこと)
OyamaZemi/ExperimentalEcon
papers.md
Markdown
bsd-3-clause
4,872
/* * Copyright (c) 1994, 1995, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that: (1) source code distributions * retain the above copyright notice and this paragraph in its entirety, (2) * distributions including binary code include the above copyright notice and * this paragraph in its entirety in the documentation or other materials * provided with the distribution, and (3) all advertising materials mentioning * features or use of this software display the following acknowledgement: * ``This product includes software developed by the University of California, * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of * the University nor the names of its contributors may be used to endorse * or promote products derived from this software without specific prior * written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint static const char rcsid[] = "@(#) $Header: /usr/home/sumikawa/kame/kame/kame/kame/libpcap/pcap-null.c,v 1.1 1999/08/08 23:30:17 itojun Exp $ (LBL)"; #endif #include <sys/param.h> /* optionally get BSD define */ #include <string.h> #include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif #include "pcap-int.h" static char nosup[] = "live packet capture not supported on this system"; int pcap_stats(pcap_t *p, struct pcap_stat *ps) { (void)sprintf(p->errbuf, "pcap_stats: %s", nosup); return (-1); } int pcap_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) { (void)sprintf(p->errbuf, "pcap_read: %s", nosup); return (-1); } pcap_t * pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf) { (void)strcpy(ebuf, nosup); return (NULL); } int pcap_setfilter(pcap_t *p, struct bpf_program *fp) { if (p->sf.rfile == NULL) { (void)sprintf(p->errbuf, "pcap_setfilter: %s", nosup); return (-1); } p->fcode = *fp; return (0); }
MarginC/kame
kame/kame/libpcap/pcap-null.c
C
bsd-3-clause
2,186
<?php use yii\helpers\Html; use yii\widgets\DetailView; use common\models\User; /* @var $this yii\web\View */ /* @var $model common\models\Page */ $this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => '单页', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="page-view"> <h1><?= Html::encode($this->title) ?></h1> <p> <?= Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a('删除', ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => '确定删除吗?', 'method' => 'post', ], ]) ?> </p> <?= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'name', 'pid', //'type', [ 'attribute'=>'type', 'format' => 'raw', 'value' => $model->type == 1 ? '自定义' : '模板', ], 'tem', //'content:ntext', [ 'attribute'=>'content', 'format' => 'raw', ], 'orderid', //'is_show', [ 'attribute'=>'is_show', 'format' => 'raw', 'value' => $model->is_show == 1 ? '显示' : '不显示', ], //'created_uid', [ 'attribute'=>'created_uid', 'format' => 'raw', 'value' => User::getName($model->created_uid), ], 'created_at:datetime', ], ]) ?> </div>
s-nice/s-run
backend/themes/quirk/views/page/view.php
PHP
bsd-3-clause
1,508
<?php # Copyright 2013 Mike Thorn (github: WasabiVengeance). All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. class bsc_widget_tbody extends bsc_widget { function init() { $this->options['tag'] = 'tbody'; } } ?>
Dev-Lucid/BootstrapConstructor
lib/php/widgets/tbody.php
PHP
bsd-3-clause
292
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>Core Plot (Mac OS): &lt;CPTTradingRangePlotDataSource&gt; Protocol Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="customdoxygen.css" rel="stylesheet" type="text/css" /> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="core-plot-logo.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">Core Plot (Mac OS) </div> <div id="projectbrief">Cocoa plotting framework for Mac OS X and iOS</div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.8.1.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="modules.html"><span>Animation&#160;&&#160;Constants</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('protocol_c_p_t_trading_range_plot_data_source-p.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">&lt;CPTTradingRangePlotDataSource&gt; Protocol Reference</div> </div> </div><!--header--> <div class="contents"> <p>A trading range plot data source. <a href="protocol_c_p_t_trading_range_plot_data_source-p.html#details">More...</a></p> <p><code>#import &lt;<a class="el" href="_c_p_t_trading_range_plot_8h_source.html">CPTTradingRangePlot.h</a>&gt;</code></p> <div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"> <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for &lt;CPTTradingRangePlotDataSource&gt;:</div> <div id="dynsection-0-summary" class="dynsummary" style="display:block;"> </div> <div id="dynsection-0-content" class="dyncontent" style="display:none;"> <div class="center"><img src="protocol_c_p_t_trading_range_plot_data_source-p__inherit__graph.png" border="0" usemap="#_3_c_p_t_trading_range_plot_data_source_4_inherit__map" alt="Inheritance graph"/></div> <map name="_3_c_p_t_trading_range_plot_data_source_4_inherit__map" id="_3_c_p_t_trading_range_plot_data_source_4_inherit__map"> <area shape="rect" id="node2" href="protocol_c_p_t_plot_data_source-p.html" title="A plot data source." alt="" coords="23,86,187,117"/><area shape="rect" id="node4" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html" title="\&lt;NSObject&#45;p\&gt;" alt="" coords="46,6,164,37"/></map> <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> <div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"> <img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for &lt;CPTTradingRangePlotDataSource&gt;:</div> <div id="dynsection-1-summary" class="dynsummary" style="display:block;"> </div> <div id="dynsection-1-content" class="dyncontent" style="display:none;"> <div class="center"><img src="protocol_c_p_t_trading_range_plot_data_source-p__coll__graph.png" border="0" usemap="#_3_c_p_t_trading_range_plot_data_source_4_coll__map" alt="Collaboration graph"/></div> <map name="_3_c_p_t_trading_range_plot_data_source_4_coll__map" id="_3_c_p_t_trading_range_plot_data_source_4_coll__map"> <area shape="rect" id="node2" href="protocol_c_p_t_plot_data_source-p.html" title="A plot data source." alt="" coords="23,86,187,117"/><area shape="rect" id="node4" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html" title="\&lt;NSObject&#45;p\&gt;" alt="" coords="46,6,164,37"/></map> <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> <p><a href="protocol_c_p_t_trading_range_plot_data_source-p-members.html">List of all members.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a> Public Instance Methods</h2></td></tr> <tr><td colspan="2"><div class="groupHeader">Bar Fills</div></td></tr> <tr class="memitem:acf8f90b75862cea16b180761db7ab6ac"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#acf8f90b75862cea16b180761db7ab6ac">increaseFillsForTradingRangePlot:recordIndexRange:</a></td></tr> <tr class="memdesc:acf8f90b75862cea16b180761db7ab6ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of fills used with a candlestick plot when close &gt;= open for the given plot. <a href="#acf8f90b75862cea16b180761db7ab6ac"></a><br/></td></tr> <tr class="memitem:ae9b7253b7ae91d00dce3a0f04d45af0d"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_fill.html">CPTFill</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ae9b7253b7ae91d00dce3a0f04d45af0d">increaseFillForTradingRangePlot:recordIndex:</a></td></tr> <tr class="memdesc:ae9b7253b7ae91d00dce3a0f04d45af0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets the fill used with a candlestick plot when close &gt;= open for the given plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#acf8f90b75862cea16b180761db7ab6ac">-increaseFillsForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. <a href="#ae9b7253b7ae91d00dce3a0f04d45af0d"></a><br/></td></tr> <tr class="memitem:aab81434371c3f13b01452eb6fe4c3683"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#aab81434371c3f13b01452eb6fe4c3683">decreaseFillsForTradingRangePlot:recordIndexRange:</a></td></tr> <tr class="memdesc:aab81434371c3f13b01452eb6fe4c3683"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of fills used with a candlestick plot when close &lt; open for the given plot. <a href="#aab81434371c3f13b01452eb6fe4c3683"></a><br/></td></tr> <tr class="memitem:acacf0574c8b1029e73fdd67c209cfa73"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_fill.html">CPTFill</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#acacf0574c8b1029e73fdd67c209cfa73">decreaseFillForTradingRangePlot:recordIndex:</a></td></tr> <tr class="memdesc:acacf0574c8b1029e73fdd67c209cfa73"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets the fill used with a candlestick plot when close &lt; open for the given plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#aab81434371c3f13b01452eb6fe4c3683">-decreaseFillsForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. <a href="#acacf0574c8b1029e73fdd67c209cfa73"></a><br/></td></tr> <tr><td colspan="2"><div class="groupHeader">Bar Line Styles</div></td></tr> <tr class="memitem:a8f9edafb0c8264c62bea1aeadc709b54"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#a8f9edafb0c8264c62bea1aeadc709b54">lineStylesForTradingRangePlot:recordIndexRange:</a></td></tr> <tr class="memdesc:a8f9edafb0c8264c62bea1aeadc709b54"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of line styles used to draw candlestick or OHLC symbols for the given trading range plot. <a href="#a8f9edafb0c8264c62bea1aeadc709b54"></a><br/></td></tr> <tr class="memitem:ab9ca3f94634e86d5c5fb74c36b875179"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_line_style.html">CPTLineStyle</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ab9ca3f94634e86d5c5fb74c36b875179">lineStyleForTradingRangePlot:recordIndex:</a></td></tr> <tr class="memdesc:ab9ca3f94634e86d5c5fb74c36b875179"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets the line style used to draw candlestick or OHLC symbols for the given trading range plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#a8f9edafb0c8264c62bea1aeadc709b54">-lineStylesForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. <a href="#ab9ca3f94634e86d5c5fb74c36b875179"></a><br/></td></tr> <tr class="memitem:ab6020f62891e2e6ecba51bd5f67d446a"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ab6020f62891e2e6ecba51bd5f67d446a">increaseLineStylesForTradingRangePlot:recordIndexRange:</a></td></tr> <tr class="memdesc:ab6020f62891e2e6ecba51bd5f67d446a"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of line styles used to outline candlestick symbols when close &gt;= open for the given trading range plot. <a href="#ab6020f62891e2e6ecba51bd5f67d446a"></a><br/></td></tr> <tr class="memitem:a99a001076e83f7d70794528fdc5f54f4"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_line_style.html">CPTLineStyle</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#a99a001076e83f7d70794528fdc5f54f4">increaseLineStyleForTradingRangePlot:recordIndex:</a></td></tr> <tr class="memdesc:a99a001076e83f7d70794528fdc5f54f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets the line style used to outline candlestick symbols when close &gt;= open for the given trading range plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ab6020f62891e2e6ecba51bd5f67d446a">-increaseLineStylesForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. <a href="#a99a001076e83f7d70794528fdc5f54f4"></a><br/></td></tr> <tr class="memitem:ad304432600cde24946858e2bed07b89a"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ad304432600cde24946858e2bed07b89a">decreaseLineStylesForTradingRangePlot:recordIndexRange:</a></td></tr> <tr class="memdesc:ad304432600cde24946858e2bed07b89a"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of line styles used to outline candlestick symbols when close &lt; open for the given trading range plot. <a href="#ad304432600cde24946858e2bed07b89a"></a><br/></td></tr> <tr class="memitem:a435a89ee8c17f9cbb040e9c5f2cf195d"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_line_style.html">CPTLineStyle</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#a435a89ee8c17f9cbb040e9c5f2cf195d">decreaseLineStyleForTradingRangePlot:recordIndex:</a></td></tr> <tr class="memdesc:a435a89ee8c17f9cbb040e9c5f2cf195d"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets the line style used to outline candlestick symbols when close &lt; open for the given trading range plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ad304432600cde24946858e2bed07b89a">-decreaseLineStylesForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. <a href="#a435a89ee8c17f9cbb040e9c5f2cf195d"></a><br/></td></tr> <tr class="inherit_header pub_methods_protocol_c_p_t_plot_data_source-p"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_protocol_c_p_t_plot_data_source-p')"><img src="closed.png" alt="-"/>&nbsp;Public Instance Methods inherited from <a class="el" href="protocol_c_p_t_plot_data_source-p.html"><CPTPlotDataSource></a></td></tr> <tr class="memitem:a4f88c11590a2ec86a41bab421d207744 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#a4f88c11590a2ec86a41bab421d207744">numberOfRecordsForPlot:</a></td></tr> <tr class="memdesc:a4f88c11590a2ec86a41bab421d207744 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Required) The number of data points for the plot. <a href="#a4f88c11590a2ec86a41bab421d207744"></a><br/></td></tr> <tr class="memitem:a9dbeec1441957bf8b8b64e553499eaf9 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#a9dbeec1441957bf8b8b64e553499eaf9">numbersForPlot:field:recordIndexRange:</a></td></tr> <tr class="memdesc:a9dbeec1441957bf8b8b64e553499eaf9 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. <a href="#a9dbeec1441957bf8b8b64e553499eaf9"></a><br/></td></tr> <tr class="memitem:a7402b4e0aa6cf2376e1f335acb55ec66 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/Reference/Reference.html">NSNumber</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#a7402b4e0aa6cf2376e1f335acb55ec66">numberForPlot:field:recordIndex:</a></td></tr> <tr class="memdesc:a7402b4e0aa6cf2376e1f335acb55ec66 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a plot data value for the given plot and field. Implement one and only one of the optional methods in this section. <a href="#a7402b4e0aa6cf2376e1f335acb55ec66"></a><br/></td></tr> <tr class="memitem:af3dd375ee459541f0a8b53c700bff9a3 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(double *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#af3dd375ee459541f0a8b53c700bff9a3">doublesForPlot:field:recordIndexRange:</a></td></tr> <tr class="memdesc:af3dd375ee459541f0a8b53c700bff9a3 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. <a href="#af3dd375ee459541f0a8b53c700bff9a3"></a><br/></td></tr> <tr class="memitem:a751d55385f637298442d0fdaad503da7 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(double)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#a751d55385f637298442d0fdaad503da7">doubleForPlot:field:recordIndex:</a></td></tr> <tr class="memdesc:a751d55385f637298442d0fdaad503da7 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a plot data value for the given plot and field. Implement one and only one of the optional methods in this section. <a href="#a751d55385f637298442d0fdaad503da7"></a><br/></td></tr> <tr class="memitem:a43a84ec249a526948d1f45bf4634d289 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_numeric_data.html">CPTNumericData</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#a43a84ec249a526948d1f45bf4634d289">dataForPlot:field:recordIndexRange:</a></td></tr> <tr class="memdesc:a43a84ec249a526948d1f45bf4634d289 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. <a href="#a43a84ec249a526948d1f45bf4634d289"></a><br/></td></tr> <tr class="memitem:abc9085d1b4dd104b130f362e21ff00ea inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#abc9085d1b4dd104b130f362e21ff00ea">dataLabelsForPlot:recordIndexRange:</a></td></tr> <tr class="memdesc:abc9085d1b4dd104b130f362e21ff00ea inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a range of data labels for the given plot. <a href="#abc9085d1b4dd104b130f362e21ff00ea"></a><br/></td></tr> <tr class="memitem:ac1bda304421f3bff21f4db54282620d9 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="memItemLeft" align="right" valign="top">(<a class="el" href="interface_c_p_t_layer.html">CPTLayer</a> *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_c_p_t_plot_data_source-p.html#ac1bda304421f3bff21f4db54282620d9">dataLabelForPlot:recordIndex:</a></td></tr> <tr class="memdesc:ac1bda304421f3bff21f4db54282620d9 inherit pub_methods_protocol_c_p_t_plot_data_source-p"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Gets a data label for the given plot. This method will not be called if <a class="el" href="protocol_c_p_t_plot_data_source-p.html#abc9085d1b4dd104b130f362e21ff00ea">-dataLabelsForPlot:recordIndexRange: </a> is also implemented in the datasource. <a href="#ac1bda304421f3bff21f4db54282620d9"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A trading range plot data source. </p> </div><hr/><h2>Method Documentation</h2> <a class="anchor" id="acacf0574c8b1029e73fdd67c209cfa73"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="el" href="interface_c_p_t_fill.html">CPTFill</a> *) decreaseFillForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndex:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td> <td class="paramname"><em>index</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets the fill used with a candlestick plot when close &lt; open for the given plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#aab81434371c3f13b01452eb6fe4c3683">-decreaseFillsForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">index</td><td>The data index of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>The bar fill for the bar with the given index. If the data source returns <code>nil</code>, the default decrease fill is used. If the data source returns an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> object, no fill is drawn. </dd></dl> </div> </div> <a class="anchor" id="aab81434371c3f13b01452eb6fe4c3683"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *) decreaseFillsForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndexRange:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSRange</a>)&#160;</td> <td class="paramname"><em>indexRange</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets a range of fills used with a candlestick plot when close &lt; open for the given plot. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">indexRange</td><td>The range of the data indexes of interest. </td></tr> <tr><td class="paramname">indexRange</td><td>The range of the data indexes of interest. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a435a89ee8c17f9cbb040e9c5f2cf195d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="el" href="interface_c_p_t_line_style.html">CPTLineStyle</a> *) decreaseLineStyleForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndex:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td> <td class="paramname"><em>index</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets the line style used to outline candlestick symbols when close &lt; open for the given trading range plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ad304432600cde24946858e2bed07b89a">-decreaseLineStylesForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">index</td><td>The data index of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>The line line style for the symbol with the given index. If the data source returns <code>nil</code>, the default decrease line style is used. If the data source returns an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> object, no line is drawn. </dd></dl> </div> </div> <a class="anchor" id="ad304432600cde24946858e2bed07b89a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *) decreaseLineStylesForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndexRange:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSRange</a>)&#160;</td> <td class="paramname"><em>indexRange</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets a range of line styles used to outline candlestick symbols when close &lt; open for the given trading range plot. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">indexRange</td><td>The range of the data indexes of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>An array of line styles. </dd></dl> </div> </div> <a class="anchor" id="ae9b7253b7ae91d00dce3a0f04d45af0d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="el" href="interface_c_p_t_fill.html">CPTFill</a> *) increaseFillForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndex:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td> <td class="paramname"><em>index</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets the fill used with a candlestick plot when close &gt;= open for the given plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#acf8f90b75862cea16b180761db7ab6ac">-increaseFillsForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">index</td><td>The data index of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>The bar fill for the bar with the given index. If the data source returns <code>nil</code>, the default increase fill is used. If the data source returns an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> object, no fill is drawn. </dd></dl> </div> </div> <a class="anchor" id="acf8f90b75862cea16b180761db7ab6ac"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *) increaseFillsForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndexRange:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSRange</a>)&#160;</td> <td class="paramname"><em>indexRange</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets a range of fills used with a candlestick plot when close &gt;= open for the given plot. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">indexRange</td><td>The range of the data indexes of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>An array of fills. </dd></dl> </div> </div> <a class="anchor" id="a99a001076e83f7d70794528fdc5f54f4"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="el" href="interface_c_p_t_line_style.html">CPTLineStyle</a> *) increaseLineStyleForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndex:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td> <td class="paramname"><em>index</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets the line style used to outline candlestick symbols when close &gt;= open for the given trading range plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#ab6020f62891e2e6ecba51bd5f67d446a">-increaseLineStylesForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">index</td><td>The data index of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>The line line style for the symbol with the given index. If the data source returns <code>nil</code>, the default increase line style is used. If the data source returns an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> object, no line is drawn. </dd></dl> </div> </div> <a class="anchor" id="ab6020f62891e2e6ecba51bd5f67d446a"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *) increaseLineStylesForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndexRange:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSRange</a>)&#160;</td> <td class="paramname"><em>indexRange</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets a range of line styles used to outline candlestick symbols when close &gt;= open for the given trading range plot. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">indexRange</td><td>The range of the data indexes of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>An array of line styles. </dd></dl> </div> </div> <a class="anchor" id="ab9ca3f94634e86d5c5fb74c36b875179"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="el" href="interface_c_p_t_line_style.html">CPTLineStyle</a> *) lineStyleForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndex:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSUInteger</a>)&#160;</td> <td class="paramname"><em>index</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets the line style used to draw candlestick or OHLC symbols for the given trading range plot. This method will not be called if <a class="el" href="protocol_c_p_t_trading_range_plot_data_source-p.html#a8f9edafb0c8264c62bea1aeadc709b54">-lineStylesForTradingRangePlot:recordIndexRange: </a> is also implemented in the datasource. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">index</td><td>The data index of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>The line style for the symbol with the given index. If the data source returns <code>nil</code>, the default line style is used. If the data source returns an <a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNull_Class/Reference/Reference.html">NSNull</a> object, no line is drawn. </dd></dl> </div> </div> <a class="anchor" id="a8f9edafb0c8264c62bea1aeadc709b54"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">- (<a class="elRef" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/Reference/Reference.html">NSArray</a> *) lineStylesForTradingRangePlot: </td> <td></td> <td class="paramtype">(<a class="el" href="interface_c_p_t_trading_range_plot.html">CPTTradingRangePlot</a> *)&#160;</td> <td class="paramname"><em>plot</em></td> </tr> <tr> <td class="paramkey">recordIndexRange:</td> <td></td> <td class="paramtype">(<a class="elRef" href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_DataTypes/Reference/reference.html">NSRange</a>)&#160;</td> <td class="paramname"><em>indexRange</em>&#160;</td> </tr> <tr> <td></td> <td></td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>(Optional) Gets a range of line styles used to draw candlestick or OHLC symbols for the given trading range plot. </p> <dl class="params"><dt>Parameters:</dt><dd> <table class="params"> <tr><td class="paramname">plot</td><td>The trading range plot. </td></tr> <tr><td class="paramname">indexRange</td><td>The range of the data indexes of interest. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns:</dt><dd>An array of line styles. </dd></dl> </div> </div> <hr/>The documentation for this protocol was generated from the following file:<ul> <li>Source/<a class="el" href="_c_p_t_trading_range_plot_8h_source.html">CPTTradingRangePlot.h</a></li> </ul> </div><!-- contents --> </div><!-- doc-content --> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a></li> </ul> </div> </body> </html>
aufflick/core-plot
documentation/html/MacOS/protocol_c_p_t_trading_range_plot_data_source-p.html
HTML
bsd-3-clause
39,947
<?php defined('SYSPATH') or die('No direct script access.'); ?> 2011-05-18 11:41:51 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:06 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:10 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL mater/index was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 94 ] 2011-05-18 11:54:10 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:11 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materi/index was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 94 ] 2011-05-18 11:54:12 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:12 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL material/index was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 94 ] 2011-05-18 11:54:12 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/index was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:13 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:13 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/index was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:13 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:16 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/ca was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:17 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/car was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:17 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:18 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/care was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:18 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/careg was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:18 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/carego was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:19 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:19 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/caregory was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:20 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:21 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/ca was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:22 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:22 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/cate was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:23 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:24 --- ERROR: Http_Exception_404 [ 404 ]: The requested URL materials/catego was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 120 ] 2011-05-18 11:54:24 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:25 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:25 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:25 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:26 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:34 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:34 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:35 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:35 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:35 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:36 --- ERROR: ErrorException [ 1 ]: Class 'Model_Material' not found ~ APPPATH\classes\controller\materials.php [ 12 ] 2011-05-18 11:54:36 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:54:51 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:55:09 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 11:55:23 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 12:05:18 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ] 2011-05-18 12:05:56 --- ERROR: Http_Exception_404 [ 404 ]: Unable to find a route to match the URI: favicon.ico ~ SYSPATH\classes\kohana\request.php [ 733 ]
sysdevbol/entidad
application/logs/2011/05/18.php
PHP
bsd-3-clause
6,873
# Ivory Language Concepts ## An Embedded Language We will discuss how Ivory has several restrictions which make it less expressive than the C programming language. On their own, these restrictions would make it quite laborious to build programs in Ivory. However, Ivory has been built as an [embedded][] language inside the Haskell programming language. This means Ivory programs can be constructed using the Haskell language as a macro language. Rather than inventing its own syntax and type system, the Ivory language reuses the syntax and type system of Haskell. So, when we refer to programs in the Ivory language, we're really talking about a Haskell value which is constructed using the Haskell library `Ivory.Language`. These values can then be interpreted by the Ivory interpreter, or compiled by an Ivory language backend. Currently, the Ivory language has a single backend which produces C source files. Because Ivory programs use Haskell syntax and types, an Ivory programmer should first have basic familiarity with the Haskell programming language. ## A Systems Language Ivory is a systems language designed for a natural compilation to C. Most of the concepts familiar to a C programmer are present in Ivory: procedures, return values, machine-sized integers and floating point numbers, structures, arrays, and strings are all available in the Ivory language. The Ivory language maps naturally to a restricted subset of C, and has a compiler backend to output C source code. Ivory also supports importing and calling external C code, and coercing Ivory types to C types. Ivory is designed for implementing systems and application software for high assurance systems. Therefore, some language trade-offs have been made so that programs can have safety properties guaranteed by construction. Ivory's feature restrictions eliminate many valid, correct programs which are possible to write in C. In general, Ivory eliminates many sources of dynamic behavior in favor of safety. Average case performance is often sacrificed in order to bound the worst case; the programmer can expect compiled Ivory programs to perhaps use more memory, code, or time than functionally equivalent safe programs written in C. While this means Ivory may not be a good language for all applications, within the domain of creating high-assurance software, these trade-offs are what make Ivory ideal. ## Differences from the C Language One major difference between Ivory and C is the treatment of memory allocation and reference. Ivory does not allow nullable pointers, unbounded memory access, or heap allocation. These restrictions are made with safety and security in mind. Nullable pointers may complicate control flow, which makes it more difficult for the user to create a correct program. Unbounded memory access is difficult for both users and verification tools to reason about. Heap allocation is difficult to implement without nullable pointers, and may create problems reasoning about time (i.e. allocator complexity) and space (i.e. memory leaks, allocation bounds) of user code. Ivory permits global allocation and stack allocation, and enforces safety of stack allocated memory by preventing references from existing after the referent's stack frame no longer exists. In addition to treating memory more carefully than C, Ivory makes restrictions on loop control structures to ensure each loop has a fixed upper bound. We expect many Ivory users will want to use an external Worst-Case Execution Time (WCET) tool as part of safety or schedulability analysis, therefore, we have ensured that it will be trivial for external tools to discover loop bounds. It is possible to create nonterminating programs in Ivory using the `forever` control flow primitive, which is designed for implementing programs which *should never* terminate. It is also possible to build nonterminating programs by call recursion. At this time, the use of forever and recursion are allowed by the Ivory compiler, but these features may be restricted or removed in the future. ## Support for Verification Ivory was created to improve safety for systems and application programmers. While the Ivory language does guarantee some safety properties by construction, it also supports specifying run-time properties using external provers. ```haskell add :: Def ('[Uint32,Uint32] :-> Uint32) add = proc "add" $ \ x y -> ensures (\r -> r ==? x + y) $ body $ ret (x + y) ``` *A sample ivory program decorated with an `ensures` clause, checking the return value against a specification. This is a trivial case where the specification and implementation are identical.* The C language backend supports rendering Ivory assertions for static checking with the [CBMC model checker][cbmc]. The SMACCMPilot project build system includes integration for CBMC verification of the SMACCMPilot source code. We also provide our own [symbolic simulator][mc] for verifying Ivory assertions using [CVC4][cvc4]. [embedded]:http://wikipedia.com/wiki/Domain-specific_language#Domain-specific_language_topics [cbmc]: http://www.cprover.org/cbmc/ [mc]: https://github.com/GaloisInc/ivory/tree/master/ivory-model-check [cvc4]: http://cvc4.cs.nyu.edu/web/
GaloisInc/ivorylang-org
pages/ivory-concepts.md
Markdown
bsd-3-clause
5,241
/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the OpenSimulator Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; using System.Reflection; using log4net; using OpenMetaverse; namespace OpenSim.Data.MSSQL { /// <summary> /// A management class for the MS SQL Storage Engine /// </summary> public class MSSQLManager { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// <summary> /// Connection string for ADO.net /// </summary> private readonly string connectionString; public MSSQLManager(string dataSource, string initialCatalog, string persistSecurityInfo, string userId, string password) { SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = dataSource; builder.InitialCatalog = initialCatalog; builder.PersistSecurityInfo = Convert.ToBoolean(persistSecurityInfo); builder.UserID = userId; builder.Password = password; builder.ApplicationName = Assembly.GetEntryAssembly().Location; connectionString = builder.ToString(); } /// <summary> /// Initialize the manager and set the connectionstring /// </summary> /// <param name="connection"></param> public MSSQLManager(string connection) { connectionString = connection; } public SqlConnection DatabaseConnection() { SqlConnection conn = new SqlConnection(connectionString); //TODO is this good??? Opening connection here conn.Open(); return conn; } #region Obsolete functions, can be removed! /// <summary> /// /// </summary> /// <param name="dt"></param> /// <param name="name"></param> /// <param name="type"></param> [Obsolete("Do not use!")] protected static void createCol(DataTable dt, string name, Type type) { DataColumn col = new DataColumn(name, type); dt.Columns.Add(col); } /// <summary> /// Define Table function /// </summary> /// <param name="dt"></param> /// <returns></returns> /* [Obsolete("Do not use!")] protected static string defineTable(DataTable dt) { string sql = "create table " + dt.TableName + "("; string subsql = String.Empty; foreach (DataColumn col in dt.Columns) { if (subsql.Length > 0) { // a map function would rock so much here subsql += ",\n"; } subsql += col.ColumnName + " " + SqlType(col.DataType); if (col == dt.PrimaryKey[0]) { subsql += " primary key"; } } sql += subsql; sql += ")"; return sql; } */ #endregion /// <summary> /// Type conversion function /// </summary> /// <param name="type">a type</param> /// <returns>a sqltype</returns> /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks> /* [Obsolete("Used by a obsolete methods")] public static string SqlType(Type type) { if (type == typeof(String)) { return "varchar(255)"; } if (type == typeof(Int32)) { return "integer"; } if (type == typeof(Double)) { return "float"; } if (type == typeof(Byte[])) { return "image"; } return "varchar(255)"; } */ /// <summary> /// Type conversion to a SQLDbType functions /// </summary> /// <param name="type"></param> /// <returns></returns> internal SqlDbType DbtypeFromType(Type type) { if (type == typeof(string)) { return SqlDbType.VarChar; } if (type == typeof(double)) { return SqlDbType.Float; } if (type == typeof(Single)) { return SqlDbType.Float; } if (type == typeof(int)) { return SqlDbType.Int; } if (type == typeof(bool)) { return SqlDbType.Bit; } if (type == typeof(UUID)) { return SqlDbType.UniqueIdentifier; } if (type == typeof(sbyte)) { return SqlDbType.Int; } if (type == typeof(Byte[])) { return SqlDbType.Image; } if (type == typeof(uint) || type == typeof(ushort)) { return SqlDbType.Int; } if (type == typeof(ulong)) { return SqlDbType.BigInt; } return SqlDbType.VarChar; } /// <summary> /// Creates value for parameter. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> private static object CreateParameterValue(object value) { Type valueType = value.GetType(); if (valueType == typeof(UUID)) //TODO check if this works { return ((UUID) value).Guid; } if (valueType == typeof(UUID)) { return ((UUID)value).Guid; } if (valueType == typeof(bool)) { return (bool)value ? 1 : 0; } if (valueType == typeof(Byte[])) { return value; } if (valueType == typeof(int)) { return value; } return value; } /// <summary> /// Create a parameter for a command /// </summary> /// <param name="parameterName">Name of the parameter.</param> /// <param name="parameterObject">parameter object.</param> /// <returns></returns> internal SqlParameter CreateParameter(string parameterName, object parameterObject) { return CreateParameter(parameterName, parameterObject, false); } /// <summary> /// Creates the parameter for a command. /// </summary> /// <param name="parameterName">Name of the parameter.</param> /// <param name="parameterObject">parameter object.</param> /// <param name="parameterOut">if set to <c>true</c> parameter is a output parameter</param> /// <returns></returns> internal SqlParameter CreateParameter(string parameterName, object parameterObject, bool parameterOut) { //Tweak so we dont always have to add @ sign if (!parameterName.StartsWith("@")) parameterName = "@" + parameterName; //HACK if object is null, it is turned into a string, there are no nullable type till now if (parameterObject == null) parameterObject = ""; SqlParameter parameter = new SqlParameter(parameterName, DbtypeFromType(parameterObject.GetType())); if (parameterOut) { parameter.Direction = ParameterDirection.Output; } else { parameter.Direction = ParameterDirection.Input; parameter.Value = CreateParameterValue(parameterObject); } return parameter; } private static readonly Dictionary<string, string> emptyDictionary = new Dictionary<string, string>(); /// <summary> /// Run a query and return a sql db command /// </summary> /// <param name="sql">The SQL query.</param> /// <returns></returns> internal AutoClosingSqlCommand Query(string sql) { return Query(sql, emptyDictionary); } /// <summary> /// Runs a query with protection against SQL Injection by using parameterised input. /// </summary> /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> /// <returns>A Sql DB Command</returns> internal AutoClosingSqlCommand Query(string sql, Dictionary<string, string> parameters) { SqlCommand dbcommand = DatabaseConnection().CreateCommand(); dbcommand.CommandText = sql; foreach (KeyValuePair<string, string> param in parameters) { dbcommand.Parameters.AddWithValue(param.Key, param.Value); } return new AutoClosingSqlCommand(dbcommand); } /// <summary> /// Runs a query with protection against SQL Injection by using parameterised input. /// </summary> /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> /// <param name="sqlParameter">A parameter - use createparameter to create parameter</param> /// <returns></returns> internal AutoClosingSqlCommand Query(string sql, SqlParameter sqlParameter) { SqlCommand dbcommand = DatabaseConnection().CreateCommand(); dbcommand.CommandText = sql; dbcommand.Parameters.Add(sqlParameter); return new AutoClosingSqlCommand(dbcommand); } /// <summary> /// Checks if we need to do some migrations to the database /// </summary> /// <param name="migrationStore">migrationStore.</param> public void CheckMigration(string migrationStore) { using (SqlConnection connection = DatabaseConnection()) { Assembly assem = GetType().Assembly; MSSQLMigration migration = new MSSQLMigration(connection, assem, migrationStore); migration.Update(); } } #region Old Testtable functions /// <summary> /// Execute a SQL statement stored in a resource, as a string /// </summary> /// <param name="name">the ressource string</param> public void ExecuteResourceSql(string name) { using (IDbCommand cmd = Query(getResourceString(name), new Dictionary<string, string>())) { cmd.ExecuteNonQuery(); } } /// <summary> /// Given a list of tables, return the version of the tables, as seen in the database /// </summary> /// <param name="tableList"></param> public void GetTableVersion(Dictionary<string, string> tableList) { Dictionary<string, string> param = new Dictionary<string, string>(); param["dbname"] = new SqlConnectionStringBuilder(connectionString).InitialCatalog; using (IDbCommand tablesCmd = Query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG=@dbname", param)) using (IDataReader tables = tablesCmd.ExecuteReader()) { while (tables.Read()) { try { string tableName = (string)tables["TABLE_NAME"]; if (tableList.ContainsKey(tableName)) tableList[tableName] = tableName; } catch (Exception e) { m_log.Error(e.ToString()); } } } } /// <summary> /// /// </summary> /// <param name="name"></param> /// <returns></returns> private string getResourceString(string name) { Assembly assem = GetType().Assembly; string[] names = assem.GetManifestResourceNames(); foreach (string s in names) if (s.EndsWith(name)) using (Stream resource = assem.GetManifestResourceStream(s)) { using (StreamReader resourceReader = new StreamReader(resource)) { string resourceString = resourceReader.ReadToEnd(); return resourceString; } } throw new Exception(string.Format("Resource '{0}' was not found", name)); } #endregion /// <summary> /// Returns the version of this DB provider /// </summary> /// <returns>A string containing the DB provider</returns> public string getVersion() { Module module = GetType().Module; // string dllName = module.Assembly.ManifestModule.Name; Version dllVersion = module.Assembly.GetName().Version; return string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, dllVersion.Revision); } } }
intari/OpenSimMirror
OpenSim/Data/MSSQL/MSSQLManager.cs
C#
bsd-3-clause
15,238
/* Copyright 2015 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /** * @fileoverview * Common styles for Settings pages. */ :host { display: block; } :host(.expanded) { height: 100%; } :host(.expanded) #header { display: none; } #header .title { @apply(--paper-font-body2); } paper-material { background-color: white; box-sizing: border-box; overflow: hidden; } paper-material, #placeholder { margin-bottom: 16px; width: 605px; } :host(.neon-animating) paper-material { position: fixed; z-index: 1; } :host(.expanded) paper-material { margin-bottom: 0; min-height: 100%; } #placeholder { visibility: hidden; } :host(:not(.neon-animating)) #placeholder { position: absolute; }
Workday/OpenFrame
chrome/browser/resources/settings/settings_page/settings_section.css
CSS
bsd-3-clause
822
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=D9eeee9766ab40088b1f88caccc0770c"></script> <script type="text/javascript" src="http://api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js"></script> <title>热力图功能示例</title> <style type="text/css"> ul,li{list-style: none;margin:0;padding:0;float:left;} html{height:100%} body{height:100%;margin:0px;padding:0px;font-family:"微软雅黑";} /*#container{height:500px;width:100%;}*/ #container{height:100%;width:100%;} #r-result{width:100%;} </style> </head> <body> <div id="container"></div> <!-- <div id="r-result"> <input type="button" onclick="openHeatmap();" value="显示热力图"/><input type="button" onclick="closeHeatmap();" value="关闭热力图"/> </div> --> </body> </html> <script type="text/javascript"> var map = new BMap.Map("container"); // 创建地图实例 var point = new BMap.Point(114.311831,30.598651); //地图中心点 map.centerAndZoom(point, 13); // 初始化地图,设置中心点坐标和地图级别 map.enableScrollWheelZoom(); // 允许滚轮缩放 /* var points =[ {"lng":114.277223,"lat":30.594135,"count":150}, {"lng":114.292745,"lat":30.591649,"count":90}, {"lng":114.303381,"lat":30.584685,"count":80}]; */ var points = <?php echo json_encode($points); ?>; if(!isSupportCanvas()){ alert('热力图目前只支持有canvas支持的浏览器,您所使用的浏览器不能使用热力图功能~') } //详细的参数,可以查看heatmap.js的文档 https://github.com/pa7/heatmap.js/blob/master/README.md //参数说明如下: /* visible 热力图是否显示,默认为true * opacity 热力的透明度,1-100 * radius 势力图的每个点的半径大小 * gradient {JSON} 热力图的渐变区间 . gradient如下所示 * { .2:'rgb(0, 255, 255)', .5:'rgb(0, 110, 255)', .8:'rgb(100, 0, 255)' } 其中 key 表示插值的位置, 0~1. value 为颜色值. */ heatmapOverlay = new BMapLib.HeatmapOverlay({"radius":20}); map.addOverlay(heatmapOverlay); heatmapOverlay.setDataSet({data:points, max:100}); //是否显示热力图 function openHeatmap(){ heatmapOverlay.show(); } function closeHeatmap(){ heatmapOverlay.hide(); } closeHeatmap(); function setGradient(){ /*格式如下所示: { 0:'rgb(102, 255, 0)', .5:'rgb(255, 170, 0)', 1:'rgb(255, 0, 0)' }*/ var gradient = {}; var colors = document.querySelectorAll("input[type='color']"); colors = [].slice.call(colors,0); colors.forEach(function(ele){ gradient[ele.getAttribute("data-key")] = ele.value; }); heatmapOverlay.setOptions({"gradient":gradient}); } //判断浏览区是否支持canvas function isSupportCanvas(){ var elem = document.createElement('canvas'); return !!(elem.getContext && elem.getContext('2d')); } //heat map openHeatmap(); //sea points var options = { size: BMAP_POINT_SIZE_SMALL, shape: BMAP_POINT_SHAPE_STAR, color: '#d340c3' } var mypoints = []; for (var i = 0; i < points.length; i++) { mypoints.push(new BMap.Point(points[i]['lng'], points[i]['lat'])); } var pointCollection = new BMap.PointCollection(mypoints, options); pointCollection.addEventListener('click', function (e) { alert('单击点的坐标为:' + e.point.lng + ',' + e.point.lat); }); map.addOverlay(pointCollection); </script>
yjhu/wowewe
views/wap/heatmap.php
PHP
bsd-3-clause
3,796
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68b.c Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-68b.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: connect_socket Read data using a connect socket (client side) * GoodSource: Fixed string * Sink: w32_execv * BadSink : execute command with wexecv * Flow Variant: 68 Data flow: data passed as a global variable from one function to another in different source files * * */ #include "std_testcase.h" #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"-c" #define COMMAND_ARG2 L"ls " #define COMMAND_ARG3 data #endif #ifdef _WIN32 #include <winsock2.h> #include <windows.h> #include <direct.h> #pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ #define CLOSE_SOCKET closesocket #else /* NOT _WIN32 */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define CLOSE_SOCKET close #define SOCKET int #endif #define TCP_PORT 27015 #define IP_ADDRESS "127.0.0.1" #include <process.h> #define EXECV _wexecv extern wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68_badData; extern wchar_t * CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68_goodG2BData; /* all the sinks are the same, we just want to know where the hit originated if a tool flags one */ #ifndef OMITBAD void CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68b_badSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68_badData; { wchar_t *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, 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 CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68b_goodG2BSink() { wchar_t * data = CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68_goodG2BData; { wchar_t *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, 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 */
JianpingZeng/xcc
xcc/test/juliet/testcases/CWE78_OS_Command_Injection/s05/CWE78_OS_Command_Injection__wchar_t_connect_socket_w32_execv_68b.c
C
bsd-3-clause
2,986
# Dygraphs in Elm This package provides component to render [dygraphs] charts. [dygraphs]: https://github.com/danvk/dygraphs ## Basic Usage ```elm content : Html msg content = Dygraphs.toHtml [ Dygraphs.labels [ "X" , "Label A" , "Label B" ] , Dygraphs.data <| Dygraphs.Rows [ [1, 3, 6], [2, 34, -1] ] ] [] ``` Important: This library not contains `dygraphs` library than you should add it to your `index.html`.
DenisKolodin/elm-dygraphs
README.md
Markdown
bsd-3-clause
455
http://localhost:8080/users/reset/{{ uid }}/{{ token }}/
giovannicode/djangoseller
main/templates/emails/reset_password_link.html
HTML
bsd-3-clause
57
/* Copyright (c) 2010-2018, Delft University of Technology * All rigths reserved * * This file is part of the Tudat. Redistribution and use in source and * binary forms, with or without modification, are permitted exclusively * under the terms of the Modified BSD license. You should have received * a copy of the license with this file. If not, please or visit: * http://tudat.tudelft.nl/LICENSE. */ #ifndef TUDAT_ONEWAYDOPPLERPARTIAL_H #define TUDAT_ONEWAYDOPPLERPARTIAL_H #include <functional> #include <Eigen/Core> #include "Tudat/Astrodynamics/BasicAstrodynamics/physicalConstants.h" #include "Tudat/Astrodynamics/ObservationModels/oneWayDopplerObservationModel.h" #include "Tudat/Astrodynamics/OrbitDetermination/EstimatableParameters/estimatableParameter.h" #include "Tudat/Astrodynamics/OrbitDetermination/ObservationPartials/observationPartial.h" #include "Tudat/Astrodynamics/OrbitDetermination/ObservationPartials/positionPartials.h" #include "Tudat/Astrodynamics/OrbitDetermination/LightTimeCorrectionPartials/lightTimeCorrectionPartial.h" #include "Tudat/Astrodynamics/ObservationModels/linkTypeDefs.h" namespace tudat { namespace observation_partials { //! Base class to compute the state partial scaling factors for the proper time component of one-way Doppler observables class OneWayDopplerProperTimeComponentScaling: public PositionPartialScaling { public: //! Constructor /*! * Constructor * \param linkEndWithPartial Link end for which this object computes partials */ OneWayDopplerProperTimeComponentScaling( const observation_models::LinkEndType linkEndWithPartial ): linkEndWithPartial_( linkEndWithPartial ){ } //! Destructor virtual ~OneWayDopplerProperTimeComponentScaling( ){ } //! Function to retrieve the scaling factor for the derivative w.r.t. the position of a given link end /*! * Function to retrieve the scaling factor for the derivative w.r.t. the position of a given link end * \param linkEndType Link end position for which partial scaling is to be retrieved. * \return The scaling factor for the derivative w.r.t. the position of a given link end */ virtual Eigen::Matrix< double, 1, 3 > getPositionScalingFactor( const observation_models::LinkEndType linkEndType ) = 0; //! Function to retrieve the scaling factor for the derivative w.r.t. the velocity of a given link end /*! * Function to retrieve the scaling factor for the derivative w.r.t. the velocity of a given link end * \param linkEndType Link end velocity for which partial scaling is to be retrieved. * \return The scaling factor for the derivative w.r.t. the velocity of a given link end */ virtual Eigen::Matrix< double, 1, 3 > getVelocityScalingFactor( const observation_models::LinkEndType linkEndType ) = 0; //! Function to get the direct partial derivative, and associated time, of proper time /*! * Function to get the direct partial derivative (e.g. independent of state partials), and associated time, of proper * time, w.r.t. parameter defined by parameterType. * \param parameterType Parameter for which partial is to be checked * \return Direct partial derivative, and associated time, of proper time rate */ virtual std::pair< Eigen::Matrix< double, 1, Eigen::Dynamic >, double > getProperTimeParameterPartial( const estimatable_parameters::EstimatebleParameterIdentifier parameterType ) = 0; //! Function to get the size of the direct dependency of proper time rate on parameter /*! * Function to get the size of the direct dependency (e.g. independent of state dependency) of proper time rate on parameter. * Returns zero for no dependency. * \param parameterType Parameter for which dependency is to be checked. * \return Number of columns in direct partial derivative of proper time rates w.r.t. parameterType */ virtual int getParameterDependencySize( const estimatable_parameters::EstimatebleParameterIdentifier parameterType ) = 0; protected: //! Link end for which this object computes partials observation_models::LinkEndType linkEndWithPartial_; }; //! Class to compute the state partial scaling factors for first-order proper time component of one-way Doppler observables class OneWayDopplerDirectFirstOrderProperTimeComponentScaling: public OneWayDopplerProperTimeComponentScaling { public: //! Constructor /*! * Constructor * \param properTimeRateModel Object used to compute proper time rate * \param linkEndWithPartial Link end for which this partial is created * \param computeStatePartials Boolean to denote whether state partials are to be computed. It is false if the link end for * which this object computes the proper time partials is fixed to the perturbing body. */ OneWayDopplerDirectFirstOrderProperTimeComponentScaling( const std::shared_ptr< observation_models::DirectFirstOrderDopplerProperTimeRateInterface > properTimeRateModel, const observation_models::LinkEndType linkEndWithPartial, const bool computeStatePartials ): OneWayDopplerProperTimeComponentScaling( linkEndWithPartial ), properTimeRateModel_( properTimeRateModel ), computeStatePartials_( computeStatePartials ){ } //! Update the scaling object to the current times and states /*! * Update the scaling object to the current times and states * \param linkEndStates List of states at each link end during observation. * \param times List of times at each link end during observation. * \param fixedLinkEnd Link end at which observation time is defined, i.e. link end for which associated time * is kept constant when computing observable. * \param currentObservation Value of observation (proper time rate) for which partial scaling is to be computed */ void update( const std::vector< Eigen::Vector6d >& linkEndStates, const std::vector< double >& times, const observation_models::LinkEndType fixedLinkEnd, const Eigen::VectorXd currentObservation ); //! Function to retrieve the scaling factor for the derivative w.r.t. the position of a given link end /*! * Function to retrieve the scaling factor for the derivative w.r.t. the position of a given link end * \param linkEndType Link end position for which partial scaling is to be retrieved. * \return The scaling factor for the derivative w.r.t. the position of a given link end */ Eigen::Matrix< double, 1, 3 > getPositionScalingFactor( const observation_models::LinkEndType linkEndType ); //! Function to retrieve the scaling factor for the derivative w.r.t. the velocity of a given link end /*! * Function to retrieve the scaling factor for the derivative w.r.t. the velocity of a given link end * \param linkEndType Link end velocity for which partial scaling is to be retrieved. * \return The scaling factor for the derivative w.r.t. the velocity of a given link end */ Eigen::Matrix< double, 1, 3 > getVelocityScalingFactor( const observation_models::LinkEndType linkEndType ); //! Function to compute partial of proper time rate w.r.t. equivalence principle violation parameter /*! * Function to compute partial of proper time rate w.r.t. equivalence principle violation parameter * \return Partial of proper time rate w.r.t. equivalence principle violation parameter */ double getEquivalencePrincipleViolationParameterPartial( ) { return -currentGravitationalParameter_ / currentDistance_ * physical_constants::INVERSE_SQUARE_SPEED_OF_LIGHT; } //! Function to get the direct partial derivative, and associated time, of proper time /*! * Function to get the direct partial derivative (e.g. independent of state partials), and associated time, of proper * time, w.r.t. parameter defined by parameterType. * \param parameterType Parameter for which partial is to be checked * \return Direct partial derivative, and associated time, of proper time rate */ std::pair< Eigen::Matrix< double, 1, Eigen::Dynamic >, double > getProperTimeParameterPartial( const estimatable_parameters::EstimatebleParameterIdentifier parameterType ); //! Function to get the size of the direct dependency of proper time rate on parameter /*! * Function to get the size of the direct dependency (e.g. independent of state dependency) of proper time rate on parameter. * Returns zero for no dependency. * \param parameterType Parameter for which dependency is to be checked. * \return Number of columns in direct partial derivative of proper time rates w.r.t. parameterType */ int getParameterDependencySize( const estimatable_parameters::EstimatebleParameterIdentifier parameterType ); private: //! Object used to compute proper time rate std::shared_ptr< observation_models::DirectFirstOrderDopplerProperTimeRateInterface > properTimeRateModel_; //! Partial of proper time rate w.r.t. position, as computed by last call to update function. Eigen::Matrix< double, 1, 3 > partialWrPosition_; //! Partial of proper time rate w.r.t. velocity, as computed by last call to update function. Eigen::Matrix< double, 1, 3 > partialWrtVelocity_; //! Current time at link end for which this object computes proper time ratre partials double currentLinkEndTime_; //! Current distance between perturbing body center of mass and computation point. double currentDistance_; //! Current value of gravitational parameter of central body. double currentGravitationalParameter_; //! Boolean to denote whether state partials are to be computed /*! * Boolean to denote whether state partials are to be computed. It is false if the link end for whicj this object computes * the proper time partials is fixed to the perturbing body. */ bool computeStatePartials_; }; //! Derived class for scaling three-dimensional position partial to one-way doppler observable partial /*! * Derived class for scaling three-dimensional position partial to one-way doppler observable partial. Implementation is taken * from Moyer(2000) and is separately implemented for fixed receiver and transmitter. */ class OneWayDopplerScaling: public PositionPartialScaling { public: //! Destructor /*! * Destructor * \param transmitterAccelerationFunction Function returning the Cartesian acceleration of the transmitter as a function of * time. * \param receiverAccelerationFunction Function returning the Cartesian acceleration of the receiver as a function of * time. * \param transmitterProperTimePartials Object used to compute the contribution of receiver proper time rate to the scaling * \param receiverProperTimePartials Object used to compute the contribution of transmitter proper time rate to the scaling */ OneWayDopplerScaling( const std::function< Eigen::Vector3d( const double ) > transmitterAccelerationFunction, const std::function< Eigen::Vector3d( const double ) > receiverAccelerationFunction, const std::shared_ptr< OneWayDopplerProperTimeComponentScaling > transmitterProperTimePartials = nullptr, const std::shared_ptr< OneWayDopplerProperTimeComponentScaling > receiverProperTimePartials = nullptr ): transmitterAccelerationFunction_( transmitterAccelerationFunction ), receiverAccelerationFunction_( receiverAccelerationFunction ), transmitterProperTimePartials_( transmitterProperTimePartials ), receiverProperTimePartials_( receiverProperTimePartials ){ } //! Destructor ~OneWayDopplerScaling( ){ } //! Update the scaling object to the current times and states /*! * Update the scaling object to the current times and states * \param linkEndStates List of states at each link end during observation Index of vector maps to link end for a * given ObsevableType through getLinkEndIndex function. * \param times List of times at each link end during observation. * \param fixedLinkEnd Link end at which observation time is defined, i.e. link end for which associated time * is kept constant when computing observable. * \param currentObservation Value of observation for which partial scaling is to be computed */ void update( const std::vector< Eigen::Vector6d >& linkEndStates, const std::vector< double >& times, const observation_models::LinkEndType fixedLinkEnd, const Eigen::VectorXd currentObservation = Eigen::VectorXd::Constant( 1, TUDAT_NAN ) ); //! Function to retrieve the position scaling factor for specific link end /*! * Function to retrieve the position scaling factor for specific link end * \param linkEndType Link end for which scaling factor is to be returned * \return Position partial scaling factor at current link end */ Eigen::Matrix< double, 1, 3 > getPositionScalingFactor( const observation_models::LinkEndType linkEndType ); //! Function to retrieve the velocity scaling factor for specific link end /*! * Function to retrieve the velocity scaling factor for specific link end * \param linkEndType Link end for which scaling factor is to be returned * \return Velocity partial scaling factor at current link end */ Eigen::Matrix< double, 1, 3 > getVelocityScalingFactor( const observation_models::LinkEndType linkEndType ); //! Function to get the fixed link end for last computation of update() function. /*! * Fixed link end for last computation of update() function. * \return Function to get the fixed link end for last computation of update() function. */ observation_models::LinkEndType getCurrentLinkEndType( ) { return currentLinkEndType_; } //! Function to return factor by which light-time correction state partial is to be scaled for one-way Doppler partial /*! * Function to return factor by which light-time correction state partial is to be scaled to be added to one-way * \return Factor by which light-time correction state partial is to be scaled for one-way Doppler partial */ double getLightTimeCorrectionPartialScaling( ) { return lightTimeEffectPositionScalingFactor_; } //! Function to return object used to compute the contribution of transmitter proper time rate to the scaling /*! * Function to return object used to compute the contribution of transmitter proper time rate to the scaling * \return Object used to compute the contribution of transmitter proper time rate to the scaling */ std::shared_ptr< OneWayDopplerProperTimeComponentScaling > getTransmitterProperTimePartials( ) { return transmitterProperTimePartials_; } //! Function to return object used to compute the contribution of receiver proper time rate to the scaling /*! * Function to return object used to compute the contribution of receiver proper time rate to the scaling * \return Object used to compute the contribution of receiver proper time rate to the scaling */ std::shared_ptr< OneWayDopplerProperTimeComponentScaling > getReceiverProperTimePartials( ) { return receiverProperTimePartials_; } //! Function to get the size of the direct dependency of proper time rate on parameter /*! * Function to get the size of the direct dependency (e.g. independent of state dependency) of proper time rate on parameter. * Returns zero for no dependency. Requires that the transmitter/receiver have the same size of dependency, or that * one of them has dependency size zero (no dependency). * \param parameterType Parameter for which dependency is to be checked. * \return Number of columns in direct partial derivative of proper time rates w.r.t. parameterType */ int getProperTimeParameterDependencySize( const estimatable_parameters::EstimatebleParameterIdentifier parameterType ); //! Function to get the direct partial derivatives, and associated times, of proper time components of Doppler partials /*! * Function to get the direct partial derivatives (e.g. independent of state partials), and associated times, of proper * time components of Doppler partials, w.r.t. parameter defined by parameterType. * \param parameterType Parameter for which partial is to be checked * \return Direct partial derivatives, and associated times, of proper time components of Doppler partials */ std::vector< std::pair< Eigen::Matrix< double, 1, Eigen::Dynamic >, double > > getProperTimeParameterPartial( const estimatable_parameters::EstimatebleParameterIdentifier parameterType ); private: //! Computed position scaling factor, for relative position vector (transmitter to receiver) Eigen::Matrix< double, 1, 3 > positionScalingFactor_; //! Factor by which light time correction state partial is to be scaled to be added to one-way Doppler partial /*! * Factor by which light time correction state partial is to be scaled to be added to one-way Doppler partial. ALso forms * part of the total partial w.r.t. the relative position. */ double lightTimeEffectPositionScalingFactor_; //! Computed scaling factor for receiver velocity partials. Eigen::Matrix< double, 1, 3 > receiverVelocityScalingFactor_; //! Computed scaling factor for transmitter velocity partials. Eigen::Matrix< double, 1, 3 > transmitterVelocityScalingFactor_; //! Fixed link end for last computation of update() function. observation_models::LinkEndType currentLinkEndType_; //! Function returning the Cartesian acceleration of the transmitter as a function of time. std::function< Eigen::Vector3d( const double ) > transmitterAccelerationFunction_; //! Function returning the Cartesian acceleration of the receiver as a function of time. std::function< Eigen::Vector3d( const double ) > receiverAccelerationFunction_; //! Object used to compute the contribution of receiver proper time rate to the scaling std::shared_ptr< OneWayDopplerProperTimeComponentScaling > transmitterProperTimePartials_; //! Object used to compute the contribution of transmitter proper time rate to the scaling std::shared_ptr< OneWayDopplerProperTimeComponentScaling > receiverProperTimePartials_; }; //! Function to computed the derivative of the unit vector from transmitter to receiver w.r.t. the observation time /*! * Function to computed the derivative of the unit vector from transmitter to receiver w.r.t. the observation time * \param vectorToReceiver Vector from transmitter to receiver (unnormalized). * \param unitVectorToReceiver Vector from transmitter to receiver (normalized). * \param linkEndDistance Distance between transmitter and receiver * \param linkEndVelocity Velocity of link end at which the time is varied * \return Derivative of the unit vector from transmitter to receiver w.r.t. the observation time */ Eigen::Vector3d computePartialOfUnitVectorWrtLinkEndTime( const Eigen::Vector3d& vectorToReceiver, const Eigen::Vector3d& unitVectorToReceiver, const double linkEndDistance, const Eigen::Vector3d linkEndVelocity ); //! Function to computed the derivative of velocity component along line-of-sight vector w.r.t. the observation time /*! * Function to computed the derivative of velocity component along line-of-sight vector w.r.t. the observation time * \param vectorToReceiver Vector from transmitter to receiver (unnormalized). * \param projectedLinkEndVelocity Velocity vector of link end, projected along line-of-sight vector * \param variableLinkEndVelocity Velocity of link end at which the time is varied * \param projectedLinkEndAcceleration Acceleration vector of link end, projected along line-of-sight vector * \param linkEndIsReceiver Boolean denoting whether the link end at which partial is taken at receiver (if true) or transmitter * (if false) * \param projectedLinkEndIsVariableLinkEnd Boolean denoting whether the link end at which partial is the reference link end * for the observation (if false) or not (if true) * \return Derivative of velocity component along line-of-sight vector w.r.t. the observation time */ double computePartialOfProjectedLinkEndVelocityWrtAssociatedTime( const Eigen::Vector3d& vectorToReceiver, const Eigen::Vector3d& projectedLinkEndVelocity, const Eigen::Vector3d& variableLinkEndVelocity, const Eigen::Vector3d& projectedLinkEndAcceleration, const bool linkEndIsReceiver, const bool projectedLinkEndIsVariableLinkEnd = true ); //! Class to compute the partial derivatives of a one-way doppler observation partial. class OneWayDopplerPartial: public ObservationPartial< 1 > { public: typedef std::vector< std::pair< Eigen::Matrix< double, 1, Eigen::Dynamic >, double > > OneWayDopplerPartialReturnType; typedef std::pair< Eigen::Matrix< double, 1, Eigen::Dynamic >, double > SingleOneWayDopplerPartialReturnType; //! Constructor /*! * Constructor * \param oneWayDopplerScaler Scaling object used for mapping partials of positions to partials of observable * \param positionPartialList List of position partials per link end. * \param parameterIdentifier Id of parameter for which instance of class computes partial derivatives. * \param lighTimeCorrectionPartials List if light-time correction partial objects. */ OneWayDopplerPartial( const std::shared_ptr< OneWayDopplerScaling > oneWayDopplerScaler, const std::map< observation_models::LinkEndType, std::shared_ptr< CartesianStatePartial > >& positionPartialList, const estimatable_parameters::EstimatebleParameterIdentifier parameterIdentifier, const std::vector< std::shared_ptr< observation_partials::LightTimeCorrectionPartial > >& lighTimeCorrectionPartials = std::vector< std::shared_ptr< observation_partials::LightTimeCorrectionPartial > >( ) ); //! Destructor. ~OneWayDopplerPartial( ) { } //! Function to calculate the observation partial(s) at required time and state /*! * Function to calculate the observation partial(s) at required time and state. State and time * are typically obtained from evaluation of observation model. * \param states Link end states. Index maps to link end for a given ObsevableType through getLinkEndIndex function. * \param times Link end time. * \param linkEndOfFixedTime Link end that is kept fixed when computing the observable. * \param currentObservation Value of the observation for which the partial is to be computed (default NaN for * compatibility purposes). * \return Vector of pairs containing partial values and associated times. */ OneWayDopplerPartialReturnType calculatePartial( const std::vector< Eigen::Vector6d >& states, const std::vector< double >& times, const observation_models::LinkEndType linkEndOfFixedTime, const Eigen::Vector1d& currentObservation = Eigen::Vector1d::Constant( TUDAT_NAN ) ); //! Function to get scaling object used for mapping partials of positions to partials of observable /*! * Function to get scaling object used for mapping partials of positions to partials of observable * \return */ std::shared_ptr< OneWayDopplerScaling > getOneWayDopplerScaler( ) { return oneWayDopplerScaler_; } //! Function to get the number of light-time correction partial functions. /*! * Number of light-time correction partial functions. * \return Number of light-time correction partial functions. */ int getNumberOfLighTimeCorrectionPartialsFunctions( ) { return lighTimeCorrectionPartialsFunctions_.size( ); } protected: //! Scaling object used for mapping partials of positions to partials of observable std::shared_ptr< OneWayDopplerScaling > oneWayDopplerScaler_; //! List of position partials per link end. std::map< observation_models::LinkEndType, std::shared_ptr< CartesianStatePartial > > positionPartialList_; //! Iterator over list of position partials per link end. std::map< observation_models::LinkEndType, std::shared_ptr< CartesianStatePartial > >::iterator positionPartialIterator_; //! List of light-time correction partial functions. std::vector< std::function< SingleOneWayDopplerPartialReturnType( const std::vector< Eigen::Vector6d >&, const std::vector< double >& ) > > lighTimeCorrectionPartialsFunctions_; //! List of light-time correction partial objects. std::vector< std::shared_ptr< observation_partials::LightTimeCorrectionPartial > > lighTimeCorrectionPartials_; //! Pre-declared state variable to be used in calculatePartial function. Eigen::Vector6d currentState_; //! Pre-declared time variable to be used in calculatePartial function. double currentTime_; //! Boolean to denote whether partials of proper time w.r.t. parameters should be added to final partial. bool addProperTimeParameterPartials_; }; } } #endif // TUDAT_ONEWAYDOPPLERPARTIAL_H
DominicDirkx/tudat
Tudat/Astrodynamics/OrbitDetermination/ObservationPartials/oneWayDopplerPartial.h
C
bsd-3-clause
25,682
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Àâòîðû è ññûëêè</title> <meta http-equiv="Content-Type" Content="text/html; charset=Windows-1251"> <link rel="stylesheet" type="text/css" href="../styles/styles.css"> <script language="JavaScript" src='links.js' type="text/javascript"></script> </head> <body> <h1>Àâòîðû è ññûëêè</h1> <div class=navbar> <a href="index.html">ãëàâíàÿ</a> </div> <div class=shortdescr> <p>Ýíöèêëîïåäèÿ "<strong>Programming FAR plugins - Encyclopedia for Developers</strong>" ÿâëÿåòñÿ ïðîäóêòîì êîëëåêòèâíîãî òâîð÷åñòâà ãðóïïû àâòîðîâ (è ñîàâòîðîâ). Èñõîäíûì ìàòåðèàëîì äëÿ ýíöèêëîïåäèè ïîñëóæèë ôàéë ïîìîùè <dfn>plugins.hlp</dfn> èç äèñòðèáóòèâà FAR Manager 1.6x.</p> <p> ýòîì ñïèñêå ïðåäñòàâëåíû àâòîðû è ñîàâòîðû äàííîãî ïðîèçâåäåíèÿ. Âñå òå, êòî ïðèíèìàë ó÷àñòèå - ñëîâîì ëè, äåëîì,... (çà èñêëþ÷åíèåì àâòîðîâ èç ðàäåëà &laquo;<a href="articles/index.html">Ñòàòüè</a>&raquo;)</p> <p>Àâòîðû áëàãîäàðÿò <dfn>Åâãåíèÿ Ðîøàëà</dfn> çà ñàíêöèîíèðîâàíèå è ïîääåðæêó, îêàçàííóþ ïðè íàïèñàíèè ýòîãî ïðîèçâåäåíèÿ.</p> </div> <h3>Àâòîðû</h3> <div class=descr> <div class=name>Âàëåíòèí Ñêèðäèí</div> <div class=contacts> <a href="mailto:vskirdin@mail.ru">vskirdin@mail.ru</a><br> <!-- <a target="_blank" href="http://www.farmanager.com/skirda/">http://www.farmanager.com/skirda</a><br> --> </div> <div class=about> êîîðäèíàòîð ïðîåêòà &laquo;FAR plugins programing - Encyclopedia of Developer&raquo; - ñáîðêà è âûïóñê. </div> <div class=name>Èãîðü Ðóññêèõ</div> <div class=contacts> <a href="mailto:cail@nm.ru">cail@nm.ru</a><br> <a target="_blank" href="http://cail.nm.ru/">http://cail.nm.ru/</a> </div> <div class=about> ñîêîîðäèíàòîð / ÷åðíîâàÿ ðàáîòà, îôîðìëåíèå, ñêðèïòû, ïîäãîíêà... </div> <div class=name>Èâàí Ñèíòþðèí</div> <div class=contacts> <a href="mailto:spinoza@mail.ru">spinoza@mail.ru</a><br> <a target="_blank" href="http://www.moris.ru/~spinoza">http://www.moris.ru/~spinoza</a> </div> <div class=about> <em>&laquo;ãëàâíûé òðàíñëÿòîð&raquo;</em> - ïåðåâîäû ñòàòåé ñ àíãëèéñêîãî íà ðóññêèé... </div> <div class=name>Êèðèëë Êèðè÷åíêî</div> <div class=contacts> <a href="mailto:nectokris@mail.ru">nectokris@mail.ru</a> <!-- a target="_blank" href=""></a --> </div> <div class=about> <em>&laquo;òðàíñëÿòîð&raquo;</em> - ïåðåâîäû ñòàòåé ñ àíãëèéñêîãî íà ðóññêèé... </div> <div class=name>Àðòåì Íàçàðîâ</div> <div class=contacts> <a href="mailto:Artyom Nazarov <tema@mail.ru>">tema@mail.ru</a> <!-- a target="_blank" href=""></a --> </div> <div class=about> <em>&laquo;DrWeb&raquo;</em> - ëîâ÷èé áàãîâ, îïå÷àòîê, etc... </div> <div class=name>Âàñèëèé Ìîøíèíîâ</div> <div class=contacts> <a href="mailto:vmoshninov@newmail.ru">vmoshninov@newmail.ru</a><br> <a target="_blank" href="http://proxykit.narod.ru/">http://proxykit.narod.ru</a> </div> <div class=about> Ðàçäåë ïî <a href="delphi/index.html">Delphi</a>, çàìå÷àíèÿ, óòî÷íåíèÿ, etc... </div> <div class=name>Äìèòðèé Æåìåðîâ</div> <div class=contacts> <a href="mailto:Dmitry Jemerov <yole@yole.ru>">yole@yole.ru</a> <!-- a target="_blank" href=""></a --> </div> <div class=about> <em>&laquo;Purify&raquo;</em> - ëîâ÷èé áàãîâ, îïå÷àòîê, etc... </div> </div> <br><br> <h3>Ññûëêè</h3> <div class=descr> <dl> <dt>Ñàéò Far PlugRinG <dd><a target="_blank" href="http://plugring.farmanager.com/"><img src="../images/plugring_sb.gif" width=88 height=31 border=0 alt="plugring.farmanager.com"></a> <dd><a target="_blank" href="http://plugring.farmanager.com/">http://plugring.farmanager.com/</a> <dt>Far official site: <dd><a target="_blank" href="http://www.farmanager.com">http://www.farmanager.com</a> </dl> </div> </body> </html>
data-man/FarAS
enc/enc_rus/meta/authors.html
HTML
bsd-3-clause
3,837
from __future__ import division from PyQt5 import QtCore, QtWidgets from pycho.gui.widgets import GLPlotWidget from pycho.world.navigation import DIRECTIONS from pycho.gui.interaction import QT_KEYS, is_left, is_right, is_up, is_down from pycho.world.helpers import box_around import logging xrange = range TURN_BASED = 0 #Qt uses camelCase for naming methods, #hence why they are used here class DefaultWindow(QtWidgets.QMainWindow): def __init__(self, game, key_press_handler=None, mouse_click_handler=None, mouse_release_handler=None, tick_time=0, width=600, height=400, key_press_handlers=None, mouse_click_handlers=None, mouse_release_handlers=None): super(DefaultWindow, self).__init__() self.game = game self.widget = GLPlotWidget(100, 100, self.game) self.widget.setGeometry(0, 0, self.widget.width, self.widget.height) self.setCentralWidget(self.widget) self.show() self.paint_timer = QtCore.QBasicTimer() self.clean_timer = QtCore.QBasicTimer() self.tick_timer = QtCore.QBasicTimer() self.callbacks = [self.widget.updateGL, self.game.world.clean_up, self.game.world.tick] QtCore.QMetaObject.connectSlotsByName(self) self.paint_timer.start(30, self) self.clean_timer.start(40, self) self.timers = [self.paint_timer, self.clean_timer] self.timer_times = [30, 40] if tick_time != TURN_BASED: self.tick_timer.start(tick_time, self) self.timers.append(self.tick_timer) self.timer_times.append(tick_time) self.resize(width, height) if key_press_handler is None: key_press_handler = lambda self, event: self._defaultKeyPressHandler(event) if mouse_click_handler is None: mouse_click_handler = lambda self, event: self._defaultMousePressHandler(event) if mouse_release_handler is None: mouse_release_handler = lambda *a, **kw: None if key_press_handlers is None: key_press_handlers = {'*' : key_press_handler} if mouse_click_handlers is None: mouse_click_handlers = {'*' : mouse_click_handler} if mouse_release_handlers is None: mouse_release_handlers = {'*' : mouse_release_handler} self.key_press_handlers = key_press_handlers self.mouse_click_handlers = mouse_click_handlers self.mouse_release_handlers = mouse_release_handlers self.is_paused = False def timerEvent(self, event): self.callbacks[event.timerId() - 1]() def _defaultKeyPressHandler(self, event): key = event.key() logging.debug('Key {} was pressed'.format(key)) if is_left(key): face_movement = DIRECTIONS['left'] elif is_right(key): face_movement = DIRECTIONS['right'] elif is_up(key): face_movement = DIRECTIONS['up'] elif is_down(key): face_movement = DIRECTIONS['down'] elif key == QT_KEYS['Space']: face_movement = DIRECTIONS['still'] else: return logging.debug('Face movement set to {}'.format(face_movement)) logging.debug('Player is facing {}'.format(self.game.player.facing)) self.game.player.facing = face_movement self.game.world.tick() def map_point_to_game_world(self, x, y): i = int((x / self.widget.width) * self.game.world.width) j = int(((self.widget.height - y) / self.widget.height) * self.game.world.height) return (i, j) def _current_handler(self, handlers): level_id = self.game.world.current_level.id if level_id not in handlers: try: return handlers['*'] except KeyError: logging.error('No default handler set as *!') return handlers[level_id] def _defaultMousePressHandler(self, event, pointer_size=5): x, y = self.map_point_to_game_world(event.x(), event.y()) # gradually grow the pointer to be bigger to # allow for a greater control on what is clicked for j in xrange(pointer_size): try: obj = self.game.world.colliding_object(None, box_around(x, y, j, j)) except: break if obj is not None: logging.error(obj) break else: logging.error("Nothing found!") def pause(self): for timer in self.timers: self.timers.stop() self.is_paused = True def unpause(self): for timer, time in zip(self.timers, self.timer_times): self.timers.start(time) self.is_paused = False def keyPressEvent(self, event): self._current_handler(self.key_press_handlers)(self, event) def mousePressEvent(self, event): self._current_handler(self.mouse_click_handlers)(self, event) def mouseReleaseEvent(self, event): self._current_handler(self.mouse_release_handlers)(self, event) def closeEvent(self, event): logging.debug("Dumping to text file") self.game.world.mind_dump()
eeue56/pycho
pycho/gui/windows.py
Python
bsd-3-clause
5,304
# Getting started with `build_runner` To use `build_runner`, you need a 2.x version of the Dart SDK. * [Automated installers](https://dart.dev/get-dart#install) * [Direct downloads](https://dart.dev/tools/sdk/archive#dev-channel) If you have issues using `build_runner`, see the [Troubleshooting section](#troubleshooting), below. - [Getting started with `build_runner`](#getting-started-with-build_runner) - [Using `build_runner` as a development server](#using-build_runner-as-a-development-server) - [Creating an output directory](#creating-an-output-directory) - [Using other `build_runner` commands](#using-other-build_runner-commands) - [Switching to dart2js](#switching-to-dart2js) - [Troubleshooting](#troubleshooting) - [Diagnosing build times](#diagnosing-build-times) - [build_runner has no versions that match...](#build_runner-has-no-versions-that-match) - [Too many open files](#too-many-open-files) ## Using `build_runner` as a development server 1. Edit your package's **pubspec.yaml** file, adding dev dependencies on **build_runner** and **build_web_compilers**: ```yaml dev_dependencies: build_runner: ^2.0.0 build_web_compilers: ^3.0.0 ``` 2. Get package dependencies: ```sh pub get ``` 3. Start the server: ```sh dart run build_runner serve ``` While the `serve` command runs, every change you save triggers a rebuild. The first build is the slowest. After that, assets are cached on disk and incremental builds are faster. ## Creating an output directory Build with `--output <directory name>` to write files into a merged output directory with file paths that match internally referenced URIs. This can be used with the `build`, `watch`, and `serve` commands. This directory can also be used with a different server if the `serve` command is insufficient. To output only part of the package, for example to output only the `web` directory, use `--output web:<directory name>`. ## Using other `build_runner` commands In addition to **serve** you can use: - **build:** Runs a single build and exits. This is most useful if your build also generates output to your source directory. With `--output <dirname>` this also creates a merged output directory with all sources and generated assets. - **watch:** Like `build` but reruns after file changes. With `--output <dirname>` the merged output directory will be kept up to date with changes. This can be used to keep the outputs updated for use with another filed-based development server. - **test:** Creates an output directory and runs `dart run test` within it. This command requires a dev dependency on `build_test`. ## Switching to dart2js By default `build_web_compilers` uses dartdevc. To switch to dart2js, pass `--release` to `dart run build_runner build` (or `serve`). Pass args to dart2js by creating a `build.yaml` file. ```yaml targets: $default: builders: build_web_compilers:entrypoint: options: dart2js_args: - --minify - --fast-startup ``` ## Troubleshooting <!-- summarize here. --> ### Diagnosing build times See <https://github.com/dart-lang/build/blob/master/docs/measuring_performance.md>. ### build_runner has no versions that match... 1. Make sure you're using a 2.x SDK. ```sh dart --version ``` 2. Check the versions of the packages that your app depends on. They should all be compatible with a 2.x SDK. ### Too many open files If you see a FileSystemException, saying the directory listing failed due to too many open files, you might need to increase the OS limits. For details, see <https://github.com/dart-lang/build/issues/857>.
dart-lang/build
docs/getting_started.md
Markdown
bsd-3-clause
3,749
({ appDir: "../", baseUrl: "js/", dir: "../../dist/", // optimize: "none", paths: { jquery: 'libs/jquery/jquery.min', backbone: 'libs/backbone/backbone.min', nunjucks: 'libs/nunjucks/nunjucks-slim', underscore: 'libs/underscore/underscore-min', blueimp: 'libs/blueimp/blueimp-gallery', socketio: 'libs/socket/socket.io.min', ds: 'libs/datastore/backbone-ds.min' }, shim: { nunjucks: { exports : 'nunjucks'}, backbone: { deps: ['jquery', 'underscore'], exports: 'Backbone' }, underscore: { 'exports': '_' } }, modules: [ //Optimize the application files. { name: "main", } ] })
calcutec/flask-burtonblog
app/static/js/app.build.js
JavaScript
bsd-3-clause
771
/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef mitkXmlSceneIO_h_included #define mitkXmlSceneIO_h_included #include "mitkDataStorage.h" class TiXmlElement; namespace mitk { class PropertyListsXmlFileReaderAndWriter; class PropertyListsXmlFileReaderAndWriter : public itk::Object { public: static const char *GetPropertyListIdElementName(); mitkClassMacroItkParent(PropertyListsXmlFileReaderAndWriter, itk::Object); itkFactorylessNewMacro(Self) itkCloneMacro(Self) bool WriteLists(const std::string &fileName, const std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const; bool ReadLists(const std::string &fileName, std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const; protected: PropertyListsXmlFileReaderAndWriter(); ~PropertyListsXmlFileReaderAndWriter() override; bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, TiXmlElement *elem) const; bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, TiXmlElement *elem) const; }; } #endif
fmilano/mitk
Modules/Persistence/mitkPropertyListsXmlFileReaderAndWriter.h
C
bsd-3-clause
1,477
/* * Copyright (c) 2007-2011, University of Maryland * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided * that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of conditions * and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions * and the following disclaimer in the documentation and/or other materials provided with the * distribution. * * Neither the name of the University of Maryland nor the names of its contributors may be used to * endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ACE Components were written in the ADAPT Project at the University of * Maryland Institute for Advanced Computer Study. */ package org.chronopolis.ingest.pkg; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.math.BigInteger; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; /** * * @author toaster */ public class ManifestBuilder { private List<ManifestBuildListener> buildListeners = new ArrayList<ManifestBuildListener>(); private ChronPackage pkg; private MessageDigest digest; private byte[] tossBlock = new byte[32768]; private boolean execute = true; private long totalSize; public ChronPackage getPackage() { return pkg; } public ManifestBuilder(ChronPackage pkg, long totalSize) { this.pkg = pkg; this.totalSize = totalSize; } public long getTotalSize() { return totalSize; } public void cancel() { execute = false; } public List<ManifestBuildListener> getBuildListeners() { return buildListeners; } public void scanPackage() throws IOException { execute = true; try { digest = MessageDigest.getInstance(pkg.getDigest()); } catch (NoSuchAlgorithmException e) { throw new IOException(e); } notifyBuildStart(); for (File root : pkg.getRootList()) { if (!execute) { return; } notifyRootStart(root); int subStrLen = root.getPath().length() - root.getName().length(); processDir(root, subStrLen); notifyRootEnd(root); } notifyEndItems(); notifyBuildEnd(); } public void processDir(File dir, int substr) { for (File f : dir.listFiles()) { if (!execute) { return; } if (f.isDirectory()) { processDir(f, substr); } else { processFile(f, substr); } } } public boolean isExecute() { return execute; } private void processFile(File f, int substr) { String name = f.getPath().substring(substr); digest.reset(); try { notifyStartItem(name, f.length()); DigestInputStream dis = new DigestInputStream(new FileInputStream(f), digest); int read = 0; while ((read = dis.read(tossBlock)) != -1) { notifyWriteBytes(tossBlock, 0, read); } dis.close(); byte[] dig = digest.digest(); String strDigest = asHexString(dig); notifyEndItem(name, strDigest); } catch (IOException e) { throw new RuntimeException(e); } } public static String repeat(char value, int times) { if (times == 0) { return ""; } char[] c = new char[times]; for (int i = 0; i < times; i++) { c[i] = value; } return new String(c); } public static String asHexString(byte[] value) { String str = new BigInteger(1, value).toString(16); if (str.length() < value.length * 2) { str = repeat('0', value.length * 2 - str.length()) + str; } return str; } private void notifyBuildStart() { for (ManifestBuildListener l : buildListeners) { l.startBuild(this); } } private void notifyEndItems() { for (ManifestBuildListener l : buildListeners) { l.endItems(this); } } private void notifyBuildEnd() { for (ManifestBuildListener l : buildListeners) { l.endBuild(this); } } private void notifyEndItem(String file, String digest) { for (ManifestBuildListener l : buildListeners) { l.endItem(this, file, digest); } } private void notifyStartItem(String item, long size) { for (ManifestBuildListener l : buildListeners) { l.startItem(this, size, item); } } private void notifyRootStart(File root) { for (ManifestBuildListener l : buildListeners) { l.startRoot(this, root); } } private void notifyRootEnd(File f) { for (ManifestBuildListener l : buildListeners) { l.endRoot(this, f); } } private void notifyWriteBytes(byte[] block, int offset, int length) { for (ManifestBuildListener l : buildListeners) { l.writeBytes(this, block, offset, length); } } }
msmorul/Restful-bag-server-implementation
CollectionManager/src/main/java/org/chronopolis/ingest/pkg/ManifestBuilder.java
Java
bsd-3-clause
6,316
/* * Copyright (C) 2011 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef HTMLContentElement_h #define HTMLContentElement_h #include "CSSSelectorList.h" #include "InsertionPoint.h" namespace WebCore { #if ENABLE(SHADOW_DOM) class HTMLContentElement FINAL : public InsertionPoint { public: static const QualifiedName& contentTagName(Document&); static PassRefPtr<HTMLContentElement> create(const QualifiedName&, Document&); static PassRefPtr<HTMLContentElement> create(Document&); virtual ~HTMLContentElement(); void setSelect(const AtomicString&); const AtomicString& select() const; virtual MatchType matchTypeFor(Node*) OVERRIDE; virtual const CSSSelectorList& selectorList() OVERRIDE; virtual Type insertionPointType() const OVERRIDE { return HTMLContentElementType; } virtual bool canAffectSelector() const OVERRIDE { return true; } virtual bool isSelectValid(); protected: HTMLContentElement(const QualifiedName&, Document&); private: virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE; void ensureSelectParsed(); bool validateSelect() const; bool m_shouldParseSelectorList; bool m_isValidSelector; CSSSelectorList m_selectorList; }; inline void HTMLContentElement::setSelect(const AtomicString& selectValue) { setAttribute(HTMLNames::selectAttr, selectValue); m_shouldParseSelectorList = true; } inline const CSSSelectorList& HTMLContentElement::selectorList() { ensureSelectParsed(); return m_selectorList; } #endif // if ENABLE(SHADOW_DOM) } #endif
klim-iv/phantomjs-qt5
src/webkit/Source/WebCore/html/shadow/HTMLContentElement.h
C
bsd-3-clause
3,087
"""This module contains an interface for using the GPy library in ELFI.""" # TODO: make own general GPRegression and kernel classes import copy import logging import GPy import numpy as np logger = logging.getLogger(__name__) logging.getLogger("GP").setLevel(logging.WARNING) # GPy library logger class GPyRegression: """Gaussian Process regression using the GPy library. GPy API: https://sheffieldml.github.io/GPy/ """ def __init__(self, parameter_names=None, bounds=None, optimizer="scg", max_opt_iters=50, gp=None, **gp_params): """Initialize GPyRegression. Parameters ---------- parameter_names : list of str, optional Names of parameter nodes. If None, sets dimension to 1. bounds : dict, optional The region where to estimate the posterior for each parameter in model.parameters. `{'parameter_name':(lower, upper), ... }` If not supplied, defaults to (0, 1) bounds for all dimensions. optimizer : string, optional Optimizer for the GP hyper parameters Alternatives: "scg", "fmin_tnc", "simplex", "lbfgsb", "lbfgs", "sgd" See also: paramz.Model.optimize() max_opt_iters : int, optional gp : GPy.model.GPRegression instance, optional **gp_params kernel : GPy.Kern noise_var : float mean_function """ if parameter_names is None: input_dim = 1 elif isinstance(parameter_names, (list, tuple)): input_dim = len(parameter_names) else: raise ValueError("Keyword `parameter_names` must be a list of strings") if bounds is None: logger.warning('Parameter bounds not specified. Using [0,1] for each parameter.') bounds = [(0, 1)] * input_dim elif len(bounds) != input_dim: raise ValueError( 'Length of `bounds` ({}) does not match the length of `parameter_names` ({}).' .format(len(bounds), input_dim)) elif isinstance(bounds, dict): if len(bounds) == 1: # might be the case parameter_names=None bounds = [bounds[n] for n in bounds.keys()] else: # turn bounds dict into a list in the same order as parameter_names bounds = [bounds[n] for n in parameter_names] else: raise ValueError("Keyword `bounds` must be a dictionary " "`{'parameter_name': (lower, upper), ... }`") self.input_dim = input_dim self.bounds = bounds self.gp_params = gp_params self.optimizer = optimizer self.max_opt_iters = max_opt_iters self._gp = gp self._rbf_is_cached = False self.is_sampling = False # set to True once in sampling phase def __str__(self): """Return GPy's __str__.""" return self._gp.__str__() def __repr__(self): """Return GPy's __str__.""" return self.__str__() def predict(self, x, noiseless=False): """Return the GP model mean and variance at x. Parameters ---------- x : np.array numpy compatible (n, input_dim) array of points to evaluate if len(x.shape) == 1 will be cast to 2D with x[None, :] noiseless : bool whether to include the noise variance or not to the returned variance Returns ------- tuple GP (mean, var) at x where mean : np.array with shape (x.shape[0], 1) var : np.array with shape (x.shape[0], 1) """ # Ensure it's 2d for GPy x = np.asanyarray(x).reshape((-1, self.input_dim)) if self._gp is None: # TODO: return from GP mean function if given return np.zeros((x.shape[0], 1)), \ np.ones((x.shape[0], 1)) # direct (=faster) implementation for RBF kernel if self.is_sampling and self._kernel_is_default: if not self._rbf_is_cached: self._cache_RBF_kernel() r2 = np.sum(x**2., 1)[:, None] + self._rbf_x2sum - 2. * x.dot(self._gp.X.T) kx = self._rbf_var * np.exp(r2 * self._rbf_factor) + self._rbf_bias mu = kx.dot(self._rbf_woodbury) var = self._rbf_var + self._rbf_bias var -= kx.dot(self._rbf_woodbury_inv.dot(kx.T)) var += self._rbf_noisevar # likelihood return mu, var else: self._rbf_is_cached = False # in case one resumes fitting the GP after sampling if noiseless: return self._gp.predict_noiseless(x) else: return self._gp.predict(x) # TODO: find a more general solution # cache some RBF-kernel-specific values for faster sampling def _cache_RBF_kernel(self): self._rbf_var = float(self._gp.kern.rbf.variance) self._rbf_factor = -0.5 / float(self._gp.kern.rbf.lengthscale)**2 self._rbf_bias = float(self._gp.kern.bias.K(self._gp.X)[0, 0]) self._rbf_noisevar = float(self._gp.likelihood.variance[0]) self._rbf_woodbury = self._gp.posterior.woodbury_vector self._rbf_woodbury_inv = self._gp.posterior.woodbury_inv self._rbf_woodbury_chol = self._gp.posterior.woodbury_chol self._rbf_x2sum = np.sum(self._gp.X**2., 1)[None, :] self._rbf_is_cached = True def predict_mean(self, x): """Return the GP model mean function at x. Parameters ---------- x : np.array numpy compatible (n, input_dim) array of points to evaluate if len(x.shape) == 1 will be cast to 2D with x[None, :] Returns ------- np.array with shape (x.shape[0], 1) """ return self.predict(x)[0] def predictive_gradients(self, x): """Return the gradients of the GP model mean and variance at x. Parameters ---------- x : np.array numpy compatible (n, input_dim) array of points to evaluate if len(x.shape) == 1 will be cast to 2D with x[None, :] Returns ------- tuple GP (grad_mean, grad_var) at x where grad_mean : np.array with shape (x.shape[0], input_dim) grad_var : np.array with shape (x.shape[0], input_dim) """ # Ensure it's 2d for GPy x = np.asanyarray(x).reshape((-1, self.input_dim)) if self._gp is None: # TODO: return from GP mean function if given return np.zeros((x.shape[0], self.input_dim)), \ np.zeros((x.shape[0], self.input_dim)) # direct (=faster) implementation for RBF kernel if self.is_sampling and self._kernel_is_default: if not self._rbf_is_cached: self._cache_RBF_kernel() r2 = np.sum(x**2., 1)[:, None] + self._rbf_x2sum - 2. * x.dot(self._gp.X.T) kx = self._rbf_var * np.exp(r2 * self._rbf_factor) dkdx = 2. * self._rbf_factor * (x - self._gp.X) * kx.T grad_mu = dkdx.T.dot(self._rbf_woodbury).T v = np.linalg.solve(self._rbf_woodbury_chol, kx.T + self._rbf_bias) dvdx = np.linalg.solve(self._rbf_woodbury_chol, dkdx) grad_var = -2. * dvdx.T.dot(v).T else: grad_mu, grad_var = self._gp.predictive_gradients(x) grad_mu = grad_mu[:, :, 0] # Assume 1D output (distance in ABC) return grad_mu, grad_var def predictive_gradient_mean(self, x): """Return the gradient of the GP model mean at x. Parameters ---------- x : np.array numpy compatible (n, input_dim) array of points to evaluate if len(x.shape) == 1 will be cast to 2D with x[None, :] Returns ------- np.array with shape (x.shape[0], input_dim) """ return self.predictive_gradients(x)[0] def _init_gp(self, x, y): self._kernel_is_default = False if self.gp_params.get('kernel') is None: kernel = self._default_kernel(x, y) if self.gp_params.get('noise_var') is None and self.gp_params.get( 'mean_function') is None: self._kernel_is_default = True else: kernel = self.gp_params.get('kernel') noise_var = self.gp_params.get('noise_var') or np.max(y)**2. / 100. mean_function = self.gp_params.get('mean_function') self._gp = self._make_gpy_instance( x, y, kernel=kernel, noise_var=noise_var, mean_function=mean_function) def _default_kernel(self, x, y): # Some heuristics to choose kernel parameters based on the initial data length_scale = (np.max(self.bounds) - np.min(self.bounds)) / 3. kernel_var = (np.max(y) / 3.)**2. bias_var = kernel_var / 4. # Construct a default kernel kernel = GPy.kern.RBF(input_dim=self.input_dim) # Set the priors kernel.lengthscale.set_prior( GPy.priors.Gamma.from_EV(length_scale, length_scale), warning=False) kernel.variance.set_prior(GPy.priors.Gamma.from_EV(kernel_var, kernel_var), warning=False) # If no mean function is specified, add a bias term to the kernel if 'mean_function' not in self.gp_params: bias = GPy.kern.Bias(input_dim=self.input_dim) bias.set_prior(GPy.priors.Gamma.from_EV(bias_var, bias_var), warning=False) kernel += bias return kernel def _make_gpy_instance(self, x, y, kernel, noise_var, mean_function): return GPy.models.GPRegression( X=x, Y=y, kernel=kernel, noise_var=noise_var, mean_function=mean_function) def update(self, x, y, optimize=False): """Update the GP model with new data. Parameters ---------- x : np.array y : np.array optimize : bool, optional Whether to optimize hyperparameters. """ # Must cast these as 2d for GPy x = x.reshape((-1, self.input_dim)) y = y.reshape((-1, 1)) if self._gp is None: self._init_gp(x, y) else: # Reconstruct with new data x = np.r_[self._gp.X, x] y = np.r_[self._gp.Y, y] # It seems that GPy will do some optimization unless you make copies of everything kernel = self._gp.kern.copy() if self._gp.kern else None noise_var = self._gp.Gaussian_noise.variance[0] mean_function = self._gp.mean_function.copy() if self._gp.mean_function else None self._gp = self._make_gpy_instance( x, y, kernel=kernel, noise_var=noise_var, mean_function=mean_function) if optimize: self.optimize() def optimize(self): """Optimize GP hyperparameters.""" logger.debug("Optimizing GP hyperparameters") try: self._gp.optimize(self.optimizer, max_iters=self.max_opt_iters) except np.linalg.linalg.LinAlgError: logger.warning("Numerical error in GP optimization. Stopping optimization") @property def n_evidence(self): """Return the number of observed samples.""" if self._gp is None: return 0 return self._gp.num_data @property def X(self): """Return input evidence.""" return self._gp.X @property def Y(self): """Return output evidence.""" return self._gp.Y def copy(self): """Return a copy of current instance.""" kopy = copy.copy(self) if self._gp: kopy._gp = self._gp.copy() if 'kernel' in self.gp_params: kopy.gp_params['kernel'] = self.gp_params['kernel'].copy() if 'mean_function' in self.gp_params: kopy.gp_params['mean_function'] = self.gp_params['mean_function'].copy() return kopy def __copy__(self): """Return a copy of current instance.""" return self.copy()
lintusj1/elfi
elfi/methods/bo/gpy_regression.py
Python
bsd-3-clause
12,384
<?php namespace Application\Response; class Response { /* * result status 0-Fail 1-Success 2-Error to be shown to user */ protected $Status; /* * redirect from page default = false */ protected $Redirect = false; /* * result message; */ protected $Message; /* * no of entities that were succeded transfered */ protected $Succeded = 0; /* * no of entities that failed */ protected $Failed = 0; /* * returned object */ protected $Object; public function __construct($Status, $Message='', $Object = null) { $this->setStatus($Status); $this->setMessage($Message); if(isset($Object)) { $this->setObject($Object); } return $this; } public function getStatus() { return $this->Status; } public function setStatus($Status) { //if status is critical then set redirect true if($Status == 2) { $this->setRedirect(true); } $this->Status = $Status; return $this; } public function getRedirect() { return $this->Redirect; } public function setRedirect($Redirect) { $this->Redirect = $Redirect; return $this; } public function getMessage() { return $this->Message; } public function setMessage($Message) { $this->Message = $Message; return $this; } public function getSucceded() { return $this->Succeded; } public function setSucceded($Succeded) { $this->Succeded = $Succeded; return $this; } public function getFailed() { return $this->Failed; } public function setFailed($Failed) { $this->Failed = $Failed; return $this; } public function getObject() { return $this->Object; } public function setObject($Object) { $this->Object = $Object; return $this; } public function expose() { return get_object_vars($this); } }
Socratemus/utopia-dev
module/Application/src/Application/Response/Response.php
PHP
bsd-3-clause
2,157
#region Apache License // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to you under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #endregion using log4net.Repository; namespace log4net.Plugin { /// <summary> /// Interface implemented by logger repository plugins. /// </summary> /// <remarks> /// <para> /// Plugins define additional behavior that can be associated /// with a <see cref="log4net.Repository.ILoggerRepository"/>. /// The <see cref="PluginMap"/> held by the <see cref="log4net.Repository.ILoggerRepository.PluginMap"/> /// property is used to store the plugins for a repository. /// </para> /// <para> /// The <c>log4net.Config.PluginAttribute</c> can be used to /// attach plugins to repositories created using configuration /// attributes. /// </para> /// </remarks> /// <author>Nicko Cadell</author> /// <author>Gert Driesen</author> public interface IPlugin { /// <summary> /// Gets the name of the plugin. /// </summary> /// <value> /// The name of the plugin. /// </value> /// <remarks> /// <para> /// Plugins are stored in the <see cref="PluginMap"/> /// keyed by name. Each plugin instance attached to a /// repository must be a unique name. /// </para> /// </remarks> string Name { get; } /// <summary> /// Attaches the plugin to the specified <see cref="ILoggerRepository"/>. /// </summary> /// <param name="repository">The <see cref="ILoggerRepository"/> that this plugin should be attached to.</param> /// <remarks> /// <para> /// A plugin may only be attached to a single repository. /// </para> /// <para> /// This method is called when the plugin is attached to the repository. /// </para> /// </remarks> void Attach(ILoggerRepository repository); /// <summary> /// Is called when the plugin is to shutdown. /// </summary> /// <remarks> /// <para> /// This method is called to notify the plugin that /// it should stop operating and should detach from /// the repository. /// </para> /// </remarks> void Shutdown(); } }
NanaYngvarrdottir/Software-Testing
Dependencies/log4net/Plugin/IPlugin.cs
C#
bsd-3-clause
2,828
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_75) on Sun Mar 01 12:04:14 AEDT 2015 --> <title>X509v2CRLBuilder (Bouncy Castle Library 1.52 API Specification)</title> <meta name="date" content="2015-03-01"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="X509v2CRLBuilder (Bouncy Castle Library 1.52 API Specification)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em><b>Bouncy Castle Cryptography Library 1.52</b></em></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/bouncycastle/cert/X509v2AttributeCertificateBuilder.html" title="class in org.bouncycastle.cert"><span class="strong">Prev Class</span></a></li> <li><a href="../../../org/bouncycastle/cert/X509v3CertificateBuilder.html" title="class in org.bouncycastle.cert"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/bouncycastle/cert/X509v2CRLBuilder.html" target="_top">Frames</a></li> <li><a href="X509v2CRLBuilder.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.bouncycastle.cert</div> <h2 title="Class X509v2CRLBuilder" class="title">Class X509v2CRLBuilder</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.bouncycastle.cert.X509v2CRLBuilder</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>Direct Known Subclasses:</dt> <dd><a href="../../../org/bouncycastle/cert/jcajce/JcaX509v2CRLBuilder.html" title="class in org.bouncycastle.cert.jcajce">JcaX509v2CRLBuilder</a></dd> </dl> <hr> <br> <pre>public class <span class="strong">X509v2CRLBuilder</span> extends java.lang.Object</pre> <div class="block">class to produce an X.509 Version 2 CRL.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name,%20java.util.Date)">X509v2CRLBuilder</a></strong>(org.bouncycastle.asn1.x500.X500Name&nbsp;issuer, java.util.Date&nbsp;thisUpdate)</code> <div class="block">Basic constructor.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name,%20java.util.Date,%20java.util.Locale)">X509v2CRLBuilder</a></strong>(org.bouncycastle.asn1.x500.X500Name&nbsp;issuer, java.util.Date&nbsp;thisUpdate, java.util.Locale&nbsp;dateLocale)</code> <div class="block">Basic constructor with Locale.</div> </td> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name,%20org.bouncycastle.asn1.x509.Time)">X509v2CRLBuilder</a></strong>(org.bouncycastle.asn1.x500.X500Name&nbsp;issuer, org.bouncycastle.asn1.x509.Time&nbsp;thisUpdate)</code> <div class="block">Basic constructor.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addCRL(org.bouncycastle.cert.X509CRLHolder)">addCRL</a></strong>(<a href="../../../org/bouncycastle/cert/X509CRLHolder.html" title="class in org.bouncycastle.cert">X509CRLHolder</a>&nbsp;other)</code> <div class="block">Add the CRLEntry objects contained in a previous CRL.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addCRLEntry(java.math.BigInteger,%20java.util.Date,%20org.bouncycastle.asn1.x509.Extensions)">addCRLEntry</a></strong>(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, org.bouncycastle.asn1.x509.Extensions&nbsp;extensions)</code> <div class="block">Add a CRL entry with extensions.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addCRLEntry(java.math.BigInteger,%20java.util.Date,%20int)">addCRLEntry</a></strong>(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, int&nbsp;reason)</code> <div class="block">Add a CRL entry with the just reasonCode extension.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addCRLEntry(java.math.BigInteger,%20java.util.Date,%20int,%20java.util.Date)">addCRLEntry</a></strong>(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, int&nbsp;reason, java.util.Date&nbsp;invalidityDate)</code> <div class="block">Add a CRL entry with an invalidityDate extension as well as a reasonCode extension.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addCRLEntry(java.math.BigInteger,%20java.util.Date,%20org.bouncycastle.asn1.x509.X509Extensions)">addCRLEntry</a></strong>(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, org.bouncycastle.asn1.x509.X509Extensions&nbsp;extensions)</code> <div class="block"><strong>Deprecated.</strong>&nbsp; <div class="block"><i>use method taking Extensions</i></div> </div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier,%20boolean,%20org.bouncycastle.asn1.ASN1Encodable)">addExtension</a></strong>(org.bouncycastle.asn1.ASN1ObjectIdentifier&nbsp;oid, boolean&nbsp;isCritical, org.bouncycastle.asn1.ASN1Encodable&nbsp;value)</code> <div class="block">Add a given extension field for the standard extensions tag (tag 3)</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier,%20boolean,%20byte[])">addExtension</a></strong>(org.bouncycastle.asn1.ASN1ObjectIdentifier&nbsp;oid, boolean&nbsp;isCritical, byte[]&nbsp;encodedValue)</code> <div class="block">Add a given extension field for the standard extensions tag (tag 3) using a byte encoding of the extension value.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509CRLHolder.html" title="class in org.bouncycastle.cert">X509CRLHolder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#build(org.bouncycastle.operator.ContentSigner)">build</a></strong>(<a href="../../../org/bouncycastle/operator/ContentSigner.html" title="interface in org.bouncycastle.operator">ContentSigner</a>&nbsp;signer)</code> <div class="block">Generate an X.509 CRL, based on the current issuer and subject using the passed in signer.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#setNextUpdate(java.util.Date)">setNextUpdate</a></strong>(java.util.Date&nbsp;date)</code> <div class="block">Set the date by which the next CRL will become available.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#setNextUpdate(java.util.Date,%20java.util.Locale)">setNextUpdate</a></strong>(java.util.Date&nbsp;date, java.util.Locale&nbsp;dateLocale)</code> <div class="block">Set the date by which the next CRL will become available.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a></code></td> <td class="colLast"><code><strong><a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html#setNextUpdate(org.bouncycastle.asn1.x509.Time)">setNextUpdate</a></strong>(org.bouncycastle.asn1.x509.Time&nbsp;date)</code> <div class="block">Set the date by which the next CRL will become available.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name, java.util.Date)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>X509v2CRLBuilder</h4> <pre>public&nbsp;X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name&nbsp;issuer, java.util.Date&nbsp;thisUpdate)</pre> <div class="block">Basic constructor.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>issuer</code> - the issuer this CRL is associated with.</dd><dd><code>thisUpdate</code> - the date of this update.</dd></dl> </li> </ul> <a name="X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name, java.util.Date, java.util.Locale)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>X509v2CRLBuilder</h4> <pre>public&nbsp;X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name&nbsp;issuer, java.util.Date&nbsp;thisUpdate, java.util.Locale&nbsp;dateLocale)</pre> <div class="block">Basic constructor with Locale. You may need to use this constructor if the default locale doesn't use a Gregorian calender so that the Time produced is compatible with other ASN.1 implementations.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>issuer</code> - the issuer this CRL is associated with.</dd><dd><code>thisUpdate</code> - the date of this update.</dd><dd><code>dateLocale</code> - locale to be used for date interpretation.</dd></dl> </li> </ul> <a name="X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x509.Time)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>X509v2CRLBuilder</h4> <pre>public&nbsp;X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name&nbsp;issuer, org.bouncycastle.asn1.x509.Time&nbsp;thisUpdate)</pre> <div class="block">Basic constructor.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>issuer</code> - the issuer this CRL is associated with.</dd><dd><code>thisUpdate</code> - the Time of this update.</dd></dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="setNextUpdate(java.util.Date)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setNextUpdate</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;setNextUpdate(java.util.Date&nbsp;date)</pre> <div class="block">Set the date by which the next CRL will become available.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - date of next CRL update.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="setNextUpdate(java.util.Date, java.util.Locale)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setNextUpdate</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;setNextUpdate(java.util.Date&nbsp;date, java.util.Locale&nbsp;dateLocale)</pre> <div class="block">Set the date by which the next CRL will become available.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - date of next CRL update.</dd><dd><code>dateLocale</code> - locale to be used for date interpretation.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="setNextUpdate(org.bouncycastle.asn1.x509.Time)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setNextUpdate</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;setNextUpdate(org.bouncycastle.asn1.x509.Time&nbsp;date)</pre> <div class="block">Set the date by which the next CRL will become available.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>date</code> - date of next CRL update.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="addCRLEntry(java.math.BigInteger, java.util.Date, int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addCRLEntry</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addCRLEntry(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, int&nbsp;reason)</pre> <div class="block">Add a CRL entry with the just reasonCode extension.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>userCertificateSerial</code> - serial number of revoked certificate.</dd><dd><code>revocationDate</code> - date of certificate revocation.</dd><dd><code>reason</code> - the reason code, as indicated in CRLReason, i.e CRLReason.keyCompromise, or 0 if not to be used.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="addCRLEntry(java.math.BigInteger, java.util.Date, int, java.util.Date)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addCRLEntry</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addCRLEntry(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, int&nbsp;reason, java.util.Date&nbsp;invalidityDate)</pre> <div class="block">Add a CRL entry with an invalidityDate extension as well as a reasonCode extension. This is used where the date of revocation might be after issues with the certificate may have occurred.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>userCertificateSerial</code> - serial number of revoked certificate.</dd><dd><code>revocationDate</code> - date of certificate revocation.</dd><dd><code>reason</code> - the reason code, as indicated in CRLReason, i.e CRLReason.keyCompromise, or 0 if not to be used.</dd><dd><code>invalidityDate</code> - the date on which the private key for the certificate became compromised or the certificate otherwise became invalid.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="addCRLEntry(java.math.BigInteger, java.util.Date, org.bouncycastle.asn1.x509.X509Extensions)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addCRLEntry</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addCRLEntry(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, org.bouncycastle.asn1.x509.X509Extensions&nbsp;extensions)</pre> <div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>use method taking Extensions</i></div> <div class="block">Add a CRL entry with extensions.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>userCertificateSerial</code> - serial number of revoked certificate.</dd><dd><code>revocationDate</code> - date of certificate revocation.</dd><dd><code>extensions</code> - extension set to be associated with this CRLEntry.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="addCRLEntry(java.math.BigInteger, java.util.Date, org.bouncycastle.asn1.x509.Extensions)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addCRLEntry</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addCRLEntry(java.math.BigInteger&nbsp;userCertificateSerial, java.util.Date&nbsp;revocationDate, org.bouncycastle.asn1.x509.Extensions&nbsp;extensions)</pre> <div class="block">Add a CRL entry with extensions.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>userCertificateSerial</code> - serial number of revoked certificate.</dd><dd><code>revocationDate</code> - date of certificate revocation.</dd><dd><code>extensions</code> - extension set to be associated with this CRLEntry.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="addCRL(org.bouncycastle.cert.X509CRLHolder)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addCRL</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addCRL(<a href="../../../org/bouncycastle/cert/X509CRLHolder.html" title="class in org.bouncycastle.cert">X509CRLHolder</a>&nbsp;other)</pre> <div class="block">Add the CRLEntry objects contained in a previous CRL.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>other</code> - the X509CRLHolder to source the other entries from.</dd> <dt><span class="strong">Returns:</span></dt><dd>the current builder.</dd></dl> </li> </ul> <a name="addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier, boolean, org.bouncycastle.asn1.ASN1Encodable)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addExtension</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier&nbsp;oid, boolean&nbsp;isCritical, org.bouncycastle.asn1.ASN1Encodable&nbsp;value) throws <a href="../../../org/bouncycastle/cert/CertIOException.html" title="class in org.bouncycastle.cert">CertIOException</a></pre> <div class="block">Add a given extension field for the standard extensions tag (tag 3)</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>oid</code> - the OID defining the extension type.</dd><dd><code>isCritical</code> - true if the extension is critical, false otherwise.</dd><dd><code>value</code> - the ASN.1 structure that forms the extension's value.</dd> <dt><span class="strong">Returns:</span></dt><dd>this builder object.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code><a href="../../../org/bouncycastle/cert/CertIOException.html" title="class in org.bouncycastle.cert">CertIOException</a></code></dd></dl> </li> </ul> <a name="addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier, boolean, byte[])"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addExtension</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509v2CRLBuilder.html" title="class in org.bouncycastle.cert">X509v2CRLBuilder</a>&nbsp;addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier&nbsp;oid, boolean&nbsp;isCritical, byte[]&nbsp;encodedValue) throws <a href="../../../org/bouncycastle/cert/CertIOException.html" title="class in org.bouncycastle.cert">CertIOException</a></pre> <div class="block">Add a given extension field for the standard extensions tag (tag 3) using a byte encoding of the extension value.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>oid</code> - the OID defining the extension type.</dd><dd><code>isCritical</code> - true if the extension is critical, false otherwise.</dd><dd><code>encodedValue</code> - a byte array representing the encoding of the extension value.</dd> <dt><span class="strong">Returns:</span></dt><dd>this builder object.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code><a href="../../../org/bouncycastle/cert/CertIOException.html" title="class in org.bouncycastle.cert">CertIOException</a></code></dd></dl> </li> </ul> <a name="build(org.bouncycastle.operator.ContentSigner)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>build</h4> <pre>public&nbsp;<a href="../../../org/bouncycastle/cert/X509CRLHolder.html" title="class in org.bouncycastle.cert">X509CRLHolder</a>&nbsp;build(<a href="../../../org/bouncycastle/operator/ContentSigner.html" title="interface in org.bouncycastle.operator">ContentSigner</a>&nbsp;signer)</pre> <div class="block">Generate an X.509 CRL, based on the current issuer and subject using the passed in signer.</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>signer</code> - the content signer to be used to generate the signature validating the certificate.</dd> <dt><span class="strong">Returns:</span></dt><dd>a holder containing the resulting signed certificate.</dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em><b>Bouncy Castle Cryptography Library 1.52</b></em></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/bouncycastle/cert/X509v2AttributeCertificateBuilder.html" title="class in org.bouncycastle.cert"><span class="strong">Prev Class</span></a></li> <li><a href="../../../org/bouncycastle/cert/X509v3CertificateBuilder.html" title="class in org.bouncycastle.cert"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/bouncycastle/cert/X509v2CRLBuilder.html" target="_top">Frames</a></li> <li><a href="X509v2CRLBuilder.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
GaloisInc/hacrypto
src/Java/BouncyCastle/bcpkix-jdk15on-152/javadoc/org/bouncycastle/cert/X509v2CRLBuilder.html
HTML
bsd-3-clause
28,500
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.tab.state; import android.support.test.filters.SmallTest; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.chromium.base.Callback; import org.chromium.base.ThreadUtils; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.chrome.browser.tab.MockTab; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeBrowserTestRule; import java.util.concurrent.Semaphore; /** * Test relating to {@link CriticalPersistedTabData} */ @RunWith(BaseJUnit4ClassRunner.class) public class CriticalPersistedTabDataTest { @Rule public final ChromeBrowserTestRule mBrowserTestRule = new ChromeBrowserTestRule(); private static final int TAB_ID = 1; private static final int PARENT_ID = 2; private static final int ROOT_ID = 3; private static final int CONTENT_STATE_VERSION = 42; private static final byte[] CONTENT_STATE = {9, 10}; private static final long TIMESTAMP = 203847028374L; private static final String APP_ID = "AppId"; private static final String OPENER_APP_ID = "OpenerAppId"; private static final int THEME_COLOR = 5; private static final int LAUNCH_TYPE_AT_CREATION = 3; private CriticalPersistedTabData mCriticalPersistedTabData; private static Tab mockTab(int id, boolean isEncrypted) { return new MockTab(id, isEncrypted); } @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); } @SmallTest @Test public void testNonEncryptedSaveRestore() throws InterruptedException { testSaveRestoreDelete(false); } @SmallTest @Test public void testEncryptedSaveRestoreDelete() throws InterruptedException { testSaveRestoreDelete(true); } private void testSaveRestoreDelete(boolean isEncrypted) throws InterruptedException { final Semaphore semaphore = new Semaphore(0); Callback<CriticalPersistedTabData> callback = new Callback<CriticalPersistedTabData>() { @Override public void onResult(CriticalPersistedTabData res) { mCriticalPersistedTabData = res; semaphore.release(); } }; ThreadUtils.runOnUiThreadBlocking(() -> { PersistedTabDataConfiguration config = PersistedTabDataConfiguration.get(CriticalPersistedTabData.class, isEncrypted); CriticalPersistedTabData criticalPersistedTabData = new CriticalPersistedTabData(mockTab(TAB_ID, isEncrypted), PARENT_ID, ROOT_ID, TIMESTAMP, CONTENT_STATE, CONTENT_STATE_VERSION, OPENER_APP_ID, THEME_COLOR, LAUNCH_TYPE_AT_CREATION, config.storage, config.id); criticalPersistedTabData.save(); CriticalPersistedTabData.from(mockTab(TAB_ID, isEncrypted), callback); }); semaphore.acquire(); Assert.assertNotNull(mCriticalPersistedTabData); Assert.assertEquals(mCriticalPersistedTabData.getParentId(), PARENT_ID); Assert.assertEquals(mCriticalPersistedTabData.getRootId(), ROOT_ID); Assert.assertEquals(mCriticalPersistedTabData.getTimestampMillis(), TIMESTAMP); Assert.assertEquals( mCriticalPersistedTabData.getContentStateVersion(), CONTENT_STATE_VERSION); Assert.assertEquals(mCriticalPersistedTabData.getOpenerAppId(), OPENER_APP_ID); Assert.assertEquals(mCriticalPersistedTabData.getThemeColor(), THEME_COLOR); Assert.assertEquals( mCriticalPersistedTabData.getTabLaunchTypeAtCreation(), LAUNCH_TYPE_AT_CREATION); Assert.assertArrayEquals(mCriticalPersistedTabData.getContentStateBytes(), CONTENT_STATE); ThreadUtils.runOnUiThreadBlocking(() -> { mCriticalPersistedTabData.delete(); CriticalPersistedTabData.from(mockTab(TAB_ID, isEncrypted), callback); }); semaphore.acquire(); Assert.assertNull(mCriticalPersistedTabData); // TODO(crbug.com/1060232) test restored.save() after restored.delete() // Also cover // - Multiple (different) TAB_IDs being stored in the same storage. // - Tests for doing multiple operations on the same TAB_ID: // - save() multiple times // - restore() multiple times // - delete() multiple times } }
endlessm/chromium-browser
chrome/android/javatests/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabDataTest.java
Java
bsd-3-clause
4,708
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/display/display_change_observer_chromeos.h" #include "ash/common/display/display_info.h" #include "base/memory/ptr_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/display/chromeos/display_configurator.h" #include "ui/display/chromeos/test/test_display_snapshot.h" #include "ui/display/types/display_mode.h" using ui::DisplayConfigurator; typedef testing::Test DisplayChangeObserverTest; namespace ash { TEST_F(DisplayChangeObserverTest, GetExternalDisplayModeList) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1200), false, 60))); // All non-interlaced (as would be seen with different refresh rates). modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 80))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 70))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 60))); // Interlaced vs non-interlaced. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1280, 720), true, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1280, 720), false, 60))); // Interlaced only. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 768), true, 70))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 768), true, 60))); // Mixed. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 600), true, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 600), false, 70))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 600), false, 60))); // Just one interlaced mode. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(640, 480), true, 60))); ui::TestDisplaySnapshot display_snapshot; display_snapshot.set_modes(std::move(modes)); DisplayInfo::DisplayModeList display_modes = DisplayChangeObserver::GetExternalDisplayModeList(display_snapshot); ASSERT_EQ(6u, display_modes.size()); EXPECT_EQ("640x480", display_modes[0]->size().ToString()); EXPECT_TRUE(display_modes[0]->is_interlaced()); EXPECT_EQ(display_modes[0]->refresh_rate(), 60); EXPECT_EQ("1024x600", display_modes[1]->size().ToString()); EXPECT_FALSE(display_modes[1]->is_interlaced()); EXPECT_EQ(display_modes[1]->refresh_rate(), 70); EXPECT_EQ("1024x768", display_modes[2]->size().ToString()); EXPECT_TRUE(display_modes[2]->is_interlaced()); EXPECT_EQ(display_modes[2]->refresh_rate(), 70); EXPECT_EQ("1280x720", display_modes[3]->size().ToString()); EXPECT_FALSE(display_modes[3]->is_interlaced()); EXPECT_EQ(display_modes[3]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[4]->size().ToString()); EXPECT_FALSE(display_modes[4]->is_interlaced()); EXPECT_EQ(display_modes[4]->refresh_rate(), 80); EXPECT_EQ("1920x1200", display_modes[5]->size().ToString()); EXPECT_FALSE(display_modes[5]->is_interlaced()); EXPECT_EQ(display_modes[5]->refresh_rate(), 60); // Outputs without any modes shouldn't cause a crash. modes.clear(); display_snapshot.set_modes(std::move(modes)); display_modes = DisplayChangeObserver::GetExternalDisplayModeList(display_snapshot); EXPECT_EQ(0u, display_modes.size()); } TEST_F(DisplayChangeObserverTest, GetInternalDisplayModeList) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; // Data picked from peppy. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1366, 768), false, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 768), false, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(800, 600), false, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(600, 600), false, 56.2))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(640, 480), false, 59.9))); ui::TestDisplaySnapshot display_snapshot; display_snapshot.set_native_mode(modes[0].get()); display_snapshot.set_modes(std::move(modes)); DisplayInfo info(1, "", false); info.SetBounds(gfx::Rect(0, 0, 1366, 768)); DisplayInfo::DisplayModeList display_modes = DisplayChangeObserver::GetInternalDisplayModeList(info, display_snapshot); ASSERT_EQ(5u, display_modes.size()); EXPECT_EQ("1366x768", display_modes[0]->size().ToString()); EXPECT_FALSE(display_modes[0]->native()); EXPECT_NEAR(display_modes[0]->ui_scale(), 0.5, 0.01); EXPECT_EQ(display_modes[0]->refresh_rate(), 60); EXPECT_EQ("1366x768", display_modes[1]->size().ToString()); EXPECT_FALSE(display_modes[1]->native()); EXPECT_NEAR(display_modes[1]->ui_scale(), 0.6, 0.01); EXPECT_EQ(display_modes[1]->refresh_rate(), 60); EXPECT_EQ("1366x768", display_modes[2]->size().ToString()); EXPECT_FALSE(display_modes[2]->native()); EXPECT_NEAR(display_modes[2]->ui_scale(), 0.75, 0.01); EXPECT_EQ(display_modes[2]->refresh_rate(), 60); EXPECT_EQ("1366x768", display_modes[3]->size().ToString()); EXPECT_TRUE(display_modes[3]->native()); EXPECT_NEAR(display_modes[3]->ui_scale(), 1.0, 0.01); EXPECT_EQ(display_modes[3]->refresh_rate(), 60); EXPECT_EQ("1366x768", display_modes[4]->size().ToString()); EXPECT_FALSE(display_modes[4]->native()); EXPECT_NEAR(display_modes[4]->ui_scale(), 1.125, 0.01); EXPECT_EQ(display_modes[4]->refresh_rate(), 60); } TEST_F(DisplayChangeObserverTest, GetInternalHiDPIDisplayModeList) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; // Data picked from peppy. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(2560, 1700), false, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(2048, 1536), false, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1440), false, 60))); ui::TestDisplaySnapshot display_snapshot; display_snapshot.set_native_mode(modes[0].get()); display_snapshot.set_modes(std::move(modes)); DisplayInfo info(1, "", false); info.SetBounds(gfx::Rect(0, 0, 2560, 1700)); info.set_device_scale_factor(2.0f); DisplayInfo::DisplayModeList display_modes = DisplayChangeObserver::GetInternalDisplayModeList(info, display_snapshot); ASSERT_EQ(8u, display_modes.size()); EXPECT_EQ("2560x1700", display_modes[0]->size().ToString()); EXPECT_FALSE(display_modes[0]->native()); EXPECT_NEAR(display_modes[0]->ui_scale(), 0.5, 0.01); EXPECT_EQ(display_modes[0]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[1]->size().ToString()); EXPECT_FALSE(display_modes[1]->native()); EXPECT_NEAR(display_modes[1]->ui_scale(), 0.625, 0.01); EXPECT_EQ(display_modes[1]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[2]->size().ToString()); EXPECT_FALSE(display_modes[2]->native()); EXPECT_NEAR(display_modes[2]->ui_scale(), 0.8, 0.01); EXPECT_EQ(display_modes[2]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[3]->size().ToString()); EXPECT_FALSE(display_modes[3]->native()); EXPECT_NEAR(display_modes[3]->ui_scale(), 1.0, 0.01); EXPECT_EQ(display_modes[3]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[4]->size().ToString()); EXPECT_FALSE(display_modes[4]->native()); EXPECT_NEAR(display_modes[4]->ui_scale(), 1.125, 0.01); EXPECT_EQ(display_modes[4]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[5]->size().ToString()); EXPECT_FALSE(display_modes[5]->native()); EXPECT_NEAR(display_modes[5]->ui_scale(), 1.25, 0.01); EXPECT_EQ(display_modes[5]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[6]->size().ToString()); EXPECT_FALSE(display_modes[6]->native()); EXPECT_NEAR(display_modes[6]->ui_scale(), 1.5, 0.01); EXPECT_EQ(display_modes[6]->refresh_rate(), 60); EXPECT_EQ("2560x1700", display_modes[7]->size().ToString()); EXPECT_TRUE(display_modes[7]->native()); EXPECT_NEAR(display_modes[7]->ui_scale(), 2.0, 0.01); EXPECT_EQ(display_modes[7]->refresh_rate(), 60); } TEST_F(DisplayChangeObserverTest, GetInternalDisplayModeList1_25) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; // Data picked from peppy. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 60))); ui::TestDisplaySnapshot display_snapshot; display_snapshot.set_native_mode(modes[0].get()); display_snapshot.set_modes(std::move(modes)); DisplayInfo info(1, "", false); info.SetBounds(gfx::Rect(0, 0, 1920, 1080)); info.set_device_scale_factor(1.25); DisplayInfo::DisplayModeList display_modes = DisplayChangeObserver::GetInternalDisplayModeList(info, display_snapshot); ASSERT_EQ(5u, display_modes.size()); EXPECT_EQ("1920x1080", display_modes[0]->size().ToString()); EXPECT_FALSE(display_modes[0]->native()); EXPECT_NEAR(display_modes[0]->ui_scale(), 0.5, 0.01); EXPECT_EQ(display_modes[0]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[1]->size().ToString()); EXPECT_FALSE(display_modes[1]->native()); EXPECT_NEAR(display_modes[1]->ui_scale(), 0.625, 0.01); EXPECT_EQ(display_modes[1]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[2]->size().ToString()); EXPECT_FALSE(display_modes[2]->native()); EXPECT_NEAR(display_modes[2]->ui_scale(), 0.8, 0.01); EXPECT_EQ(display_modes[2]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[3]->size().ToString()); EXPECT_TRUE(display_modes[3]->native()); EXPECT_NEAR(display_modes[3]->ui_scale(), 1.0, 0.01); EXPECT_EQ(display_modes[3]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[4]->size().ToString()); EXPECT_FALSE(display_modes[4]->native()); EXPECT_NEAR(display_modes[4]->ui_scale(), 1.25, 0.01); EXPECT_EQ(display_modes[4]->refresh_rate(), 60); } TEST_F(DisplayChangeObserverTest, GetExternalDisplayModeList4K) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(3840, 2160), false, 30))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1200), false, 60))); // All non-interlaced (as would be seen with different refresh rates). modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 80))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 70))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 60))); // Interlaced vs non-interlaced. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1280, 720), true, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1280, 720), false, 60))); // Interlaced only. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 768), true, 70))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 768), true, 60))); // Mixed. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 600), true, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 600), false, 70))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1024, 600), false, 60))); // Just one interlaced mode. modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(640, 480), true, 60))); ui::TestDisplaySnapshot display_snapshot; display_snapshot.set_native_mode(modes[0].get()); display_snapshot.set_modes(std::move(modes)); DisplayInfo::DisplayModeList display_modes = DisplayChangeObserver::GetExternalDisplayModeList(display_snapshot); DisplayInfo info(1, "", false); info.SetDisplayModes(display_modes); // Sort as external display. display_modes = info.display_modes(); ASSERT_EQ(9u, display_modes.size()); EXPECT_EQ("640x480", display_modes[0]->size().ToString()); EXPECT_TRUE(display_modes[0]->is_interlaced()); EXPECT_EQ(display_modes[0]->refresh_rate(), 60); EXPECT_EQ("1024x600", display_modes[1]->size().ToString()); EXPECT_FALSE(display_modes[1]->is_interlaced()); EXPECT_EQ(display_modes[1]->refresh_rate(), 70); EXPECT_EQ("1024x768", display_modes[2]->size().ToString()); EXPECT_TRUE(display_modes[2]->is_interlaced()); EXPECT_EQ(display_modes[2]->refresh_rate(), 70); EXPECT_EQ("1280x720", display_modes[3]->size().ToString()); EXPECT_FALSE(display_modes[3]->is_interlaced()); EXPECT_EQ(display_modes[3]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[4]->size().ToString()); EXPECT_FALSE(display_modes[4]->is_interlaced()); EXPECT_EQ(display_modes[4]->refresh_rate(), 80); EXPECT_EQ("3840x2160", display_modes[5]->size().ToString()); EXPECT_FALSE(display_modes[5]->is_interlaced()); EXPECT_FALSE(display_modes[5]->native()); EXPECT_EQ(display_modes[5]->refresh_rate(), 30); EXPECT_EQ(display_modes[5]->device_scale_factor(), 2.0); EXPECT_EQ("1920x1200", display_modes[6]->size().ToString()); EXPECT_FALSE(display_modes[6]->is_interlaced()); EXPECT_EQ(display_modes[6]->refresh_rate(), 60); EXPECT_EQ("3840x2160", display_modes[7]->size().ToString()); EXPECT_FALSE(display_modes[7]->is_interlaced()); EXPECT_FALSE(display_modes[7]->native()); EXPECT_EQ(display_modes[7]->refresh_rate(), 30); EXPECT_EQ(display_modes[7]->device_scale_factor(), 1.25); EXPECT_EQ("3840x2160", display_modes[8]->size().ToString()); EXPECT_FALSE(display_modes[8]->is_interlaced()); EXPECT_TRUE(display_modes[8]->native()); EXPECT_EQ(display_modes[8]->refresh_rate(), 30); // Outputs without any modes shouldn't cause a crash. modes.clear(); display_snapshot.set_native_mode(NULL); display_snapshot.set_modes(std::move(modes)); display_modes = DisplayChangeObserver::GetExternalDisplayModeList(display_snapshot); EXPECT_EQ(0u, display_modes.size()); } namespace { float ComputeDeviceScaleFactor(float diagonal_inch, const gfx::Rect& resolution) { // We assume that displays have square pixel. float diagonal_pixel = std::sqrt(std::pow(resolution.width(), 2) + std::pow(resolution.height(), 2)); float dpi = diagonal_pixel / diagonal_inch; return DisplayChangeObserver::FindDeviceScaleFactor(dpi); } } // namespace TEST_F(DisplayChangeObserverTest, FindDeviceScaleFactor) { EXPECT_EQ(1.0f, ComputeDeviceScaleFactor(19.5f, gfx::Rect(1600, 900))); // 21.5" 1920x1080 EXPECT_EQ(1.0f, ComputeDeviceScaleFactor(21.5f, gfx::Rect(1920, 1080))); // 12.1" 1280x800 EXPECT_EQ(1.0f, ComputeDeviceScaleFactor(12.1f, gfx::Rect(1280, 800))); // 11.6" 1920x1080 EXPECT_EQ(1.25f, ComputeDeviceScaleFactor(11.6f, gfx::Rect(1920, 1080))); // 13.3" 1920x1080 EXPECT_EQ(1.25f, ComputeDeviceScaleFactor(13.3f, gfx::Rect(1920, 1080))); // 14" 1920x1080 EXPECT_EQ(1.25f, ComputeDeviceScaleFactor(14.0f, gfx::Rect(1920, 1080))); // 12.85" 2560x1700 EXPECT_EQ(2.0f, ComputeDeviceScaleFactor(12.85f, gfx::Rect(2560, 1700))); // Erroneous values should still work. EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(-100.0f)); EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(0.0f)); EXPECT_EQ(2.0f, DisplayChangeObserver::FindDeviceScaleFactor(10000.0f)); } TEST_F(DisplayChangeObserverTest, FindExternalDisplayNativeModeWhenOverwritten) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), true, 60))); modes.push_back( base::WrapUnique(new ui::DisplayMode(gfx::Size(1920, 1080), false, 60))); ui::TestDisplaySnapshot display_snapshot; display_snapshot.set_native_mode(modes[0].get()); display_snapshot.set_modes(std::move(modes)); DisplayInfo::DisplayModeList display_modes = DisplayChangeObserver::GetExternalDisplayModeList(display_snapshot); ASSERT_EQ(2u, display_modes.size()); EXPECT_EQ("1920x1080", display_modes[0]->size().ToString()); EXPECT_FALSE(display_modes[0]->is_interlaced()); EXPECT_FALSE(display_modes[0]->native()); EXPECT_EQ(display_modes[0]->refresh_rate(), 60); EXPECT_EQ("1920x1080", display_modes[1]->size().ToString()); EXPECT_TRUE(display_modes[1]->is_interlaced()); EXPECT_TRUE(display_modes[1]->native()); EXPECT_EQ(display_modes[1]->refresh_rate(), 60); } } // namespace ash
danakj/chromium
ash/display/display_change_observer_chromeos_unittest.cc
C++
bsd-3-clause
16,663
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // The base class for client/server QUIC streams. // It does not contain the entire interface needed by an application to interact // with a QUIC stream. Some parts of the interface must be obtained by // accessing the owning session object. A subclass of QuicStream // connects the object and the application that generates and consumes the data // of the stream. // The QuicStream object has a dependent QuicStreamSequencer object, // which is given the stream frames as they arrive, and provides stream data in // order by invoking ProcessRawData(). #ifndef NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_H_ #define NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_H_ #include <cstddef> #include <cstdint> #include <list> #include "base/macros.h" #include "net/third_party/quic/core/quic_flow_controller.h" #include "net/third_party/quic/core/quic_packets.h" #include "net/third_party/quic/core/quic_stream_send_buffer.h" #include "net/third_party/quic/core/quic_stream_sequencer.h" #include "net/third_party/quic/core/quic_types.h" #include "net/third_party/quic/core/session_notifier_interface.h" #include "net/third_party/quic/platform/api/quic_export.h" #include "net/third_party/quic/platform/api/quic_mem_slice_span.h" #include "net/third_party/quic/platform/api/quic_reference_counted.h" #include "net/third_party/quic/platform/api/quic_string.h" #include "net/third_party/quic/platform/api/quic_string_piece.h" #include "net/third_party/quiche/src/spdy/core/spdy_protocol.h" namespace quic { namespace test { class QuicStreamPeer; } // namespace test class QuicSession; class QuicStream; // Buffers frames for a stream until the first byte of that frame arrives. class QUIC_EXPORT_PRIVATE PendingStream : public QuicStreamSequencer::StreamInterface { public: PendingStream(QuicStreamId id, QuicSession* session); PendingStream(const PendingStream&) = delete; PendingStream(PendingStream&&) = default; ~PendingStream() override = default; // QuicStreamSequencer::StreamInterface void OnDataAvailable() override; void OnFinRead() override; void AddBytesConsumed(QuicByteCount bytes) override; void Reset(QuicRstStreamErrorCode error) override; void CloseConnectionWithDetails(QuicErrorCode error, const QuicString& details) override; QuicStreamId id() const override; const QuicSocketAddress& PeerAddressOfLatestPacket() const override; // Buffers the contents of |frame|. Frame must have a non-zero offset. // If the data violates flow control, the connection will be closed. void OnStreamFrame(const QuicStreamFrame& frame); // Stores the final byte offset from |frame|. // If the final offset violates flow control, the connection will be closed. void OnRstStreamFrame(const QuicRstStreamFrame& frame); // Returns the number of bytes read on this stream. uint64_t stream_bytes_read() { return stream_bytes_read_; } private: friend class QuicStream; bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset); // ID of this stream. QuicStreamId id_; // Session which owns this. QuicSession* session_; // Bytes read refers to payload bytes only: they do not include framing, // encryption overhead etc. uint64_t stream_bytes_read_; // True if a frame containing a fin has been received. bool fin_received_; // Connection-level flow controller. Owned by the session. QuicFlowController* connection_flow_controller_; // Stream-level flow controller. QuicFlowController flow_controller_; // Stores the buffered frames. QuicStreamSequencer sequencer_; }; class QUIC_EXPORT_PRIVATE QuicStream : public QuicStreamSequencer::StreamInterface { public: // This is somewhat arbitrary. It's possible, but unlikely, we will either // fail to set a priority client-side, or cancel a stream before stripping the // priority from the wire server-side. In either case, start out with a // priority in the middle. static const spdy::SpdyPriority kDefaultPriority = 3; static_assert(kDefaultPriority == (spdy::kV3LowestPriority + spdy::kV3HighestPriority) / 2, "Unexpected value of kDefaultPriority"); // Creates a new stream with stream_id |id| associated with |session|. If // |is_static| is true, then the stream will be given precedence // over other streams when determing what streams should write next. // |type| indicates whether the stream is bidirectional, read unidirectional // or write unidirectional. // TODO(fayang): Remove |type| when IETF stream ID numbering fully kicks in. QuicStream(QuicStreamId id, QuicSession* session, bool is_static, StreamType type); QuicStream(PendingStream pending, StreamType type); QuicStream(const QuicStream&) = delete; QuicStream& operator=(const QuicStream&) = delete; virtual ~QuicStream(); // Not in use currently. void SetFromConfig(); // QuicStreamSequencer::StreamInterface implementation. QuicStreamId id() const override { return id_; } // Called by the stream subclass after it has consumed the final incoming // data. void OnFinRead() override; // Called by the subclass or the sequencer to reset the stream from this // end. void Reset(QuicRstStreamErrorCode error) override; // Called by the subclass or the sequencer to close the entire connection from // this end. void CloseConnectionWithDetails(QuicErrorCode error, const QuicString& details) override; // Called by the stream sequencer as bytes are consumed from the buffer. // If the receive window has dropped below the threshold, then send a // WINDOW_UPDATE frame. void AddBytesConsumed(QuicByteCount bytes) override; // Get peer IP of the lastest packet which connection is dealing/delt with. const QuicSocketAddress& PeerAddressOfLatestPacket() const override; // Called by the session when a (potentially duplicate) stream frame has been // received for this stream. virtual void OnStreamFrame(const QuicStreamFrame& frame); // Called by the session when the connection becomes writeable to allow the // stream to write any pending data. virtual void OnCanWrite(); // Called by the session just before the object is destroyed. // The object should not be accessed after OnClose is called. // Sends a RST_STREAM with code QUIC_RST_ACKNOWLEDGEMENT if neither a FIN nor // a RST_STREAM has been sent. virtual void OnClose(); // Called by the session when the endpoint receives a RST_STREAM from the // peer. virtual void OnStreamReset(const QuicRstStreamFrame& frame); // Called by the session when the endpoint receives or sends a connection // close, and should immediately close the stream. virtual void OnConnectionClosed(QuicErrorCode error, ConnectionCloseSource source); spdy::SpdyPriority priority() const; // Sets priority_ to priority. This should only be called before bytes are // written to the server. void SetPriority(spdy::SpdyPriority priority); // Returns true if this stream is still waiting for acks of sent data. // This will return false if all data has been acked, or if the stream // is no longer interested in data being acked (which happens when // a stream is reset because of an error). bool IsWaitingForAcks() const; // Number of bytes available to read. size_t ReadableBytes() const; QuicRstStreamErrorCode stream_error() const { return stream_error_; } QuicErrorCode connection_error() const { return connection_error_; } bool reading_stopped() const { return sequencer_.ignore_read_data() || read_side_closed_; } bool write_side_closed() const { return write_side_closed_; } bool rst_received() const { return rst_received_; } bool rst_sent() const { return rst_sent_; } bool fin_received() const { return fin_received_; } bool fin_sent() const { return fin_sent_; } bool fin_outstanding() const { return fin_outstanding_; } bool fin_lost() const { return fin_lost_; } uint64_t BufferedDataBytes() const; uint64_t stream_bytes_read() const { return stream_bytes_read_; } uint64_t stream_bytes_written() const; size_t busy_counter() const { return busy_counter_; } void set_busy_counter(size_t busy_counter) { busy_counter_ = busy_counter; } void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } void set_fin_received(bool fin_received) { fin_received_ = fin_received; } void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } void set_rst_received(bool rst_received) { rst_received_ = rst_received; } void set_stream_error(QuicRstStreamErrorCode error) { stream_error_ = error; } // Adjust the flow control window according to new offset in |frame|. virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); int num_frames_received() const; int num_duplicate_frames_received() const; QuicFlowController* flow_controller() { return &flow_controller_; } // Called when endpoint receives a frame which could increase the highest // offset. // Returns true if the highest offset did increase. bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset); // Called when bytes are sent to the peer. void AddBytesSent(QuicByteCount bytes); // Updates the flow controller's send window offset and calls OnCanWrite if // it was blocked before. void UpdateSendWindowOffset(QuicStreamOffset new_offset); // Returns true if the stream has received either a RST_STREAM or a FIN - // either of which gives a definitive number of bytes which the peer has // sent. If this is not true on deletion of the stream object, the session // must keep track of the stream's byte offset until a definitive final value // arrives. bool HasFinalReceivedByteOffset() const { return fin_received_ || rst_received_; } // Returns true if the stream has queued data waiting to write. bool HasBufferedData() const; // Returns the version of QUIC being used for this stream. QuicTransportVersion transport_version() const; // Returns the crypto handshake protocol that was used on this stream's // connection. HandshakeProtocol handshake_protocol() const; // Sets the sequencer to consume all incoming data itself and not call // OnDataAvailable(). // When the FIN is received, the stream will be notified automatically (via // OnFinRead()) (which may happen during the call of StopReading()). // TODO(dworley): There should be machinery to send a RST_STREAM/NO_ERROR and // stop sending stream-level flow-control updates when this end sends FIN. virtual void StopReading(); // Sends as much of 'data' to the connection as the connection will consume, // and then buffers any remaining data in queued_data_. // If fin is true: if it is immediately passed on to the session, // write_side_closed() becomes true, otherwise fin_buffered_ becomes true. void WriteOrBufferData( QuicStringPiece data, bool fin, QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); // Adds random padding after the fin is consumed for this stream. void AddRandomPaddingAfterFin(); // Write |data_length| of data starts at |offset| from send buffer. bool WriteStreamData(QuicStreamOffset offset, QuicByteCount data_length, QuicDataWriter* writer); // Called when data [offset, offset + data_length) is acked. |fin_acked| // indicates whether the fin is acked. Returns true and updates // |newly_acked_length| if any new stream data (including fin) gets acked. virtual bool OnStreamFrameAcked(QuicStreamOffset offset, QuicByteCount data_length, bool fin_acked, QuicTime::Delta ack_delay_time, QuicByteCount* newly_acked_length); // Called when data [offset, offset + data_length) was retransmitted. // |fin_retransmitted| indicates whether fin was retransmitted. virtual void OnStreamFrameRetransmitted(QuicStreamOffset offset, QuicByteCount data_length, bool fin_retransmitted); // Called when data [offset, offset + data_length) is considered as lost. // |fin_lost| indicates whether the fin is considered as lost. virtual void OnStreamFrameLost(QuicStreamOffset offset, QuicByteCount data_length, bool fin_lost); // Called to retransmit outstanding portion in data [offset, offset + // data_length) and |fin|. Returns true if all data gets retransmitted. virtual bool RetransmitStreamData(QuicStreamOffset offset, QuicByteCount data_length, bool fin); // Sets deadline of this stream to be now + |ttl|, returns true if the setting // succeeds. bool MaybeSetTtl(QuicTime::Delta ttl); // Same as WritevData except data is provided in reference counted memory so // that data copy is avoided. QuicConsumedData WriteMemSlices(QuicMemSliceSpan span, bool fin); // Returns true if any stream data is lost (including fin) and needs to be // retransmitted. virtual bool HasPendingRetransmission() const; // Returns true if any portion of data [offset, offset + data_length) is // outstanding or fin is outstanding (if |fin| is true). Returns false // otherwise. bool IsStreamFrameOutstanding(QuicStreamOffset offset, QuicByteCount data_length, bool fin) const; StreamType type() const { return type_; } // Creates and sends a STOP_SENDING frame. This can be called regardless of // the version that has been negotiated. If not IETF QUIC/Version 99 then the // method is a noop, relieving the application of the necessity of // understanding the connection's QUIC version and knowing whether it can call // this method or not. void SendStopSending(uint16_t code); // Invoked when QUIC receives a STOP_SENDING frame for this stream, informing // the application that the peer has sent a STOP_SENDING. The default // implementation is a noop. Is to be overridden by the application-specific // QuicStream class. virtual void OnStopSending(uint16_t code); // Close the write side of the socket. Further writes will fail. // Can be called by the subclass or internally. // Does not send a FIN. May cause the stream to be closed. virtual void CloseWriteSide(); protected: // Sends as many bytes in the first |count| buffers of |iov| to the connection // as the connection will consume. If FIN is consumed, the write side is // immediately closed. // Returns the number of bytes consumed by the connection. // Please note: Returned consumed data is the amount of data saved in send // buffer. The data is not necessarily consumed by the connection. So write // side is closed when FIN is sent. // TODO(fayang): Let WritevData return boolean. QuicConsumedData WritevData(const struct IOVEC* iov, int iov_count, bool fin); // Allows override of the session level writev, for the force HOL // blocking experiment. virtual QuicConsumedData WritevDataInner(size_t write_length, QuicStreamOffset offset, bool fin); // Close the read side of the socket. May cause the stream to be closed. // Subclasses and consumers should use StopReading to terminate reading early // if expecting a FIN. Can be used directly by subclasses if not expecting a // FIN. void CloseReadSide(); // Called when data of [offset, offset + data_length] is buffered in send // buffer. virtual void OnDataBuffered( QuicStreamOffset /*offset*/, QuicByteCount /*data_length*/, const QuicReferenceCountedPointer<QuicAckListenerInterface>& /*ack_listener*/) {} // True if buffered data in send buffer is below buffered_data_threshold_. bool CanWriteNewData() const; // True if buffered data in send buffer is still below // buffered_data_threshold_ even after writing |length| bytes. bool CanWriteNewDataAfterData(QuicByteCount length) const; // Called when upper layer can write new data. virtual void OnCanWriteNewData() {} // Called when |bytes_consumed| bytes has been consumed. virtual void OnStreamDataConsumed(size_t bytes_consumed); // Writes pending retransmissions if any. virtual void WritePendingRetransmission(); // This is called when stream tries to retransmit data after deadline_. Make // this virtual so that subclasses can implement their own logics. virtual void OnDeadlinePassed(); bool fin_buffered() const { return fin_buffered_; } const QuicSession* session() const { return session_; } QuicSession* session() { return session_; } const QuicStreamSequencer* sequencer() const { return &sequencer_; } QuicStreamSequencer* sequencer() { return &sequencer_; } void DisableConnectionFlowControlForThisStream() { stream_contributes_to_connection_flow_control_ = false; } const QuicIntervalSet<QuicStreamOffset>& bytes_acked() const; const QuicStreamSendBuffer& send_buffer() const { return send_buffer_; } QuicStreamSendBuffer& send_buffer() { return send_buffer_; } private: friend class test::QuicStreamPeer; friend class QuicStreamUtils; QuicStream(QuicStreamId id, QuicSession* session, QuicStreamSequencer sequencer, bool is_static, StreamType type, uint64_t stream_bytes_read, bool fin_received, QuicFlowController flow_controller, QuicFlowController* connection_flow_controller); // Subclasses and consumers should use reading_stopped. bool read_side_closed() const { return read_side_closed_; } // Calls MaybeSendBlocked on the stream's flow controller and the connection // level flow controller. If the stream is flow control blocked by the // connection-level flow controller but not by the stream-level flow // controller, marks this stream as connection-level write blocked. void MaybeSendBlocked(); // Write buffered data in send buffer. TODO(fayang): Consider combine // WriteOrBufferData, Writev and WriteBufferedData. void WriteBufferedData(); // Returns true if deadline_ has passed. bool HasDeadlinePassed() const; QuicStreamSequencer sequencer_; QuicStreamId id_; // Pointer to the owning QuicSession object. QuicSession* session_; // The priority of the stream, once parsed. spdy::SpdyPriority priority_; // Bytes read refers to payload bytes only: they do not include framing, // encryption overhead etc. uint64_t stream_bytes_read_; // Stream error code received from a RstStreamFrame or error code sent by the // visitor or sequencer in the RstStreamFrame. QuicRstStreamErrorCode stream_error_; // Connection error code due to which the stream was closed. |stream_error_| // is set to |QUIC_STREAM_CONNECTION_ERROR| when this happens and consumers // should check |connection_error_|. QuicErrorCode connection_error_; // True if the read side is closed and further frames should be rejected. bool read_side_closed_; // True if the write side is closed, and further writes should fail. bool write_side_closed_; // True if the subclass has written a FIN with WriteOrBufferData, but it was // buffered in queued_data_ rather than being sent to the session. bool fin_buffered_; // True if a FIN has been sent to the session. bool fin_sent_; // True if a FIN is waiting to be acked. bool fin_outstanding_; // True if a FIN is lost. bool fin_lost_; // True if this stream has received (and the sequencer has accepted) a // StreamFrame with the FIN set. bool fin_received_; // True if an RST_STREAM has been sent to the session. // In combination with fin_sent_, used to ensure that a FIN and/or a // RST_STREAM is always sent to terminate the stream. bool rst_sent_; // True if this stream has received a RST_STREAM frame. bool rst_received_; // Tracks if the session this stream is running under was created by a // server or a client. Perspective perspective_; QuicFlowController flow_controller_; // The connection level flow controller. Not owned. QuicFlowController* connection_flow_controller_; // Special streams, such as the crypto and headers streams, do not respect // connection level flow control limits (but are stream level flow control // limited). bool stream_contributes_to_connection_flow_control_; // A counter incremented when OnCanWrite() is called and no progress is made. // For debugging only. size_t busy_counter_; // Indicates whether paddings will be added after the fin is consumed for this // stream. bool add_random_padding_after_fin_; // Send buffer of this stream. Send buffer is cleaned up when data gets acked // or discarded. QuicStreamSendBuffer send_buffer_; // Latched value of FLAGS_quic_buffered_data_threshold. const QuicByteCount buffered_data_threshold_; // If true, then this stream has precedence over other streams for write // scheduling. const bool is_static_; // If initialized, reset this stream at this deadline. QuicTime deadline_; // Indicates whether this stream is bidirectional, read unidirectional or // write unidirectional. const StreamType type_; }; } // namespace quic #endif // NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_H_
youtube/cobalt
net/third_party/quic/core/quic_stream.h
C
bsd-3-clause
21,855
/***************************** Include Files *******************************/ #include "Video_PR.h" /************************** Function Definitions ***************************/
AEW2015/PYNQ_PR_Overlay
Pynq-Z1/vivado/ip/Video_PR_1.0/drivers/Video_PR_v1_0/src/Video_PR.c
C
bsd-3-clause
181
/* $FreeBSD: releng/9.3/sys/dev/bktr/bktr_core.h 139749 2005-01-06 01:43:34Z imp $ */ /* * This is part of the Driver for Video Capture Cards (Frame grabbers) * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879 * chipset. * Copyright Roger Hardiman and Amancio Hasty. * * bktr_core : This deals with the Bt848/849/878/879 PCI Frame Grabber, * Handles all the open, close, ioctl and read userland calls. * Sets the Bt848 registers and generates RISC pograms. * Controls the i2c bus and GPIO interface. * Contains the interface to the kernel. * (eg probe/attach and open/close/ioctl) * */ /*- * 1. Redistributions of source code must retain the * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Amancio Hasty and * Roger Hardiman * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ int i2cWrite( bktr_ptr_t bktr, int addr, int byte1, int byte2 ); int i2cRead( bktr_ptr_t bktr, int addr ); void msp_dpl_reset( bktr_ptr_t bktr, int i2d_addr ); unsigned int msp_dpl_read( bktr_ptr_t bktr, int i2c_addr, unsigned char dev, unsigned int addr ); void msp_dpl_write( bktr_ptr_t bktr, int i2c_addr, unsigned char dev, unsigned int addr, unsigned int data ); /* * Defines for userland processes blocked in this driver * For /dev/bktr[n] use memory address of bktr structure * For /dev/vbi[n] use memory address of bktr structure + 1 * this is ok as the bktr structure is > 1 byte */ #define BKTR_SLEEP ((caddr_t)bktr ) #define VBI_SLEEP ((caddr_t)bktr + 1) /* device name for printf */ const char *bktr_name(bktr_ptr_t bktr); /* Prototypes for attatch and interrupt functions */ void common_bktr_attach( bktr_ptr_t bktr, int unit, u_long pci_id, u_int rev ); int common_bktr_intr( void *arg ); /* Prototypes for open, close, read, mmap and ioctl calls */ int video_open( bktr_ptr_t bktr ); int video_close( bktr_ptr_t bktr ); int video_read( bktr_ptr_t bktr, int unit, struct cdev *dev, struct uio *uio ); int video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* pr ); int tuner_open( bktr_ptr_t bktr ); int tuner_close( bktr_ptr_t bktr ); int tuner_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* pr ); int vbi_open( bktr_ptr_t bktr ); int vbi_close( bktr_ptr_t bktr ); int vbi_read( bktr_ptr_t bktr, struct uio *uio, int ioflag );
dcui/FreeBSD-9.3_kernel
sys/dev/bktr/bktr_core.h
C
bsd-3-clause
4,081
<?php namespace Util\Model\Entity\Base; use Util\Model\Service\Entity\Base\EntityInterface; abstract class AbstractEntity implements EntityInterface { /** * Solo se deben agregar relaciones de primer nivel y de tipo "m - 1" (relaciones padres) * Ejm: relaciones para producto, puede ser categoría o tipo, más no transacciones * * Relations array. It must be like this: * $relations = array( * 'UsuarioEntity' => array( * 'prefix' => 'usuario_usuario_', // prefix of relation table column name, it is like "<table>_" * 'class' => '\Usuario\Model\Entity\UsuarioEntity', //relation entity's class path * 'attribute' => 'usuario'), //relation attribute in current entity * ) * * @var array */ public $relations = array(); /** * variable en la cual se puede guardar datos extras * @var mix */ public $extraData; /** * Convert array data to Object * * @param type $data * @param string $mainPrefix Prefijo de los elementos del array de datos, * Sirve para poder enviar data de la entidad con un prefijo. * Ejm: para el atributo id, si existe prefijo 'usuario_', entonces el elemento que le * corresponde en el array de datos sería usuario_id * * @return \Util\Model\Service\Entity\Base\AbstractEntity */ public function exchangeArray($data, $mainPrefix = '') { if (!empty($this->relations) || !empty($data)) { foreach ($this->relations as $key => $relation) { foreach ($data as $column => $value) { if (strpos($column, $relation['prefix']) !== false) { $col = str_replace($relation['prefix'], '', $column); $this->relations[$key]['data'][$col] = $value; unset($data[$column]); } } if (!empty($this->relations[$key]['data'])) { $relObject = new $relation['class'](); $relObject->exchangeArray($this->relations[$key]['data']); $this->relations[$key]['object'] = $relObject; $attribute = \Util\Common\String::prepareForMethod($this->relations[$key]['attribute']); $method = 'set' . $attribute; $this->$method($this->relations[$key]['object']); } } } foreach (get_object_vars($this) as $field => $value) { $dataField = $mainPrefix . $field; $this->$field = isset($data[$dataField]) ? $data[$dataField] : $value; } return $this; } public function toArray() { return get_object_vars($this); } public function setExtraData($extraData) { $this->extraData = $extraData; } public function getExtraData() { return $this->extraData; } }
NextTrick/cp
common/Util/src/Util/Model/Entity/Base/AbstractEntity.php
PHP
bsd-3-clause
3,173
<?php namespace backend\models; use Yii; use yii\base\Model; use yii\data\ActiveDataProvider; use common\models\Town; /** * TownSearch represents the model behind the search form about `common\models\Town`. */ class TownSearch extends Town { /** * @inheritdoc */ public function rules() { return [ [['id', 'id_region', 'asdefault'], 'integer'], [['name'], 'safe'], ]; } /** * @inheritdoc */ public function scenarios() { // bypass scenarios() implementation in the parent class return Model::scenarios(); } /** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search($params) { $query = Town::find(); // add conditions that should always apply here $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } // grid filtering conditions $query->andFilterWhere([ 'id' => $this->id, 'id_region' => $this->id_region, 'asdefault' => $this->asdefault, ]); $query->andFilterWhere(['like', 'name', $this->name]); return $dataProvider; } }
N1kolayS/PCExpert
backend/models/TownSearch.php
PHP
bsd-3-clause
1,562
/*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ alter table ZSTG_DISEASEONTOLOGY_CGID disable constraint SYS_C004876; alter table ZSTG_DISEASEONTOLOGY_CGID disable constraint SYS_C004877; alter table ZSTG_DISEASEONTOLOGY_CGID disable constraint SYS_C004878; --EXIT;
NCIP/cabio
software/cabio-database/scripts/sql_loader/no_longer_used/constraints/zstg_diseaseontology_cgid.disable.sql
SQL
bsd-3-clause
380
import os WAGTAIL_ROOT = os.path.dirname(__file__) STATIC_ROOT = os.path.join(WAGTAIL_ROOT, 'test-static') MEDIA_ROOT = os.path.join(WAGTAIL_ROOT, 'test-media') MEDIA_URL = '/media/' DATABASES = { 'default': { 'ENGINE': os.environ.get('DATABASE_ENGINE', 'django.db.backends.sqlite3'), 'NAME': os.environ.get('DATABASE_NAME', 'wagtail'), 'USER': os.environ.get('DATABASE_USER', None), 'PASSWORD': os.environ.get('DATABASE_PASS', None), 'HOST': os.environ.get('DATABASE_HOST', None), 'TEST': { 'NAME': os.environ.get('DATABASE_NAME', None), } } } SECRET_KEY = 'not needed' ROOT_URLCONF = 'wagtail.tests.urls' STATIC_URL = '/static/' STATIC_ROOT = STATIC_ROOT STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) USE_TZ = True TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.request', 'wagtail.tests.context_processors.do_not_use_static_url', 'wagtail.contrib.settings.context_processors.settings', ], }, }, { 'BACKEND': 'django.template.backends.jinja2.Jinja2', 'APP_DIRS': True, 'OPTIONS': { 'extensions': [ 'wagtail.wagtailcore.jinja2tags.core', 'wagtail.wagtailadmin.jinja2tags.userbar', 'wagtail.wagtailimages.jinja2tags.images', ], }, }, ] MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'wagtail.wagtailcore.middleware.SiteMiddleware', 'wagtail.wagtailredirects.middleware.RedirectMiddleware', ) INSTALLED_APPS = ( # Install wagtailredirects with its appconfig # Theres nothing special about wagtailredirects, we just need to have one # app which uses AppConfigs to test that hooks load properly 'wagtail.wagtailredirects.apps.WagtailRedirectsAppConfig', 'wagtail.tests.testapp', 'wagtail.tests.demosite', 'wagtail.tests.customuser', 'wagtail.tests.snippets', 'wagtail.tests.routablepage', 'wagtail.tests.search', 'wagtail.contrib.wagtailstyleguide', 'wagtail.contrib.wagtailsitemaps', 'wagtail.contrib.wagtailroutablepage', 'wagtail.contrib.wagtailfrontendcache', 'wagtail.contrib.wagtailapi', 'wagtail.contrib.wagtailsearchpromotions', 'wagtail.contrib.settings', 'wagtail.wagtailforms', 'wagtail.wagtailsearch', 'wagtail.wagtailembeds', 'wagtail.wagtailimages', 'wagtail.wagtailsites', 'wagtail.wagtailusers', 'wagtail.wagtailsnippets', 'wagtail.wagtaildocs', 'wagtail.wagtailadmin', 'wagtail.wagtailcore', 'taggit', 'rest_framework', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ) # Using DatabaseCache to make sure that the cache is cleared between tests. # This prevents false-positives in some wagtail core tests where we are # changing the 'wagtail_root_paths' key which may cause future tests to fail. CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', 'LOCATION': 'cache', } } PASSWORD_HASHERS = ( 'django.contrib.auth.hashers.MD5PasswordHasher', # don't use the intentionally slow default password hasher ) WAGTAILSEARCH_BACKENDS = { 'default': { 'BACKEND': 'wagtail.wagtailsearch.backends.db', } } AUTH_USER_MODEL = 'customuser.CustomUser' if 'ELASTICSEARCH_URL' in os.environ: WAGTAILSEARCH_BACKENDS['elasticsearch'] = { 'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch', 'URLS': [os.environ['ELASTICSEARCH_URL']], 'TIMEOUT': 10, 'max_retries': 1, 'AUTO_UPDATE': False, } WAGTAIL_SITE_NAME = "Test Site"
inonit/wagtail
wagtail/tests/settings.py
Python
bsd-3-clause
4,667
/* * Copyright 2014 The Ideal Authors. All rights reserved. * * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file or at * https://developers.google.com/open-source/licenses/bsd */ package ideal.development.analyzers; import ideal.library.elements.*; import javax.annotation.Nullable; import ideal.runtime.elements.*; import ideal.development.elements.*; import ideal.development.literals.*; import ideal.development.actions.*; import ideal.development.constructs.*; import ideal.development.notifications.*; import ideal.development.names.*; import ideal.development.types.*; import ideal.development.flavors.*; import ideal.development.values.*; public class literal_analyzer extends single_pass_analyzer { private static final boolean USE_JAVA_STRING_TYPE = false; public final literal the_literal; public literal_analyzer(literal_construct source) { super(source); the_literal = source.the_literal; } @Override protected action do_single_pass_analysis() { if (the_literal instanceof integer_literal) { int the_value = ((integer_literal) the_literal).the_value(); type bound = the_value >= 0 ? library().immutable_nonnegative_type() : library().immutable_integer_type(); return new integer_value(the_value, bound).to_action(this); } else if (the_literal instanceof quoted_literal) { quoted_literal the_quoted_literal = (quoted_literal) the_literal; string the_value = the_quoted_literal.the_value(); type bound; if (USE_JAVA_STRING_TYPE && jinterop_library.is_enabled()) { bound = jinterop_library.get_instance().string_type(). get_flavored(flavors.mutable_flavor); } else { if (the_quoted_literal.quote == punctuation.SINGLE_QUOTE) { bound = library().immutable_character_type(); } else if (the_quoted_literal.quote == punctuation.DOUBLE_QUOTE) { bound = library().immutable_string_type(); } else { utilities.panic("Unrecognized quote type: " + the_quoted_literal.quote); return null; } } return new base_string_value(the_value, bound).to_action(this); } else { utilities.panic("Unrecognized literal: " + the_literal); return null; } } }
gnanam336/ideal
ideal/development/analyzers/literal_analyzer.java
Java
bsd-3-clause
2,315
--- title: "KinaseInhibitorTargets_analysis" author: "Oana Ursu" date: "December 4, 2015" output: html_document --- Produces Figure 1C, 1D ==== ```r require(reshape2) ``` ``` ## Loading required package: reshape2 ``` ```r require(pheatmap) ``` ``` ## Loading required package: pheatmap ``` ```r #Change DATADIR to where you downloaded the supplement DATADIR='/nfs/vendata/oursu/oana/GemPaper_2015-12-07' ``` ```r FIG_OUT=paste(DATADIR,'/results/data_processing/kinase/',sep='') system(paste('mkdir',FIG_OUT)) KI_NAMES=paste(DATADIR,'/data/kinase/Table.S1.2.KI_names.txt',sep='') KINASE_HITS=paste(DATADIR,'/results/data_processing/kinase/Table.S1.4.KinaseScreen_Hits.txt',sep='') KINASE_TARGETS=paste(DATADIR,'/data/kinase/Table.S1.3.KinaseTargets.txt',sep='') GENETIC_ANALYSIS=paste(DATADIR,'/data/genetic/Table.S2.1.GeneticHitsProcessedData.txt.translatedR_org.Hs.eg.db_2011-08-07_entrez_to_geneSymbols',sep='') DE_FILE=paste(DATADIR,'/data/RNAseq/Table.S3.1.Cuffdiff_protein_coding_V23_vs_G23_gene_exp.diff',sep='') FPKMmin=0.1 KINASE_THRESHOLD=50 KINASE_PHEN=paste(DATADIR,'/results/data_processing/kinase/KinaseTargets_for_phen_thresholdActivityReduction',KINASE_THRESHOLD,'.phen',sep='') ``` Read in files. ```r #Kinase files kinase.data=read.table(KINASE_TARGETS,header=TRUE,sep='\t') kinase.data=kinase.data[-which(is.na(kinase.data$percent_activity)),] dim(kinase.data) ``` ``` ## [1] 52834 4 ``` ```r #Genetic hits files genetic.data=read.table(GENETIC_ANALYSIS,header=TRUE)[,c('TraslatedGeneSymbol', 'ratio','FDR','controlStatus')] #also read a table of expressed genes (for filtering) de_data=read.table(DE_FILE,header=TRUE) expressed_genes=de_data[union(which(de_data$value_1>=FPKMmin),which(de_data$value_2>=FPKMmin)),'gene'] #Convert kinase data to genetic names as well. #Loop through kinase data and get corresponding genetic hit kinase.data=data.frame(kinase.data,siRNAscreen.SI=NA) unique_kinases=unique(kinase.data$target_kinase) genetic.genes=as.character(genetic.data$TraslatedGeneSymbol) for (kinase in unique_kinases){ kinase_items=strsplit(kinase,'/')[[1]] correspondingGene=c() for (kinase_item in kinase_items){ new_item=which(genetic.genes==kinase_item) if (length(new_item)>0){ correspondingGene=c(correspondingGene,new_item) } } if (length(correspondingGene)>0){ kinase.data[which(as.character(kinase.data$target_kinase)==kinase), 'siRNAscreen.SI']=max(abs(1-as.numeric(as.character(genetic.data[correspondingGene,'ratio']))),na.rm=TRUE) } } ``` Targets of gemcitabine synergizers. ---- Get the synergizer drugs. ```r KI_dict=read.table(KI_NAMES,header=TRUE,sep='\t') KI_dict[,'Ki_name']=gsub('/','.',gsub(' ','.',gsub(',','.',gsub('-','.',KI_dict[,'Ki_name'])))) rownames(KI_dict)=KI_dict[,'KI'] synergizer_ids=as.character(unique(read.table(KINASE_HITS,header=TRUE,sep='\t')[,'KI'])) synergizers=as.character(KI_dict[synergizer_ids,'Ki_name']) synergy_rows=which(as.character(kinase.data$kinase_inhibitor) %in% synergizers) print(synergizers) ``` ``` ## [1] "SB.218078" "Akt.Inhibitor.IV" ## [3] "K.252a..Nocardiopsis.sp." "Aminopurvalanol.A" ## [5] "G.6976" "Syk.Inhibitor" ## [7] "ERK.Inhibitor.III" "Cdk4.Inhibitor" ``` Make a heatmap of targets x synergizers. Note that for some pairs, data are missing. The data are missing from the original paper, it is not a bug in this code (http://www.nature.com/nbt/journal/v29/n11/full/nbt.2017.html) ```r synergizer.data=kinase.data[synergy_rows,] kinase.data[,1]=as.character(kinase.data[,1]) kinh.target.full=acast(kinase.data, target_kinase~kinase_inhibitor,fun.aggregate=min,value.var='percent_activity',fill=1000) kinh.target=acast(synergizer.data, target_kinase~kinase_inhibitor,value.var='percent_activity') get_optimal_ordering=function(m){ require(cba) d <- dist(as.matrix(m)) hc <- hclust(d) co <- order.optimal(d, hc$merge) m.optimalRows=as.matrix(m)[co$order,] d <- dist(as.matrix(t(m))) hc <- hclust(d) co <- order.optimal(d, hc$merge) m.optimal=m.optimalRows[,co$order] return(m.optimal) } pheatmap(get_optimal_ordering(t(kinh.target)),cluster_cols=FALSE,cluster_rows=FALSE, show_colnames=FALSE) ``` ``` ## Loading required package: cba ## Loading required package: grid ## Loading required package: proxy ## ## Attaching package: 'proxy' ## ## The following objects are masked from 'package:stats': ## ## as.dist, dist ## ## The following object is masked from 'package:base': ## ## as.matrix ``` ![plot of chunk unnamed-chunk-5](figure/unnamed-chunk-5-1.svg) ```r #plot for the figure pdf(paste(FIG_OUT,'KinaseHitHeatmap.pdf',sep=''),height=4,width=6) pheatmap(get_optimal_ordering(t(kinh.target)),cluster_cols=FALSE,cluster_rows=FALSE, show_colnames=FALSE) dev.off() ``` ``` ## pdf ## 2 ``` Now, make a histogram of targets per kinase inhibitor, for the whole data vs for the synergizer kinase inhibitors. ```r activity_threshold=50 kinh.data.withBinary=kinase.data[which(as.numeric(as.character(kinase.data$percent_activity))<=activity_threshold),] entries=unique(kinase.data[,1]) targets.perInh=rep(0,length(entries)) names(targets.perInh)=entries targets.perInhCounts=table(kinh.data.withBinary[,'kinase_inhibitor']) targets.perInh[names(targets.perInhCounts)]=targets.perInhCounts pdf(paste(FIG_OUT,'InhibitorsPerKinase.pdf',sep='')) par(mfrow=c(2,1)) hist(targets.perInh,breaks=100,xlim=c(0,250),xlab='Targets per inhibitor',main='Targets per kinase inhibitor \n (all)') hist(targets.perInh[synergizers],breaks=100,xlab='Targets per inhibitor',xlim=c(0,250),main='Targets per inhibitor \n(gemcitabine synergizers)') dev.off() ``` ``` ## pdf ## 2 ``` ```r expressed_kinase_hits2=c() unique_kinaseHits2=unique(kinase.data[,'target_kinase']) for (kinase in unique_kinaseHits2){ kinase_items=strsplit(kinase,'/')[[1]] for (kinase_item in kinase_items){ if (kinase_item %in% expressed_genes){ expressed_kinase_hits2=c(expressed_kinase_hits2,kinase) } } } kinh.data.withBinary=kinase.data[intersect(which(as.numeric(as.character(kinase.data$percent_activity))<=activity_threshold),which(kinase.data$target_kinase %in% expressed_kinase_hits2)),] entries=unique(kinase.data[,1]) targets.perInh=rep(0,length(entries)) names(targets.perInh)=entries targets.perInhCounts=table(kinh.data.withBinary[,'kinase_inhibitor']) targets.perInh[names(targets.perInhCounts)]=targets.perInhCounts pdf(paste(FIG_OUT,'InhibitorsPerKinase_expressed.pdf',sep=''),height=8,width=4) par(mfrow=c(2,1)) hist(targets.perInh,breaks=100,xlim=c(0,160),xlab='Targets per inhibitor',main='Targets per kinase inhibitor \n (all)') hist(targets.perInh[synergizers],breaks=100,xlab='Targets per inhibitor',xlim=c(0,160),main='Targets per inhibitor \n(gemcitabine synergizers)') dev.off() ``` ``` ## pdf ## 2 ``` ```r pdf(paste(FIG_OUT,'InhibitorsPerKinase_expressedECDF.pdf',sep=''),height=4,width=4) plot(ecdf(targets.perInh),main='ECDF Targets per kinase inhibitor\n Anastassiadis et al., 2011 ',xlab='Targets per kinase inhibitor',ylab='ECDF') abline(v=2,col='blue') dev.off() ``` ``` ## pdf ## 2 ``` Prepare a list of targets with associated values for the network input ```r phendata=data.frame(target=character(),value=double()) for (target in rownames(kinh.target)){ print(kinh.target[target,]) val=min(kinh.target[target,],na.rm=TRUE) if (val<=KINASE_THRESHOLD){ phendata=rbind(phendata,data.frame(target=gsub('/','_',target),value=100-val)) } } ``` ``` ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.73 45.51 83.27 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.43 84.61 92.87 ## SB.218078 Syk.Inhibitor ## 72.66 52.48 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.74 21.32 93.77 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.75 42.28 89.48 ## SB.218078 Syk.Inhibitor ## 68.05 54.24 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.00 47.82 97.36 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.88 2.78 1.05 ## SB.218078 Syk.Inhibitor ## 2.39 72.32 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.93 116.75 100.86 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.71 108.19 86.17 ## SB.218078 Syk.Inhibitor ## 63.90 104.79 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.63 100.45 86.91 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.68 109.54 84.20 ## SB.218078 Syk.Inhibitor ## 48.52 88.63 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.76 101.15 91.08 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.34 85.29 27.34 ## SB.218078 Syk.Inhibitor ## 27.14 97.40 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.14 79.65 93.96 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.65 12.20 10.71 ## SB.218078 Syk.Inhibitor ## 36.91 72.10 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 110.05 108.78 109.17 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.81 73.64 88.33 ## SB.218078 Syk.Inhibitor ## 78.58 99.11 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.58 99.42 127.36 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.98 155.15 119.66 ## SB.218078 Syk.Inhibitor ## 85.82 111.33 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.94 106.52 101.04 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.90 115.42 128.23 ## SB.218078 Syk.Inhibitor ## 113.16 98.38 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.90 102.84 96.87 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.62 103.73 115.77 ## SB.218078 Syk.Inhibitor ## 110.47 97.78 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.51 82.39 99.84 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.68 102.81 165.29 ## SB.218078 Syk.Inhibitor ## 126.66 112.89 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.14 61.55 14.26 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.39 3.86 1.05 ## SB.218078 Syk.Inhibitor ## 2.09 5.88 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.31 95.58 94.93 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.46 49.79 3.55 ## SB.218078 Syk.Inhibitor ## 56.20 53.23 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 88.10 80.45 60.68 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.16 56.80 4.62 ## SB.218078 Syk.Inhibitor ## 22.28 20.01 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.85 87.79 44.25 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.07 33.13 3.51 ## SB.218078 Syk.Inhibitor ## 9.52 10.49 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.30 91.90 51.90 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.54 55.73 7.25 ## SB.218078 Syk.Inhibitor ## 36.48 37.14 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.37 93.08 82.92 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.02 101.62 40.97 ## SB.218078 Syk.Inhibitor ## 38.13 49.19 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.14 79.65 83.91 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.83 68.07 27.42 ## SB.218078 Syk.Inhibitor ## 37.68 42.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.30 81.89 92.01 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.13 13.71 7.88 ## SB.218078 Syk.Inhibitor ## 27.48 77.03 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.37 97.45 98.93 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.35 110.04 133.42 ## SB.218078 Syk.Inhibitor ## 105.05 96.81 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.24 85.60 92.69 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.24 38.69 23.20 ## SB.218078 Syk.Inhibitor ## 83.92 80.16 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.22 93.13 21.48 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.25 20.17 1.56 ## SB.218078 Syk.Inhibitor ## 14.81 47.82 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.74 88.25 35.59 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.59 26.30 9.80 ## SB.218078 Syk.Inhibitor ## 13.56 65.52 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.59 33.03 74.81 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 109.57 22.02 8.92 ## SB.218078 Syk.Inhibitor ## 43.26 30.40 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.41 95.31 99.04 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.01 94.20 26.46 ## SB.218078 Syk.Inhibitor ## 69.74 75.73 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 113.63 131.66 99.44 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.49 103.11 55.67 ## SB.218078 Syk.Inhibitor ## 50.49 58.14 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.70 103.16 92.24 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.43 82.41 24.38 ## SB.218078 Syk.Inhibitor ## 33.57 69.56 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.33 104.67 94.51 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.53 100.61 42.54 ## SB.218078 Syk.Inhibitor ## 56.53 89.25 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.20 83.93 78.33 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.07 19.08 0.84 ## SB.218078 Syk.Inhibitor ## 2.84 57.61 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.95 98.18 80.30 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.12 51.25 4.81 ## SB.218078 Syk.Inhibitor ## 9.85 86.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.02 87.31 63.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.08 20.30 2.59 ## SB.218078 Syk.Inhibitor ## 7.03 66.81 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.92 104.49 99.48 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 82.15 21.88 3.10 ## SB.218078 Syk.Inhibitor ## 8.36 91.93 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.21 97.43 96.24 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.21 88.10 100.35 ## SB.218078 Syk.Inhibitor ## 98.71 96.40 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 114.69 86.84 99.09 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.25 19.25 19.01 ## SB.218078 Syk.Inhibitor ## 27.21 44.91 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 115.19 33.25 48.12 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 113.56 3.88 6.56 ## SB.218078 Syk.Inhibitor ## 7.93 34.37 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.78 25.85 91.89 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.37 55.54 19.80 ## SB.218078 Syk.Inhibitor ## 61.65 56.92 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.13 17.04 47.81 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.94 38.69 18.66 ## SB.218078 Syk.Inhibitor ## 29.86 49.61 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.42 4.07 52.50 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.63 20.84 4.20 ## SB.218078 Syk.Inhibitor ## 15.64 66.21 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.88 7.97 74.87 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 104.61 27.82 17.20 ## SB.218078 Syk.Inhibitor ## 28.55 77.93 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.17 31.91 88.09 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 84.95 65.20 47.47 ## SB.218078 Syk.Inhibitor ## 71.48 90.32 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 107.34 71.96 84.91 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.62 27.54 2.90 ## SB.218078 Syk.Inhibitor ## 11.18 105.53 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.43 76.51 21.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.36 44.55 3.35 ## SB.218078 Syk.Inhibitor ## 22.23 94.00 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.69 3.31 43.44 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.54 21.27 8.20 ## SB.218078 Syk.Inhibitor ## 27.97 57.96 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.61 0.13 44.14 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 89.21 8.52 6.63 ## SB.218078 Syk.Inhibitor ## 23.32 55.80 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.76 56.42 12.17 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.41 39.36 5.76 ## SB.218078 Syk.Inhibitor ## 6.06 82.44 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.18 51.08 40.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.69 52.08 7.18 ## SB.218078 Syk.Inhibitor ## 19.91 81.39 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.78 54.70 93.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.07 84.55 77.76 ## SB.218078 Syk.Inhibitor ## 80.40 73.65 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.74 65.68 82.66 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.69 55.18 25.42 ## SB.218078 Syk.Inhibitor ## 15.76 86.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 89.55 67.60 87.52 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 108.78 46.76 26.37 ## SB.218078 Syk.Inhibitor ## 8.52 65.02 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.10 96.19 79.73 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.80 7.95 2.60 ## SB.218078 Syk.Inhibitor ## 3.63 19.48 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.36 96.28 37.50 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.66 50.20 2.87 ## SB.218078 Syk.Inhibitor ## 13.00 1.30 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.93 75.51 95.40 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 112.74 75.45 93.67 ## SB.218078 Syk.Inhibitor ## 103.60 105.43 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.82 65.73 96.87 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.85 97.55 100.15 ## SB.218078 Syk.Inhibitor ## 93.77 102.34 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.54 82.72 82.22 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.03 80.41 102.31 ## SB.218078 Syk.Inhibitor ## 47.33 89.02 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.02 26.43 96.20 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.41 93.31 100.75 ## SB.218078 Syk.Inhibitor ## 96.10 88.32 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.65 35.19 89.53 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.02 105.11 98.72 ## SB.218078 Syk.Inhibitor ## 81.83 100.25 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.36 13.40 94.64 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.18 136.91 93.74 ## SB.218078 Syk.Inhibitor ## 107.87 109.35 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.82 99.27 93.13 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.01 73.13 82.03 ## SB.218078 Syk.Inhibitor ## 16.74 84.66 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.90 105.74 93.19 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.53 103.67 NA ## SB.218078 Syk.Inhibitor ## 4.47 66.04 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.39 86.15 127.84 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.40 96.94 57.34 ## SB.218078 Syk.Inhibitor ## 60.84 68.24 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 107.87 51.91 96.99 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 104.65 69.89 1.45 ## SB.218078 Syk.Inhibitor ## 43.08 88.26 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.38 17.65 84.75 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.31 88.74 4.38 ## SB.218078 Syk.Inhibitor ## 52.12 38.13 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 113.59 85.46 93.37 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.70 23.08 97.95 ## SB.218078 Syk.Inhibitor ## 97.02 81.39 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.46 16.49 49.51 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.63 66.18 10.37 ## SB.218078 Syk.Inhibitor ## 20.32 42.57 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.54 79.70 69.09 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.25 59.92 3.58 ## SB.218078 Syk.Inhibitor ## 13.63 45.93 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.20 109.40 76.57 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.28 100.43 53.19 ## SB.218078 Syk.Inhibitor ## 76.89 84.18 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.99 109.19 88.97 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.85 111.46 134.52 ## SB.218078 Syk.Inhibitor ## 94.63 96.81 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.43 79.28 100.04 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.53 80.97 31.12 ## SB.218078 Syk.Inhibitor ## 79.70 89.29 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.53 3.75 88.94 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.01 74.83 29.96 ## SB.218078 Syk.Inhibitor ## 69.51 45.06 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.41 111.14 97.33 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.26 100.38 138.41 ## SB.218078 Syk.Inhibitor ## 91.75 103.08 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 74.70 95.33 73.52 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.83 101.69 29.00 ## SB.218078 Syk.Inhibitor ## 32.66 98.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.31 100.74 98.38 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 80.14 84.36 59.23 ## SB.218078 Syk.Inhibitor ## 39.35 94.00 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.77 104.59 87.19 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.93 84.72 74.43 ## SB.218078 Syk.Inhibitor ## 89.62 93.19 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.35 127.93 91.77 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.37 73.31 79.98 ## SB.218078 Syk.Inhibitor ## 80.13 100.33 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.88 99.74 103.97 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.89 100.61 102.84 ## SB.218078 Syk.Inhibitor ## 98.85 106.10 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.94 96.30 29.52 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.19 85.31 4.07 ## SB.218078 Syk.Inhibitor ## 8.65 57.49 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.81 38.27 82.80 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.61 25.55 3.88 ## SB.218078 Syk.Inhibitor ## 3.15 103.74 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.68 57.10 84.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.83 46.27 11.67 ## SB.218078 Syk.Inhibitor ## 8.74 92.17 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.46 93.22 70.51 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.08 48.94 9.90 ## SB.218078 Syk.Inhibitor ## 5.94 85.48 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.69 103.33 94.53 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.52 83.92 10.44 ## SB.218078 Syk.Inhibitor ## 16.58 89.71 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 106.80 91.62 85.99 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.69 95.65 96.34 ## SB.218078 Syk.Inhibitor ## 87.77 73.69 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.00 93.90 100.49 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.21 63.62 86.59 ## SB.218078 Syk.Inhibitor ## 78.34 77.54 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 77.14 76.89 98.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.87 81.58 62.56 ## SB.218078 Syk.Inhibitor ## 90.12 100.61 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.36 67.54 99.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.82 92.48 63.04 ## SB.218078 Syk.Inhibitor ## 91.26 93.02 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.45 86.64 100.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.27 97.87 81.29 ## SB.218078 Syk.Inhibitor ## 96.53 80.89 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.90 61.35 91.29 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.82 90.42 70.37 ## SB.218078 Syk.Inhibitor ## 91.44 80.47 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.96 63.98 90.55 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.46 88.21 70.01 ## SB.218078 Syk.Inhibitor ## 78.68 69.28 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## NA NA NA ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## NA NA 59.51 ## SB.218078 Syk.Inhibitor ## 63.93 30.22 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.91 80.20 95.33 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.85 62.58 41.29 ## SB.218078 Syk.Inhibitor ## 69.21 41.29 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.31 92.50 101.92 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.91 91.71 96.28 ## SB.218078 Syk.Inhibitor ## 89.87 83.43 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.57 59.19 95.46 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.80 94.96 60.85 ## SB.218078 Syk.Inhibitor ## 80.21 68.72 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.13 73.62 99.47 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 84.58 77.74 87.54 ## SB.218078 Syk.Inhibitor ## 98.38 84.81 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.54 95.33 91.92 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.72 87.16 92.99 ## SB.218078 Syk.Inhibitor ## 93.23 93.24 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.71 58.39 86.53 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.60 96.33 82.52 ## SB.218078 Syk.Inhibitor ## 75.42 57.36 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.03 92.91 100.59 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.06 106.91 94.89 ## SB.218078 Syk.Inhibitor ## 98.38 120.19 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.63 131.04 100.51 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.63 100.39 84.94 ## SB.218078 Syk.Inhibitor ## 72.46 81.29 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 112.10 105.90 108.45 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.38 72.55 24.37 ## SB.218078 Syk.Inhibitor ## 102.37 109.08 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 112.42 95.41 92.42 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.73 104.09 47.96 ## SB.218078 Syk.Inhibitor ## 88.68 98.19 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.20 59.53 91.77 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 107.27 77.03 67.28 ## SB.218078 Syk.Inhibitor ## 23.48 94.09 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.89 54.90 88.94 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.67 5.90 1.83 ## SB.218078 Syk.Inhibitor ## 5.39 20.01 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.48 69.19 88.12 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.24 78.41 36.35 ## SB.218078 Syk.Inhibitor ## 42.08 57.40 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.42 76.66 85.27 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.63 63.31 43.72 ## SB.218078 Syk.Inhibitor ## 29.13 50.16 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.31 97.27 98.39 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.60 79.84 45.41 ## SB.218078 Syk.Inhibitor ## 34.11 50.53 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 88.38 79.40 86.20 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.63 76.72 46.66 ## SB.218078 Syk.Inhibitor ## 36.32 33.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 84.11 93.39 90.58 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.83 86.49 82.94 ## SB.218078 Syk.Inhibitor ## 70.40 74.10 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.05 15.02 88.77 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.87 70.72 12.13 ## SB.218078 Syk.Inhibitor ## 30.86 28.37 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.09 97.54 56.53 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.62 63.61 23.20 ## SB.218078 Syk.Inhibitor ## 13.31 70.14 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.60 8.35 8.19 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.27 5.27 2.41 ## SB.218078 Syk.Inhibitor ## 0.19 1.56 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.93 80.70 28.00 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.33 38.24 2.50 ## SB.218078 Syk.Inhibitor ## 4.97 65.13 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 107.72 71.09 96.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.45 84.08 34.62 ## SB.218078 Syk.Inhibitor ## 29.34 82.53 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.12 70.29 93.91 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.05 84.70 68.14 ## SB.218078 Syk.Inhibitor ## 101.52 97.07 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.19 18.92 95.20 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.54 90.64 22.94 ## SB.218078 Syk.Inhibitor ## 59.91 45.66 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.26 90.71 74.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 114.64 5.68 0.77 ## SB.218078 Syk.Inhibitor ## 3.75 17.39 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 87.50 82.99 97.57 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.88 103.09 104.09 ## SB.218078 Syk.Inhibitor ## 97.92 100.49 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.42 97.09 95.20 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.87 106.22 90.10 ## SB.218078 Syk.Inhibitor ## 101.24 110.52 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.46 103.27 99.78 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.45 75.15 44.09 ## SB.218078 Syk.Inhibitor ## 77.00 40.37 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.75 100.57 97.03 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 123.40 89.07 61.97 ## SB.218078 Syk.Inhibitor ## 88.73 86.30 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.89 72.14 107.86 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.26 44.44 23.41 ## SB.218078 Syk.Inhibitor ## 55.58 47.24 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.40 79.32 98.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.00 37.86 4.94 ## SB.218078 Syk.Inhibitor ## 53.41 20.86 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.37 100.64 33.89 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 108.11 35.63 22.35 ## SB.218078 Syk.Inhibitor ## 2.19 100.46 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.65 102.65 63.75 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 116.93 38.91 50.45 ## SB.218078 Syk.Inhibitor ## 4.60 98.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.55 99.88 72.90 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 89.11 27.21 10.22 ## SB.218078 Syk.Inhibitor ## 18.46 93.08 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.59 27.31 92.43 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 114.25 96.78 13.25 ## SB.218078 Syk.Inhibitor ## 24.79 49.98 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.53 86.05 29.26 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.56 0.43 0.12 ## SB.218078 Syk.Inhibitor ## 0.99 22.51 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.55 99.16 98.25 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 81.06 81.11 104.11 ## SB.218078 Syk.Inhibitor ## 93.61 97.16 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.11 94.27 106.82 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.72 97.75 94.23 ## SB.218078 Syk.Inhibitor ## 32.57 82.60 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.48 99.42 93.26 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.30 29.78 107.62 ## SB.218078 Syk.Inhibitor ## 49.89 104.92 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.35 96.41 94.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.88 102.78 65.42 ## SB.218078 Syk.Inhibitor ## 29.15 86.21 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.00 72.99 14.96 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.35 98.32 57.21 ## SB.218078 Syk.Inhibitor ## 63.79 87.95 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 85.97 97.26 81.51 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.05 101.99 36.47 ## SB.218078 Syk.Inhibitor ## 106.50 109.38 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.61 104.23 92.21 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.01 90.38 38.81 ## SB.218078 Syk.Inhibitor ## 97.84 101.28 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.71 88.44 83.45 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.96 69.39 2.39 ## SB.218078 Syk.Inhibitor ## 23.86 21.90 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.95 85.03 86.43 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.97 89.32 32.16 ## SB.218078 Syk.Inhibitor ## 17.19 87.44 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.79 97.08 81.85 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.92 6.43 5.79 ## SB.218078 Syk.Inhibitor ## 37.52 14.17 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 173.43 86.76 76.25 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.27 63.52 1.03 ## SB.218078 Syk.Inhibitor ## 14.04 2.98 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.78 70.76 85.78 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.24 82.50 14.44 ## SB.218078 Syk.Inhibitor ## 7.16 86.91 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.72 80.24 84.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.49 4.32 22.74 ## SB.218078 Syk.Inhibitor ## 8.29 21.38 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.81 100.94 109.68 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.91 20.16 1.78 ## SB.218078 Syk.Inhibitor ## 22.22 83.87 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.83 99.95 95.75 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.82 5.58 2.95 ## SB.218078 Syk.Inhibitor ## 14.19 58.37 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 106.39 107.50 76.98 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.78 2.44 0.50 ## SB.218078 Syk.Inhibitor ## 1.87 43.70 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.29 93.42 85.23 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.15 78.66 28.84 ## SB.218078 Syk.Inhibitor ## 98.53 108.33 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.61 99.83 99.61 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 110.53 86.03 12.42 ## SB.218078 Syk.Inhibitor ## 96.15 93.84 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.72 94.57 104.51 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.96 94.51 87.82 ## SB.218078 Syk.Inhibitor ## 138.09 93.14 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.93 101.50 67.93 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.73 56.99 19.99 ## SB.218078 Syk.Inhibitor ## 4.55 74.29 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.70 82.48 42.31 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 109.06 4.18 1.07 ## SB.218078 Syk.Inhibitor ## 2.69 13.43 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 89.92 70.17 88.92 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.62 84.27 25.56 ## SB.218078 Syk.Inhibitor ## 36.21 57.60 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.28 106.54 83.52 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.67 45.34 6.33 ## SB.218078 Syk.Inhibitor ## 49.34 74.07 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.08 60.25 90.20 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.71 31.83 41.39 ## SB.218078 Syk.Inhibitor ## 50.46 68.18 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.21 55.60 84.60 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.60 20.09 5.06 ## SB.218078 Syk.Inhibitor ## 9.25 16.99 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.51 100.84 49.85 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.99 30.52 0.34 ## SB.218078 Syk.Inhibitor ## 1.91 9.76 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.45 23.07 93.24 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.35 94.35 24.79 ## SB.218078 Syk.Inhibitor ## 35.38 43.79 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 110.25 85.68 92.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.39 90.25 43.68 ## SB.218078 Syk.Inhibitor ## 73.59 75.03 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.20 92.77 101.30 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.28 108.57 13.10 ## SB.218078 Syk.Inhibitor ## 99.24 101.27 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.24 98.41 118.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.41 83.70 54.69 ## SB.218078 Syk.Inhibitor ## 93.06 91.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.82 95.81 86.19 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.59 127.15 47.90 ## SB.218078 Syk.Inhibitor ## 80.43 88.33 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.18 87.47 41.99 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.70 20.77 1.30 ## SB.218078 Syk.Inhibitor ## 10.43 40.38 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.60 74.12 40.37 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 108.48 11.77 1.56 ## SB.218078 Syk.Inhibitor ## 4.88 45.49 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.82 85.20 57.27 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 107.00 13.88 1.77 ## SB.218078 Syk.Inhibitor ## 8.53 57.23 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.62 71.16 38.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.64 10.75 0.94 ## SB.218078 Syk.Inhibitor ## 5.31 40.59 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.53 91.33 90.29 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.45 90.15 23.65 ## SB.218078 Syk.Inhibitor ## 29.48 63.58 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 88.45 87.50 105.09 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 78.20 92.46 16.17 ## SB.218078 Syk.Inhibitor ## 87.94 94.67 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.28 83.07 100.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.99 2.96 2.91 ## SB.218078 Syk.Inhibitor ## 13.97 92.05 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.26 100.01 105.31 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.82 5.86 6.93 ## SB.218078 Syk.Inhibitor ## 18.37 80.67 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.39 51.50 46.64 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.25 21.08 1.20 ## SB.218078 Syk.Inhibitor ## 7.13 63.01 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.03 94.49 52.22 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 84.07 2.48 0.39 ## SB.218078 Syk.Inhibitor ## 0.90 53.75 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.86 92.54 94.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 111.18 21.07 9.58 ## SB.218078 Syk.Inhibitor ## 19.27 115.75 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.83 99.49 43.31 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.15 59.60 6.24 ## SB.218078 Syk.Inhibitor ## 7.76 53.56 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.40 81.30 85.35 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.53 24.56 6.35 ## SB.218078 Syk.Inhibitor ## 4.01 95.01 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.31 7.81 7.57 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.77 1.49 0.36 ## SB.218078 Syk.Inhibitor ## 8.72 28.12 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.52 95.08 70.35 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.18 25.76 2.49 ## SB.218078 Syk.Inhibitor ## 2.66 95.89 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.87 17.71 14.01 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.40 2.19 0.70 ## SB.218078 Syk.Inhibitor ## 1.37 9.89 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.14 99.14 81.52 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.41 75.17 12.75 ## SB.218078 Syk.Inhibitor ## 48.64 74.11 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.42 113.18 43.95 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 89.29 17.96 4.23 ## SB.218078 Syk.Inhibitor ## 9.71 71.11 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.49 99.40 97.48 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.33 89.94 84.08 ## SB.218078 Syk.Inhibitor ## 84.03 70.73 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.98 98.45 84.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.40 92.10 78.90 ## SB.218078 Syk.Inhibitor ## 101.58 113.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 110.68 103.01 76.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.84 23.74 12.32 ## SB.218078 Syk.Inhibitor ## 9.88 80.86 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.56 89.30 75.94 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.90 29.95 2.46 ## SB.218078 Syk.Inhibitor ## 12.36 71.18 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 106.99 37.69 89.21 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.14 92.75 26.76 ## SB.218078 Syk.Inhibitor ## 63.63 88.47 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.31 63.64 52.04 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.52 3.73 2.74 ## SB.218078 Syk.Inhibitor ## 3.56 10.66 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.87 70.01 55.83 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.39 3.07 2.86 ## SB.218078 Syk.Inhibitor ## 3.22 23.41 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.17 75.92 80.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.70 62.80 25.79 ## SB.218078 Syk.Inhibitor ## 14.25 80.20 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.68 67.82 80.46 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.54 89.76 137.12 ## SB.218078 Syk.Inhibitor ## 20.52 101.48 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.72 46.04 88.45 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.41 34.76 6.05 ## SB.218078 Syk.Inhibitor ## 25.83 104.59 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## NA NA NA ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## NA NA 4.45 ## SB.218078 Syk.Inhibitor ## 19.07 74.59 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.67 81.49 89.14 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.72 62.89 36.22 ## SB.218078 Syk.Inhibitor ## 50.86 68.51 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.61 84.23 108.73 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 109.54 109.51 94.44 ## SB.218078 Syk.Inhibitor ## 60.63 96.06 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.31 94.41 92.01 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.86 89.93 81.81 ## SB.218078 Syk.Inhibitor ## 93.76 89.14 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.16 100.40 88.32 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.18 133.46 92.46 ## SB.218078 Syk.Inhibitor ## 101.94 66.21 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.51 80.18 88.98 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.78 49.14 15.01 ## SB.218078 Syk.Inhibitor ## 22.03 81.05 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.13 110.67 103.89 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.40 102.75 99.26 ## SB.218078 Syk.Inhibitor ## 93.08 98.57 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.37 89.01 96.82 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.83 97.02 90.45 ## SB.218078 Syk.Inhibitor ## 99.12 101.09 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 107.81 69.42 83.55 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.79 96.86 14.70 ## SB.218078 Syk.Inhibitor ## 23.41 67.32 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.98 100.30 101.09 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 77.88 84.09 46.55 ## SB.218078 Syk.Inhibitor ## 134.48 122.87 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.23 93.91 81.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.07 57.28 58.02 ## SB.218078 Syk.Inhibitor ## 74.13 90.41 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.19 100.40 95.83 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.17 102.27 102.27 ## SB.218078 Syk.Inhibitor ## 92.41 93.75 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.95 98.92 90.62 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.16 93.53 92.09 ## SB.218078 Syk.Inhibitor ## 101.70 123.46 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.29 96.29 93.62 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.59 99.49 98.49 ## SB.218078 Syk.Inhibitor ## 107.94 93.81 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.50 101.48 99.05 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.05 104.36 99.52 ## SB.218078 Syk.Inhibitor ## 113.70 104.91 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.67 101.81 100.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.38 85.85 92.69 ## SB.218078 Syk.Inhibitor ## 112.88 100.94 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.17 98.17 83.86 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.59 21.58 34.94 ## SB.218078 Syk.Inhibitor ## 35.01 94.57 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.77 95.54 45.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.32 6.71 7.24 ## SB.218078 Syk.Inhibitor ## 2.38 44.30 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 87.50 81.76 87.80 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.37 83.28 4.61 ## SB.218078 Syk.Inhibitor ## 23.61 90.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.30 95.47 100.97 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.52 91.66 7.46 ## SB.218078 Syk.Inhibitor ## 43.90 79.19 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.56 101.40 97.68 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.06 122.24 5.64 ## SB.218078 Syk.Inhibitor ## 41.67 93.81 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 108.53 101.52 96.39 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.34 43.99 39.52 ## SB.218078 Syk.Inhibitor ## 75.29 86.19 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.59 44.34 96.66 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.97 37.07 24.48 ## SB.218078 Syk.Inhibitor ## 64.66 75.34 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.49 57.26 97.71 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.02 20.37 38.91 ## SB.218078 Syk.Inhibitor ## 85.40 90.12 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.50 106.11 86.32 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.38 84.31 14.61 ## SB.218078 Syk.Inhibitor ## 43.27 84.77 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 106.84 75.63 86.29 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 111.16 84.16 2.69 ## SB.218078 Syk.Inhibitor ## 39.85 99.56 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.19 89.42 97.62 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.20 83.51 17.12 ## SB.218078 Syk.Inhibitor ## 32.83 81.05 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.15 98.07 82.62 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 128.77 60.64 14.62 ## SB.218078 Syk.Inhibitor ## 19.08 65.95 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.60 105.55 66.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.62 63.23 1.61 ## SB.218078 Syk.Inhibitor ## 10.62 94.97 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.06 81.10 40.68 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.84 1.76 1.19 ## SB.218078 Syk.Inhibitor ## 2.75 20.60 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.65 104.51 94.79 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.25 8.40 6.47 ## SB.218078 Syk.Inhibitor ## 75.57 51.96 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.80 98.00 8.84 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.94 36.08 18.50 ## SB.218078 Syk.Inhibitor ## 0.44 96.53 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 116.93 113.15 44.63 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 106.05 100.66 64.96 ## SB.218078 Syk.Inhibitor ## 1.86 101.34 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.82 93.01 4.69 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 113.73 17.32 1.75 ## SB.218078 Syk.Inhibitor ## 0.24 91.55 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.91 101.33 103.31 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.27 83.66 18.04 ## SB.218078 Syk.Inhibitor ## 44.74 103.58 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## NA NA NA ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## NA NA 10.77 ## SB.218078 Syk.Inhibitor ## 39.81 100.59 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 77.74 66.15 72.54 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 114.79 7.58 23.73 ## SB.218078 Syk.Inhibitor ## 13.94 122.79 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.81 98.81 78.58 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 88.86 18.71 26.28 ## SB.218078 Syk.Inhibitor ## 22.47 113.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 117.99 97.34 72.84 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.29 9.73 13.80 ## SB.218078 Syk.Inhibitor ## 6.42 86.70 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.28 87.61 99.14 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.21 41.93 12.58 ## SB.218078 Syk.Inhibitor ## 19.05 91.25 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.69 105.16 95.68 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.46 58.51 10.63 ## SB.218078 Syk.Inhibitor ## 28.44 77.28 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.63 99.45 100.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.05 35.30 20.50 ## SB.218078 Syk.Inhibitor ## 47.62 101.53 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.43 106.83 76.58 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.37 72.15 40.23 ## SB.218078 Syk.Inhibitor ## 32.85 105.95 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.14 89.55 96.25 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.32 91.60 42.04 ## SB.218078 Syk.Inhibitor ## 86.42 99.57 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 91.87 94.21 51.91 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.53 17.32 1.32 ## SB.218078 Syk.Inhibitor ## 1.89 79.98 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.37 89.20 49.53 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.87 7.30 1.95 ## SB.218078 Syk.Inhibitor ## -0.05 76.44 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.60 119.19 93.07 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.60 76.30 22.52 ## SB.218078 Syk.Inhibitor ## 43.17 102.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.77 101.26 91.78 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.13 87.05 70.13 ## SB.218078 Syk.Inhibitor ## 87.41 104.80 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.12 103.12 45.89 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.30 18.70 1.43 ## SB.218078 Syk.Inhibitor ## 2.02 87.22 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.48 103.94 76.02 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.42 80.22 13.36 ## SB.218078 Syk.Inhibitor ## 35.65 81.13 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.61 102.49 90.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.83 84.31 19.08 ## SB.218078 Syk.Inhibitor ## 41.29 87.23 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.40 88.77 29.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.71 28.16 -4.02 ## SB.218078 Syk.Inhibitor ## 6.01 85.02 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 85.66 93.33 65.96 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.91 10.28 1.34 ## SB.218078 Syk.Inhibitor ## 2.68 68.91 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 79.16 97.96 88.69 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.63 67.73 2.44 ## SB.218078 Syk.Inhibitor ## 15.90 81.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 110.39 54.95 91.19 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.56 102.77 46.16 ## SB.218078 Syk.Inhibitor ## 50.22 92.06 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.10 92.01 93.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 107.20 104.58 89.69 ## SB.218078 Syk.Inhibitor ## 62.39 104.20 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.87 62.84 93.29 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.77 88.08 45.74 ## SB.218078 Syk.Inhibitor ## 52.49 99.01 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 107.94 101.28 85.14 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.83 60.08 7.17 ## SB.218078 Syk.Inhibitor ## 17.46 81.02 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.62 63.57 79.47 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.45 26.69 17.03 ## SB.218078 Syk.Inhibitor ## 41.51 43.14 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.85 113.10 97.77 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.14 111.11 121.61 ## SB.218078 Syk.Inhibitor ## 120.59 102.02 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.60 61.60 80.11 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.86 0.52 2.36 ## SB.218078 Syk.Inhibitor ## 3.21 1.93 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 88.60 87.72 99.56 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.82 55.06 11.42 ## SB.218078 Syk.Inhibitor ## 79.65 74.25 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.52 93.12 65.64 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.39 9.91 1.36 ## SB.218078 Syk.Inhibitor ## 45.54 92.49 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.08 90.01 93.95 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.69 61.87 31.24 ## SB.218078 Syk.Inhibitor ## 88.70 63.85 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.10 100.76 72.69 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.32 48.52 18.48 ## SB.218078 Syk.Inhibitor ## 73.67 40.98 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.44 121.56 100.66 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.58 110.65 82.28 ## SB.218078 Syk.Inhibitor ## 87.75 100.26 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.06 96.55 74.37 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 97.51 1.18 1.55 ## SB.218078 Syk.Inhibitor ## 1.60 82.21 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 104.02 37.21 58.37 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.33 9.70 -5.99 ## SB.218078 Syk.Inhibitor ## 1.58 12.72 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.20 54.06 46.33 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.86 5.93 2.61 ## SB.218078 Syk.Inhibitor ## 2.35 12.43 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.69 48.67 37.88 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.46 0.30 1.72 ## SB.218078 Syk.Inhibitor ## 1.33 9.26 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.99 46.12 32.41 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.94 4.20 1.66 ## SB.218078 Syk.Inhibitor ## 1.08 6.55 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.17 93.09 47.55 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 92.45 79.08 8.03 ## SB.218078 Syk.Inhibitor ## 23.85 71.82 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 122.92 121.31 68.50 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.31 94.03 9.65 ## SB.218078 Syk.Inhibitor ## 18.57 80.73 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.44 99.91 97.23 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 107.42 112.31 53.07 ## SB.218078 Syk.Inhibitor ## 71.70 94.72 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 111.87 104.00 80.41 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.62 54.55 4.00 ## SB.218078 Syk.Inhibitor ## 33.92 81.42 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 101.32 39.77 90.90 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.02 34.09 7.89 ## SB.218078 Syk.Inhibitor ## 25.97 28.63 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.35 81.43 84.48 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.21 40.52 14.52 ## SB.218078 Syk.Inhibitor ## 52.00 102.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.74 96.83 91.45 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 90.23 96.63 110.80 ## SB.218078 Syk.Inhibitor ## 104.62 99.76 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.21 62.14 86.36 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 94.92 98.30 99.16 ## SB.218078 Syk.Inhibitor ## 88.08 69.03 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 105.32 30.98 96.19 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.92 95.00 97.30 ## SB.218078 Syk.Inhibitor ## 106.72 51.39 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.40 73.98 87.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 104.90 81.08 32.00 ## SB.218078 Syk.Inhibitor ## 58.05 78.71 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.27 91.25 86.52 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.70 10.12 0.79 ## SB.218078 Syk.Inhibitor ## 17.70 17.04 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.54 81.81 84.42 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 86.31 83.86 73.57 ## SB.218078 Syk.Inhibitor ## 34.36 83.53 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 89.42 56.22 71.92 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 102.15 26.54 12.46 ## SB.218078 Syk.Inhibitor ## 12.73 46.27 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## NA NA NA ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## NA NA 14.27 ## SB.218078 Syk.Inhibitor ## 46.19 53.15 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 81.06 83.66 90.68 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.81 96.74 81.74 ## SB.218078 Syk.Inhibitor ## 88.33 79.26 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 103.54 81.10 58.27 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.84 14.61 5.99 ## SB.218078 Syk.Inhibitor ## 15.79 16.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.84 51.27 91.39 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.45 25.43 2.45 ## SB.218078 Syk.Inhibitor ## 6.06 48.91 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.39 79.91 68.37 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 89.56 43.95 26.00 ## SB.218078 Syk.Inhibitor ## 66.92 98.28 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.65 82.15 94.06 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.30 13.35 40.47 ## SB.218078 Syk.Inhibitor ## 57.41 86.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 116.28 86.85 82.28 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.52 NA 16.01 ## SB.218078 Syk.Inhibitor ## 24.47 60.18 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.70 86.62 53.54 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 104.01 72.12 5.25 ## SB.218078 Syk.Inhibitor ## 7.40 21.64 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 160.68 129.61 105.35 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 146.92 96.45 84.16 ## SB.218078 Syk.Inhibitor ## 142.03 156.78 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.09 93.49 61.80 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 123.09 116.62 47.61 ## SB.218078 Syk.Inhibitor ## 70.34 100.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.04 92.45 93.83 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 99.56 103.72 92.33 ## SB.218078 Syk.Inhibitor ## 94.13 95.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## NA NA NA ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## NA NA 3.11 ## SB.218078 Syk.Inhibitor ## 14.11 63.17 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 99.11 45.35 82.18 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.96 1.64 2.32 ## SB.218078 Syk.Inhibitor ## 4.98 6.15 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 97.83 3.04 68.10 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 82.40 0.81 2.11 ## SB.218078 Syk.Inhibitor ## 6.87 4.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 100.07 4.42 28.81 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 104.02 0.20 1.19 ## SB.218078 Syk.Inhibitor ## 1.41 1.18 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 98.38 101.90 96.86 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.01 74.34 16.64 ## SB.218078 Syk.Inhibitor ## 87.15 83.98 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 96.57 84.52 98.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.92 69.04 18.94 ## SB.218078 Syk.Inhibitor ## 76.43 97.26 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 107.13 42.54 90.32 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.29 6.39 24.35 ## SB.218078 Syk.Inhibitor ## 22.69 51.27 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.74 103.07 89.89 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 101.71 8.79 9.78 ## SB.218078 Syk.Inhibitor ## 21.81 54.49 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 88.52 57.92 81.07 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 109.89 2.62 0.90 ## SB.218078 Syk.Inhibitor ## 4.32 34.97 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 102.85 103.12 89.70 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 91.54 85.62 20.37 ## SB.218078 Syk.Inhibitor ## 55.28 90.45 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.86 41.52 99.20 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.75 105.70 26.64 ## SB.218078 Syk.Inhibitor ## 73.13 27.48 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 109.30 74.89 86.03 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 87.32 92.89 6.75 ## SB.218078 Syk.Inhibitor ## 89.10 72.28 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## NA NA NA ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## NA NA 3.25 ## SB.218078 Syk.Inhibitor ## 33.00 15.83 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 90.89 85.84 92.33 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.14 83.98 80.52 ## SB.218078 Syk.Inhibitor ## 90.16 102.90 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 92.44 70.75 74.63 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 100.05 85.44 72.90 ## SB.218078 Syk.Inhibitor ## 16.86 82.29 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 112.14 112.16 92.12 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 105.83 103.29 90.59 ## SB.218078 Syk.Inhibitor ## 93.57 97.71 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 85.91 76.90 92.32 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 96.60 93.07 60.33 ## SB.218078 Syk.Inhibitor ## 85.98 99.00 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 94.89 7.03 88.40 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 95.62 68.72 17.70 ## SB.218078 Syk.Inhibitor ## 31.86 24.16 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 93.84 92.26 88.85 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 98.04 86.63 75.87 ## SB.218078 Syk.Inhibitor ## 89.70 94.96 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.46 101.55 103.99 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 93.11 77.66 22.80 ## SB.218078 Syk.Inhibitor ## 88.44 102.30 ## Akt.Inhibitor.IV Aminopurvalanol.A Cdk4.Inhibitor ## 95.43 96.72 62.89 ## ERK.Inhibitor.III G.6976 K.252a..Nocardiopsis.sp. ## 103.03 93.65 27.17 ## SB.218078 Syk.Inhibitor ## 24.58 94.13 ``` ```r write.table(phendata,file=KINASE_PHEN,sep='\t',quote=F,row.names=F,col.names=F) ``` Compare the kinase data with the genetic data === ```r expressed_kinase_hits=c() unique_kinaseHits=unique(synergizer.data[which(synergizer.data$target_passes_threshold),'target_kinase']) for (kinase in unique_kinaseHits){ kinase_items=strsplit(kinase,'/')[[1]] for (kinase_item in kinase_items){ if (kinase_item %in% expressed_genes){ expressed_kinase_hits=c(expressed_kinase_hits,kinase) } } } ``` There are 140 kinase hits. Keep only synergizer kinase inhibitors, get per gene best % activity reduced. Plot this best activity reduction vs abs(SI-1). ```r synergizer.aggregated=aggregate(synergizer.data[,c('percent_activity','siRNAscreen.SI')],list(ceva=synergizer.data$target_kinase),min) plot((100-synergizer.aggregated$percent_activity), synergizer.aggregated$siRNAscreen.SI, xlab='Percent activity reduction by kinase inhibitor', ylab='Sensitivity index deviation from 1',cex.lab=1.5,cex.axis=1.5) abline(v=50,col='purple',lty=2) abline(h=0.3,col='blue',lty=2) ``` ![plot of chunk unnamed-chunk-9](figure/unnamed-chunk-9-1.svg) ```r #plot for the figure pdf(paste(FIG_OUT,'KinaseVsGenetics.pdf',sep=''),height=6,width=6) plot((100-synergizer.aggregated$percent_activity), synergizer.aggregated$siRNAscreen.SI, xlab='Percent activity reduction by kinase inhibitor', ylab='Sensitivity index deviation from 1',cex.lab=1.5,cex.axis=1.5) abline(v=50,col='purple',lty=2) abline(h=0.3,col='blue',lty=2) dev.off() ``` ``` ## pdf ## 2 ```
oursu/Gem_code
inputs/kinase_targetAnalysis.md
Markdown
bsd-3-clause
136,469
/* * Copyright (c) 2009-2011, Salvatore Sanfilippo <antirez at gmail dot com> * Copyright (c) 2010-2011, Pieter Noordhuis <pcnoordhuis at gmail dot com> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Redis nor the names of its contributors may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "fmacros.h" #include <string.h> #include <stdlib.h> #include <unistd.h> #include <assert.h> #include <errno.h> #include <ctype.h> #include "hiredis.h" #include "net.h" #include "sds.h" static redisReply *createReplyObject(int type); static void *createStringObject(const redisReadTask *task, char *str, size_t len); static void *createArrayObject(const redisReadTask *task, int elements); static void *createIntegerObject(const redisReadTask *task, long long value); static void *createNilObject(const redisReadTask *task); /* Default set of functions to build the reply. Keep in mind that such a * function returning NULL is interpreted as OOM. */ static redisReplyObjectFunctions defaultFunctions = { createStringObject, createArrayObject, createIntegerObject, createNilObject, freeReplyObject }; /* Create a reply object */ static redisReply *createReplyObject(int type) { redisReply *r = calloc(1,sizeof(*r)); if (r == NULL) return NULL; r->type = type; return r; } /* Free a reply object */ void freeReplyObject(void *reply) { redisReply *r = reply; size_t j; switch(r->type) { case REDIS_REPLY_INTEGER: break; /* Nothing to free */ case REDIS_REPLY_ARRAY: if (r->element != NULL) { for (j = 0; j < r->elements; j++) if (r->element[j] != NULL) freeReplyObject(r->element[j]); free(r->element); } break; case REDIS_REPLY_ERROR: case REDIS_REPLY_STATUS: case REDIS_REPLY_STRING: if (r->str != NULL) free(r->str); break; } free(r); } static void *createStringObject(const redisReadTask *task, char *str, size_t len) { redisReply *r, *parent; char *buf; r = createReplyObject(task->type); if (r == NULL) return NULL; buf = malloc(len+1); if (buf == NULL) { freeReplyObject(r); return NULL; } assert(task->type == REDIS_REPLY_ERROR || task->type == REDIS_REPLY_STATUS || task->type == REDIS_REPLY_STRING); /* Copy string value */ memcpy(buf,str,len); buf[len] = '\0'; r->str = buf; r->len = len; if (task->parent) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY); parent->element[task->idx] = r; } return r; } static void *createArrayObject(const redisReadTask *task, int elements) { redisReply *r, *parent; r = createReplyObject(REDIS_REPLY_ARRAY); if (r == NULL) return NULL; if (elements > 0) { r->element = calloc(elements,sizeof(redisReply*)); if (r->element == NULL) { freeReplyObject(r); return NULL; } } r->elements = elements; if (task->parent) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY); parent->element[task->idx] = r; } return r; } static void *createIntegerObject(const redisReadTask *task, long long value) { redisReply *r, *parent; r = createReplyObject(REDIS_REPLY_INTEGER); if (r == NULL) return NULL; r->integer = value; /* 构建树状对象层级关系 */ if (task->parent) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY); parent->element[task->idx] = r; } return r; } static void *createNilObject(const redisReadTask *task) { redisReply *r, *parent; r = createReplyObject(REDIS_REPLY_NIL); if (r == NULL) return NULL; if (task->parent) { parent = task->parent->obj; assert(parent->type == REDIS_REPLY_ARRAY); parent->element[task->idx] = r; } return r; } static void __redisReaderSetError(redisReader *r, int type, const char *str) { size_t len; if (r->reply != NULL && r->fn && r->fn->freeObject) { r->fn->freeObject(r->reply); r->reply = NULL; } /* Clear input buffer on errors. */ if (r->buf != NULL) { sdsfree(r->buf); r->buf = NULL; r->pos = r->len = 0; } /* Reset task stack. */ r->ridx = -1; /* Set error. */ r->err = type; len = strlen(str); len = len < (sizeof(r->errstr)-1) ? len : (sizeof(r->errstr)-1); memcpy(r->errstr,str,len); r->errstr[len] = '\0'; } static size_t chrtos(char *buf, size_t size, char byte) { size_t len = 0; switch(byte) { case '\\': case '"': len = snprintf(buf,size,"\"\\%c\"",byte); break; case '\n': len = snprintf(buf,size,"\"\\n\""); break; case '\r': len = snprintf(buf,size,"\"\\r\""); break; case '\t': len = snprintf(buf,size,"\"\\t\""); break; case '\a': len = snprintf(buf,size,"\"\\a\""); break; case '\b': len = snprintf(buf,size,"\"\\b\""); break; default: if (isprint(byte)) len = snprintf(buf,size,"\"%c\"",byte); else len = snprintf(buf,size,"\"\\x%02x\"",(unsigned char)byte); break; } return len; } static void __redisReaderSetErrorProtocolByte(redisReader *r, char byte) { char cbuf[8], sbuf[128]; chrtos(cbuf,sizeof(cbuf),byte); snprintf(sbuf,sizeof(sbuf), "Protocol error, got %s as reply type byte", cbuf); __redisReaderSetError(r,REDIS_ERR_PROTOCOL,sbuf); } static void __redisReaderSetErrorOOM(redisReader *r) { __redisReaderSetError(r,REDIS_ERR_OOM,"Out of memory"); } static char *readBytes(redisReader *r, unsigned int bytes) { char *p; if (r->len-r->pos >= bytes) { p = r->buf+r->pos; r->pos += bytes; return p; } return NULL; } /* Find pointer to \r\n. */ static char *seekNewline(char *s, size_t len) { int pos = 0; int _len = len-1; /* Position should be < len-1 because the character at "pos" should be * followed by a \n. Note that strchr cannot be used because it doesn't * allow to search a limited length and the buffer that is being searched * might not have a trailing NULL character. */ while (pos < _len) { while(pos < _len && s[pos] != '\r') pos++; if (s[pos] != '\r') { /* Not found. */ return NULL; } else { if (s[pos+1] == '\n') { /* Found. */ return s+pos; } else { /* Continue searching. */ pos++; } } } return NULL; } /* Read a long long value starting at *s, under the assumption that it will be * terminated by \r\n. Ambiguously returns -1 for unexpected input. */ static long long readLongLong(char *s) { long long v = 0; int dec, mult = 1; char c; if (*s == '-') { mult = -1; s++; } else if (*s == '+') { mult = 1; s++; } while ((c = *(s++)) != '\r') { dec = c - '0'; if (dec >= 0 && dec < 10) { v *= 10; v += dec; } else { /* Should not happen... */ return -1; } } return mult*v; } static char *readLine(redisReader *r, int *_len) { char *p, *s; int len; p = r->buf+r->pos; s = seekNewline(p,(r->len-r->pos)); if (s != NULL) { len = s-(r->buf+r->pos); r->pos += len+2; /* skip \r\n */ if (_len) *_len = len; return p; } return NULL; } static void moveToNextTask(redisReader *r) { redisReadTask *cur, *prv; while (r->ridx >= 0) { /* Return a.s.a.p. when the stack is now empty. */ if (r->ridx == 0) { r->ridx--; return; } cur = &(r->rstack[r->ridx]); prv = &(r->rstack[r->ridx-1]); assert(prv->type == REDIS_REPLY_ARRAY); if (cur->idx == prv->elements-1) { r->ridx--; } else { /* Reset the type because the next item can be anything */ assert(cur->idx < prv->elements); cur->type = -1; cur->elements = -1; cur->idx++; return; } } } /* 处理单行回复的情况, 包括+/-/:开头的情况 */ static int processLineItem(redisReader *r) { redisReadTask *cur = &(r->rstack[r->ridx]); void *obj; char *p; int len; /* 读取行 */ if ((p = readLine(r,&len)) != NULL) { if (cur->type == REDIS_REPLY_INTEGER) { if (r->fn && r->fn->createInteger) obj = r->fn->createInteger(cur,readLongLong(p)); else obj = (void*)REDIS_REPLY_INTEGER; } else { /* Type will be error or status. */ if (r->fn && r->fn->createString) obj = r->fn->createString(cur,p,len); else obj = (void*)(size_t)(cur->type); } if (obj == NULL) { __redisReaderSetErrorOOM(r); return REDIS_ERR; } /* Set reply if this is the root object. */ if (r->ridx == 0) r->reply = obj; moveToNextTask(r); return REDIS_OK; } return REDIS_ERR; } /* 处理字符串的返回形式, $ */ static int processBulkItem(redisReader *r) { redisReadTask *cur = &(r->rstack[r->ridx]); void *obj = NULL; char *p, *s; long len; unsigned long bytelen; int success = 0; p = r->buf+r->pos; s = seekNewline(p,r->len-r->pos); if (s != NULL) { p = r->buf+r->pos; bytelen = s-(r->buf+r->pos)+2; /* include \r\n */ len = readLongLong(p); /* $-n的情形, 创建空对象 */ if (len < 0) { /* The nil object can always be created. */ if (r->fn && r->fn->createNil) obj = r->fn->createNil(cur); else obj = (void*)REDIS_REPLY_NIL; success = 1; /* $n的情形, 创建字符串对象 */ } else { /* Only continue when the buffer contains the entire bulk item. */ bytelen += len+2; /* include \r\n */ if (r->pos+bytelen <= r->len) { if (r->fn && r->fn->createString) obj = r->fn->createString(cur,s+2,len); else obj = (void*)REDIS_REPLY_STRING; success = 1; } } /* Proceed when obj was created. */ if (success) { if (obj == NULL) { __redisReaderSetErrorOOM(r); return REDIS_ERR; } r->pos += bytelen; /* Set reply if this is the root object. */ if (r->ridx == 0) r->reply = obj; moveToNextTask(r); return REDIS_OK; } } return REDIS_ERR; } /* 处理多数据块儿返回的情形, *开头 */ static int processMultiBulkItem(redisReader *r) { redisReadTask *cur = &(r->rstack[r->ridx]); void *obj; char *p; long elements; int root = 0; /* Set error for nested multi bulks with depth > 7 */ if (r->ridx == 8) { __redisReaderSetError(r,REDIS_ERR_PROTOCOL, "No support for nested multi bulk replies with depth > 7"); return REDIS_ERR; } if ((p = readLine(r,NULL)) != NULL) { elements = readLongLong(p); root = (r->ridx == 0); /* 无数据块儿, *-n的情形 */ if (elements == -1) { if (r->fn && r->fn->createNil) obj = r->fn->createNil(cur); else obj = (void*)REDIS_REPLY_NIL; if (obj == NULL) { __redisReaderSetErrorOOM(r); return REDIS_ERR; } moveToNextTask(r); /* 多个数据块儿, *n的情形 */ } else { if (r->fn && r->fn->createArray) obj = r->fn->createArray(cur,elements); else obj = (void*)REDIS_REPLY_ARRAY; if (obj == NULL) { __redisReaderSetErrorOOM(r); return REDIS_ERR; } /* Modify task stack when there are more than 0 elements. */ if (elements > 0) { cur->elements = elements; cur->obj = obj; r->ridx++; /* 增加任务层级 */ r->rstack[r->ridx].type = -1; r->rstack[r->ridx].elements = -1; r->rstack[r->ridx].idx = 0; r->rstack[r->ridx].obj = NULL; r->rstack[r->ridx].parent = cur; r->rstack[r->ridx].privdata = r->privdata; } else { moveToNextTask(r); } } /* Set reply if this is the root object. */ if (root) r->reply = obj; return REDIS_OK; } return REDIS_ERR; } static int processItem(redisReader *r) { redisReadTask *cur = &(r->rstack[r->ridx]); char *p; /* check if we need to read type */ if (cur->type < 0) { /* 初始解析时, 确定数据块儿类型 */ if ((p = readBytes(r,1)) != NULL) { switch (p[0]) { case '-': cur->type = REDIS_REPLY_ERROR; break; case '+': cur->type = REDIS_REPLY_STATUS; break; case ':': cur->type = REDIS_REPLY_INTEGER; break; case '$': cur->type = REDIS_REPLY_STRING; break; case '*': cur->type = REDIS_REPLY_ARRAY; break; default: __redisReaderSetErrorProtocolByte(r,*p); return REDIS_ERR; } } else { /* could not consume 1 byte */ return REDIS_ERR; } } /* process typed item */ switch(cur->type) { case REDIS_REPLY_ERROR: case REDIS_REPLY_STATUS: case REDIS_REPLY_INTEGER: return processLineItem(r); /* 简单单行回复信息解析 */ case REDIS_REPLY_STRING: return processBulkItem(r); /* 单数据块儿, 字符串回复解析 */ case REDIS_REPLY_ARRAY: return processMultiBulkItem(r); /* 多数据块儿, 数组回复解析 */ default: assert(NULL); return REDIS_ERR; /* Avoid warning. */ } } redisReader *redisReaderCreate(void) { redisReader *r; r = calloc(sizeof(redisReader),1); if (r == NULL) return NULL; r->err = 0; r->errstr[0] = '\0'; r->fn = &defaultFunctions; r->buf = sdsempty(); r->maxbuf = REDIS_READER_MAX_BUF; if (r->buf == NULL) { free(r); return NULL; } r->ridx = -1; return r; } void redisReaderFree(redisReader *r) { if (r->reply != NULL && r->fn && r->fn->freeObject) r->fn->freeObject(r->reply); if (r->buf != NULL) sdsfree(r->buf); free(r); } int redisReaderFeed(redisReader *r, const char *buf, size_t len) { sds newbuf; /* Return early when this reader is in an erroneous state. */ if (r->err) return REDIS_ERR; /* Copy the provided buffer. */ if (buf != NULL && len >= 1) { /* Destroy internal buffer when it is empty and is quite large. */ if (r->len == 0 && r->maxbuf != 0 && sdsavail(r->buf) > r->maxbuf) { sdsfree(r->buf); r->buf = sdsempty(); r->pos = 0; /* r->buf should not be NULL since we just free'd a larger one. */ assert(r->buf != NULL); } newbuf = sdscatlen(r->buf,buf,len); if (newbuf == NULL) { __redisReaderSetErrorOOM(r); return REDIS_ERR; } r->buf = newbuf; r->len = sdslen(r->buf); } return REDIS_OK; } int redisReaderGetReply(redisReader *r, void **reply) { /* Default target pointer to NULL. */ if (reply != NULL) *reply = NULL; /* Return early when this reader is in an erroneous state. */ if (r->err) return REDIS_ERR; /* When the buffer is empty, there will never be a reply. */ if (r->len == 0) return REDIS_OK; /* 环境初始化, Set first item to process when the stack is empty. */ if (r->ridx == -1) { r->rstack[0].type = -1; r->rstack[0].elements = -1; r->rstack[0].idx = -1; r->rstack[0].obj = NULL; r->rstack[0].parent = NULL; r->rstack[0].privdata = r->privdata; r->ridx = 0; } /* 按照redis协议解析服务器的回应数据, 参考redis_protocol.brief */ while (r->ridx >= 0) if (processItem(r) != REDIS_OK) break; /* Return ASAP when an error occurred. */ if (r->err) return REDIS_ERR; /* Discard part of the buffer when we've consumed at least 1k, to avoid * doing unnecessary calls to memmove() in sds.c. * 利用memmove, 调整redisReader->buf的内存, >=1024的条件限制了调用的 * 频率, 避免过多无用的memmove */ if (r->pos >= 1024) { sdsrange(r->buf,r->pos,-1); r->pos = 0; r->len = sdslen(r->buf); } /* Emit a reply when there is one. */ if (r->ridx == -1) { if (reply != NULL) *reply = r->reply; r->reply = NULL; } return REDIS_OK; } /* Calculate the number of bytes needed to represent an integer as string. */ static int intlen(int i) { int len = 0; if (i < 0) { len++; i = -i; } do { len++; i /= 10; } while(i); return len; } /* Helper that calculates the bulk length given a certain string length. */ static size_t bulklen(size_t len) { return 1+intlen(len)+2+len+2; } int redisvFormatCommand(char **target, const char *format, va_list ap) { const char *c = format; char *cmd = NULL; /* final command */ int pos; /* position in final command */ sds curarg, newarg; /* current argument */ int touched = 0; /* was the current argument touched? */ char **curargv = NULL, **newargv = NULL; int argc = 0; int totlen = 0; int j; /* Abort if there is not target to set */ if (target == NULL) return -1; /* Build the command string accordingly to protocol */ curarg = sdsempty(); if (curarg == NULL) return -1; /* 把printf类似的参变量拼接为一个字符串, 记录到curarg, 并利用指针 * 记录每个参变量的起始位置 */ while(*c != '\0') { /* 处理非转义命令字符串, 或结尾的情况 */ if (*c != '%' || c[1] == '\0') { /* 遇到分隔符, 利用指针记录 */ if (*c == ' ') { if (touched) { newargv = realloc(curargv,sizeof(char*)*(argc+1)); if (newargv == NULL) goto err; curargv = newargv; curargv[argc++] = curarg; totlen += bulklen(sdslen(curarg)); /* curarg is put in argv so it can be overwritten. */ curarg = sdsempty(); if (curarg == NULL) goto err; touched = 0; } /* 拼接普通字符 */ } else { newarg = sdscatlen(curarg,c,1); if (newarg == NULL) goto err; curarg = newarg; touched = 1; } /* 处理转义命令字符串(%s) */ } else { char *arg; size_t size; /* Set newarg so it can be checked even if it is not touched. */ newarg = curarg; switch(c[1]) { case 's': /* 普通c字符串(以\0结尾) */ arg = va_arg(ap,char*); size = strlen(arg); if (size > 0) newarg = sdscatlen(curarg,arg,size); break; case 'b': /* 二进制安全的字符串 */ arg = va_arg(ap,char*); size = va_arg(ap,size_t); if (size > 0) newarg = sdscatlen(curarg,arg,size); break; case '%': /* 特殊字符%(转义字符本身) */ newarg = sdscat(curarg,"%"); break; default: /* Try to detect printf format */ { /* 处理整数类型 */ static const char intfmts[] = "diouxX"; char _format[16]; const char *_p = c+1; size_t _l = 0; va_list _cpy; /* Flags */ if (*_p != '\0' && *_p == '#') _p++; if (*_p != '\0' && *_p == '0') _p++; if (*_p != '\0' && *_p == '-') _p++; if (*_p != '\0' && *_p == ' ') _p++; if (*_p != '\0' && *_p == '+') _p++; /* Field width */ while (*_p != '\0' && isdigit(*_p)) _p++; /* Precision */ if (*_p == '.') { _p++; while (*_p != '\0' && isdigit(*_p)) _p++; } /* Copy va_list before consuming with va_arg */ va_copy(_cpy,ap); /* Integer conversion (without modifiers) */ if (strchr(intfmts,*_p) != NULL) { va_arg(ap,int); goto fmt_valid; } /* 处理浮点类型, Double conversion (without modifiers) */ if (strchr("eEfFgGaA",*_p) != NULL) { va_arg(ap,double); goto fmt_valid; } /* %hh ==> Size: char */ if (_p[0] == 'h' && _p[1] == 'h') { _p += 2; if (*_p != '\0' && strchr(intfmts,*_p) != NULL) { va_arg(ap,int); /* char gets promoted to int */ goto fmt_valid; } goto fmt_invalid; } /* %hh ==> Size: short */ if (_p[0] == 'h') { _p += 1; if (*_p != '\0' && strchr(intfmts,*_p) != NULL) { va_arg(ap,int); /* short gets promoted to int */ goto fmt_valid; } goto fmt_invalid; } /* %hh ==> Size: long long */ if (_p[0] == 'l' && _p[1] == 'l') { _p += 2; if (*_p != '\0' && strchr(intfmts,*_p) != NULL) { va_arg(ap,long long); goto fmt_valid; } goto fmt_invalid; } /* %hh ==> Size: long */ if (_p[0] == 'l') { _p += 1; if (*_p != '\0' && strchr(intfmts,*_p) != NULL) { va_arg(ap,long); goto fmt_valid; } goto fmt_invalid; } fmt_invalid: va_end(_cpy); goto err; fmt_valid: _l = (_p+1)-c; if (_l < sizeof(_format)-2) { memcpy(_format,c,_l); _format[_l] = '\0'; newarg = sdscatvprintf(curarg,_format,_cpy); /* Update current position (note: outer blocks * increment c twice so compensate here) */ c = _p-1; } va_end(_cpy); break; } } if (newarg == NULL) goto err; curarg = newarg; touched = 1; c++; } c++; } /* 处理解析字符串结尾的情况, Add the last argument if needed */ if (touched) { newargv = realloc(curargv,sizeof(char*)*(argc+1)); if (newargv == NULL) goto err; curargv = newargv; curargv[argc++] = curarg; totlen += bulklen(sdslen(curarg)); } else { sdsfree(curarg); } /* Clear curarg because it was put in curargv or was free'd. */ curarg = NULL; /* Add bytes needed to hold multi bulk count */ totlen += 1+intlen(argc)+2; /* Build the command at protocol level */ cmd = malloc(totlen+1); if (cmd == NULL) goto err; /* 按照redis协议拼装TCP payload */ pos = sprintf(cmd,"*%d\r\n",argc); for (j = 0; j < argc; j++) { pos += sprintf(cmd+pos,"$%zu\r\n",sdslen(curargv[j])); memcpy(cmd+pos,curargv[j],sdslen(curargv[j])); pos += sdslen(curargv[j]); sdsfree(curargv[j]); cmd[pos++] = '\r'; cmd[pos++] = '\n'; } assert(pos == totlen); cmd[pos] = '\0'; free(curargv); *target = cmd; return totlen; err: while(argc--) sdsfree(curargv[argc]); free(curargv); if (curarg != NULL) sdsfree(curarg); /* No need to check cmd since it is the last statement that can fail, * but do it anyway to be as defensive as possible. */ if (cmd != NULL) free(cmd); return -1; } /* Format a command according to the Redis protocol. This function * takes a format similar to printf: * * %s represents a C null terminated string you want to interpolate * %b represents a binary safe string * * When using %b you need to provide both the pointer to the string * and the length in bytes as a size_t. Examples: * * len = redisFormatCommand(target, "GET %s", mykey); * len = redisFormatCommand(target, "SET %s %b", mykey, myval, myvallen); */ int redisFormatCommand(char **target, const char *format, ...) { va_list ap; int len; va_start(ap,format); len = redisvFormatCommand(target,format,ap); va_end(ap); return len; } /* Format a command according to the Redis protocol. This function takes the * number of arguments, an array with arguments and an array with their * lengths. If the latter is set to NULL, strlen will be used to compute the * argument lengths. */ int redisFormatCommandArgv(char **target, int argc, const char **argv, const size_t *argvlen) { char *cmd = NULL; /* final command */ int pos; /* position in final command */ size_t len; int totlen, j; /* Calculate number of bytes needed for the command */ totlen = 1+intlen(argc)+2; for (j = 0; j < argc; j++) { len = argvlen ? argvlen[j] : strlen(argv[j]); totlen += bulklen(len); } /* Build the command at protocol level */ cmd = malloc(totlen+1); if (cmd == NULL) return -1; pos = sprintf(cmd,"*%d\r\n",argc); for (j = 0; j < argc; j++) { len = argvlen ? argvlen[j] : strlen(argv[j]); pos += sprintf(cmd+pos,"$%zu\r\n",len); memcpy(cmd+pos,argv[j],len); pos += len; cmd[pos++] = '\r'; cmd[pos++] = '\n'; } assert(pos == totlen); cmd[pos] = '\0'; *target = cmd; return totlen; } void __redisSetError(redisContext *c, int type, const char *str) { size_t len; c->err = type; if (str != NULL) { len = strlen(str); len = len < (sizeof(c->errstr)-1) ? len : (sizeof(c->errstr)-1); memcpy(c->errstr,str,len); c->errstr[len] = '\0'; } else { /* Only REDIS_ERR_IO may lack a description! */ assert(type == REDIS_ERR_IO); strerror_r(errno,c->errstr,sizeof(c->errstr)); } } static redisContext *redisContextInit(void) { redisContext *c; c = calloc(1,sizeof(redisContext)); if (c == NULL) return NULL; c->err = 0; c->errstr[0] = '\0'; c->obuf = sdsempty(); c->reader = redisReaderCreate(); return c; } void redisFree(redisContext *c) { if (c->fd > 0) close(c->fd); if (c->obuf != NULL) sdsfree(c->obuf); if (c->reader != NULL) redisReaderFree(c->reader); free(c); } int redisFreeKeepFd(redisContext *c) { int fd = c->fd; c->fd = -1; redisFree(c); return fd; } /* Connect to a Redis instance. On error the field error in the returned * context will be set to the return value of the error function. * When no set of reply functions is given, the default set will be used. */ redisContext *redisConnect(const char *ip, int port) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->flags |= REDIS_BLOCK; redisContextConnectTcp(c,ip,port,NULL); return c; } redisContext *redisConnectWithTimeout(const char *ip, int port, const struct timeval tv) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->flags |= REDIS_BLOCK; redisContextConnectTcp(c,ip,port,&tv); return c; } redisContext *redisConnectNonBlock(const char *ip, int port) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->flags &= ~REDIS_BLOCK; redisContextConnectTcp(c,ip,port,NULL); return c; } redisContext *redisConnectBindNonBlock(const char *ip, int port, const char *source_addr) { redisContext *c = redisContextInit(); c->flags &= ~REDIS_BLOCK; redisContextConnectBindTcp(c,ip,port,NULL,source_addr); return c; } redisContext *redisConnectUnix(const char *path) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->flags |= REDIS_BLOCK; redisContextConnectUnix(c,path,NULL); return c; } redisContext *redisConnectUnixWithTimeout(const char *path, const struct timeval tv) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->flags |= REDIS_BLOCK; redisContextConnectUnix(c,path,&tv); return c; } redisContext *redisConnectUnixNonBlock(const char *path) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->flags &= ~REDIS_BLOCK; redisContextConnectUnix(c,path,NULL); return c; } redisContext *redisConnectFd(int fd) { redisContext *c; c = redisContextInit(); if (c == NULL) return NULL; c->fd = fd; c->flags |= REDIS_BLOCK | REDIS_CONNECTED; return c; } /* Set read/write timeout on a blocking socket. */ int redisSetTimeout(redisContext *c, const struct timeval tv) { if (c->flags & REDIS_BLOCK) return redisContextSetTimeout(c,tv); return REDIS_ERR; } /* Enable connection KeepAlive. */ int redisEnableKeepAlive(redisContext *c) { if (redisKeepAlive(c, REDIS_KEEPALIVE_INTERVAL) != REDIS_OK) return REDIS_ERR; return REDIS_OK; } /* Use this function to handle a read event on the descriptor. It will try * and read some bytes from the socket and feed them to the reply parser. * * After this function is called, you may use redisContextReadReply to * see if there is a reply available. */ int redisBufferRead(redisContext *c) { char buf[1024*16]; int nread; /* Return early when the context has seen an error. */ if (c->err) return REDIS_ERR; /* 读取数据 */ nread = read(c->fd,buf,sizeof(buf)); if (nread == -1) { if ((errno == EAGAIN && !(c->flags & REDIS_BLOCK)) || (errno == EINTR)) { /* Try again later */ } else { __redisSetError(c,REDIS_ERR_IO,NULL); return REDIS_ERR; } } else if (nread == 0) { __redisSetError(c,REDIS_ERR_EOF,"Server closed the connection"); return REDIS_ERR; } else { /* 存储到redisContext->reader->buf中 */ if (redisReaderFeed(c->reader,buf,nread) != REDIS_OK) { __redisSetError(c,c->reader->err,c->reader->errstr); return REDIS_ERR; } } return REDIS_OK; } /* Write the output buffer to the socket. * * Returns REDIS_OK when the buffer is empty, or (a part of) the buffer was * succesfully written to the socket. When the buffer is empty after the * write operation, "done" is set to 1 (if given). * * Returns REDIS_ERR if an error occured trying to write and sets * c->errstr to hold the appropriate error string. */ int redisBufferWrite(redisContext *c, int *done) { int nwritten; /* Return early when the context has seen an error. */ if (c->err) return REDIS_ERR; if (sdslen(c->obuf) > 0) { nwritten = write(c->fd,c->obuf,sdslen(c->obuf)); if (nwritten == -1) { if ((errno == EAGAIN && !(c->flags & REDIS_BLOCK)) || (errno == EINTR)) { /* Try again later */ } else { __redisSetError(c,REDIS_ERR_IO,NULL); return REDIS_ERR; } } else if (nwritten > 0) { if (nwritten == (signed)sdslen(c->obuf)) { sdsfree(c->obuf); c->obuf = sdsempty(); } else { sdsrange(c->obuf,nwritten,-1); } } } if (done != NULL) *done = (sdslen(c->obuf) == 0); return REDIS_OK; } /* Internal helper function to try and get a reply from the reader, * or set an error in the context otherwise. */ int redisGetReplyFromReader(redisContext *c, void **reply) { if (redisReaderGetReply(c->reader,reply) == REDIS_ERR) { __redisSetError(c,c->reader->err,c->reader->errstr); return REDIS_ERR; } return REDIS_OK; } int redisGetReply(redisContext *c, void **reply) { int wdone = 0; void *aux = NULL; /* Try to read pending replies */ if (redisGetReplyFromReader(c,&aux) == REDIS_ERR) return REDIS_ERR; /* For the blocking context, flush output buffer and read reply */ if (aux == NULL && c->flags & REDIS_BLOCK) { /* 调用write(), 输出发送缓存(c->obuf)到插口(c->fd), 完成 * 指令发送任务 */ do { if (redisBufferWrite(c,&wdone) == REDIS_ERR) return REDIS_ERR; } while (!wdone); do { /* 调用read()读取服务器响应, 暂存在c->reader->buf */ if (redisBufferRead(c) == REDIS_ERR) return REDIS_ERR; /* 解析redis协议 */ if (redisGetReplyFromReader(c,&aux) == REDIS_ERR) return REDIS_ERR; } while (aux == NULL); } /* 设置解析结果的root对象指针, Set reply object */ if (reply != NULL) *reply = aux; return REDIS_OK; } /* Helper function for the redisAppendCommand* family of functions. * * Write a formatted command to the output buffer. When this family * is used, you need to call redisGetReply yourself to retrieve * the reply (or replies in pub/sub). */ int __redisAppendCommand(redisContext *c, const char *cmd, size_t len) { sds newbuf; newbuf = sdscatlen(c->obuf,cmd,len); if (newbuf == NULL) { __redisSetError(c,REDIS_ERR_OOM,"Out of memory"); return REDIS_ERR; } c->obuf = newbuf; return REDIS_OK; } int redisAppendFormattedCommand(redisContext *c, const char *cmd, size_t len) { if (__redisAppendCommand(c, cmd, len) != REDIS_OK) { return REDIS_ERR; } return REDIS_OK; } int redisvAppendCommand(redisContext *c, const char *format, va_list ap) { char *cmd; int len; /* 按照redis协议构造命令, 参考redis_protocol.brief */ len = redisvFormatCommand(&cmd,format,ap); if (len == -1) { __redisSetError(c,REDIS_ERR_OOM,"Out of memory"); return REDIS_ERR; } /* 挂接到c->obuf输出缓存 */ if (__redisAppendCommand(c,cmd,len) != REDIS_OK) { free(cmd); return REDIS_ERR; } free(cmd); return REDIS_OK; } int redisAppendCommand(redisContext *c, const char *format, ...) { va_list ap; int ret; va_start(ap,format); ret = redisvAppendCommand(c,format,ap); va_end(ap); return ret; } int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen) { char *cmd; int len; len = redisFormatCommandArgv(&cmd,argc,argv,argvlen); if (len == -1) { __redisSetError(c,REDIS_ERR_OOM,"Out of memory"); return REDIS_ERR; } if (__redisAppendCommand(c,cmd,len) != REDIS_OK) { free(cmd); return REDIS_ERR; } free(cmd); return REDIS_OK; } /* Helper function for the redisCommand* family of functions. * * Write a formatted command to the output buffer. If the given context is * blocking, immediately read the reply into the "reply" pointer. When the * context is non-blocking, the "reply" pointer will not be used and the * command is simply appended to the write buffer. * * Returns the reply when a reply was succesfully retrieved. Returns NULL * otherwise. When NULL is returned in a blocking context, the error field * in the context will be set. */ static void *__redisBlockForReply(redisContext *c) { void *reply; if (c->flags & REDIS_BLOCK) { if (redisGetReply(c,&reply) != REDIS_OK) return NULL; return reply; } return NULL; } void *redisvCommand(redisContext *c, const char *format, va_list ap) { /* 向服务器发送指令 */ if (redisvAppendCommand(c,format,ap) != REDIS_OK) return NULL; /* 阻塞等待回应 */ return __redisBlockForReply(c); } void *redisCommand(redisContext *c, const char *format, ...) { va_list ap; void *reply = NULL; va_start(ap,format); reply = redisvCommand(c,format,ap); va_end(ap); return reply; } void *redisCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen) { if (redisAppendCommandArgv(c,argc,argv,argvlen) != REDIS_OK) return NULL; return __redisBlockForReply(c); }
sqlfocus/redis-note
deps/hiredis/hiredis.c
C
bsd-3-clause
39,967
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model app\models\TaxcomTariffSubdirection */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="taxcom-tariff-subdirection-form"> <?php $form = ActiveForm::begin(); ?> <input type="hidden" name="TaxcomTariffSubdirection[referrer]" value="<?= Yii::$app->request->referrer ?>"> <div class="form-group"> <?= Html::submitButton( $model->isNewRecord ? 'Создать' : 'Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary'] ) ?> <?= Html::resetButton('Сбросить', ['class' => 'btn btn-default']) ?> <?= Html::a('Назад', Yii::$app->request->referrer, ['class' => 'btn btn-default']) ?> </div> <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?> <?php ActiveForm::end(); ?> </div>
2zub2/vesterra
views/taxcom-tariff-subdirection/_form.php
PHP
bsd-3-clause
935
<div class="inner"> <th-select ng-model="thFilterTime.filter.operator" ng-change="thFilterTime.onOperatorChange()" options="thFilterTime.operatorOptions" condensed="true" class="operator" > </th-select> <th-input ng-model="thFilterTime.filter.model" ng-attr-placeholder="{{thFilterTime.filter.placeholder || '4am, 16:13'}}" ng-keypress="thFilterTime.onKeypress($event)" ng-blur="thFilterTime.validateInput()" condensed="true" class="value" > </th-input> </div>
seanhealy/lib-themisui
src/lib/thFilter/filters/time/thFilter.time.template.html
HTML
bsd-3-clause
521
<?php // Name of the list $liste['name'] = 'help_faq_sections'; // Database table $liste['table'] = 'help_faq_sections'; // Index index field of the database table $liste['table_idx'] = 'hfs_id'; // Search Field Prefix #$liste['search_prefix'] = 'search_'; // Records per page $liste['records_per_page'] = 100; // Script File of the list $liste['file'] = 'faq_sections_list.php'; // Script file of the edit form $liste['edit_file'] = 'faq_sections_edit.php'; // Script File of the delete script $liste['delete_file'] = 'faq_sections_delete.php'; // Paging Template $liste['paging_tpl'] = 'templates/paging.tpl.htm'; // Enable auth $liste['auth'] = 'yes'; ?>
TR-Host/THConfig
interface/web/help/list/faq_sections_list.php
PHP
bsd-3-clause
669
from datetime import ( datetime, time, ) import numpy as np import pytest from pandas._libs.tslibs import timezones import pandas.util._test_decorators as td from pandas import ( DataFrame, Series, date_range, ) import pandas._testing as tm class TestBetweenTime: @td.skip_if_has_locale def test_between_time_formats(self, frame_or_series): # GH#11818 rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) ts = tm.get_obj(ts, frame_or_series) strings = [ ("2:00", "2:30"), ("0200", "0230"), ("2:00am", "2:30am"), ("0200am", "0230am"), ("2:00:00", "2:30:00"), ("020000", "023000"), ("2:00:00am", "2:30:00am"), ("020000am", "023000am"), ] expected_length = 28 for time_string in strings: assert len(ts.between_time(*time_string)) == expected_length @pytest.mark.parametrize("tzstr", ["US/Eastern", "dateutil/US/Eastern"]) def test_localized_between_time(self, tzstr, frame_or_series): tz = timezones.maybe_get_tz(tzstr) rng = date_range("4/16/2012", "5/1/2012", freq="H") ts = Series(np.random.randn(len(rng)), index=rng) if frame_or_series is DataFrame: ts = ts.to_frame() ts_local = ts.tz_localize(tzstr) t1, t2 = time(10, 0), time(11, 0) result = ts_local.between_time(t1, t2) expected = ts.between_time(t1, t2).tz_localize(tzstr) tm.assert_equal(result, expected) assert timezones.tz_compare(result.index.tz, tz) def test_between_time_types(self, frame_or_series): # GH11818 rng = date_range("1/1/2000", "1/5/2000", freq="5min") obj = DataFrame({"A": 0}, index=rng) obj = tm.get_obj(obj, frame_or_series) msg = r"Cannot convert arg \[datetime\.datetime\(2010, 1, 2, 1, 0\)\] to a time" with pytest.raises(ValueError, match=msg): obj.between_time(datetime(2010, 1, 2, 1), datetime(2010, 1, 2, 5)) def test_between_time(self, inclusive_endpoints_fixture, frame_or_series): rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) ts = tm.get_obj(ts, frame_or_series) stime = time(0, 0) etime = time(1, 0) inclusive = inclusive_endpoints_fixture filtered = ts.between_time(stime, etime, inclusive=inclusive) exp_len = 13 * 4 + 1 if inclusive in ["right", "neither"]: exp_len -= 5 if inclusive in ["left", "neither"]: exp_len -= 4 assert len(filtered) == exp_len for rs in filtered.index: t = rs.time() if inclusive in ["left", "both"]: assert t >= stime else: assert t > stime if inclusive in ["right", "both"]: assert t <= etime else: assert t < etime result = ts.between_time("00:00", "01:00") expected = ts.between_time(stime, etime) tm.assert_equal(result, expected) # across midnight rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) ts = tm.get_obj(ts, frame_or_series) stime = time(22, 0) etime = time(9, 0) filtered = ts.between_time(stime, etime, inclusive=inclusive) exp_len = (12 * 11 + 1) * 4 + 1 if inclusive in ["right", "neither"]: exp_len -= 4 if inclusive in ["left", "neither"]: exp_len -= 4 assert len(filtered) == exp_len for rs in filtered.index: t = rs.time() if inclusive in ["left", "both"]: assert (t >= stime) or (t <= etime) else: assert (t > stime) or (t <= etime) if inclusive in ["right", "both"]: assert (t <= etime) or (t >= stime) else: assert (t < etime) or (t >= stime) def test_between_time_raises(self, frame_or_series): # GH#20725 obj = DataFrame([[1, 2, 3], [4, 5, 6]]) obj = tm.get_obj(obj, frame_or_series) msg = "Index must be DatetimeIndex" with pytest.raises(TypeError, match=msg): # index is not a DatetimeIndex obj.between_time(start_time="00:00", end_time="12:00") def test_between_time_axis(self, frame_or_series): # GH#8839 rng = date_range("1/1/2000", periods=100, freq="10min") ts = Series(np.random.randn(len(rng)), index=rng) if frame_or_series is DataFrame: ts = ts.to_frame() stime, etime = ("08:00:00", "09:00:00") expected_length = 7 assert len(ts.between_time(stime, etime)) == expected_length assert len(ts.between_time(stime, etime, axis=0)) == expected_length msg = f"No axis named {ts.ndim} for object type {type(ts).__name__}" with pytest.raises(ValueError, match=msg): ts.between_time(stime, etime, axis=ts.ndim) def test_between_time_axis_aliases(self, axis): # GH#8839 rng = date_range("1/1/2000", periods=100, freq="10min") ts = DataFrame(np.random.randn(len(rng), len(rng))) stime, etime = ("08:00:00", "09:00:00") exp_len = 7 if axis in ["index", 0]: ts.index = rng assert len(ts.between_time(stime, etime)) == exp_len assert len(ts.between_time(stime, etime, axis=0)) == exp_len if axis in ["columns", 1]: ts.columns = rng selected = ts.between_time(stime, etime, axis=1).columns assert len(selected) == exp_len def test_between_time_axis_raises(self, axis): # issue 8839 rng = date_range("1/1/2000", periods=100, freq="10min") mask = np.arange(0, len(rng)) rand_data = np.random.randn(len(rng), len(rng)) ts = DataFrame(rand_data, index=rng, columns=rng) stime, etime = ("08:00:00", "09:00:00") msg = "Index must be DatetimeIndex" if axis in ["columns", 1]: ts.index = mask with pytest.raises(TypeError, match=msg): ts.between_time(stime, etime) with pytest.raises(TypeError, match=msg): ts.between_time(stime, etime, axis=0) if axis in ["index", 0]: ts.columns = mask with pytest.raises(TypeError, match=msg): ts.between_time(stime, etime, axis=1) def test_between_time_datetimeindex(self): index = date_range("2012-01-01", "2012-01-05", freq="30min") df = DataFrame(np.random.randn(len(index), 5), index=index) bkey = slice(time(13, 0, 0), time(14, 0, 0)) binds = [26, 27, 28, 74, 75, 76, 122, 123, 124, 170, 171, 172] result = df.between_time(bkey.start, bkey.stop) expected = df.loc[bkey] expected2 = df.iloc[binds] tm.assert_frame_equal(result, expected) tm.assert_frame_equal(result, expected2) assert len(result) == 12 @pytest.mark.parametrize("include_start", [True, False]) @pytest.mark.parametrize("include_end", [True, False]) def test_between_time_warn(self, include_start, include_end, frame_or_series): # GH40245 rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) ts = tm.get_obj(ts, frame_or_series) stime = time(0, 0) etime = time(1, 0) match = ( "`include_start` and `include_end` " "are deprecated in favour of `inclusive`." ) with tm.assert_produces_warning(FutureWarning, match=match): _ = ts.between_time(stime, etime, include_start, include_end) def test_between_time_incorr_arg_inclusive(self): # GH40245 rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) stime = time(0, 0) etime = time(1, 0) inclusive = "bad_string" msg = "Inclusive has to be either 'both', 'neither', 'left' or 'right'" with pytest.raises(ValueError, match=msg): ts.between_time(stime, etime, inclusive=inclusive) @pytest.mark.parametrize( "include_start, include_end", [(True, None), (True, True), (None, True)] ) def test_between_time_incompatiable_args_given(self, include_start, include_end): # GH40245 rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) stime = time(0, 0) etime = time(1, 0) msg = ( "Deprecated arguments `include_start` and `include_end` cannot be " "passed if `inclusive` has been given." ) with pytest.raises(ValueError, match=msg): ts.between_time(stime, etime, include_start, include_end, inclusive="left") def test_between_time_same_functionality_old_and_new_args(self): # GH40245 rng = date_range("1/1/2000", "1/5/2000", freq="5min") ts = DataFrame(np.random.randn(len(rng), 2), index=rng) stime = time(0, 0) etime = time(1, 0) match = ( "`include_start` and `include_end` " "are deprecated in favour of `inclusive`." ) result = ts.between_time(stime, etime) expected = ts.between_time(stime, etime, inclusive="both") tm.assert_frame_equal(result, expected) with tm.assert_produces_warning(FutureWarning, match=match): result = ts.between_time(stime, etime, include_start=False) expected = ts.between_time(stime, etime, inclusive="right") tm.assert_frame_equal(result, expected) with tm.assert_produces_warning(FutureWarning, match=match): result = ts.between_time(stime, etime, include_end=False) expected = ts.between_time(stime, etime, inclusive="left") tm.assert_frame_equal(result, expected) with tm.assert_produces_warning(FutureWarning, match=match): result = ts.between_time( stime, etime, include_start=False, include_end=False ) expected = ts.between_time(stime, etime, inclusive="neither") tm.assert_frame_equal(result, expected) with tm.assert_produces_warning(FutureWarning, match=match): result = ts.between_time(stime, etime, include_start=True, include_end=True) expected = ts.between_time(stime, etime, inclusive="both") tm.assert_frame_equal(result, expected)
pandas-dev/pandas
pandas/tests/frame/methods/test_between_time.py
Python
bsd-3-clause
10,811
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ja_JP"> <context> <name>XDGDesktopList</name> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="608"/> <source>Multimedia</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="609"/> <source>Development</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="610"/> <source>Education</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="611"/> <source>Games</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="612"/> <source>Graphics</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="613"/> <source>Network</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="614"/> <source>Office</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="615"/> <source>Science</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="616"/> <source>Settings</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="617"/> <source>System</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="618"/> <source>Utility</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="619"/> <source>Wine</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="620"/> <source>Unsorted</source> <translation type="unfinished"></translation> </message> </context> <context> <name>mainUI</name> <message> <location filename="../mainUI.ui" line="14"/> <location filename="../mainUI.cpp" line="53"/> <source>Calculator</source> <translation>電卓</translation> </message> <message> <location filename="../mainUI.ui" line="657"/> <source>Advanced Operations</source> <translation>高度な計算</translation> </message> <message> <location filename="../mainUI.cpp" line="83"/> <source>Percentage %1</source> <translation>パーセント %1</translation> </message> <message> <location filename="../mainUI.cpp" line="85"/> <source>Power %1</source> <translation>べき乗 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="87"/> <source>Base-10 Exponential %1</source> <translation>10が底の指数関数 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="89"/> <source>Exponential %1</source> <translation>指数関数 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="91"/> <source>Constant Pi %1</source> <translation>円周率π %1</translation> </message> <message> <location filename="../mainUI.cpp" line="94"/> <source>Square Root %1</source> <translation>平方根 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="96"/> <source>Logarithm %1</source> <translation>対数 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="98"/> <source>Natural Log %1</source> <translation>自然対数 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="101"/> <source>Sine %1</source> <translation>正弦 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="103"/> <source>Cosine %1</source> <translation>余弦 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="105"/> <source>Tangent %1</source> <translation>正接 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="108"/> <source>Arc Sine %1</source> <translation>逆正弦 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="110"/> <source>Arc Cosine %1</source> <translation>逆余弦 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="112"/> <source>Arc Tangent %1</source> <translation>逆正接 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="115"/> <source>Hyperbolic Sine %1</source> <translation>双曲線正弦 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="117"/> <source>Hyperbolic Cosine %1</source> <translation>双曲線余弦 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="119"/> <source>Hyperbolic Tangent %1</source> <translation>双曲線正接 %1</translation> </message> <message> <location filename="../mainUI.cpp" line="182"/> <source>Save Calculator History</source> <translation>計算履歴を保存</translation> </message> </context> </TS>
cpforbes/lumina
src-qt5/desktop-utils/lumina-calculator/i18n/l-calc_ja.ts
TypeScript
bsd-3-clause
6,296
/* $KAME: dccp6_usrreq.c,v 1.13 2005/07/27 08:42:56 nishida Exp $ */ /* * Copyright (C) 2003 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define DCCP_DEBUG_ON #ifndef __OpenBSD__ #include "opt_inet.h" #include "opt_dccp.h" #endif #include <sys/param.h> #include <sys/systm.h> #include <sys/domain.h> #include <sys/kernel.h> #ifdef __NetBSD__ #include <sys/pool.h> #endif #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/proc.h> #include <sys/protosw.h> #include <sys/signalvar.h> #include <sys/socket.h> #include <sys/socketvar.h> #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #include <sys/sx.h> #endif #include <sys/sysctl.h> #include <sys/syslog.h> #include <sys/queue.h> #if defined(__FreeBSD__) #if __FreeBSD_version >= 500000 #include <vm/uma.h> #else #include <vm/vm_zone.h> #endif #endif #include <net/if.h> #include <net/route.h> #include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/ip.h> #include <netinet/in_pcb.h> #include <netinet/in_var.h> #include <netinet/ip6.h> #include <netinet/ip_icmp.h> #include <netinet/icmp_var.h> #include <netinet/ip_var.h> #ifndef __OpenBSD__ #include <netinet6/in6_pcb.h> #endif #include <netinet6/ip6_var.h> #include <netinet6/nd6.h> #include <netinet/dccp.h> #include <netinet/dccp_var.h> #include <netinet6/dccp6_var.h> #include <netinet/dccp_cc_sw.h> #ifdef __FreeBSD__ #include <machine/in_cksum.h> #endif #ifdef __OpenBSD__ #include <dev/rndvar.h> #endif #if !defined(__FreeBSD__) || __FreeBSD_version < 500000 #define INP_INFO_LOCK_INIT(x,y) #define INP_INFO_WLOCK(x) #define INP_INFO_WUNLOCK(x) #define INP_INFO_RLOCK(x) #define INP_INFO_RUNLOCK(x) #define INP_LOCK(x) #define INP_UNLOCK(x) #endif #define PULLDOWN_TEST int dccp6_input(struct mbuf **mp, int *offp, int proto) { struct mbuf *m = *mp; DCCP_DEBUG((LOG_INFO, "In dccp6_input!\n")); #ifndef PULLDOWN_TEST IP6_EXTHDR_CHECK(m, *offp, sizeof(struct dccphdr), IPPROTO_DONE); #endif dccp_input(m, *offp); return IPPROTO_DONE; } void dccp6_ctlinput(int cmd, struct sockaddr *sa, void *d) { if (sa->sa_family != AF_INET6 || sa->sa_len != sizeof(struct sockaddr_in6)) return; /* FIX LATER */ } int #ifdef __FreeBSD__ #if __FreeBSD_version >= 500000 dccp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td) #else dccp6_bind(struct socket *so, struct sockaddr *nam, struct proc *td) #endif #else dccp6_bind(struct socket *so, struct mbuf *m, struct proc *td) #endif { #ifndef __NetBSD__ struct inpcb *inp; #else struct in6pcb *in6p; #endif #ifndef __FreeBSD__ struct sockaddr *nam; #endif int s, error; struct sockaddr_in6 *sin6p; DCCP_DEBUG((LOG_INFO, "Entering dccp6_bind!\n")); #ifdef __FreeBSD__ s = splnet(); #else s = splsoftnet(); #endif INP_INFO_WLOCK(&dccpbinfo); #ifndef __NetBSD__ inp = sotoinpcb(so); if (inp == 0) { INP_INFO_WUNLOCK(&dccpbinfo); DCCP_DEBUG((LOG_INFO, "dccp6_bind: inp == 0!\n")); splx(s); return EINVAL; } #else in6p = sotoin6pcb(so); if (in6p == 0) { DCCP_DEBUG((LOG_INFO, "dccp6_bind: in6p == 0!\n")); splx(s); return EINVAL; } #endif /* Do not bind to multicast addresses! */ #ifndef __FreeBSD__ nam = mtod(m, struct sockaddr *); #endif sin6p = (struct sockaddr_in6 *)nam; if (sin6p->sin6_family == AF_INET6 && IN6_IS_ADDR_MULTICAST(&sin6p->sin6_addr)) { INP_INFO_WUNLOCK(&dccpbinfo); splx(s); return EAFNOSUPPORT; } INP_LOCK(inp); #ifdef __FreeBSD__ inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; #elif defined(__NetBSD__) in6todccpcb(in6p)->inp_vflag &= ~INP_IPV4; in6todccpcb(in6p)->inp_vflag |= INP_IPV6; #else inp->inp_flags &= ~INP_IPV4; inp->inp_flags |= INP_IPV6; #endif #ifdef __FreeBSD__ #if __FreeBSD_version >= 503000 error = in6_pcbbind(inp, nam, td->td_ucred); #else error = in6_pcbbind(inp, nam, td); #endif #elif __NetBSD__ error = in6_pcbbind(in6p, m, td); #else error = in6_pcbbind(inp, m); #endif INP_UNLOCK(inp); INP_INFO_WUNLOCK(&dccpbinfo); splx(s); return error; } int #ifdef __FreeBSD__ #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 dccp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) #else dccp6_connect(struct socket *so, struct sockaddr *nam, struct proc *td) #endif #else dccp6_connect(struct socket *so, struct mbuf *m, struct proc *td) #endif { #ifndef __NetBSD__ struct inpcb *inp; #else struct in6pcb *in6p; #endif struct dccpcb *dp; int s, error; struct sockaddr_in6 *sin6; #ifndef __FreeBSD__ struct sockaddr *nam; #endif char test[2]; DCCP_DEBUG((LOG_INFO, "Entering dccp6_connect!\n")); #ifdef __FreeBSD__ s = splnet(); #else s = splsoftnet(); #endif #ifndef __NetBSD__ INP_INFO_WLOCK(&dccpbinfo); inp = sotoinpcb(so); if (inp == 0) { INP_INFO_WUNLOCK(&dccpbinfo); return EINVAL; } INP_LOCK(inp); if (inp->inp_faddr.s_addr != INADDR_ANY) { INP_UNLOCK(inp); INP_INFO_WUNLOCK(&dccpbinfo); return EISCONN; } dp = (struct dccpcb *)inp->inp_ppcb; #else in6p = sotoin6pcb(so); if (in6p == 0) { return EINVAL; } if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) { return EISCONN; } dp = (struct dccpcb *)in6p->in6p_ppcb; #endif if (dp->state == DCCPS_ESTAB) { DCCP_DEBUG((LOG_INFO, "Why are we in connect when we already have a established connection?\n")); } dp->who = DCCP_CLIENT; dp->seq_snd = (((u_int64_t)arc4random() << 32) | arc4random()) % 281474976710656LL; #ifndef __FreeBSD__ nam = mtod(m, struct sockaddr *); #endif sin6 = (struct sockaddr_in6 *)nam; if (sin6->sin6_family == AF_INET6 && IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { splx(s); error = EAFNOSUPPORT; goto bad; } #ifdef __FreeBSD__ inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; inp->inp_inc.inc_isipv6 = 1; #elif defined(__OpenBSD__) inp->inp_flags &= ~INP_IPV4; inp->inp_flags |= INP_IPV6; #else dp->inp_vflag &= ~INP_IPV4; dp->inp_vflag |= INP_IPV6; #endif #ifdef __FreeBSD__ error = dccp_doconnect(so, nam, td, 1); #else error = dccp_doconnect(so, m, td, 1); #endif if (error != 0) goto bad; #ifdef __OpenBSD__ timeout_set(&dp->retrans_timer, dccp_retrans_t, dp); timeout_add(&dp->retrans_timer, dp->retrans); timeout_set(&dp->connect_timer, dccp_connect_t, dp); timeout_add(&dp->connect_timer, DCCP_CONNECT_TIMER); #else callout_reset(&dp->retrans_timer, dp->retrans, dccp_retrans_t, dp); callout_reset(&dp->connect_timer, DCCP_CONNECT_TIMER, dccp_connect_t, dp); #endif test[0] = dp->pref_cc; #if 0 /* FIX THIS LATER */ if (dp->pref_cc == 2) { test[1] = 3; } else { test[1] = 2; } dccp_add_feature(dp, DCCP_OPT_CHANGE, DCCP_FEATURE_CC, test, 2); dccp_add_feature(dp, DCCP_OPT_PREFER, DCCP_FEATURE_CC, test, 2); #else /* we only support CCID2 at this moment */ dccp_add_feature(dp, DCCP_OPT_CHANGE_R, DCCP_FEATURE_CC, test, 1); #endif error = dccp_output(dp, 0); bad: INP_UNLOCK(inp); INP_INFO_WUNLOCK(&dccpbinfo); splx(s); return error; } int #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 dccp6_listen(struct socket *so, struct thread *td) #else dccp6_listen(struct socket *so, struct proc *td) #endif { #ifndef __NetBSD__ struct inpcb *inp; #else struct in6pcb *in6p; #endif struct dccpcb *dp; int error = 0; #ifdef __FreeBSD__ int s = splnet(); #else int s = splsoftnet(); #endif DCCP_DEBUG((LOG_INFO, "Entering dccp6_listen!\n")); INP_INFO_RLOCK(&dccpbinfo); #ifndef __NetBSD__ inp = sotoinpcb(so); if (inp == 0) { INP_INFO_RUNLOCK(&dccpbinfo); splx(s); return EINVAL; } INP_LOCK(inp); INP_INFO_RUNLOCK(&dccpbinfo); dp = (struct dccpcb *)inp->inp_ppcb; DCCP_DEBUG((LOG_INFO, "Checking inp->inp_lport!\n")); if (inp->inp_lport == 0) { #ifdef __OpenBSD__ error = in6_pcbbind(inp, (struct mbuf *)0); #else inp->inp_vflag &= ~INP_IPV4; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) inp->inp_vflag |= INP_IPV4; #if __FreeBSD_version >= 503000 error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred); #else error = in6_pcbbind(inp, (struct sockaddr *)0, td); #endif #endif } #else in6p = sotoin6pcb(so); if (in6p == 0) { splx(s); return EINVAL; } dp = in6todccpcb(in6p); DCCP_DEBUG((LOG_INFO, "Checking in6p->in6p_lport!\n")); if (in6p->in6p_lport == 0) { error = in6_pcbbind(in6p, (struct mbuf *)0, td); } #endif if (error == 0) { dp->state = DCCPS_LISTEN; dp->who = DCCP_LISTENER; dp->seq_snd = 512; } INP_UNLOCK(inp); splx(s); return error; } int #ifdef __FreeBSD__ dccp6_accept(struct socket *so, struct sockaddr **nam) #else dccp6_accept(struct socket *so, struct mbuf *m) #endif { #ifndef __NetBSD__ struct inpcb *inp = NULL; #else struct in6pcb *in6p = NULL; #endif #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 struct in_addr addr; struct in6_addr addr6; in_port_t port = 0; int v4 = 0; #endif int error = 0; int s; DCCP_DEBUG((LOG_INFO, "Entering dccp6_accept!\n")); if (so->so_state & SS_ISDISCONNECTED) { DCCP_DEBUG((LOG_INFO, "so_state && SS_ISDISCONNECTED!, so->state = %i\n", so->so_state)); return ECONNABORTED; } #ifdef __FreeBSD__ s = splnet(); #else s = splsoftnet(); #endif INP_INFO_RLOCK(&dccpbinfo); #ifndef __NetBSD__ inp = sotoinpcb(so); if (inp == 0) { INP_INFO_RUNLOCK(&dccpbinfo); splx(s); return EINVAL; } #else in6p = sotoin6pcb(so); if (in6p == 0) { splx(s); return EINVAL; } #endif INP_LOCK(inp); INP_INFO_RUNLOCK(&dccpbinfo); #ifdef __FreeBSD__ #if __FreeBSD_version >= 500000 port = inp->inp_fport; if (inp->inp_vflag & INP_IPV4) { v4 = 1; addr = inp->inp_faddr; } else { addr6 = inp->in6p_faddr; } #else in6_mapped_peeraddr(so, nam); #endif #elif defined(__NetBSD__) in6_setpeeraddr(in6p, m); #else in6_setpeeraddr(inp, m); #endif INP_UNLOCK(inp); splx(s); #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 if (error == 0) { if (v4) *nam = in6_v4mapsin6_sockaddr(port, &addr); else *nam = in6_sockaddr(port, &addr6); } #endif return error; } #ifdef __FreeBSD__ struct pr_usrreqs dccp6_usrreqs = { dccp_abort, dccp6_accept, dccp_attach, dccp6_bind, dccp6_connect, pru_connect2_notsupp, in6_control, dccp_detach, dccp_disconnect, dccp6_listen, in6_mapped_peeraddr, pru_rcvd_notsupp, pru_rcvoob_notsupp, dccp_send, pru_sense_null, dccp_shutdown, in6_mapped_sockaddr, sosend, soreceive, sopoll }; #endif #ifndef __FreeBSD__ int dccp6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, struct mbuf *control, struct proc *p) { #ifdef __NetBSD__ struct in6pcb *in6p = sotoin6pcb(so); #else struct inpcb *in6p = sotoinpcb(so); #endif int s; int error = 0; int family; family = so->so_proto->pr_domain->dom_family; if (req == PRU_CONTROL) { switch (family) { case PF_INET6: error = in6_control(so, (long)m, (caddr_t)nam, (struct ifnet *)control, p); break; default: error = EAFNOSUPPORT; } return (error); } #ifdef __NetBSD__ if (req == PRU_PURGEIF) { struct ifnet *ifn = (struct ifnet *)control; in6_pcbpurgeif0(&dccpbtable, ifn); in6_purgeif (ifn); in6_pcbpurgeif(&dccpbtable, ifn); return (0); } #endif s = splsoftnet(); if (in6p == 0 && req != PRU_ATTACH) { error = EINVAL; goto release; } switch (req) { case PRU_ATTACH: error = dccp_attach(so, family, p); break; case PRU_DETACH: error = dccp_detach(so); break; case PRU_BIND: if (!nam) { splx(s); return (EINVAL); } error = dccp6_bind(so, nam, p); break; case PRU_LISTEN: error = dccp6_listen(so, p); break; case PRU_CONNECT: if (!nam) { splx(s); return (EINVAL); } error = dccp6_connect(so, nam, p); break; case PRU_DISCONNECT: error = dccp_disconnect(so); break; case PRU_ACCEPT: if (!nam) { splx(s); return (EINVAL); } error = dccp6_accept(so, nam); break; case PRU_SHUTDOWN: error = dccp_shutdown(so); break; case PRU_RCVD: error = EAFNOSUPPORT; break; case PRU_SEND: if (control && control->m_len) { m_freem(control); m_freem(m); error = EINVAL; break; } /* Flags are ignored */ error = dccp_send(so, 0, m, nam, control, p); break; case PRU_ABORT: error = dccp_abort(so); break; case PRU_SENSE: error = 0; break; case PRU_RCVOOB: case PRU_SENDOOB: error = EAFNOSUPPORT; break; case PRU_PEERADDR: if (!nam) { splx(s); return (EINVAL); } in6_setpeeraddr(in6p, nam); break; case PRU_SOCKADDR: if (!nam) { splx(s); return (EINVAL); } in6_setsockaddr(in6p, nam); break; case PRU_SLOWTIMO: error = 0; break; default: panic("dccp6_usrreq"); } release: splx(s); return (error); } #endif
MarginC/kame
kame/sys/netinet6/dccp6_usrreq.c
C
bsd-3-clause
14,066
<?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\Element; use Zend\Form\ElementInterface; use Zend\View\Helper\AbstractHelper as BaseAbstractHelper; /** * @category Zend * @package Zend_Form * @subpackage View */ class FormElement extends BaseAbstractHelper { /** * Render an element * * Introspects the element type and attributes to determine which * helper to utilize when rendering. * * @param ElementInterface $element * @return string */ public function render(ElementInterface $element) { $renderer = $this->getView(); if (!method_exists($renderer, 'plugin')) { // Bail early if renderer is not pluggable return ''; } if ($element instanceof Element\Button) { $helper = $renderer->plugin('form_button'); return $helper($element); } if ($element instanceof Element\Captcha) { $helper = $renderer->plugin('form_captcha'); return $helper($element); } if ($element instanceof Element\Csrf) { $helper = $renderer->plugin('form_hidden'); return $helper($element); } if ($element instanceof Element\Collection) { $helper = $renderer->plugin('form_collection'); return $helper($element); } $type = $element->getAttribute('type'); $options = $element->getAttribute('options'); if ('checkbox' == $type) { $helper = $renderer->plugin('form_checkbox'); return $helper($element); } if ('color' == $type) { $helper = $renderer->plugin('form_color'); return $helper($element); } if ('date' == $type) { $helper = $renderer->plugin('form_date'); return $helper($element); } if ('datetime' == $type) { $helper = $renderer->plugin('form_date_time'); return $helper($element); } if ('datetime-local' == $type) { $helper = $renderer->plugin('form_date_time_local'); return $helper($element); } if ('email' == $type) { $helper = $renderer->plugin('form_email'); return $helper($element); } if ('file' == $type) { $helper = $renderer->plugin('form_file'); return $helper($element); } if ('hidden' == $type) { $helper = $renderer->plugin('form_hidden'); return $helper($element); } if ('image' == $type) { $helper = $renderer->plugin('form_image'); return $helper($element); } if ('month' == $type) { $helper = $renderer->plugin('form_month'); return $helper($element); } if ('multi_checkbox' == $type && is_array($options)) { $helper = $renderer->plugin('form_multi_checkbox'); return $helper($element); } if ('number' == $type) { $helper = $renderer->plugin('form_number'); return $helper($element); } if ('password' == $type) { $helper = $renderer->plugin('form_password'); return $helper($element); } if ('radio' == $type && is_array($options)) { $helper = $renderer->plugin('form_radio'); return $helper($element); } if ('range' == $type) { $helper = $renderer->plugin('form_range'); return $helper($element); } if ('reset' == $type) { $helper = $renderer->plugin('form_reset'); return $helper($element); } if ('search' == $type) { $helper = $renderer->plugin('form_search'); return $helper($element); } if ('select' == $type && is_array($options)) { $helper = $renderer->plugin('form_select'); return $helper($element); } if ('submit' == $type) { $helper = $renderer->plugin('form_submit'); return $helper($element); } if ('tel' == $type) { $helper = $renderer->plugin('form_tel'); return $helper($element); } if ('text' == $type) { $helper = $renderer->plugin('form_text'); return $helper($element); } if ('textarea' == $type) { $helper = $renderer->plugin('form_textarea'); return $helper($element); } if ('time' == $type) { $helper = $renderer->plugin('form_time'); return $helper($element); } if ('time' == $type) { $helper = $renderer->plugin('form_time'); return $helper($element); } if ('url' == $type) { $helper = $renderer->plugin('form_url'); return $helper($element); } if ('week' == $type) { $helper = $renderer->plugin('form_week'); return $helper($element); } $helper = $renderer->plugin('form_input'); return $helper($element); } /** * Invoke helper as function * * Proxies to {@link render()}. * * @param ElementInterface|null $element * @return string|FormElement */ public function __invoke(ElementInterface $element = null) { if (!$element) { return $this; } return $this->render($element); } }
tomaskocfelda/zf2
library/Zend/Form/View/Helper/FormElement.php
PHP
bsd-3-clause
5,908
// Copyright (c) 2012, Noriyuki OHKAWA a.k.a. notogawa. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided // with the distribution. // // * Neither the name of Noriyuki OHKAWA and notogawa nor the names of other // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <config.h> #include <sys/socket.h> #include "basic_impl.hpp" IFT_BASIC_IMPL(int, sockatmark, (int), -1, (int sockfd), (sockfd))
notogawa/libift
src/sys/socket/sockatmark.cpp
C++
bsd-3-clause
1,740
<link rel="import" href="../bower_components/polymer/polymer.html"> <link rel="import" href="../bower_components/iron-ajax/iron-ajax.html"> <link rel="import" href="../bower_components/iron-ajax/iron-request.html"> <link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout-classes.html"> <link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout.html"> <link rel="import" href="../bower_components/iron-icon/iron-icon.html"> <link rel="import" href="../bower_components/iron-icons/iron-icons.html"> <link rel="import" href="../bower_components/iron-iconset/iron-iconset.html"> <link rel="import" href="../bower_components/iron-image/iron-image.html"> <link rel="import" href="../bower_components/paper-button/paper-button.html"> <link rel="import" href="../bower_components/paper-card/paper-card.html"> <link rel="import" href="../bower_components/paper-checkbox/paper-checkbox.html"> <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html"> <link rel="import" href="../bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html"> <link rel="import" href="../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> <link rel="import" href="../bower_components/paper-fab/paper-fab.html"> <link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html"> <link rel="import" href="../bower_components/paper-input/paper-input-container.html"> <link rel="import" href="../bower_components/paper-input/paper-textarea.html"> <link rel="import" href="../bower_components/paper-item/paper-item.html"> <link rel="import" href="../bower_components/paper-material/paper-material.html"> <link rel="import" href="../bower_components/paper-material/paper-material-shared-styles.html"> <link rel="import" href="../bower_components/paper-menu/paper-menu.html"> <link rel="import" href="../bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html"> <link rel="import" href="../bower_components/paper-styles/paper-styles.html"> <link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html"> <link rel="import" href="../bower_components/app-router/app-router.html"> <link rel="import" href="elements/article-info.html"> <link rel="import" href="elements/article-list.html"> <link rel="import" href="elements/user-info-control.html"> <link rel="import" href="dialogs/article-add-dialog.html"> <link rel="import" href="dialogs/article-review-dialog.html"> <link rel="import" href="dialogs/login-dialog.html"> <link rel="import" href="dialogs/tag-selection-dialog.html"> <link rel="import" href="shell/app-shell.html"> <link rel="import" href="pages/home-page.html"> <link rel="import" href="pages/article-list-page.html"> <link rel="import" href="pages/search-page.html"> <link rel="stylesheet" type="text/css" href="../styles/main.css" />
xunkai55/rl4nlp-web
app/elements/elements.html
HTML
bsd-3-clause
2,863
from django.conf.urls import include, url from django.views.generic import TemplateView urlpatterns = [ url(r"^home/", TemplateView.as_view(template_name="no-ie.html"), name="home"), url(r"^", include("formly.urls", namespace="formly")), ]
eldarion/formly
formly/tests/urls.py
Python
bsd-3-clause
249
/* * ProgramHandler * */ package apollo.analysis; /** * interface specifies the behaviour of a program handler * * the program handler acts as a kind of adapter between * the analysis program (usually run in the unix shell) * and the SeqAnalysisI object * * it provides a way of executing an analysis program, * and a way of interpreting the results * * * In general, a program handler is only required by * SeqAnalysisLocal * * (if you are running an analysis program non-locally then * presumably the remote server will deal with these things) * * @see ProgramHandlerFactory * @see GenericProgramHandler * * @author Chris Mungall **/ import java.util.*; import apollo.analysis.*; import apollo.datamodel.*; public interface ProgramHandlerI { /** * different analysis programs require different ways of * running them * **/ public String createUnixShellCommand(SeqAnalysisLocal seqAnalysis); /** * different programs must be parsed differently * implementations may also choose to also filter the results * in some configurable way. it is up to the individual * implementations to respect these **/ public CurationSet parseAnalysisResults(SeqAnalysisI seqAnalysis); }
genome-vendor/apollo
src/java/apollo/analysis/ProgramHandlerI.java
Java
bsd-3-clause
1,240
package main import ( "fmt" "io/ioutil" "net/http" "strings" ct "github.com/flynn/flynn/controller/types" hh "github.com/flynn/flynn/pkg/httphelper" "github.com/flynn/flynn/pkg/postgres" "github.com/flynn/flynn/pkg/random" "github.com/flynn/flynn/pkg/verify" "github.com/jackc/pgx" ) type ArtifactRepo struct { db *postgres.DB } func NewArtifactRepo(db *postgres.DB) *ArtifactRepo { return &ArtifactRepo{db} } func (r *ArtifactRepo) Add(data interface{}) error { a := data.(*ct.Artifact) // TODO: actually validate if a.ID == "" { a.ID = random.UUID() } if a.Type == "" { return ct.ValidationError{Field: "type", Message: "must not be empty"} } if a.URI == "" { return ct.ValidationError{Field: "uri", Message: "must not be empty"} } if a.Type == ct.ArtifactTypeFlynn && a.RawManifest == nil { if a.Size <= 0 { return ct.ValidationError{Field: "size", Message: "must be greater than zero"} } if err := downloadManifest(a); err != nil { return ct.ValidationError{Field: "manifest", Message: fmt.Sprintf("failed to download from %s: %s", a.URI, err)} } } tx, err := r.db.Begin() if err != nil { return err } err = tx.QueryRow("artifact_insert", a.ID, string(a.Type), a.URI, a.Meta, []byte(a.RawManifest), a.Hashes, a.Size, a.LayerURLTemplate).Scan(&a.CreatedAt) if postgres.IsUniquenessError(err, "") { tx.Rollback() tx, err = r.db.Begin() if err != nil { return err } var size *int64 var layerURLTemplate *string err = tx.QueryRow("artifact_select_by_type_and_uri", string(a.Type), a.URI).Scan(&a.ID, &a.Meta, &a.RawManifest, &a.Hashes, &size, &layerURLTemplate, &a.CreatedAt) if err != nil { tx.Rollback() return err } if size != nil { a.Size = *size } if layerURLTemplate != nil { a.LayerURLTemplate = *layerURLTemplate } } if err != nil { tx.Rollback() return err } if err := createEvent(tx.Exec, &ct.Event{ ObjectID: a.ID, ObjectType: ct.EventTypeArtifact, }, a); err != nil { tx.Rollback() return err } return tx.Commit() } func scanArtifact(s postgres.Scanner) (*ct.Artifact, error) { artifact := &ct.Artifact{} var typ string var size *int64 var layerURLTemplate *string err := s.Scan(&artifact.ID, &typ, &artifact.URI, &artifact.Meta, &artifact.RawManifest, &artifact.Hashes, &size, &layerURLTemplate, &artifact.CreatedAt) if err == pgx.ErrNoRows { err = ErrNotFound } artifact.Type = ct.ArtifactType(typ) if size != nil { artifact.Size = *size } if layerURLTemplate != nil { artifact.LayerURLTemplate = *layerURLTemplate } return artifact, err } func (r *ArtifactRepo) Get(id string) (interface{}, error) { row := r.db.QueryRow("artifact_select", id) return scanArtifact(row) } func (r *ArtifactRepo) List() (interface{}, error) { rows, err := r.db.Query("artifact_list") if err != nil { return nil, err } var artifacts []*ct.Artifact for rows.Next() { artifact, err := scanArtifact(rows) if err != nil { rows.Close() return nil, err } artifacts = append(artifacts, artifact) } return artifacts, rows.Err() } func (r *ArtifactRepo) ListIDs(ids ...string) (map[string]*ct.Artifact, error) { if len(ids) == 0 { return nil, nil } rows, err := r.db.Query("artifact_list_ids", fmt.Sprintf("{%s}", strings.Join(ids, ","))) if err != nil { return nil, err } artifacts := make(map[string]*ct.Artifact, len(ids)) for rows.Next() { artifact, err := scanArtifact(rows) if err != nil { rows.Close() return nil, err } artifacts[artifact.ID] = artifact } return artifacts, rows.Err() } func downloadManifest(artifact *ct.Artifact) error { verifier, err := verify.NewVerifier(artifact.Hashes, artifact.Size) if err != nil { return err } res, err := hh.RetryClient.Get(artifact.URI) if err != nil { return err } defer res.Body.Close() if res.StatusCode != http.StatusOK { return fmt.Errorf("unexpected HTTP status: %s", res.Status) } r := verifier.Reader(res.Body) data, err := ioutil.ReadAll(r) if err != nil { return err } if err := verifier.Verify(); err != nil { return err } artifact.RawManifest = data return nil }
philiplb/flynn
controller/artifact.go
GO
bsd-3-clause
4,139
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <math.h> #include <objbase.h> #include <sapi.h> #include <stdint.h> #include <wrl/client.h> #include <wrl/implements.h> #include "base/bind.h" #include "base/cxx17_backports.h" #include "base/macros.h" #include "base/no_destructor.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" #include "base/task/sequenced_task_runner.h" #include "base/task/task_runner.h" #include "base/task/task_traits.h" #include "base/task/thread_pool.h" #include "base/thread_annotations.h" #include "base/threading/sequence_bound.h" #include "base/values.h" #include "base/win/scoped_co_mem.h" #include "base/win/sphelper.h" #include "content/browser/speech/tts_platform_impl.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/tts_controller.h" namespace content { namespace { class TtsPlatformImplWin; class TtsPlatformImplBackgroundWorker; constexpr int kInvalidUtteranceId = -1; // ISpObjectToken key and value names. const wchar_t kAttributesKey[] = L"Attributes"; const wchar_t kLanguageValue[] = L"Language"; // Original blog detailing how to use this registry. // https://social.msdn.microsoft.com/Forums/en-US/8bbe761c-69c7-401c-8261-1442935c57c8/why-isnt-my-program-detecting-all-tts-voices // Microsoft docs on how to view system registry keys. // https://docs.microsoft.com/en-us/troubleshoot/windows-client/deployment/view-system-registry-with-64-bit-windows const wchar_t* kSPCategoryOneCoreVoices = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices"; // This COM interface is receiving the TTS events on the ISpVoice asynchronous // worker thread and is emitting a notification task // TtsPlatformImplBackgroundWorker::SendTtsEvent(...) on the worker sequence. class TtsEventSink : public Microsoft::WRL::RuntimeClass< Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, ISpNotifySink> { public: TtsEventSink(TtsPlatformImplBackgroundWorker* worker, scoped_refptr<base::TaskRunner> worker_task_runner) : worker_(worker), worker_task_runner_(std::move(worker_task_runner)) {} // ISpNotifySink: IFACEMETHODIMP Notify(void) override; int GetUtteranceId() { base::AutoLock lock(lock_); return utterance_id_; } void SetUtteranceId(int utterance_id) { base::AutoLock lock(lock_); utterance_id_ = utterance_id; } private: // |worker_| is leaky and must never deleted because TtsEventSink posts // asynchronous tasks to it. TtsPlatformImplBackgroundWorker* worker_; scoped_refptr<base::TaskRunner> worker_task_runner_; base::Lock lock_; int utterance_id_ GUARDED_BY(lock_); }; class TtsPlatformImplBackgroundWorker { public: explicit TtsPlatformImplBackgroundWorker( scoped_refptr<base::TaskRunner> task_runner) : tts_event_sink_( Microsoft::WRL::Make<TtsEventSink>(this, std::move(task_runner))) {} TtsPlatformImplBackgroundWorker(const TtsPlatformImplBackgroundWorker&) = delete; TtsPlatformImplBackgroundWorker& operator=( const TtsPlatformImplBackgroundWorker&) = delete; ~TtsPlatformImplBackgroundWorker() = default; void Initialize(); void ProcessSpeech(int utterance_id, const std::string& lang, const VoiceData& voice, const UtteranceContinuousParameters& params, base::OnceCallback<void(bool)> on_speak_finished, const std::string& parsed_utterance); void StopSpeaking(bool paused); void Pause(); void Resume(); void Shutdown(); // This function is called after being notified by the speech synthetizer that // there are TTS notifications are available and should be they should be // processed. void OnSpeechEvent(int utterance_id); // Send an TTS event notification to the TTS controller. void SendTtsEvent(int utterance_id, TtsEventType event_type, int char_index, int length = -1); private: void GetVoices(std::vector<VoiceData>* voices); // Search the newer OneCore or the older SAPI locations for voice tokens. // This ensures new voices are shown and that the method works on Windows 7. bool GetVoiceTokens(Microsoft::WRL::ComPtr<IEnumSpObjectTokens>* out_tokens); void SetVoiceFromName(const std::string& name); // These apply to the current utterance only that is currently being processed // on the worker thread. TTS events are dispatched by TtsEventSink to this // class and update the current speaking state of the utterance. std::string last_voice_name_; ULONG stream_number_ = 0u; int utterance_id_ = kInvalidUtteranceId; size_t utterance_char_position_ = 0u; size_t utterance_prefix_length_ = 0u; size_t utterance_length_ = 0u; // The COM class ISpVoice lives within the COM MTA apartment (worker pool). // This interface can not be called on the UI thread since UI thread is // COM STA. Microsoft::WRL::ComPtr<ISpVoice> speech_synthesizer_; Microsoft::WRL::ComPtr<TtsEventSink> tts_event_sink_; }; class TtsPlatformImplWin : public TtsPlatformImpl { public: TtsPlatformImplWin(const TtsPlatformImplWin&) = delete; TtsPlatformImplWin& operator=(const TtsPlatformImplWin&) = delete; bool PlatformImplSupported() override { return true; } bool PlatformImplInitialized() override; void Speak(int utterance_id, const std::string& utterance, const std::string& lang, const VoiceData& voice, const UtteranceContinuousParameters& params, base::OnceCallback<void(bool)> on_speak_finished) override; bool StopSpeaking() override; void Pause() override; void Resume() override; bool IsSpeaking() override; void GetVoices(std::vector<VoiceData>* out_voices) override; void Shutdown() override; void OnInitializeComplete(bool success, std::vector<VoiceData> voices); void OnSpeakScheduled(base::OnceCallback<void(bool)> on_speak_finished, bool success); void OnSpeakFinished(int utterance_id); // Get the single instance of this class. static TtsPlatformImplWin* GetInstance(); private: friend base::NoDestructor<TtsPlatformImplWin>; TtsPlatformImplWin(); void ProcessSpeech(int utterance_id, const std::string& lang, const VoiceData& voice, const UtteranceContinuousParameters& params, base::OnceCallback<void(bool)> on_speak_finished, const std::string& parsed_utterance); void FinishCurrentUtterance(); // These variables hold the platform state. bool paused_ = false; bool is_speaking_ = false; int utterance_id_ = kInvalidUtteranceId; bool platform_initialized_ = false; std::vector<VoiceData> voices_; // Hold the state and the code of the background implementation. scoped_refptr<base::SequencedTaskRunner> worker_task_runner_; base::SequenceBound<TtsPlatformImplBackgroundWorker> worker_; }; HRESULT TtsEventSink::Notify() { worker_task_runner_->PostTask( FROM_HERE, base::BindOnce(&TtsPlatformImplBackgroundWorker::OnSpeechEvent, base::Unretained(worker_), GetUtteranceId())); return S_OK; } // // TtsPlatformImplBackgroundWorker // void TtsPlatformImplBackgroundWorker::Initialize() { bool success = false; std::vector<VoiceData> voices; ::CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL, IID_PPV_ARGS(&speech_synthesizer_)); if (speech_synthesizer_.Get()) { ULONGLONG event_mask = SPFEI(SPEI_START_INPUT_STREAM) | SPFEI(SPEI_TTS_BOOKMARK) | SPFEI(SPEI_WORD_BOUNDARY) | SPFEI(SPEI_SENTENCE_BOUNDARY) | SPFEI(SPEI_END_INPUT_STREAM); speech_synthesizer_->SetInterest(event_mask, event_mask); speech_synthesizer_->SetNotifySink(tts_event_sink_.Get()); GetVoices(&voices); success = true; } GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(&TtsPlatformImplWin::OnInitializeComplete, base::Unretained(TtsPlatformImplWin::GetInstance()), success, std::move(voices))); } void TtsPlatformImplBackgroundWorker::ProcessSpeech( int utterance_id, const std::string& lang, const VoiceData& voice, const UtteranceContinuousParameters& params, base::OnceCallback<void(bool)> on_speak_finished, const std::string& parsed_utterance) { DCHECK(speech_synthesizer_.Get()); SetVoiceFromName(voice.name); if (params.rate >= 0.0) { // Map our multiplicative range of 0.1x to 10.0x onto Microsoft's // linear range of -10 to 10: // 0.1 -> -10 // 1.0 -> 0 // 10.0 -> 10 speech_synthesizer_->SetRate(static_cast<int32_t>(10 * log10(params.rate))); } std::wstring prefix; std::wstring suffix; if (params.pitch >= 0.0) { // The TTS api allows a range of -10 to 10 for speech pitch: // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms720500(v%3Dvs.85) // Note that the API requires an integer value, so be sure to cast the pitch // value to an int before calling NumberToWString. TODO(dtseng): cleanup if // we ever use any other properties that require xml. double adjusted_pitch = base::clamp<double>(params.pitch * 10 - 10, -10, 10); std::wstring adjusted_pitch_string = base::NumberToWString(static_cast<int>(adjusted_pitch)); prefix = L"<pitch absmiddle=\"" + adjusted_pitch_string + L"\">"; suffix = L"</pitch>"; } if (params.volume >= 0.0) { // The TTS api allows a range of 0 to 100 for speech volume. speech_synthesizer_->SetVolume(static_cast<uint16_t>(params.volume * 100)); } // TODO(dmazzoni): convert SSML to SAPI xml. http://crbug.com/88072 std::wstring utterance = base::UTF8ToWide(parsed_utterance); std::wstring merged_utterance = prefix + utterance + suffix; utterance_id_ = utterance_id; utterance_char_position_ = 0; utterance_length_ = utterance.size(); utterance_prefix_length_ = prefix.size(); tts_event_sink_->SetUtteranceId(utterance_id); HRESULT result = speech_synthesizer_->Speak(merged_utterance.c_str(), SPF_ASYNC, &stream_number_); bool success = (result == S_OK); GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(std::move(on_speak_finished), success)); } void TtsPlatformImplWin::FinishCurrentUtterance() { if (paused_) Resume(); DCHECK(is_speaking_); DCHECK_NE(utterance_id_, kInvalidUtteranceId); is_speaking_ = false; utterance_id_ = kInvalidUtteranceId; } void TtsPlatformImplBackgroundWorker::StopSpeaking(bool paused) { if (speech_synthesizer_.Get()) { // Block notifications from the current utterance. tts_event_sink_->SetUtteranceId(kInvalidUtteranceId); utterance_id_ = kInvalidUtteranceId; // Stop speech by speaking nullptr with the purge flag. speech_synthesizer_->Speak(nullptr, SPF_PURGEBEFORESPEAK, nullptr); // Ensures the synthesizer is not paused after a stop. if (paused) speech_synthesizer_->Resume(); } } void TtsPlatformImplBackgroundWorker::Pause() { if (speech_synthesizer_.Get()) { speech_synthesizer_->Pause(); SendTtsEvent(utterance_id_, TTS_EVENT_PAUSE, utterance_char_position_); } } void TtsPlatformImplBackgroundWorker::Resume() { if (speech_synthesizer_.Get()) { speech_synthesizer_->Resume(); SendTtsEvent(utterance_id_, TTS_EVENT_RESUME, utterance_char_position_); } } void TtsPlatformImplBackgroundWorker::Shutdown() { if (speech_synthesizer_) speech_synthesizer_->SetNotifySink(nullptr); if (tts_event_sink_) { tts_event_sink_->SetUtteranceId(kInvalidUtteranceId); utterance_id_ = kInvalidUtteranceId; } tts_event_sink_ = nullptr; speech_synthesizer_ = nullptr; } void TtsPlatformImplBackgroundWorker::OnSpeechEvent(int utterance_id) { if (!speech_synthesizer_.Get()) return; SPEVENT event; while (S_OK == speech_synthesizer_->GetEvents(1, &event, nullptr)) { // Ignore notifications that are not related to the current utterance. if (event.ulStreamNum != stream_number_ || utterance_id_ == kInvalidUtteranceId || utterance_id != utterance_id_) { continue; } switch (event.eEventId) { case SPEI_START_INPUT_STREAM: utterance_char_position_ = 0; SendTtsEvent(utterance_id_, TTS_EVENT_START, utterance_char_position_); break; case SPEI_END_INPUT_STREAM: GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(&TtsPlatformImplWin::OnSpeakFinished, base::Unretained(TtsPlatformImplWin::GetInstance()), utterance_id_)); utterance_char_position_ = utterance_length_; SendTtsEvent(utterance_id_, TTS_EVENT_END, utterance_char_position_); break; case SPEI_TTS_BOOKMARK: SendTtsEvent(utterance_id_, TTS_EVENT_MARKER, utterance_char_position_); break; case SPEI_WORD_BOUNDARY: utterance_char_position_ = static_cast<size_t>(event.lParam) - utterance_prefix_length_; SendTtsEvent(utterance_id_, TTS_EVENT_WORD, utterance_char_position_, static_cast<ULONG>(event.wParam)); break; case SPEI_SENTENCE_BOUNDARY: utterance_char_position_ = static_cast<size_t>(event.lParam) - utterance_prefix_length_; SendTtsEvent(utterance_id_, TTS_EVENT_SENTENCE, utterance_char_position_); break; default: break; } } } void TtsPlatformImplBackgroundWorker::SendTtsEvent(int utterance_id, TtsEventType event_type, int char_index, int length) { GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(&TtsController::OnTtsEvent, base::Unretained(TtsController::GetInstance()), utterance_id, event_type, char_index, length, std::string())); } void TtsPlatformImplBackgroundWorker::GetVoices( std::vector<VoiceData>* out_voices) { if (!speech_synthesizer_.Get()) return; Microsoft::WRL::ComPtr<IEnumSpObjectTokens> voice_tokens; unsigned long voice_count; if (!this->GetVoiceTokens(&voice_tokens)) { return; } if (S_OK != voice_tokens->GetCount(&voice_count)) return; for (unsigned i = 0; i < voice_count; i++) { VoiceData voice; Microsoft::WRL::ComPtr<ISpObjectToken> voice_token; if (S_OK != voice_tokens->Next(1, &voice_token, NULL)) return; base::win::ScopedCoMem<WCHAR> description; if (S_OK != SpGetDescription(voice_token.Get(), &description)) continue; voice.name = base::WideToUTF8(description.get()); Microsoft::WRL::ComPtr<ISpDataKey> attributes; if (S_OK != voice_token->OpenKey(kAttributesKey, &attributes)) continue; base::win::ScopedCoMem<WCHAR> language; if (S_OK == attributes->GetStringValue(kLanguageValue, &language)) { int lcid_value; base::HexStringToInt(base::WideToUTF8(language.get()), &lcid_value); LCID lcid = MAKELCID(lcid_value, SORT_DEFAULT); WCHAR locale_name[LOCALE_NAME_MAX_LENGTH] = {0}; LCIDToLocaleName(lcid, locale_name, LOCALE_NAME_MAX_LENGTH, 0); voice.lang = base::WideToUTF8(locale_name); } voice.native = true; voice.events.insert(TTS_EVENT_START); voice.events.insert(TTS_EVENT_END); voice.events.insert(TTS_EVENT_MARKER); voice.events.insert(TTS_EVENT_WORD); voice.events.insert(TTS_EVENT_SENTENCE); voice.events.insert(TTS_EVENT_PAUSE); voice.events.insert(TTS_EVENT_RESUME); out_voices->push_back(voice); } } void TtsPlatformImplBackgroundWorker::SetVoiceFromName( const std::string& name) { if (name.empty() || name == last_voice_name_) return; last_voice_name_ = name; Microsoft::WRL::ComPtr<IEnumSpObjectTokens> voice_tokens; unsigned long voice_count; if (!this->GetVoiceTokens(&voice_tokens)) { return; } if (S_OK != voice_tokens->GetCount(&voice_count)) return; for (unsigned i = 0; i < voice_count; i++) { Microsoft::WRL::ComPtr<ISpObjectToken> voice_token; if (S_OK != voice_tokens->Next(1, &voice_token, NULL)) return; base::win::ScopedCoMem<WCHAR> description; if (S_OK != SpGetDescription(voice_token.Get(), &description)) continue; if (name == base::WideToUTF8(description.get())) { speech_synthesizer_->SetVoice(voice_token.Get()); break; } } } bool TtsPlatformImplBackgroundWorker::GetVoiceTokens( Microsoft::WRL::ComPtr<IEnumSpObjectTokens>* out_tokens) { if (S_OK == SpEnumTokens(kSPCategoryOneCoreVoices, NULL, NULL, &(*out_tokens))) { } else if (S_OK != SpEnumTokens(SPCAT_VOICES, NULL, NULL, &(*out_tokens))) { return false; } return true; } // // TtsPlatformImplWin // bool TtsPlatformImplWin::PlatformImplInitialized() { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); return platform_initialized_; } void TtsPlatformImplWin::Speak( int utterance_id, const std::string& utterance, const std::string& lang, const VoiceData& voice, const UtteranceContinuousParameters& params, base::OnceCallback<void(bool)> on_speak_finished) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(platform_initialized_); // Do not emit utterance if the platform is not ready. if (paused_ || is_speaking_) { std::move(on_speak_finished).Run(false); return; } // Flag that a utterance is getting emitted. The |is_speaking_| flag will be // set back to false when the utterance will be fully spoken, stopped or if // the voice synthetizer was not able to emit it. is_speaking_ = true; utterance_id_ = utterance_id; // Parse SSML and process speech. TtsController::GetInstance()->StripSSML( utterance, base::BindOnce(&TtsPlatformImplWin::ProcessSpeech, base::Unretained(this), utterance_id, lang, voice, params, base::BindOnce(&TtsPlatformImplWin::OnSpeakScheduled, base::Unretained(this), std::move(on_speak_finished)))); } bool TtsPlatformImplWin::StopSpeaking() { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); worker_.AsyncCall(&TtsPlatformImplBackgroundWorker::StopSpeaking) .WithArgs(paused_); paused_ = false; is_speaking_ = false; utterance_id_ = kInvalidUtteranceId; return true; } void TtsPlatformImplWin::Pause() { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(platform_initialized_); if (paused_ || !is_speaking_) return; worker_.AsyncCall(&TtsPlatformImplBackgroundWorker::Pause); paused_ = true; } void TtsPlatformImplWin::Resume() { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(platform_initialized_); if (!paused_) return; worker_.AsyncCall(&TtsPlatformImplBackgroundWorker::Resume); paused_ = false; } bool TtsPlatformImplWin::IsSpeaking() { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(platform_initialized_); return is_speaking_ && !paused_; } void TtsPlatformImplWin::GetVoices(std::vector<VoiceData>* out_voices) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(platform_initialized_); out_voices->insert(out_voices->end(), voices_.begin(), voices_.end()); } void TtsPlatformImplWin::Shutdown() { // This is required to ensures the object is released before the COM is // uninitialized. Otherwise, this is causing shutdown hangs. worker_.AsyncCall(&TtsPlatformImplBackgroundWorker::Shutdown); } void TtsPlatformImplWin::OnInitializeComplete(bool success, std::vector<VoiceData> voices) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); if (success) voices_ = std::move(voices); platform_initialized_ = true; TtsController::GetInstance()->VoicesChanged(); } void TtsPlatformImplWin::OnSpeakScheduled( base::OnceCallback<void(bool)> on_speak_finished, bool success) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(is_speaking_); // If the utterance was not able to be emitted, stop the speaking. There // won't be any asynchronous TTS event to confirm the end of the speech. if (!success) FinishCurrentUtterance(); // Pass the results to our caller. std::move(on_speak_finished).Run(success); } void TtsPlatformImplWin::OnSpeakFinished(int utterance_id) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); if (utterance_id != utterance_id_) return; FinishCurrentUtterance(); } void TtsPlatformImplWin::ProcessSpeech( int utterance_id, const std::string& lang, const VoiceData& voice, const UtteranceContinuousParameters& params, base::OnceCallback<void(bool)> on_speak_finished, const std::string& parsed_utterance) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); worker_.AsyncCall(&TtsPlatformImplBackgroundWorker::ProcessSpeech) .WithArgs(utterance_id, lang, voice, params, std::move(on_speak_finished), parsed_utterance); } TtsPlatformImplWin::TtsPlatformImplWin() : worker_task_runner_( base::ThreadPool::CreateSequencedTaskRunner({base::MayBlock()})), worker_(worker_task_runner_, worker_task_runner_) { DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI)); worker_.AsyncCall(&TtsPlatformImplBackgroundWorker::Initialize); } // static TtsPlatformImplWin* TtsPlatformImplWin::GetInstance() { static base::NoDestructor<TtsPlatformImplWin> tts_platform; return tts_platform.get(); } } // namespace // static TtsPlatformImpl* TtsPlatformImpl::GetInstance() { return TtsPlatformImplWin::GetInstance(); } } // namespace content
nwjs/chromium.src
content/browser/speech/tts_win.cc
C++
bsd-3-clause
22,565
// Do not edit. This file is machine generated by the Resource DLL Wizard. //--------------------------------------------------------------------------- #define PACKAGE __declspec(package) #define USERC(FileName) extern PACKAGE _Dummy #define USERES(FileName) extern PACKAGE _Dummy #define USEFORMRES(FileName, FormName, AncestorName) extern PACKAGE _Dummy #pragma hdrstop int _turboFloat; //--------------------------------------------------------------------------- /*ITE*/ /*LCID:00000C0A:0000042D*/ /**/ /*ITE*/ /*DFMFileType*/ /*src\Boole1\FormasN.dfm*/ /*ITE*/ /*RCFileType*/ /*exe\boole_DRC.rc*/ /*ITE*/ /*RCFileType*/ /*src\res\mensajes.rc*/ //--------------------------------------------------------------------------- #pragma resource "src\Boole1\app.dfm" #pragma resource "src\Boole1\calc.dfm" #pragma resource "src\Boole1\uKarnaugh.dfm" #pragma resource "src\Boole1\ExpBool.dfm" USEFORMRES("src\Boole1\FormasN.dfm", TForm); #pragma resource "src\Boole1\FormasN.dfm" #pragma resource "src\Boole1\FormSimp.dfm" #pragma resource "src\Boole1\Main.dfm" #pragma resource "src\Boole1\NandNor.dfm" #pragma resource "src\Boole1\NuevoSC.dfm" #pragma resource "src\Boole1\SCCompac.dfm" #pragma resource "src\Boole1\TVComple.dfm" #pragma resource "src\Boole1\TVManual.dfm" #pragma resource "src\Boole2\FCalculando.dfm" #pragma resource "src\Boole2\ayuda.dfm" #pragma resource "src\Boole2\uLog.dfm" #pragma resource "src\Boole2\Unit15.dfm" #pragma resource "src\Boole2\Unit11.dfm" #pragma resource "src\Boole2\Unit12.dfm" #pragma resource "src\Boole2\Unit13.dfm" #pragma resource "src\Boole2\Unit14.dfm" #pragma resource "src\Boole2\Unit10.dfm" #pragma resource "src\Boole2\V_Boole2.dfm" #pragma resource "src\Boole2\Unit2.dfm" #pragma resource "src\Boole2\Unit3.dfm" #pragma resource "src\Boole2\Unit4.dfm" #pragma resource "src\Boole2\Unit5.dfm" #pragma resource "src\Boole2\Unit6.dfm" #pragma resource "src\Boole2\Unit8.dfm" #pragma resource "src\Boole2\Unit9.dfm" #pragma resource "src\Boole2\uSimulacion.dfm" #pragma resource "src\Boole2\Unit16.dfm" #pragma resource "src\Circuito\V_Imprimir.dfm" #pragma resource "src\Circuito\V_Circuito.dfm" #pragma resource "src\Comun\uTextoAsoc.dfm" USERC("exe\boole_DRC.rc"); USERC("src\res\mensajes.rc"); //--------------------------------------------------------------------------- #define DllEntryPoint
zstars/booledeusto
EUS/boole_5_34.cpp
C++
bsd-3-clause
2,402
#ifndef GRAPH_VIEW_H #define GRAPH_VIEW_H /// COMPONENT #include <csapex/command/command_fwd.h> #include <csapex/core/core_fwd.h> #include <csapex/model/connector_description.h> #include <csapex/model/connector_type.h> #include <csapex/model/execution_mode.h> #include <csapex/model/execution_type.h> #include <csapex/model/model_fwd.h> #include <csapex/model/observer.h> #include <csapex/profiling/profilable.h> #include <csapex_qt/export.h> #include <csapex/scheduling/scheduling_fwd.h> #include <csapex/serialization/snippet.h> #include <csapex/utility/slim_signal.hpp> #include <csapex/utility/uuid.h> #include <csapex/view/csapex_view_core.h> #include <csapex/view/designer/designer_styleable.h> #include <csapex/view/view_fwd.h> /// SYSTEM #include <QGraphicsView> #include <map> #include <QTimer> #include <unordered_map> namespace csapex { class NodeFactory; class GraphViewContextMenu; class CSAPEX_QT_EXPORT GraphView : public QGraphicsView, public Profilable, public Observer { friend class GraphViewContextMenu; Q_OBJECT Q_PROPERTY(QColor lineColor READ lineColor WRITE setLineColor) Q_PROPERTY(QColor lineColorError READ lineColorError WRITE setLineColorError) Q_PROPERTY(QColor lineColorBlocked READ lineColorBlocked WRITE setLineColorBlocked) Q_PROPERTY(QColor lineColorDisabled READ lineColorDisabled WRITE setLineColorDisabled) Q_PROPERTY(QColor lineColorMarker READ lineColorMarker WRITE setLineColorMarker) Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth) Q_PROPERTY(QColor balloonColor READ balloonColor WRITE setBalloonColor) void setLineColor(const QColor& c) { view_core_.getStyle().setLineColor(c); } void setLineColorError(const QColor& c) { view_core_.getStyle().setLineColorError(c); } void setLineColorBlocked(const QColor& c) { view_core_.getStyle().setLineColorBlocked(c); } void setLineColorDisabled(const QColor& c) { view_core_.getStyle().setLineColorDisabled(c); } void setLineColorMarker(const QColor& c) { view_core_.getStyle().setLineColorMarker(c); } void setLineWidth(int width) { view_core_.getStyle().setLineWidth(width); } void setBalloonColor(const QColor& c) { view_core_.getStyle().setBalloonColor(c); } QColor lineColor() const { return view_core_.getStyle().lineColor(); } QColor lineColorError() const { return view_core_.getStyle().lineColorError(); } QColor lineColorBlocked() const { return view_core_.getStyle().lineColorBlocked(); } QColor lineColorDisabled() const { return view_core_.getStyle().lineColorDisabled(); } QColor lineColorMarker() const { return view_core_.getStyle().lineColorMarker(); } int lineWidth() const { return view_core_.getStyle().lineWidth(); } QColor balloonColor() const { return view_core_.getStyle().balloonColor(); } public: GraphView(csapex::GraphFacadePtr graph_facade, CsApexViewCore& view_core, QWidget* parent = nullptr); ~GraphView() override; DesignerScene* designerScene(); std::vector<NodeBox*> boxes(); std::vector<NodeBox*> getSelectedBoxes() const; std::vector<UUID> getSelectedUUIDs() const; NodeBox* getBox(const csapex::UUID& node_id); MovableGraphicsProxyWidget* getProxy(const csapex::UUID& node_id); GraphFacade* getGraphFacade() const; CsApexViewCore& getViewCore() const; void focusOnNode(const csapex::UUID& uuid); void resizeEvent(QResizeEvent* event) override; void scrollContentsBy(int dx, int dy) override; void keyPressEvent(QKeyEvent* e) override; void keyReleaseEvent(QKeyEvent* e) override; void mousePressEvent(QMouseEvent* e) override; void mouseReleaseEvent(QMouseEvent* e) override; void wheelEvent(QWheelEvent* we) override; void mouseMoveEvent(QMouseEvent* me) override; void dragEnterEvent(QDragEnterEvent* e) override; void dragMoveEvent(QDragMoveEvent* e) override; void dropEvent(QDropEvent* e) override; void dragLeaveEvent(QDragLeaveEvent* e) override; void drawForeground(QPainter* painter, const QRectF& rect) override; void paintEvent(QPaintEvent* e) override; void startPlacingBox(const std::string& type, NodeStatePtr state, const QPoint& offset = QPoint(0, 0)); void startCloningSelection(NodeBox* handle, const QPoint& offset = QPoint(0, 0)); void useProfiler(std::shared_ptr<Profiler> profiler) override; void usePrivateThreadForSelectedNodes(); void useDefaultThreadForSelectedNodes(); void switchSelectedNodesToThread(int group_id); Q_SIGNALS: void selectionChanged(); void graphModelChanged(); void viewChanged(); void boxAdded(NodeBox* box); void boxRemoved(NodeBox* box); void nodeFacadeAdded(NodeFacadePtr facade); void nodeFacadeRemoved(NodeFacadePtr facade); void childNodeFacadeAdded(NodeFacadePtr facade); void childNodeFacadeRemoved(NodeFacadePtr facade); void startProfilingRequest(NodeFacade* box); void stopProfilingRequest(NodeFacade* box); void triggerConnectorCreated(const ConnectorDescription& connector); void triggerConnectorRemoved(const ConnectorDescription& connector); public Q_SLOTS: void nodeAdded(NodeFacadePtr node_facade); void nodeRemoved(NodeFacadePtr node_facade); void childNodeAdded(NodeFacadePtr node_facade); void childNodeRemoved(NodeFacadePtr node_facade); void showNodeInsertDialog(); void addBox(NodeBox* box); void removeBox(NodeBox* box); void updateBoxInformation(); void createPort(ConnectorDescription request); void createPortAndConnect(ConnectorDescription request, ConnectorPtr from); void createPortAndMove(ConnectorDescription request, ConnectorPtr from); void addPort(Port* port); void removePort(Port* port); void renameBox(NodeBox* box); void connectorCreated(const ConnectorDescription& connector); void connectorRemoved(const ConnectorDescription& connector); void addConnector(const ConnectorDescription& connector); void removeConnector(const ConnectorDescription& connector); void centerOnPoint(QPointF point); void movedBoxes(double dx, double dy); void overwriteStyleSheet(const QString& stylesheet); void contextMenuEvent(QContextMenuEvent* e) override; void showContextMenuGlobal(const QPoint& pos); void showContextMenuForSelectedNodes(NodeBox* box, const QPoint& pos); void startProfiling(NodeFacade* box); void stopProfiling(NodeFacade* box); void reset(); void resetZoom(); void zoomIn(); void zoomOut(); void zoom(double factor); void zoomAt(QPointF point, double factor); void animateZoom(); void animateScroll(); void enableSelection(bool enabled); void updateSelection(); void selectAll(); void copySelected(); void paste(); void deleteSelected(); void groupSelected(); void ungroupSelected(); void makeSnippetFromSelected(); void showDelayedPreview(Port* port); void stopPreview(); private Q_SLOTS: void showPreview(); private: void createNodes(const QPoint& global_pos, const std::string& type, const std::string& mime); void setupWidgets(); void flipBox(); void setExecutionMode(ExecutionMode mode); void setExecutionType(ExecutionType typed); void setLoggerLevel(int level); void setMaximumFrequency(); void setUnboundedMaximumFrequency(); void chooseColor(); void minimizeBox(bool mini); void muteBox(bool muted); void morphNode(); void createNewThreadGroupFor(); void showProfiling(bool visible); SnippetPtr serializeSelection() const; void invalidateCache(); private: CsApexViewCore& view_core_; DesignerScene* scene_; GraphFacadePtr graph_facade_; PortPanel* inputs_widget_; QGraphicsProxyWidget* inputs_widget_proxy_; PortPanel* outputs_widget_; QGraphicsProxyWidget* outputs_widget_proxy_; PortPanel* slots_widget_; QGraphicsProxyWidget* slots_widget_proxy_; PortPanel* events_widget_; QGraphicsProxyWidget* triggers_widget_proxy_; std::map<NodeFacade*, std::vector<csapex::slim_signal::ScopedConnection>> facade_connections_; std::vector<NodeBox*> boxes_; std::vector<NodeBox*> selected_boxes_; std::map<NodeBox*, QPointer<ProfilingWidget>> profiling_; std::map<NodeBox*, std::vector<csapex::slim_signal::ScopedConnection>> profiling_connections_; int scalings_to_perform_; QTimer scalings_animation_timer_; QRectF item_bbox_; QTimer scroll_animation_timer_; double scroll_offset_x_; double scroll_offset_y_; bool middle_mouse_dragging_; bool middle_mouse_panning_; QPointF middle_mouse_drag_start_; QDragMoveEvent* move_event_; std::unordered_map<UUID, NodeBox*, UUID::Hasher> box_map_; std::unordered_map<UUID, MovableGraphicsProxyWidget*, UUID::Hasher> proxy_map_; QTimer* preview_timer_; Port* preview_port_; MessagePreviewWidget* preview_widget_; }; } // namespace csapex #endif // GRAPH_VIEW_H
cogsys-tuebingen/csapex
src/csapex_qt/include/csapex/view/designer/graph_view.h
C
bsd-3-clause
9,266
/* * Copyright (C) 2010, 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #if ENABLE(VIDEO) #include "FullscreenVideoController.h" #include "WebKitDLL.h" #include "WebView.h" #include <ApplicationServices/ApplicationServices.h> #include <WebCore/BitmapInfo.h> #include <WebCore/Chrome.h> #include <WebCore/Font.h> #include <WebCore/FontSelector.h> #include <WebCore/GraphicsContext.h> #include <WebCore/HWndDC.h> #include <WebCore/Page.h> #include <WebCore/PlatformCALayer.h> #include <WebCore/TextRun.h> #include <WebKitSystemInterface/WebKitSystemInterface.h> #include <windowsx.h> #include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> #include <wtf/StdLibExtras.h> using namespace std; using namespace WebCore; static const float timerInterval = 0.033; // HUD Size static const int windowHeight = 59; static const int windowWidth = 438; // Margins and button sizes static const int margin = 9; static const int marginTop = 9; static const int buttonSize = 25; static const int buttonMiniSize = 16; static const int volumeSliderWidth = 50; static const int timeSliderWidth = 310; static const int sliderHeight = 8; static const int volumeSliderButtonSize = 10; static const int timeSliderButtonSize = 8; static const int textSize = 11; static const float initialHUDPositionY = 0.9; // Initial Y position of HUD in percentage from top of screen // Background values static const int borderRadius = 12; static const int borderThickness = 2; // Colors static const unsigned int backgroundColor = 0xA0202020; static const unsigned int borderColor = 0xFFA0A0A0; static const unsigned int sliderGutterColor = 0xFF141414; static const unsigned int sliderButtonColor = 0xFF808080; static const unsigned int textColor = 0xFFFFFFFF; HUDButton::HUDButton(HUDButtonType type, const IntPoint& position) : HUDWidget(IntRect(position, IntSize())) , m_type(type) , m_showAltButton(false) { const char* buttonResource = 0; const char* buttonResourceAlt = 0; switch (m_type) { case PlayPauseButton: buttonResource = "fsVideoPlay"; buttonResourceAlt = "fsVideoPause"; break; case TimeSliderButton: break; case VolumeUpButton: buttonResource = "fsVideoAudioVolumeHigh"; break; case VolumeSliderButton: break; case VolumeDownButton: buttonResource = "fsVideoAudioVolumeLow"; break; case ExitFullscreenButton: buttonResource = "fsVideoExitFullscreen"; break; } if (buttonResource) { m_buttonImage = Image::loadPlatformResource(buttonResource); m_rect.setWidth(m_buttonImage->width()); m_rect.setHeight(m_buttonImage->height()); } if (buttonResourceAlt) m_buttonImageAlt = Image::loadPlatformResource(buttonResourceAlt); } void HUDButton::draw(GraphicsContext& context) { Image* image = (m_showAltButton && m_buttonImageAlt) ? m_buttonImageAlt.get() : m_buttonImage.get(); context.drawImage(image, ColorSpaceDeviceRGB, m_rect.location()); } HUDSlider::HUDSlider(HUDSliderButtonShape shape, int buttonSize, const IntRect& rect) : HUDWidget(rect) , m_buttonShape(shape) , m_buttonSize(buttonSize) , m_buttonPosition(0) , m_dragStartOffset(0) { } void HUDSlider::draw(GraphicsContext& context) { // Draw gutter IntSize radius(m_rect.height() / 2, m_rect.height() / 2); context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), ColorSpaceDeviceRGB); // Draw button context.setStrokeColor(Color(sliderButtonColor), ColorSpaceDeviceRGB); context.setFillColor(Color(sliderButtonColor), ColorSpaceDeviceRGB); if (m_buttonShape == RoundButton) { context.drawEllipse(IntRect(m_rect.location().x() + m_buttonPosition, m_rect.location().y() - (m_buttonSize - m_rect.height()) / 2, m_buttonSize, m_buttonSize)); return; } // Draw a diamond FloatPoint points[4]; float half = static_cast<float>(m_buttonSize) / 2; points[0].setX(m_rect.location().x() + m_buttonPosition + half); points[0].setY(m_rect.location().y()); points[1].setX(m_rect.location().x() + m_buttonPosition + m_buttonSize); points[1].setY(m_rect.location().y() + half); points[2].setX(m_rect.location().x() + m_buttonPosition + half); points[2].setY(m_rect.location().y() + m_buttonSize); points[3].setX(m_rect.location().x() + m_buttonPosition); points[3].setY(m_rect.location().y() + half); context.drawConvexPolygon(4, points, true); } void HUDSlider::drag(const IntPoint& point, bool start) { if (start) { // When we start, we need to snap the slider position to the x position if we clicked the gutter. // But if we click the button, we need to drag relative to where we clicked down. We only need // to check X because we would not even get here unless Y were already inside. int relativeX = point.x() - m_rect.location().x(); if (relativeX >= m_buttonPosition && relativeX <= m_buttonPosition + m_buttonSize) m_dragStartOffset = point.x() - m_buttonPosition; else m_dragStartOffset = m_rect.location().x() + m_buttonSize / 2; } m_buttonPosition = max(0, min(m_rect.width() - m_buttonSize, point.x() - m_dragStartOffset)); } #if USE(ACCELERATED_COMPOSITING) class FullscreenVideoController::LayerClient : public WebCore::PlatformCALayerClient { public: LayerClient(FullscreenVideoController* parent) : m_parent(parent) { } private: virtual void platformCALayerLayoutSublayersOfLayer(PlatformCALayer*); virtual bool platformCALayerRespondsToLayoutChanges() const { return true; } virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime) { } virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesBottomUp; } virtual void platformCALayerPaintContents(GraphicsContext&, const IntRect& inClip) { } virtual bool platformCALayerShowDebugBorders() const { return false; } virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const { return false; } virtual int platformCALayerIncrementRepaintCount() { return 0; } virtual bool platformCALayerContentsOpaque() const { return false; } virtual bool platformCALayerDrawsContent() const { return false; } virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { } virtual void platformCALayerDidCreateTiles(const Vector<FloatRect>&) { } virtual float platformCALayerDeviceScaleFactor() { return 1; } FullscreenVideoController* m_parent; }; void FullscreenVideoController::LayerClient::platformCALayerLayoutSublayersOfLayer(PlatformCALayer* layer) { ASSERT_ARG(layer, layer == m_parent->m_rootChild); HTMLMediaElement* mediaElement = m_parent->m_mediaElement.get(); if (!mediaElement) return; PlatformCALayer* videoLayer = PlatformCALayer::platformCALayer(mediaElement->platformLayer()); if (!videoLayer || videoLayer->superlayer() != layer) return; FloatRect layerBounds = layer->bounds(); FloatSize videoSize = mediaElement->player()->naturalSize(); float scaleFactor; if (videoSize.aspectRatio() > layerBounds.size().aspectRatio()) scaleFactor = layerBounds.width() / videoSize.width(); else scaleFactor = layerBounds.height() / videoSize.height(); videoSize.scale(scaleFactor); // Calculate the centered position based on the videoBounds and layerBounds: FloatPoint videoPosition; FloatPoint videoOrigin; videoOrigin.setX((layerBounds.width() - videoSize.width()) * 0.5); videoOrigin.setY((layerBounds.height() - videoSize.height()) * 0.5); videoLayer->setFrame(FloatRect(videoOrigin, videoSize)); } #endif FullscreenVideoController::FullscreenVideoController() : m_hudWindow(0) , m_playPauseButton(HUDButton::PlayPauseButton, IntPoint((windowWidth - buttonSize) / 2, marginTop)) , m_timeSliderButton(HUDButton::TimeSliderButton, IntPoint(0, 0)) , m_volumeUpButton(HUDButton::VolumeUpButton, IntPoint(margin + buttonMiniSize + volumeSliderWidth + buttonMiniSize / 2, marginTop + (buttonSize - buttonMiniSize) / 2)) , m_volumeSliderButton(HUDButton::VolumeSliderButton, IntPoint(0, 0)) , m_volumeDownButton(HUDButton::VolumeDownButton, IntPoint(margin, marginTop + (buttonSize - buttonMiniSize) / 2)) , m_exitFullscreenButton(HUDButton::ExitFullscreenButton, IntPoint(windowWidth - 2 * margin - buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2)) , m_volumeSlider(HUDSlider::RoundButton, volumeSliderButtonSize, IntRect(IntPoint(margin + buttonMiniSize, marginTop + (buttonSize - buttonMiniSize) / 2 + buttonMiniSize / 2 - sliderHeight / 2), IntSize(volumeSliderWidth, sliderHeight))) , m_timeSlider(HUDSlider::DiamondButton, timeSliderButtonSize, IntRect(IntPoint(windowWidth / 2 - timeSliderWidth / 2, windowHeight - margin - sliderHeight), IntSize(timeSliderWidth, sliderHeight))) , m_hitWidget(0) , m_movingWindow(false) , m_timer(this, &FullscreenVideoController::timerFired) #if USE(ACCELERATED_COMPOSITING) , m_layerClient(adoptPtr(new LayerClient(this))) , m_rootChild(PlatformCALayer::create(PlatformCALayer::LayerTypeLayer, m_layerClient.get())) #endif , m_fullscreenWindow(adoptPtr(new MediaPlayerPrivateFullscreenWindow(this))) { } FullscreenVideoController::~FullscreenVideoController() { #if USE(ACCELERATED_COMPOSITING) m_rootChild->setOwner(0); #endif } void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement) { if (mediaElement == m_mediaElement) return; m_mediaElement = mediaElement; if (!m_mediaElement) { // Can't do full-screen, just get out exitFullscreen(); } } void FullscreenVideoController::enterFullscreen() { if (!m_mediaElement) return; WebView* webView = kit(m_mediaElement->document().page()); HWND parentHwnd = webView ? webView->viewWindow() : 0; m_fullscreenWindow->createWindow(parentHwnd); ::ShowWindow(m_fullscreenWindow->hwnd(), SW_SHOW); #if USE(ACCELERATED_COMPOSITING) m_fullscreenWindow->setRootChildLayer(m_rootChild); PlatformCALayer* videoLayer = PlatformCALayer::platformCALayer(m_mediaElement->platformLayer()); m_rootChild->appendSublayer(videoLayer); m_rootChild->setNeedsLayout(); m_rootChild->setGeometryFlipped(1); #endif RECT windowRect; GetClientRect(m_fullscreenWindow->hwnd(), &windowRect); m_fullscreenSize.setWidth(windowRect.right - windowRect.left); m_fullscreenSize.setHeight(windowRect.bottom - windowRect.top); createHUDWindow(); } void FullscreenVideoController::exitFullscreen() { SetWindowLongPtr(m_hudWindow, 0, 0); if (m_fullscreenWindow) m_fullscreenWindow = nullptr; ASSERT(!IsWindow(m_hudWindow)); m_hudWindow = 0; // We previously ripped the mediaElement's platform layer out // of its orginial layer tree to display it in our fullscreen // window. Now, we need to get the layer back in its original // tree. // // As a side effect of setting the player to invisible/visible, // the player's layer will be recreated, and will be picked up // the next time the layer tree is synched. m_mediaElement->player()->setVisible(0); m_mediaElement->player()->setVisible(1); } bool FullscreenVideoController::canPlay() const { return m_mediaElement && m_mediaElement->canPlay(); } void FullscreenVideoController::play() { if (m_mediaElement) m_mediaElement->play(); } void FullscreenVideoController::pause() { if (m_mediaElement) m_mediaElement->pause(); } float FullscreenVideoController::volume() const { return m_mediaElement ? m_mediaElement->volume() : 0; } void FullscreenVideoController::setVolume(float volume) { if (m_mediaElement) { ExceptionCode ec; m_mediaElement->setVolume(volume, ec); } } float FullscreenVideoController::currentTime() const { return m_mediaElement ? m_mediaElement->currentTime() : 0; } void FullscreenVideoController::setCurrentTime(float value) { if (m_mediaElement) { ExceptionCode ec; m_mediaElement->setCurrentTime(value, ec); } } float FullscreenVideoController::duration() const { return m_mediaElement ? m_mediaElement->duration() : 0; } void FullscreenVideoController::beginScrubbing() { if (m_mediaElement) m_mediaElement->beginScrubbing(); } void FullscreenVideoController::endScrubbing() { if (m_mediaElement) m_mediaElement->endScrubbing(); } LRESULT FullscreenVideoController::fullscreenClientWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_CHAR: onChar(wParam); break; case WM_KEYDOWN: onKeyDown(wParam); break; case WM_LBUTTONDOWN: onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; case WM_MOUSEMOVE: onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; case WM_LBUTTONUP: onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; } return DefWindowProc(wnd, message, wParam, lParam); } static const LPCWSTR fullscreenVideeoHUDWindowClassName = L"fullscreenVideeoHUDWindowClass"; void FullscreenVideoController::registerHUDWindowClass() { static bool haveRegisteredHUDWindowClass; if (haveRegisteredHUDWindowClass) return; haveRegisteredHUDWindowClass = true; WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = hudWndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = sizeof(FullscreenVideoController*); wcex.hInstance = gInstance; wcex.hIcon = 0; wcex.hCursor = LoadCursor(0, IDC_ARROW); wcex.hbrBackground = 0; wcex.lpszMenuName = 0; wcex.lpszClassName = fullscreenVideeoHUDWindowClassName; wcex.hIconSm = 0; RegisterClassEx(&wcex); } void FullscreenVideoController::createHUDWindow() { m_hudPosition.setX((m_fullscreenSize.width() - windowWidth) / 2); m_hudPosition.setY(m_fullscreenSize.height() * initialHUDPositionY - windowHeight / 2); // Local variable that will hold the returned pixels. No need to cleanup this value. It // will get cleaned up when m_bitmap is destroyed in the dtor void* pixels; BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(windowWidth, windowHeight)); m_bitmap = adoptGDIObject(::CreateDIBSection(0, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0)); // Dirty the window so the HUD draws RECT clearRect = { m_hudPosition.x(), m_hudPosition.y(), m_hudPosition.x() + windowWidth, m_hudPosition.y() + windowHeight }; InvalidateRect(m_fullscreenWindow->hwnd(), &clearRect, true); m_playPauseButton.setShowAltButton(!canPlay()); m_volumeSlider.setValue(volume()); m_timeSlider.setValue(currentTime() / duration()); if (!canPlay()) m_timer.startRepeating(timerInterval); registerHUDWindowClass(); m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW, fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE, m_hudPosition.x(), m_hudPosition.y(), 0, 0, m_fullscreenWindow->hwnd(), 0, gInstance, 0); ASSERT(::IsWindow(m_hudWindow)); SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this)); draw(); } static String timeToString(float time) { if (!std::isfinite(time)) time = 0; int seconds = fabsf(time); int hours = seconds / (60 * 60); int minutes = (seconds / 60) % 60; seconds %= 60; if (hours) { if (hours > 9) return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds); } return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds); } void FullscreenVideoController::draw() { auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(HWndDC(m_hudWindow))); HGDIOBJ oldBitmap = SelectObject(bitmapDC.get(), m_bitmap.get()); GraphicsContext context(bitmapDC.get(), true); context.save(); // Draw the background IntSize outerRadius(borderRadius, borderRadius); IntRect outerRect(0, 0, windowWidth, windowHeight); IntSize innerRadius(borderRadius - borderThickness, borderRadius - borderThickness); IntRect innerRect(borderThickness, borderThickness, windowWidth - borderThickness * 2, windowHeight - borderThickness * 2); context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), ColorSpaceDeviceRGB); context.setCompositeOperation(CompositeCopy); context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), ColorSpaceDeviceRGB); // Draw the widgets m_playPauseButton.draw(context); m_volumeUpButton.draw(context); m_volumeSliderButton.draw(context); m_volumeDownButton.draw(context); m_timeSliderButton.draw(context); m_exitFullscreenButton.draw(context); m_volumeSlider.draw(context); m_timeSlider.draw(context); // Draw the text strings FontDescription desc; NONCLIENTMETRICS metrics; metrics.cbSize = sizeof(metrics); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0); desc.setOneFamily(metrics.lfSmCaptionFont.lfFaceName); desc.setComputedSize(textSize); Font font = Font(desc, 0, 0); font.update(0); String s; // The y positioning of these two text strings is tricky because they are so small. They // are currently positioned relative to the center of the slider and then down the font // height / 4 (which is actually half of font height /2), which positions the center of // the text at the center of the slider. // Left string s = timeToString(currentTime()); int fontHeight = font.fontMetrics().height(); TextRun leftText(s); context.setFillColor(Color(textColor), ColorSpaceDeviceRGB); context.drawText(font, leftText, IntPoint(windowWidth / 2 - timeSliderWidth / 2 - margin - font.width(leftText), windowHeight - margin - sliderHeight / 2 + fontHeight / 4)); // Right string s = timeToString(currentTime() - duration()); TextRun rightText(s); context.setFillColor(Color(textColor), ColorSpaceDeviceRGB); context.drawText(font, rightText, IntPoint(windowWidth / 2 + timeSliderWidth / 2 + margin, windowHeight - margin - sliderHeight / 2 + fontHeight / 4)); // Copy to the window BLENDFUNCTION blendFunction = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; SIZE size = { windowWidth, windowHeight }; POINT sourcePoint = {0, 0}; POINT destPoint = { m_hudPosition.x(), m_hudPosition.y() }; BOOL result = UpdateLayeredWindow(m_hudWindow, 0, &destPoint, &size, bitmapDC.get(), &sourcePoint, 0, &blendFunction, ULW_ALPHA); context.restore(); ::SelectObject(bitmapDC.get(), oldBitmap); } LRESULT FullscreenVideoController::hudWndProc(HWND wnd, UINT message, WPARAM wParam, LPARAM lParam) { LONG_PTR longPtr = GetWindowLongPtr(wnd, 0); FullscreenVideoController* controller = reinterpret_cast<FullscreenVideoController*>(longPtr); if (!controller) return DefWindowProc(wnd, message, wParam, lParam); switch (message) { case WM_CHAR: controller->onChar(wParam); break; case WM_KEYDOWN: controller->onKeyDown(wParam); break; case WM_LBUTTONDOWN: controller->onMouseDown(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; case WM_MOUSEMOVE: controller->onMouseMove(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; case WM_LBUTTONUP: controller->onMouseUp(IntPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); break; } return DefWindowProc(wnd, message, wParam, lParam); } void FullscreenVideoController::onChar(int c) { if (c == VK_ESCAPE) { if (m_mediaElement) m_mediaElement->exitFullscreen(); } else if (c == VK_SPACE) togglePlay(); } void FullscreenVideoController::onKeyDown(int virtualKey) { if (virtualKey == VK_ESCAPE) { if (m_mediaElement) m_mediaElement->exitFullscreen(); } } void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*) { // Update the time slider m_timeSlider.setValue(currentTime() / duration()); draw(); } void FullscreenVideoController::onMouseDown(const IntPoint& point) { IntPoint convertedPoint(fullscreenToHUDCoordinates(point)); // Don't bother hit testing if we're outside the bounds of the window if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight) return; m_hitWidget = 0; m_movingWindow = false; if (m_playPauseButton.hitTest(convertedPoint)) m_hitWidget = &m_playPauseButton; else if (m_exitFullscreenButton.hitTest(convertedPoint)) m_hitWidget = &m_exitFullscreenButton; else if (m_volumeUpButton.hitTest(convertedPoint)) m_hitWidget = &m_volumeUpButton; else if (m_volumeDownButton.hitTest(convertedPoint)) m_hitWidget = &m_volumeDownButton; else if (m_volumeSlider.hitTest(convertedPoint)) { m_hitWidget = &m_volumeSlider; m_volumeSlider.drag(convertedPoint, true); setVolume(m_volumeSlider.value()); } else if (m_timeSlider.hitTest(convertedPoint)) { m_hitWidget = &m_timeSlider; m_timeSlider.drag(convertedPoint, true); beginScrubbing(); setCurrentTime(m_timeSlider.value() * duration()); } // If we did not pick any of our widgets we are starting a window move if (!m_hitWidget) { m_moveOffset = convertedPoint; m_movingWindow = true; } draw(); } void FullscreenVideoController::onMouseMove(const IntPoint& point) { IntPoint convertedPoint(fullscreenToHUDCoordinates(point)); if (m_hitWidget) { m_hitWidget->drag(convertedPoint, false); if (m_hitWidget == &m_volumeSlider) setVolume(m_volumeSlider.value()); else if (m_hitWidget == &m_timeSlider) setCurrentTime(m_timeSlider.value() * duration()); draw(); } else if (m_movingWindow) m_hudPosition.move(convertedPoint.x() - m_moveOffset.x(), convertedPoint.y() - m_moveOffset.y()); } void FullscreenVideoController::onMouseUp(const IntPoint& point) { IntPoint convertedPoint(fullscreenToHUDCoordinates(point)); m_movingWindow = false; if (m_hitWidget) { if (m_hitWidget == &m_playPauseButton && m_playPauseButton.hitTest(convertedPoint)) togglePlay(); else if (m_hitWidget == &m_volumeUpButton && m_volumeUpButton.hitTest(convertedPoint)) { setVolume(1); m_volumeSlider.setValue(1); } else if (m_hitWidget == &m_volumeDownButton && m_volumeDownButton.hitTest(convertedPoint)) { setVolume(0); m_volumeSlider.setValue(0); } else if (m_hitWidget == &m_timeSlider) endScrubbing(); else if (m_hitWidget == &m_exitFullscreenButton && m_exitFullscreenButton.hitTest(convertedPoint)) { m_hitWidget = 0; if (m_mediaElement) m_mediaElement->exitFullscreen(); return; } } m_hitWidget = 0; draw(); } void FullscreenVideoController::togglePlay() { if (canPlay()) play(); else pause(); m_playPauseButton.setShowAltButton(!canPlay()); // Run a timer while the video is playing so we can keep the time // slider and time values up to date. if (!canPlay()) m_timer.startRepeating(timerInterval); else m_timer.stop(); draw(); } #endif
klim-iv/phantomjs-qt5
src/webkit/Source/WebKit/win/FullscreenVideoController.cpp
C++
bsd-3-clause
25,409
{-# LANGUAGE OverloadedStrings #-} module Network.IRC.Bot.Part.Channels where import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TVar (TVar, newTVar, readTVar, writeTVar) import Control.Monad.Trans (MonadIO(liftIO)) import Data.Monoid ((<>)) import Data.Set (Set, insert, toList) import Data.ByteString (ByteString) import Data.ByteString.Char8(unpack) import Network.IRC (Message(..), joinChan) import Network.IRC.Bot.BotMonad (BotMonad(..)) import Network.IRC.Bot.Log (LogLevel(..)) initChannelsPart :: (BotMonad m) => Set ByteString -> IO (TVar (Set ByteString), m ()) initChannelsPart chans = do channels <- atomically $ newTVar chans return (channels, channelsPart channels) channelsPart :: (BotMonad m) => TVar (Set ByteString) -> m () channelsPart channels = do msg <- askMessage let cmd = msg_command msg case cmd of "005" -> do chans <- liftIO $ atomically $ readTVar channels mapM_ doJoin (toList chans) _ -> return () where doJoin :: (BotMonad m) => ByteString -> m () doJoin chan = do sendMessage (joinChan chan) logM Normal $ "Joining room " <> chan joinChannel :: (BotMonad m) => ByteString -> TVar (Set ByteString) -> m () joinChannel chan channels = do liftIO $ atomically $ do cs <- readTVar channels writeTVar channels (insert chan cs) sendMessage (joinChan chan)
eigengrau/haskell-ircbot
Network/IRC/Bot/Part/Channels.hs
Haskell
bsd-3-clause
1,451
/****************************************************************************** Copyright (c) 2016, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ var m = require("mraa"); shared.pin = new m.Pwm(CONFIG.pin); shared.pin.period_ms(19); shared.pin.enable(true); done();
01org/intel-iot-services-orchestration-layer
node_modules/hope-demo/startkit/thing_bundle/servo/rotate/start.js
JavaScript
bsd-3-clause
1,778
/* * Copyright (c) 2014, Groupon, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of GROUPON nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 'use strict'; const download = require('./download'); const getLatestVersion = require('./version'); function downloadChromeDriver(binPath, tempPath) { return function withCallback(callback) { return getLatestVersion((error, metadata) => { if (error != null) { return callback(error); } /* eslint no-console: 0 */ console.log( '[testium] grabbing selenium chromedriver %s', metadata.version ); return download( binPath, tempPath, metadata.version, metadata.downloadUrl, callback ); }); }; } module.exports = downloadChromeDriver;
groupon/selenium-download
lib/chromedriver/index.js
JavaScript
bsd-3-clause
2,202
<?php require_once('libs/tcpdf/config/lang/eng.php'); require_once('libs/tcpdf/tcpdf.php'); // Extend the TCPDF class to create custom Header and Footer class MYPDF extends TCPDF { //Page header /*public function Header() { // Logo $image_file = K_PATH_IMAGES.'logo.jpg'; $this->Image($image_file, 3, 2, 35, 0, 'JPG', '', '', FALSE, 300, '', FALSE, FALSE, 1); //$this->Image($image_file, 3, 2, 30, '', 'JPG'); // Set font $this->SetFont('helvetica', 'B', 20); // Title $this->Ln(); $this->Cell(0, 30, '', 'B', false, 'C', 0, '', 0, false, 'M', 'M'); } // Page footer /* public function Footer() { // Position at 15 mm from bottom $this->SetY(-15); // Set font $this->SetFont('helvetica', 'I', 7); // Page number //$this->Cell(0, 10, 'Av. Mariscal Santa Cruz, Edif. Palacio de Comunicaciones Piso 20 - Telefono(2124935-40)-2124933'.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M'); $this->Cell(0, 10, 'Av. Mariscal Santa Cruz, Edif. Palacio de Comunicaciones Piso 20 - Telefono(2124935-40)-2124933, Fax: 212913 - Casilla 1868', 'T', false, 'C', 0, '', 0, false, 'T', 'M'); $this->Ln(2); $this->Cell(0, 15, 'La Paz - Bolivia', 0, false, 'C', 0, '', 0, false, 'T', 'M'); }*/ } // create new PDF document $pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, 'LETTER', true, 'UTF-8', false); $pdf->SetFont('Helvetica', 'B', 18); $pdf->AddPage(); $image_file = K_PATH_IMAGES.'logo.jpg'; $pdf->Image($image_file, 10, 10, 35, 20, 'JPG', '', '', FALSE, 300, '', FALSE, FALSE, 1); $pdf->SetFont('helvetica', '', 18); $pdf->SetX(45); //hoja de seguimiento $pdf->Cell(107, 20, 'HOJA DE SEGUIMIENTO INTERNO', 1,FALSE,'C'); $pdf->SetX(152); //logo entidad $pdf-> // $pdf->SetFont('helvetica', 'B', 10); $pdf->Cell(55, 5, 'NURI', 1,FALSE,'C'); $pdf->SetXY(152, 15); $pdf->SetFont('helvetica', 'B', 14); $pdf->Cell(55, 5, 'I/2011-02560', 'TR',FALSE,'C'); $pdf->SetXY(152, 15); //codigo de barra $pdf->write1DBarcode('I/2011-02560', 'C39', 154, 21, 51, 8, .8, array('align'=>'C'), 'N'); $pdf->SetXY(152, 15); $pdf->Cell(55, 15, '', 'BR',FALSE,'C'); $pdf->Ln(); //columna 1 $pdf->SetFont('helvetica', 'B', 10); $pdf->Cell(35, 10, 'Entidad', 1,FALSE,'L'); $pdf->SetFont('helvetica', '', 9); $pdf->Cell(107, 10, 'MINISTERIO DE DESARROLLO PRODUCTIVO Y ECONOMIA PLURAL', 1,FALSE,'L'); $pdf->Cell(55, 5, 'CITE', 1,FALSE,'C'); $pdf->SetXY(152, 35); $pdf->Cell(55, 5, 'INF/MDP/DGA/US/SIS/2011-0015', 1,FALSE,'C'); $pdf->Ln(); //REMITENTE $pdf->Cell(35, 10, 'Remitente', 1,FALSE,'L'); $pdf->Cell(107, 5, 'Nombre Remitente', 'TLR',FALSE,'L'); $pdf->SetFont('helvetica', 'B', 9); $pdf->SetXY(45, 45); $pdf->Cell(107, 5, 'Cargo Remitente', 'BLR',FALSE,'L'); $pdf->SetFont('helvetica', '', 9); $pdf->Ln(); $pdf->Cell(35, 10, 'Referencia', 1,FALSE,'L'); $pdf->SetFont('helvetica', '', 9); $pdf->MultiCell(162, 10, 'Refeencia con texto mayodeaskjdaskljdlmas asd as d as dasdasd as da sd', 1, 'L'); //fecha $pdf->SetXY(152, 40); $pdf->Cell(15, 5, 'Fecha', 1,FALSE,'R'); $pdf->Cell(40, 5, '15 de Diciembre de 2010', 1,FALSE,'R'); //hora $pdf->SetXY(152, 45); $pdf->Cell(15, 5, 'Hora', 1,FALSE,'R'); $pdf->Cell(40, 5, '15:00:00 PM', 1,FALSE,'R'); $pdf->Ln(15); $pdf->Cell(35, 5, 'Adjunto', 1,FALSE,'L'); $pdf->Cell(107, 5, 'DOCUMENTO', 'BLR',FALSE,'L'); $pdf->Cell(15, 5, 'N° Hojas', 'BLR',FALSE,'L'); $pdf->Cell(40, 5, '', 'BLR',FALSE,'L'); $pdf->Ln(); $pdf->Cell(35, 5, 'Accion', 1,FALSE,'L'); //sello de despacho //$pdf->SetXY(152, 15); $pdf->Cell(60, 40, 'Sello de despacho', 1,FALSE,'C'); $pdf->Cell(90, 40, 'Proceso', 1,FALSE,'C'); $pdf->SetXY(10, 40); $pdf->SetFont('helvetica', '', 6); $pdf->Ln(); $pdf->Cell(30, 5 , 'Accion Necesaria y Respuesta', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Preparar Respuesta', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Preparar Informe', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Hacer Seguimiento', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Para su conocimiento', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Para firma', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Despachar', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); $pdf->Ln(); $pdf->Cell(30, 5 , 'Archivar', 1,FALSE,'L'); $pdf->Cell(5, 5 , '', 1,FALSE,'L'); //columna 2 $pdf->SetXY(45, 30); $pdf->SetFont('helvetica', '', 9); // $pdf->Cell(107, 10, 'MINISTERIO DE DESARROLLO PRODUCTIVO Y ECONOMIA PLURAL', 1,FALSE,'L'); $pdf->SetXY(45, 40); $pdf->SetXY(45, 50); $pdf->SetXY(45, 60); //$this->Image($image_file, 3, 2, 30, '', 'JPG'); // Set font // Title $pdf->Ln(); $pdf->Cell(0, 30, '', 'B', false, 'C', 0, '', 0, false, 'M', 'M'); /* // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('Nicola Asuni'); $pdf->SetTitle('TCPDF Example 003'); $pdf->SetSubject('TCPDF Tutorial'); $pdf->SetKeywords('TCPDF, PDF, example, test, guide'); // set default header data $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); // set header and footer fonts $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); //set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf->setLanguageArray($l); */ // add a page try { $id=$_GET['id']; $dbh = new PDO('mysql:host=localhost;port=3306;dbname=paperwork', 'root', '', array( PDO::ATTR_PERSISTENT => false)); $stmt = $dbh->prepare("SELECT * FROM documentos d INNER JOIN tipos t ON d.id_tipo=t.id WHERE d.id='$id'"); // call the stored procedure $stmt->execute(); //echo "<B>outputting...</B><BR>"; while ($rs = $stmt->fetch(PDO::FETCH_OBJ)) { /*$pdf->SetFont('Helvetica', 'B', 16); $pdf->Cell(20,15, 'HOJA DE SEGUIMIENTO INTERNO','',0,'C'); $pdf->Ln(); $pdf->SetFont('Helvetica', 'B', 12); $pdf->Write(0, strtoupper($rs->codigo),'',0,'C'); $pdf->Ln(10); $pdf->SetFont('Helvetica', 'B', 11); $pdf->Cell(15, 5, 'A:'); $pdf->SetFont('Helvetica', '', 11); $pdf->Write(0, $rs->nombreDestinatario,'',0,'L'); $pdf->Ln(); $pdf->Cell(15, 5, ''); $pdf->SetFont('Helvetica', 'B', 11); $pdf->Write(0, $rs->cargoDestinatario,'',0,'L'); $pdf->Ln(10); if(($rs->via!=0)&&(trim($rs->nombreVia)!='')){ $pdf->SetFont('Helvetica', 'B', 11); $pdf->Cell(15, 5, 'Via:'); $pdf->SetFont('Helvetica', '', 11); $pdf->Write(0, $rs->nombreVia,'',0,'L'); $pdf->Ln(); $pdf->Cell(15, 5, ''); $pdf->SetFont('Helvetica', 'B', 11); $pdf->Write(0, $rs->cargoVia,'',0,'L'); $pdf->Ln(10); } $pdf->SetFont('Helvetica', 'B', 11); $pdf->Cell(15, 5, 'De:'); $pdf->SetFont('Helvetica', '', 11); $pdf->Write(0, $rs->nombreRemitente,'',0,'L'); $pdf->Ln(); $pdf->Cell(15, 5, ''); $pdf->SetFont('Helvetica', 'B', 11); $pdf->Write(0, $rs->cargoRemitente,'',0,'L'); $pdf->Ln(10); $pdf->Cell(15, 5, 'Fecha:'); $pdf->SetFont('Helvetica', '', 11); $mes=(int)date('m', $rs->fecha); $meses=array(1=>'Enero',2=>'Febrero',3=>'Marzo',4=>'Abril',5=>'Mayo',6=>'Junio',7=>'Julio',8=>'Agosto',9=>'Septiembre',10=>'Octubre',11=>'Noviembre',12=>'Diciembre'); $fecha=date('d',$rs->fecha).' de '.$meses[$mes].' de '.date('Y',$rs->fecha); $pdf->Write(0, $fecha,'',0,'L'); $pdf->Ln(10); $pdf->SetFont('Helvetica', 'B', 11); $pdf->Cell(15, 5, 'Ref:'); $pdf->SetFont('Helvetica', '', 11); $pdf->MultiCell(170,5, $rs->referencia,0,'L'); $pdf->Ln(10); $pdf->writeHTML($rs->contenido); $pdf->Ln(25); $pdf->SetFont('Helvetica', '', 6); $pdf->writeHTML('cc. '); $pdf->writeHTML(strtoupper($rs->copias)); /* $pdf->SetY(-5); // Set font $pdf->SetFont('helvetica', 'I', 7); $pdf->Write(0, $fecha,'',0,'L'); * */ } //echo "<BR><B>".date("r")."</B>"; } catch (PDOException $e) { print "Error!: " . $e->getMessage() . "<br/>"; die(); } //Close and output PDF document $pdf->Output('example_003.pdf', 'I'); //============================================================+ // END OF FILE //============================================================+
fredd-for/codice
hr.php
PHP
bsd-3-clause
10,051
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_ #include <set> #include <string> #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "chrome/browser/drive/drive_notification_observer.h" #include "chrome/browser/drive/drive_service_interface.h" #include "chrome/browser/sync_file_system/drive_backend/sync_engine_context.h" #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" #include "chrome/browser/sync_file_system/local_change_processor.h" #include "chrome/browser/sync_file_system/remote_file_sync_service.h" #include "net/base/network_change_notifier.h" class ExtensionServiceInterface; class SigninManagerBase; namespace base { class SequencedTaskRunner; } namespace drive { class DriveServiceInterface; class DriveNotificationManager; } namespace leveldb { class Env; } namespace sync_file_system { namespace drive_backend { class LocalToRemoteSyncer; class MetadataDatabase; class RemoteToLocalSyncer; class SyncEngineInitializer; class SyncEngine : public RemoteFileSyncService, public LocalChangeProcessor, public SyncTaskManager::Client, public drive::DriveNotificationObserver, public drive::DriveServiceObserver, public net::NetworkChangeNotifier::NetworkChangeObserver { public: typedef Observer SyncServiceObserver; static scoped_ptr<SyncEngine> CreateForBrowserContext( content::BrowserContext* context); static void AppendDependsOnFactories( std::set<BrowserContextKeyedServiceFactory*>* factories); virtual ~SyncEngine(); void Initialize(); // RemoteFileSyncService overrides. virtual void AddServiceObserver(SyncServiceObserver* observer) OVERRIDE; virtual void AddFileStatusObserver(FileStatusObserver* observer) OVERRIDE; virtual void RegisterOrigin( const GURL& origin, const SyncStatusCallback& callback) OVERRIDE; virtual void EnableOrigin( const GURL& origin, const SyncStatusCallback& callback) OVERRIDE; virtual void DisableOrigin( const GURL& origin, const SyncStatusCallback& callback) OVERRIDE; virtual void UninstallOrigin( const GURL& origin, UninstallFlag flag, const SyncStatusCallback& callback) OVERRIDE; virtual void ProcessRemoteChange(const SyncFileCallback& callback) OVERRIDE; virtual void SetRemoteChangeProcessor( RemoteChangeProcessor* processor) OVERRIDE; virtual LocalChangeProcessor* GetLocalChangeProcessor() OVERRIDE; virtual bool IsConflicting(const fileapi::FileSystemURL& url) OVERRIDE; virtual RemoteServiceState GetCurrentState() const OVERRIDE; virtual void GetOriginStatusMap(OriginStatusMap* status_map) OVERRIDE; virtual scoped_ptr<base::ListValue> DumpFiles(const GURL& origin) OVERRIDE; virtual scoped_ptr<base::ListValue> DumpDatabase() OVERRIDE; virtual void SetSyncEnabled(bool enabled) OVERRIDE; virtual SyncStatusCode SetDefaultConflictResolutionPolicy( ConflictResolutionPolicy policy) OVERRIDE; virtual SyncStatusCode SetConflictResolutionPolicy( const GURL& origin, ConflictResolutionPolicy policy) OVERRIDE; virtual ConflictResolutionPolicy GetDefaultConflictResolutionPolicy() const OVERRIDE; virtual ConflictResolutionPolicy GetConflictResolutionPolicy( const GURL& origin) const OVERRIDE; virtual void GetRemoteVersions( const fileapi::FileSystemURL& url, const RemoteVersionsCallback& callback) OVERRIDE; virtual void DownloadRemoteVersion( const fileapi::FileSystemURL& url, const std::string& version_id, const DownloadVersionCallback& callback) OVERRIDE; virtual void PromoteDemotedChanges() OVERRIDE; // LocalChangeProcessor overrides. virtual void ApplyLocalChange( const FileChange& local_change, const base::FilePath& local_path, const SyncFileMetadata& local_metadata, const fileapi::FileSystemURL& url, const SyncStatusCallback& callback) OVERRIDE; // SyncTaskManager::Client overrides. virtual void MaybeScheduleNextTask() OVERRIDE; virtual void NotifyLastOperationStatus(SyncStatusCode sync_status, bool used_network) OVERRIDE; // drive::DriveNotificationObserver overrides. virtual void OnNotificationReceived() OVERRIDE; virtual void OnPushNotificationEnabled(bool enabled) OVERRIDE; // drive::DriveServiceObserver overrides. virtual void OnReadyToSendRequests() OVERRIDE; virtual void OnRefreshTokenInvalid() OVERRIDE; // net::NetworkChangeNotifier::NetworkChangeObserver overrides. virtual void OnNetworkChanged( net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; drive::DriveServiceInterface* GetDriveService(); drive::DriveUploaderInterface* GetDriveUploader(); MetadataDatabase* GetMetadataDatabase(); RemoteChangeProcessor* GetRemoteChangeProcessor(); base::SequencedTaskRunner* GetBlockingTaskRunner(); private: friend class DriveBackendSyncTest; friend class SyncEngineTest; SyncEngine(const base::FilePath& base_dir, base::SequencedTaskRunner* task_runner, scoped_ptr<drive::DriveServiceInterface> drive_service, scoped_ptr<drive::DriveUploaderInterface> drive_uploader, drive::DriveNotificationManager* notification_manager, ExtensionServiceInterface* extension_service, SigninManagerBase* signin_manager, leveldb::Env* env_override); void DoDisableApp(const std::string& app_id, const SyncStatusCallback& callback); void DoEnableApp(const std::string& app_id, const SyncStatusCallback& callback); void PostInitializeTask(); void DidInitialize(SyncEngineInitializer* initializer, SyncStatusCode status); void DidProcessRemoteChange(RemoteToLocalSyncer* syncer, const SyncFileCallback& callback, SyncStatusCode status); void DidApplyLocalChange(LocalToRemoteSyncer* syncer, const SyncStatusCallback& callback, SyncStatusCode status); void MaybeStartFetchChanges(); void DidResolveConflict(SyncStatusCode status); void DidFetchChanges(SyncStatusCode status); void UpdateServiceStateFromSyncStatusCode(SyncStatusCode state, bool used_network); void UpdateServiceState(RemoteServiceState state, const std::string& description); void UpdateRegisteredApps(); base::FilePath base_dir_; base::FilePath temporary_file_dir_; leveldb::Env* env_override_; // These external services are not owned by SyncEngine. // The owner of the SyncEngine is responsible for their lifetime. // I.e. the owner should declare the dependency explicitly by calling // KeyedService::DependsOn(). drive::DriveNotificationManager* notification_manager_; ExtensionServiceInterface* extension_service_; SigninManagerBase* signin_manager_; ObserverList<SyncServiceObserver> service_observers_; ObserverList<FileStatusObserver> file_status_observers_; RemoteServiceState service_state_; bool should_check_conflict_; bool should_check_remote_change_; bool listing_remote_changes_; base::TimeTicks time_to_check_changes_; bool sync_enabled_; ConflictResolutionPolicy default_conflict_resolution_policy_; bool network_available_; scoped_ptr<SyncTaskManager> task_manager_; scoped_ptr<SyncEngineContext> context_; base::WeakPtrFactory<SyncEngine> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(SyncEngine); }; } // namespace drive_backend } // namespace sync_file_system #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_H_
patrickm/chromium.src
chrome/browser/sync_file_system/drive_backend/sync_engine.h
C
bsd-3-clause
8,094
/******************************************************************************* * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/license ******************************************************************************/ /** * */ package org.caleydo.core.view.opengl.util.connectionline; /** * Abstract base class for all attribute renderers that are supposed to be * rendered at one end of the connection line. Specifies, which line end to use. * * @author Christian * */ public abstract class ALineEndRenderer implements IConnectionLineAttributeRenderer { /** * Specifies whether the attribute shall be rendered at the first or last * line point. */ protected boolean isLineEnd1; /** * @param isLineEnd1 * see {@link #isLineEnd1} */ public ALineEndRenderer(boolean isLineEnd1) { this.isLineEnd1 = isLineEnd1; } /** * @param isLineEnd1 * setter, see {@link #isLineEnd1} */ public void setLineEnd1(boolean isLineEnd1) { this.isLineEnd1 = isLineEnd1; } /** * @return the isLineEnd1, see {@link #isLineEnd1} */ public boolean isLineEnd1() { return isLineEnd1; } }
Caleydo/caleydo
org.caleydo.ui/src/org/caleydo/core/view/opengl/util/connectionline/ALineEndRenderer.java
Java
bsd-3-clause
1,286
vtk_module(vtkIOMINC GROUPS StandAlone DEPENDS vtkIOImage vtkCommonExecutionModel vtkRenderingCore vtkFiltersHybrid vtknetcdf )
cjh1/VTK
IO/MINC/module.cmake
CMake
bsd-3-clause
158
require "test_helper" class CheckForZurbTest < Capybara::Rails::TestCase feature "Using Zerb for styling" do scenario "check to see if zerb is loaded" do visit posts_path page.body.must_include "columns" page.source.must_include "foundation_and_overrides.css" end end end
jbsmith86/JoelByronSmith
test/features/check_for_zurb_test.rb
Ruby
bsd-3-clause
303
class Tweet < ActiveRecord::Base belongs_to :user end
bounceflick/Kut
app/models/tweet.rb
Ruby
bsd-3-clause
57
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package http import ( "bufio" "bytes" "errors" "fmt" "io" "io/ioutil" "net/textproto" "sort" "strconv" "strings" "sync" "github.com/renzuinc/goproxy/http/internal" ) // ErrLineTooLong is returned when reading request or response bodies // with malformed chunked encoding. var ErrLineTooLong = internal.ErrLineTooLong type errorReader struct { err error } func (r *errorReader) Read(p []byte) (n int, err error) { return 0, r.err } // transferWriter inspects the fields of a user-supplied Request or Response, // sanitizes them without changing the user object and provides methods for // writing the respective header, body and trailer in wire format. type transferWriter struct { Method string Body io.Reader BodyCloser io.Closer ResponseToHEAD bool ContentLength int64 // -1 means unknown, 0 means exactly none Close bool TransferEncoding []string Trailer Header } func newTransferWriter(r interface{}) (t *transferWriter, err error) { t = &transferWriter{} // Extract relevant fields atLeastHTTP11 := false switch rr := r.(type) { case *Request: if rr.ContentLength != 0 && rr.Body == nil { return nil, fmt.Errorf("http: Request.ContentLength=%d with nil Body", rr.ContentLength) } t.Method = rr.Method t.Body = rr.Body t.BodyCloser = rr.Body t.ContentLength = rr.ContentLength t.Close = rr.Close t.TransferEncoding = rr.TransferEncoding t.Trailer = rr.Trailer atLeastHTTP11 = rr.ProtoAtLeast(1, 1) if t.Body != nil && len(t.TransferEncoding) == 0 && atLeastHTTP11 { if t.ContentLength == 0 { // Test to see if it's actually zero or just unset. var buf [1]byte n, rerr := io.ReadFull(t.Body, buf[:]) if rerr != nil && rerr != io.EOF { t.ContentLength = -1 t.Body = &errorReader{rerr} } else if n == 1 { // Oh, guess there is data in this Body Reader after all. // The ContentLength field just wasn't set. // Stich the Body back together again, re-attaching our // consumed byte. t.ContentLength = -1 t.Body = io.MultiReader(bytes.NewReader(buf[:]), t.Body) } else { // Body is actually empty. t.Body = nil t.BodyCloser = nil } } if t.ContentLength < 0 { t.TransferEncoding = []string{"chunked"} } } case *Response: if rr.Request != nil { t.Method = rr.Request.Method } t.Body = rr.Body t.BodyCloser = rr.Body t.ContentLength = rr.ContentLength t.Close = rr.Close t.TransferEncoding = rr.TransferEncoding t.Trailer = rr.Trailer atLeastHTTP11 = rr.ProtoAtLeast(1, 1) t.ResponseToHEAD = noBodyExpected(t.Method) } // Sanitize Body,ContentLength,TransferEncoding if t.ResponseToHEAD { t.Body = nil if chunked(t.TransferEncoding) { t.ContentLength = -1 } } else { if !atLeastHTTP11 || t.Body == nil { t.TransferEncoding = nil } if chunked(t.TransferEncoding) { t.ContentLength = -1 } else if t.Body == nil { // no chunking, no body t.ContentLength = 0 } } // Sanitize Trailer if !chunked(t.TransferEncoding) { t.Trailer = nil } return t, nil } func noBodyExpected(requestMethod string) bool { return requestMethod == "HEAD" } func (t *transferWriter) shouldSendContentLength() bool { if chunked(t.TransferEncoding) { return false } if t.ContentLength > 0 { return true } // Many servers expect a Content-Length for these methods if t.Method == "POST" || t.Method == "PUT" { return true } if t.ContentLength == 0 && isIdentity(t.TransferEncoding) { return true } return false } func (t *transferWriter) WriteHeader(w io.Writer) error { if t.Close { if _, err := io.WriteString(w, "Connection: close\r\n"); err != nil { return err } } // Write Content-Length and/or Transfer-Encoding whose values are a // function of the sanitized field triple (Body, ContentLength, // TransferEncoding) if t.shouldSendContentLength() { if _, err := io.WriteString(w, "Content-Length: "); err != nil { return err } if _, err := io.WriteString(w, strconv.FormatInt(t.ContentLength, 10)+"\r\n"); err != nil { return err } } else if chunked(t.TransferEncoding) { if _, err := io.WriteString(w, "Transfer-Encoding: chunked\r\n"); err != nil { return err } } // Write Trailer header if t.Trailer != nil { keys := make([]string, 0, len(t.Trailer)) for k := range t.Trailer { k = CanonicalHeaderKey(k) switch k { case "Transfer-Encoding", "Trailer", "Content-Length": return &badStringError{"invalid Trailer key", k} } keys = append(keys, k) } if len(keys) > 0 { sort.Strings(keys) // TODO: could do better allocation-wise here, but trailers are rare, // so being lazy for now. if _, err := io.WriteString(w, "Trailer: "+strings.Join(keys, ",")+"\r\n"); err != nil { return err } } } return nil } func (t *transferWriter) WriteBody(w io.Writer) error { var err error var ncopy int64 // Write body if t.Body != nil { if chunked(t.TransferEncoding) { cw := internal.NewChunkedWriter(w) _, err = io.Copy(cw, t.Body) if err == nil { err = cw.Close() } } else if t.ContentLength == -1 { ncopy, err = io.Copy(w, t.Body) } else { ncopy, err = io.Copy(w, io.LimitReader(t.Body, t.ContentLength)) if err != nil { return err } var nextra int64 nextra, err = io.Copy(ioutil.Discard, t.Body) ncopy += nextra } if err != nil { return err } if err = t.BodyCloser.Close(); err != nil { return err } } if !t.ResponseToHEAD && t.ContentLength != -1 && t.ContentLength != ncopy { return fmt.Errorf("http: ContentLength=%d with Body length %d", t.ContentLength, ncopy) } // TODO(petar): Place trailer writer code here. if chunked(t.TransferEncoding) { // Write Trailer header if t.Trailer != nil { if err := t.Trailer.Write(w); err != nil { return err } } // Last chunk, empty trailer _, err = io.WriteString(w, "\r\n") } return err } type transferReader struct { // Input Header Header StatusCode int RequestMethod string ProtoMajor int ProtoMinor int // Output Body io.ReadCloser ContentLength int64 TransferEncoding []string Close bool Trailer Header } // bodyAllowedForStatus reports whether a given response status code // permits a body. See RFC2616, section 4.4. func bodyAllowedForStatus(status int) bool { switch { case status >= 100 && status <= 199: return false case status == 204: return false case status == 304: return false } return true } var ( suppressedHeaders304 = []string{"Content-Type", "Content-Length", "Transfer-Encoding"} suppressedHeadersNoBody = []string{"Content-Length", "Transfer-Encoding"} ) func suppressedHeaders(status int) []string { switch { case status == 304: // RFC 2616 section 10.3.5: "the response MUST NOT include other entity-headers" return suppressedHeaders304 case !bodyAllowedForStatus(status): return suppressedHeadersNoBody } return nil } // msg is *Request or *Response. func readTransfer(msg interface{}, r *bufio.Reader) (err error) { t := &transferReader{RequestMethod: "GET"} // Unify input isResponse := false switch rr := msg.(type) { case *Response: t.Header = rr.Header t.StatusCode = rr.StatusCode t.ProtoMajor = rr.ProtoMajor t.ProtoMinor = rr.ProtoMinor t.Close = shouldClose(t.ProtoMajor, t.ProtoMinor, t.Header, true) isResponse = true if rr.Request != nil { t.RequestMethod = rr.Request.Method } case *Request: t.Header = rr.Header t.ProtoMajor = rr.ProtoMajor t.ProtoMinor = rr.ProtoMinor // Transfer semantics for Requests are exactly like those for // Responses with status code 200, responding to a GET method t.StatusCode = 200 default: panic("unexpected type") } // Default to HTTP/1.1 if t.ProtoMajor == 0 && t.ProtoMinor == 0 { t.ProtoMajor, t.ProtoMinor = 1, 1 } // Transfer encoding, content length t.TransferEncoding, err = fixTransferEncoding(t.RequestMethod, t.Header) if err != nil { return err } realLength, err := fixLength(isResponse, t.StatusCode, t.RequestMethod, t.Header, t.TransferEncoding) if err != nil { return err } if isResponse && t.RequestMethod == "HEAD" { if n, err := parseContentLength(t.Header.get("Content-Length")); err != nil { return err } else { t.ContentLength = n } } else { t.ContentLength = realLength } // Trailer t.Trailer, err = fixTrailer(t.Header, t.TransferEncoding) if err != nil { return err } // If there is no Content-Length or chunked Transfer-Encoding on a *Response // and the status is not 1xx, 204 or 304, then the body is unbounded. // See RFC2616, section 4.4. switch msg.(type) { case *Response: if realLength == -1 && !chunked(t.TransferEncoding) && bodyAllowedForStatus(t.StatusCode) { // Unbounded body. t.Close = true } } // Prepare body reader. ContentLength < 0 means chunked encoding // or close connection when finished, since multipart is not supported yet switch { case chunked(t.TransferEncoding): if noBodyExpected(t.RequestMethod) { t.Body = eofReader } else { t.Body = &body{src: internal.NewChunkedReader(r), hdr: msg, r: r, closing: t.Close} } case realLength == 0: t.Body = eofReader case realLength > 0: t.Body = &body{src: io.LimitReader(r, realLength), closing: t.Close} default: // realLength < 0, i.e. "Content-Length" not mentioned in header if t.Close { // Close semantics (i.e. HTTP/1.0) t.Body = &body{src: r, closing: t.Close} } else { // Persistent connection (i.e. HTTP/1.1) t.Body = eofReader } } // Unify output switch rr := msg.(type) { case *Request: rr.Body = t.Body rr.ContentLength = t.ContentLength rr.TransferEncoding = t.TransferEncoding rr.Close = t.Close rr.Trailer = t.Trailer case *Response: rr.Body = t.Body rr.ContentLength = t.ContentLength rr.TransferEncoding = t.TransferEncoding rr.Close = t.Close rr.Trailer = t.Trailer } return nil } // Checks whether chunked is part of the encodings stack func chunked(te []string) bool { return len(te) > 0 && te[0] == "chunked" } // Checks whether the encoding is explicitly "identity". func isIdentity(te []string) bool { return len(te) == 1 && te[0] == "identity" } // Sanitize transfer encoding func fixTransferEncoding(requestMethod string, header Header) ([]string, error) { raw, present := header["Transfer-Encoding"] if !present { return nil, nil } delete(header, "Transfer-Encoding") encodings := strings.Split(raw[0], ",") te := make([]string, 0, len(encodings)) // TODO: Even though we only support "identity" and "chunked" // encodings, the loop below is designed with foresight. One // invariant that must be maintained is that, if present, // chunked encoding must always come first. for _, encoding := range encodings { encoding = strings.ToLower(strings.TrimSpace(encoding)) // "identity" encoding is not recorded if encoding == "identity" { break } if encoding != "chunked" { return nil, &badStringError{"unsupported transfer encoding", encoding} } te = te[0 : len(te)+1] te[len(te)-1] = encoding } if len(te) > 1 { return nil, &badStringError{"too many transfer encodings", strings.Join(te, ",")} } if len(te) > 0 { // Chunked encoding trumps Content-Length. See RFC 2616 // Section 4.4. Currently len(te) > 0 implies chunked // encoding. delete(header, "Content-Length") return te, nil } return nil, nil } // Determine the expected body length, using RFC 2616 Section 4.4. This // function is not a method, because ultimately it should be shared by // ReadResponse and ReadRequest. func fixLength(isResponse bool, status int, requestMethod string, header Header, te []string) (int64, error) { // Logic based on response type or status if noBodyExpected(requestMethod) { return 0, nil } if status/100 == 1 { return 0, nil } switch status { case 204, 304: return 0, nil } // Logic based on Transfer-Encoding if chunked(te) { return -1, nil } // Logic based on Content-Length cl := strings.TrimSpace(header.get("Content-Length")) if cl != "" { n, err := parseContentLength(cl) if err != nil { return -1, err } return n, nil } else { header.Del("Content-Length") } if !isResponse && requestMethod == "GET" { // RFC 2616 doesn't explicitly permit nor forbid an // entity-body on a GET request so we permit one if // declared, but we default to 0 here (not -1 below) // if there's no mention of a body. return 0, nil } // Body-EOF logic based on other methods (like closing, or chunked coding) return -1, nil } // Determine whether to hang up after sending a request and body, or // receiving a response and body // 'header' is the request headers func shouldClose(major, minor int, header Header, removeCloseHeader bool) bool { if major < 1 { return true } else if major == 1 && minor == 0 { if !strings.Contains(strings.ToLower(header.get("Connection")), "keep-alive") { return true } return false } else { // TODO: Should split on commas, toss surrounding white space, // and check each field. if strings.ToLower(header.get("Connection")) == "close" { if removeCloseHeader { header.Del("Connection") } return true } } return false } // Parse the trailer header func fixTrailer(header Header, te []string) (Header, error) { raw := header.get("Trailer") if raw == "" { return nil, nil } header.Del("Trailer") trailer := make(Header) keys := strings.Split(raw, ",") for _, key := range keys { key = CanonicalHeaderKey(strings.TrimSpace(key)) switch key { case "Transfer-Encoding", "Trailer", "Content-Length": return nil, &badStringError{"bad trailer key", key} } trailer[key] = nil } if len(trailer) == 0 { return nil, nil } if !chunked(te) { // Trailer and no chunking return nil, ErrUnexpectedTrailer } return trailer, nil } // body turns a Reader into a ReadCloser. // Close ensures that the body has been fully read // and then reads the trailer if necessary. type body struct { src io.Reader hdr interface{} // non-nil (Response or Request) value means read trailer r *bufio.Reader // underlying wire-format reader for the trailer closing bool // is the connection to be closed after reading body? mu sync.Mutex // guards closed, and calls to Read and Close closed bool } // ErrBodyReadAfterClose is returned when reading a Request or Response // Body after the body has been closed. This typically happens when the body is // read after an HTTP Handler calls WriteHeader or Write on its // ResponseWriter. var ErrBodyReadAfterClose = errors.New("http: invalid Read on closed Body") func (b *body) Read(p []byte) (n int, err error) { b.mu.Lock() defer b.mu.Unlock() if b.closed { return 0, ErrBodyReadAfterClose } return b.readLocked(p) } // Must hold b.mu. func (b *body) readLocked(p []byte) (n int, err error) { n, err = b.src.Read(p) if err == io.EOF { // Chunked case. Read the trailer. if b.hdr != nil { if e := b.readTrailer(); e != nil { err = e } b.hdr = nil } else { // If the server declared the Content-Length, our body is a LimitedReader // and we need to check whether this EOF arrived early. if lr, ok := b.src.(*io.LimitedReader); ok && lr.N > 0 { err = io.ErrUnexpectedEOF } } } // If we can return an EOF here along with the read data, do // so. This is optional per the io.Reader contract, but doing // so helps the HTTP transport code recycle its connection // earlier (since it will see this EOF itself), even if the // client doesn't do future reads or Close. if err == nil && n > 0 { if lr, ok := b.src.(*io.LimitedReader); ok && lr.N == 0 { err = io.EOF } } return n, err } var ( singleCRLF = []byte("\r\n") doubleCRLF = []byte("\r\n\r\n") ) func seeUpcomingDoubleCRLF(r *bufio.Reader) bool { for peekSize := 4; ; peekSize++ { // This loop stops when Peek returns an error, // which it does when r's buffer has been filled. buf, err := r.Peek(peekSize) if bytes.HasSuffix(buf, doubleCRLF) { return true } if err != nil { break } } return false } var errTrailerEOF = errors.New("http: unexpected EOF reading trailer") func (b *body) readTrailer() error { // The common case, since nobody uses trailers. buf, err := b.r.Peek(2) if bytes.Equal(buf, singleCRLF) { b.r.ReadByte() b.r.ReadByte() return nil } if len(buf) < 2 { return errTrailerEOF } if err != nil { return err } // Make sure there's a header terminator coming up, to prevent // a DoS with an unbounded size Trailer. It's not easy to // slip in a LimitReader here, as textproto.NewReader requires // a concrete *bufio.Reader. Also, we can't get all the way // back up to our conn's LimitedReader that *might* be backing // this bufio.Reader. Instead, a hack: we iteratively Peek up // to the bufio.Reader's max size, looking for a double CRLF. // This limits the trailer to the underlying buffer size, typically 4kB. if !seeUpcomingDoubleCRLF(b.r) { return errors.New("http: suspiciously long trailer after chunked body") } hdr, err := textproto.NewReader(b.r).ReadMIMEHeader() if err != nil { if err == io.EOF { return errTrailerEOF } return err } switch rr := b.hdr.(type) { case *Request: mergeSetHeader(&rr.Trailer, Header(hdr)) case *Response: mergeSetHeader(&rr.Trailer, Header(hdr)) } return nil } func mergeSetHeader(dst *Header, src Header) { if *dst == nil { *dst = src return } for k, vv := range src { (*dst)[k] = vv } } func (b *body) Close() error { b.mu.Lock() defer b.mu.Unlock() if b.closed { return nil } var err error switch { case b.hdr == nil && b.closing: // no trailer and closing the connection next. // no point in reading to EOF. default: // Fully consume the body, which will also lead to us reading // the trailer headers after the body, if present. _, err = io.Copy(ioutil.Discard, bodyLocked{b}) } b.closed = true return err } // bodyLocked is a io.Reader reading from a *body when its mutex is // already held. type bodyLocked struct { b *body } func (bl bodyLocked) Read(p []byte) (n int, err error) { if bl.b.closed { return 0, ErrBodyReadAfterClose } return bl.b.readLocked(p) } // parseContentLength trims whitespace from s and returns -1 if no value // is set, or the value if it's >= 0. func parseContentLength(cl string) (int64, error) { cl = strings.TrimSpace(cl) if cl == "" { return -1, nil } n, err := strconv.ParseInt(cl, 10, 64) if err != nil || n < 0 { return 0, &badStringError{"bad Content-Length", cl} } return n, nil }
renzuinc/goproxy
http/transfer.go
GO
bsd-3-clause
18,912
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.40 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus /* SwigValueWrapper is described in swig.swg */ template<typename T> class SwigValueWrapper { struct SwigMovePointer { T *ptr; SwigMovePointer(T *p) : ptr(p) { } ~SwigMovePointer() { delete ptr; } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } } pointer; SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs); SwigValueWrapper(const SwigValueWrapper<T>& rhs); public: SwigValueWrapper() : pointer(0) { } SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } operator T&() const { return *pointer.ptr; } T *operator&() { return pointer.ptr; } }; template <typename T> T SwigValueInit() { return T(); } #endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ----------------------------------------------------------------------------- */ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) # define SWIGTEMPLATEDISAMBIGUATOR template # elif defined(__HP_aCC) /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ # define SWIGTEMPLATEDISAMBIGUATOR template # else # define SWIGTEMPLATEDISAMBIGUATOR # endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) # define SWIGINLINE inline # else # define SWIGINLINE # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) # define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else # define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif /* internal inline SWIG method */ #ifndef SWIGINTERNINLINE # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif /* exporting methods */ #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # ifndef GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY # endif #endif #ifndef SWIGEXPORT # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # if defined(STATIC_LINKED) # define SWIGEXPORT # else # define SWIGEXPORT __declspec(dllexport) # endif # else # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) # define SWIGEXPORT __attribute__ ((visibility("default"))) # else # define SWIGEXPORT # endif # endif #endif /* calling conventions for Windows */ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL # endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) # define _SCL_SECURE_NO_DEPRECATE #endif /* Python.h has to appear first */ #include <Python.h> /* ----------------------------------------------------------------------------- * swigrun.swg * * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ #define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE # define SWIG_QUOTE_STRING(x) #x # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) #else # define SWIG_TYPE_TABLE_NAME #endif /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME # define SWIGRUNTIME SWIGINTERN #endif #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif /* Generic buffer size */ #ifndef SWIG_BUFFER_SIZE # define SWIG_BUFFER_SIZE 1024 #endif /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 #define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 /* Flags/methods for returning states. The SWIG conversion methods, as ConvertPtr, return and integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). Use the following macros/flags to set or process the returning states. In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { //fail code } Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { // success code } else { // fail code } which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); if (SWIG_IsOK(res)) { // success code if (SWIG_IsNewObj(res) { ... delete *ptr; } else { ... } } else { // fail code } I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as int SWIG_ConvertPtr(obj, ptr,...) { if (<obj is ok>) { if (<need new object>) { *ptr = <ptr to new allocated object>; return SWIG_NEWOBJ; } else { *ptr = <ptr to old object>; return SWIG_OLDOBJ; } } else { return SWIG_BADOBJ; } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this int food(double) int fooi(int); and you call food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ #define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) /* The TmpMask is for in/out typemaps that use temporal objects */ #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) /* Simple returning values */ #define SWIG_BADOBJ (SWIG_ERROR) #define SWIG_OLDOBJ (SWIG_OK) #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) /* Check, add and del mask methods */ #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include <string.h> #ifdef __cplusplus extern "C" { #endif typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ swig_converter_func converter; /* function to cast the void pointers */ struct swig_cast_info *next; /* pointer to next cast in linked list */ struct swig_cast_info *prev; /* pointer to the previous cast */ } swig_cast_info; /* Structure used to store module information * Each module generates one structure like this, and the runtime collects * all of these structures and stores them in a circularly linked list.*/ typedef struct swig_module_info { swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ size_t size; /* Number of types in this module */ struct swig_module_info *next; /* Pointer to next element in circularly linked list */ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class<int>" == "Class<int >", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2) { for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { while ((*f1 == ' ') && (f1 != l1)) ++f1; while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if not equal, 1 if equal */ SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like <name1>|<name2>|... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int SWIG_TypeCompare(const char *nb, const char *tb) { int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (strcmp(iter->type->name, c) == 0) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { swig_cast_info *iter = ty->cast; while (iter) { if (iter->type == from) { if (iter == ty->cast) return iter; /* Move iter to the top of the linked list */ iter->prev->next = iter->next; if (iter->next) iter->next->prev = iter->prev; iter->next = ty->cast; iter->prev = 0; if (ty->cast) ty->cast->prev = iter; ty->cast = iter; return iter; } iter = iter->next; } } return 0; } /* Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; if (!ty || !ty->dcast) return ty; while (ty && (ty->dcast)) { ty = (*ty->dcast)(ptr); if (ty) lastty = ty; } return lastty; } /* Return the name associated with this type */ SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty) { return ty->name; } /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; return last_name; } else return type->name; } /* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { register size_t l = 0; register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { break; } } else if (compare > 0) { l = i + 1; } } else { break; /* should never happen */ } } while (l <= r); } iter = iter->next; } while (iter != end); return 0; } /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { register size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } /* neither found a match */ return 0; } /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; register const unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } /* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); else return (char *) 0; *u = uu; } return c; } /* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; if ((2*sizeof(void *) + 2) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,&ptr,sizeof(void *)); if (strlen(name) + 1 > (bsz - (r - buff))) return 0; strcpy(r,name); return buff; } SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { *ptr = (void *) 0; return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sizeof(void *)); } SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { char *r = buff; size_t lname = (name ? strlen(name) : 0); if ((2*sz + 2 + lname) > bsz) return 0; *(r++) = '_'; r = SWIG_PackData(r,ptr,sz); if (lname) { strncpy(r,name,lname+1); } else { *r = 0; } return buff; } SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { if (*c != '_') { if (strcmp(c,"NULL") == 0) { memset(ptr,0,sz); return name; } else { return 0; } } return SWIG_UnpackData(++c,ptr,sz); } #ifdef __cplusplus } #endif /* Errors in SWIG */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 #define SWIG_IndexError -4 #define SWIG_TypeError -5 #define SWIG_DivisionByZero -6 #define SWIG_OverflowError -7 #define SWIG_SyntaxError -8 #define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 #define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 /* Compatibility macros for Python 3 */ #if PY_VERSION_HEX >= 0x03000000 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) #define PyInt_Check(x) PyLong_Check(x) #define PyInt_AsLong(x) PyLong_AsLong(x) #define PyInt_FromLong(x) PyLong_FromLong(x) #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) #endif #ifndef Py_TYPE # define Py_TYPE(op) ((op)->ob_type) #endif /* SWIG APIs for compatibility of both Python 2 & 3 */ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat #else # define SWIG_Python_str_FromFormat PyString_FromFormat #endif /* Warning: This function will allocate a new string in Python 3, * so please call SWIG_Python_str_DelForPy3(x) to free the space. */ SWIGINTERN char* SWIG_Python_str_AsChar(PyObject *str) { #if PY_VERSION_HEX >= 0x03000000 char *cstr; char *newstr; Py_ssize_t len; str = PyUnicode_AsUTF8String(str); PyBytes_AsStringAndSize(str, &cstr, &len); newstr = (char *) malloc(len+1); memcpy(newstr, cstr, len+1); Py_XDECREF(str); return newstr; #else return PyString_AsString(str); #endif } #if PY_VERSION_HEX >= 0x03000000 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) #else # define SWIG_Python_str_DelForPy3(x) #endif SWIGINTERN PyObject* SWIG_Python_str_FromChar(const char *c) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_FromString(c); #else return PyString_FromString(c); #endif } /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) # define PyOS_snprintf _snprintf # else # define PyOS_snprintf snprintf # endif #endif /* A crude PyString_FromFormat implementation for old Pythons */ #if PY_VERSION_HEX < 0x02020000 #ifndef SWIG_PYBUFFER_SIZE # define SWIG_PYBUFFER_SIZE 1024 #endif static PyObject * PyString_FromFormat(const char *fmt, ...) { va_list ap; char buf[SWIG_PYBUFFER_SIZE * 2]; int res; va_start(ap, fmt); res = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif /* Add PyObject_Del for old Pythons */ #if PY_VERSION_HEX < 0x01060000 # define PyObject_Del(op) PyMem_DEL((op)) #endif #ifndef PyObject_DEL # define PyObject_DEL PyObject_Del #endif /* A crude PyExc_StopIteration exception for old Pythons */ #if PY_VERSION_HEX < 0x02020000 # ifndef PyExc_StopIteration # define PyExc_StopIteration PyExc_RuntimeError # endif # ifndef PyObject_GenericGetAttr # define PyObject_GenericGetAttr 0 # endif #endif /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented # define Py_NotImplemented PyExc_RuntimeError # endif #endif /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} # endif #endif /* PySequence_Size for old Pythons */ #if PY_VERSION_HEX < 0x02000000 # ifndef PySequence_Size # define PySequence_Size PySequence_Length # endif #endif /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static PyObject *PyBool_FromLong(long ok) { PyObject *result = ok ? Py_True : Py_False; Py_INCREF(result); return result; } #endif /* Py_ssize_t for old Pythons */ /* This code is as recommended by: */ /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN #endif /* ----------------------------------------------------------------------------- * error manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_Python_ErrorType(int code) { PyObject* type = 0; switch(code) { case SWIG_MemoryError: type = PyExc_MemoryError; break; case SWIG_IOError: type = PyExc_IOError; break; case SWIG_RuntimeError: type = PyExc_RuntimeError; break; case SWIG_IndexError: type = PyExc_IndexError; break; case SWIG_TypeError: type = PyExc_TypeError; break; case SWIG_DivisionByZero: type = PyExc_ZeroDivisionError; break; case SWIG_OverflowError: type = PyExc_OverflowError; break; case SWIG_SyntaxError: type = PyExc_SyntaxError; break; case SWIG_ValueError: type = PyExc_ValueError; break; case SWIG_SystemError: type = PyExc_SystemError; break; case SWIG_AttributeError: type = PyExc_AttributeError; break; default: type = PyExc_RuntimeError; } return type; } SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char* mesg) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { PyErr_SetString(PyExc_RuntimeError, mesg); } } #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS # endif #endif #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif # ifdef __cplusplus /* C++ code */ class SWIG_Python_Thread_Block { bool status; PyGILState_STATE state; public: void end() { if (status) { PyGILState_Release(state); status = false;} } SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} ~SWIG_Python_Thread_Block() { end(); } }; class SWIG_Python_Thread_Allow { bool status; PyThreadState *save; public: void end() { if (status) { PyEval_RestoreThread(save); status = false; }} SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} ~SWIG_Python_Thread_Allow() { end(); } }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() # else /* C code */ # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif # else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) # define SWIG_PYTHON_THREAD_END_BLOCK # endif # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # endif # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) # define SWIG_PYTHON_THREAD_END_ALLOW # endif # endif #else /* No thread support */ # define SWIG_PYTHON_INITIALIZE_THREADS # define SWIG_PYTHON_THREAD_BEGIN_BLOCK # define SWIG_PYTHON_THREAD_END_BLOCK # define SWIG_PYTHON_THREAD_BEGIN_ALLOW # define SWIG_PYTHON_THREAD_END_ALLOW #endif /* ----------------------------------------------------------------------------- * Python API portion that goes into the runtime * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* ----------------------------------------------------------------------------- * Constant declarations * ----------------------------------------------------------------------------- */ /* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 /* Constant information structure */ typedef struct swig_const_info { int type; char *name; long lvalue; double dvalue; void *pvalue; swig_type_info **ptype; } swig_const_info; /* ----------------------------------------------------------------------------- * Wrapper of PyInstanceMethod_New() used in Python 3 * It is exported to the generated module, used for -fastproxy * ----------------------------------------------------------------------------- */ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) { #if PY_VERSION_HEX >= 0x03000000 return PyInstanceMethod_New(func); #else return NULL; #endif } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif /* ----------------------------------------------------------------------------- * See the LICENSE file for information on copyright, usage and redistribution * of SWIG, and the README file for authors - http://www.swig.org/release.html. * * pyrun.swg * * This file contains the runtime support for Python modules * and includes code for managing global variables and pointer * type checking. * * ----------------------------------------------------------------------------- */ /* Common SWIG API */ /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int /* for raw packed data */ #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* for class or struct pointers */ #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) /* Runtime API */ #define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetObject(errtype, obj); Py_DECREF(obj); SWIG_PYTHON_THREAD_END_BLOCK; } SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(errtype, (char *) msg); SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { PyDict_SetItemString(d, (char*) name, obj); Py_DECREF(obj); } /* Append a value to the result obj */ SWIGINTERN PyObject* SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyList_Check(result)) { PyObject *o2 = result; result = PyList_New(1); PyList_SetItem(result, 0, o2); } PyList_Append(result,obj); Py_DECREF(obj); } return result; #else PyObject* o2; PyObject* o3; if (!result) { result = obj; } else if (result == Py_None) { Py_DECREF(result); result = obj; } else { if (!PyTuple_Check(result)) { o2 = result; result = PyTuple_New(1); PyTuple_SET_ITEM(result, 0, o2); } o3 = PyTuple_New(1); PyTuple_SET_ITEM(o3, 0, obj); o2 = result; result = PySequence_Concat(o2, o3); Py_DECREF(o2); Py_DECREF(o3); } return result; #endif } /* Unpack the argument tuple */ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int)min); return 0; } } if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; for (i = 0; i < l; ++i) { objs[i] = PyTuple_GET_ITEM(args, i); } for (; l < max; ++l) { objs[l] = 0; } return i + 1; } } } /* A functor is a function object with one single object argument */ #if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); #else #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); #endif /* Helper for static pointer initialization for both C and C++ code, for example static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); */ #ifdef __cplusplus #define SWIG_STATIC_POINTER(var) var #else #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var #endif /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */ /* Flags for new pointer objects */ #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) #ifdef __cplusplus extern "C" { #if 0 } /* cc-mode */ #endif #endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE # ifndef SWIG_PYTHON_BUILD_NONE # define SWIG_PYTHON_BUILD_NONE # endif # endif #endif #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif SWIGRUNTIMEINLINE PyObject * _SWIG_Py_None(void) { PyObject *none = Py_BuildValue((char*)""); Py_DECREF(none); return none; } SWIGRUNTIME PyObject * SWIG_Py_None(void) { static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); return none; } #endif /* The python void return value */ SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void) { PyObject *none = Py_None; Py_INCREF(none); return none; } /* SwigPyClientData */ typedef struct { PyObject *klass; PyObject *newraw; PyObject *newargs; PyObject *destroy; int delargs; int implicitconv; } SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; data->newargs = obj; Py_INCREF(obj); } else { #if (PY_VERSION_HEX < 0x02020000) data->newraw = 0; #else data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif if (data->newraw) { Py_INCREF(data->newraw); data->newargs = PyTuple_New(1); PyTuple_SetItem(data->newargs, 0, obj); } else { data->newargs = obj; } Py_INCREF(data->newargs); } /* the destroy method, aka as the C++ delete method */ data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); if (PyErr_Occurred()) { PyErr_Clear(); data->destroy = 0; } if (data->destroy) { int flags; Py_INCREF(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else data->delargs = 0; #endif } else { data->delargs = 0; } data->implicitconv = 0; return data; } } SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData* data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } /* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD void *ptr; swig_type_info *ty; int own; PyObject *next; } SwigPyObject; SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { #if PY_VERSION_HEX >= 0x03000000 res = PyUnicode_Format(ofmt,args); #else res = PyString_Format(ofmt,args); #endif Py_DECREF(ofmt); } Py_DECREF(args); } } return res; } SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v) { return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v) { return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS SwigPyObject_repr(SwigPyObject *v) #else SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v); if (v->next) { #ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); #else PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); #endif #if PY_VERSION_HEX >= 0x03000000 PyObject *joined = PyUnicode_Concat(repr, nrep); Py_DecRef(repr); Py_DecRef(nrep); repr = joined; #else PyString_ConcatAndDel(&repr,nrep); #endif } return repr; } SWIGRUNTIME int SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *str; #ifdef METH_NOARGS PyObject *repr = SwigPyObject_repr(v); #else PyObject *repr = SwigPyObject_repr(v, NULL); #endif if (repr) { str = SWIG_Python_str_AsChar(repr); fputs(str, fp); SWIG_Python_str_DelForPy3(str); Py_DECREF(repr); return 0; } else { return 1; } } SWIGRUNTIME PyObject * SwigPyObject_str(SwigPyObject *v) { char result[SWIG_BUFFER_SIZE]; return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? SWIG_Python_str_FromChar(result) : 0; } SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } /* Added for Python 3.x, would it also be useful for Python 2.x? */ SWIGRUNTIME PyObject* SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) { PyObject* res; if( op != Py_EQ && op != Py_NE ) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) res = Py_True; else res = Py_False; Py_INCREF(res); return res; } SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); SWIGRUNTIME PyTypeObject* SwigPyObject_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); return type; } SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op) { return (Py_TYPE(op) == SwigPyObject_type()) || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v) { SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { /* we need to create a temporary object to carry the destroy operation */ PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); PyObject *mself = PyCFunction_GET_SELF(destroy); res = ((*meth)(mself, v)); } Py_XDECREF(res); } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) else { const char *name = SWIG_TypePrettyName(ty); printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } #endif } Py_XDECREF(next); PyObject_DEL(v); } SWIGRUNTIME PyObject* SwigPyObject_append(PyObject* v, PyObject* next) { SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; Py_INCREF(next); return SWIG_Py_Void(); } SWIGRUNTIME PyObject* #ifdef METH_NOARGS SwigPyObject_next(PyObject* v) #else SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; } else { return SWIG_Py_Void(); } } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_disown(PyObject *v) #else SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS SwigPyObject_acquire(PyObject *v) #else SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #else if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #endif { return NULL; } else { SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v); } else { SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { SwigPyObject_acquire(v,args); } else { SwigPyObject_disown(v,args); } #endif } return obj; } } #ifdef METH_O static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* _PySwigObject_type(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ /* nb_divide removed in Python 3 */ #if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ #endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ (unaryfunc)0, /*nb_negative*/ (unaryfunc)0, /*nb_positive*/ (unaryfunc)0, /*nb_absolute*/ (inquiry)0, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_VERSION_HEX < 0x03000000 0, /*nb_coerce*/ #endif (unaryfunc)SwigPyObject_long, /*nb_int*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_long, /*nb_long*/ #else 0, /*nb_reserved*/ #endif (unaryfunc)0, /*nb_float*/ #if PY_VERSION_HEX < 0x03000000 (unaryfunc)SwigPyObject_oct, /*nb_oct*/ (unaryfunc)SwigPyObject_hex, /*nb_hex*/ #endif #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyObject", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */ (printfunc)SwigPyObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ #else (getattrfunc)0, /* tp_getattr */ #endif (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX >= 0x03000000 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ #else (cmpfunc)SwigPyObject_compare, /* tp_compare */ #endif (reprfunc)SwigPyObject_repr, /* tp_repr */ &SwigPyObject_as_number, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyObject_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigobject_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ swigobject_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpyobject_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpyobject_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpyobject_type; } SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; sobj->own = own; sobj->next = 0; } return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- * Implements a simple Swig Packed type, and use it instead of string * ----------------------------------------------------------------------------- */ typedef struct { PyObject_HEAD void *pack; swig_type_info *ty; size_t size; } SwigPyPacked; SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("<Swig Packed ", fp); if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { fputs("at ", fp); fputs(result, fp); } fputs(v->ty->name,fp); fputs(">", fp); return 0; } SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name); } else { return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name); } } SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; int s = (i < j) ? -1 : ((i > j) ? 1 : 0); return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); SWIGRUNTIME PyTypeObject* SwigPyPacked_type(void) { static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); return type; } SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op) { return ((op)->ob_type == _PySwigPacked_type()) || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v) { if (SwigPyPacked_Check(v)) { SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; static PyTypeObject swigpypacked_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX>=0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif (char *)"SwigPyPacked", /* tp_name */ sizeof(SwigPyPacked), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (printfunc)SwigPyPacked_print, /* tp_print */ (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ #if PY_VERSION_HEX>=0x03000000 0, /* tp_reserved in 3.0.1 */ #else (cmpfunc)SwigPyPacked_compare, /* tp_compare */ #endif (reprfunc)SwigPyPacked_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)SwigPyPacked_str, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ swigpacked_doc, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ 0, /* tp_mro */ 0, /* tp_cache */ 0, /* tp_subclasses */ 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; swigpypacked_type = tmp; /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 swigpypacked_type.ob_type = &PyType_Type; #endif type_init = 1; } return &swigpypacked_type; } SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { memcpy(pack, ptr, size); sobj->pack = pack; sobj->ty = ty; sobj->size = size; } else { PyObject_DEL((PyObject *) sobj); sobj = 0; } } return (PyObject *) sobj; } SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { if (SwigPyPacked_Check(obj)) { SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; } else { return 0; } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { return SWIG_Python_str_FromChar("this"); } SWIGRUNTIME PyObject * SWIG_This(void) { static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ /* TODO: I don't know how to implement the fast getset in Python 3 right now */ #if PY_VERSION_HEX>=0x03000000 #define SWIG_PYTHON_SLOW_GETSET_THIS #endif SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { if (SwigPyObject_Check(pyobj)) { return (SwigPyObject *) pyobj; } else { PyObject *obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) if (PyInstance_Check(pyobj)) { obj = _PyInstance_Lookup(pyobj, SWIG_This()); } else { PyObject **dictptr = _PyObject_GetDictPtr(pyobj); if (dictptr != NULL) { PyObject *dict = *dictptr; obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { #ifdef PyWeakref_CheckProxy if (PyWeakref_CheckProxy(pyobj)) { PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } #endif obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } } } #else obj = PyObject_GetAttr(pyobj,SWIG_This()); if (obj) { Py_DECREF(obj); } else { if (PyErr_Occurred()) PyErr_Clear(); return 0; } #endif if (obj && !SwigPyObject_Check(obj)) { /* a PyObject is called 'this', try to get the 'real this' SwigPyObject from it */ return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; } } /* Acquire a pointer value */ SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; return oldown; } } return 0; } /* Convert a pointer value */ SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { if (!obj) return SWIG_ERROR; if (obj == Py_None) { if (ptr) *ptr = 0; return SWIG_OK; } else { SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (own) *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { swig_type_info *to = sobj->ty; if (to == ty) { /* no type cast needed */ if (ptr) *ptr = vptr; break; } else { swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) { sobj = (SwigPyObject *)sobj->next; } else { if (ptr) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); if (newmemory == SWIG_CAST_NEW_MEMORY) { assert(own); if (own) *own = *own | SWIG_CAST_NEW_MEMORY; } } break; } } } else { if (ptr) *ptr = vptr; break; } } if (sobj) { if (own) *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } return SWIG_OK; } else { int res = SWIG_ERROR; if (flags & SWIG_POINTER_IMPLICIT_CONV) { SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; if (data && !data->implicitconv) { PyObject *klass = data->klass; if (klass) { PyObject *impconv; data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ impconv = SWIG_Python_CallFunctor(klass, obj); data->implicitconv = 0; if (PyErr_Occurred()) { PyErr_Clear(); impconv = 0; } if (impconv) { SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); if (iobj) { void *vptr; res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); if (SWIG_IsOK(res)) { if (ptr) { *ptr = vptr; /* transfer the ownership to 'ptr' */ iobj->own = 0; res = SWIG_AddCast(res); res = SWIG_AddNewMask(res); } else { res = SWIG_AddCast(res); } } } Py_DECREF(impconv); } } } } return res; } } } /* Convert a function ptr value */ SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { if (!PyCFunction_Check(obj)) { return SWIG_ConvertPtr(obj, ptr, ty, 0); } else { void *vptr = 0; /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; if (!desc) return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { int newmemory = 0; *ptr = SWIG_TypeCast(tc,vptr,&newmemory); assert(!newmemory); /* newmemory handling not yet implemented */ } else { return SWIG_ERROR; } } else { *ptr = vptr; } return SWIG_OK; } } /* Convert a packed value value */ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { /* check type cast? */ swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); if (!tc) return SWIG_ERROR; } } return SWIG_OK; } /* ----------------------------------------------------------------------------- * Create a new pointer object * ----------------------------------------------------------------------------- */ /* Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; PyObject *newraw = data->newraw; if (newraw) { inst = PyObject_Call(newraw, data->newargs, NULL); if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { PyObject *dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; PyDict_SetItem(dict, SWIG_This(), swig_this); } } #else PyObject *key = SWIG_This(); PyObject_SetAttr(inst, key, swig_this); #endif } } else { #if PY_VERSION_HEX >= 0x03000000 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); PyObject_SetAttr(inst, SWIG_This(), swig_this); Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; #else PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); #endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) PyObject *inst; PyObject *dict = PyDict_New(); PyDict_SetItem(dict, SWIG_This(), swig_this); inst = PyInstance_NewRaw(data->newargs, dict); Py_DECREF(dict); return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); if (inst == NULL) { return NULL; } inst->in_class = (PyClassObject *)data->newargs; Py_INCREF(inst->in_class); inst->in_dict = PyDict_New(); if (inst->in_dict == NULL) { Py_DECREF(inst); return NULL; } #ifdef Py_TPFLAGS_HAVE_WEAKREFS inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC PyObject_GC_Init(inst); #endif PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); return (PyObject *) inst; #endif #endif } SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) PyObject **dictptr = _PyObject_GetDictPtr(inst); if (dictptr != NULL) { dict = *dictptr; if (dict == NULL) { dict = PyDict_New(); *dictptr = dict; } PyDict_SetItem(dict, SWIG_This(), swig_this); return; } #endif dict = PyObject_GetAttrString(inst, (char*)"__dict__"); PyDict_SetItem(dict, SWIG_This(), swig_this); Py_DECREF(dict); } SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { return NULL; } else { SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } return SWIG_Py_Void(); } } /* Create a new pointer object */ SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { if (!ptr) { return SWIG_Py_Void(); } else { int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; PyObject *robj = SwigPyObject_New(ptr, type, own); SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); if (inst) { Py_DECREF(robj); robj = inst; } } return robj; } } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* * Get type list * -----------------------------------------------------------------------------*/ #ifdef SWIG_LINK_RUNTIME void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; } #endif } return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o) { PyObject *dict; if (!PyModule_Check(m)) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); return SWIG_ERROR; } if (!o) { PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); return SWIG_ERROR; } dict = PyModule_GetDict(m); if (dict == NULL) { /* Internal error -- modules must have a dict! */ PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); return SWIG_ERROR; } if (PyDict_SetItemString(dict, name, o)) return SWIG_ERROR; Py_DECREF(o); return SWIG_OK; } #endif SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr) { swig_module_info *swig_module = (swig_module_info *) vptr; swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } } /* The python cached type query */ SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void) { static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); return cache; } SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); } else { swig_module_info *swig_module = SWIG_Python_GetModule(); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { obj = PyCObject_FromVoidPtr(descriptor, NULL); PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } } Py_DECREF(key); return descriptor; } /* For backward compatibility only */ #define SWIG_POINTER_EXCEPTION 0 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) { if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; } else { return 0; } } SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) { if (PyErr_Occurred()) { /* add information about failing argument */ char mesg[256]; PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); return SWIG_Python_AddErrMesg(mesg, 1); } else { return 0; } } SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self) { SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; return ty ? ty->str : (char*)""; } SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) if (obj && SwigPyObject_Check(obj)) { const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } } else #endif { const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); } Py_XDECREF(str); return; } } PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); } else { PyErr_Format(PyExc_TypeError, "unexpected type is received"); } } /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); #if SWIG_POINTER_EXCEPTION if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } #endif } return result; } #ifdef __cplusplus #if 0 { /* cc-mode */ #endif } #endif #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_AbstractMemory swig_types[0] #define SWIGTYPE_p_AbstractMemoryParams swig_types[1] #define SWIGTYPE_p_DmaDevice swig_types[2] #define SWIGTYPE_p_DmaDeviceParams swig_types[3] #define SWIGTYPE_p_EtherDevBase swig_types[4] #define SWIGTYPE_p_EtherDevBaseParams swig_types[5] #define SWIGTYPE_p_EtherDevice swig_types[6] #define SWIGTYPE_p_EtherDeviceParams swig_types[7] #define SWIGTYPE_p_IntrControl swig_types[8] #define SWIGTYPE_p_IntrControlParams swig_types[9] #define SWIGTYPE_p_MemObject swig_types[10] #define SWIGTYPE_p_MemObjectParams swig_types[11] #define SWIGTYPE_p_Net__EthAddr swig_types[12] #define SWIGTYPE_p_Net__IpAddress swig_types[13] #define SWIGTYPE_p_Net__IpNetmask swig_types[14] #define SWIGTYPE_p_Net__IpWithPort swig_types[15] #define SWIGTYPE_p_PciDevice swig_types[16] #define SWIGTYPE_p_PciDeviceParams swig_types[17] #define SWIGTYPE_p_PioDevice swig_types[18] #define SWIGTYPE_p_PioDeviceParams swig_types[19] #define SWIGTYPE_p_Platform swig_types[20] #define SWIGTYPE_p_PlatformParams swig_types[21] #define SWIGTYPE_p_RefCountingPtrT_FaultBase_t swig_types[22] #define SWIGTYPE_p_SimObject swig_types[23] #define SWIGTYPE_p_SimObjectParams swig_types[24] #define SWIGTYPE_p_System swig_types[25] #define SWIGTYPE_p_SystemParams swig_types[26] #define SWIGTYPE_p_allocator_type swig_types[27] #define SWIGTYPE_p_char swig_types[28] #define SWIGTYPE_p_const_reference swig_types[29] #define SWIGTYPE_p_difference_type swig_types[30] #define SWIGTYPE_p_int swig_types[31] #define SWIGTYPE_p_long_long swig_types[32] #define SWIGTYPE_p_p_AbstractMemory swig_types[33] #define SWIGTYPE_p_reference swig_types[34] #define SWIGTYPE_p_short swig_types[35] #define SWIGTYPE_p_signed_char swig_types[36] #define SWIGTYPE_p_size_type swig_types[37] #define SWIGTYPE_p_unsigned_char swig_types[38] #define SWIGTYPE_p_unsigned_int swig_types[39] #define SWIGTYPE_p_unsigned_long_long swig_types[40] #define SWIGTYPE_p_unsigned_short swig_types[41] static swig_type_info *swig_types[43]; static swig_module_info swig_module = {swig_types, 42, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #if (PY_VERSION_HEX <= 0x02000000) # if !defined(SWIG_PYTHON_CLASSIC) # error "This python version requires swig to be run with the '-classic' option" # endif #endif #if (PY_VERSION_HEX <= 0x02020000) # error "This python version requires swig to be run with the '-nomodern' option" #endif #if (PY_VERSION_HEX <= 0x02020000) # error "This python version requires swig to be run with the '-nomodernargs' option" #endif /*----------------------------------------------- @(target):= _param_EtherDevBase.so ------------------------------------------------*/ #if PY_VERSION_HEX >= 0x03000000 # define SWIG_init PyInit__param_EtherDevBase #else # define SWIG_init init_param_EtherDevBase #endif #define SWIG_name "_param_EtherDevBase" #define SWIGVERSION 0x010340 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include <stdexcept> namespace swig { class SwigPtr_PyObject { protected: PyObject *_obj; public: SwigPtr_PyObject() :_obj(0) { } SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); _obj = item._obj; return *this; } ~SwigPtr_PyObject() { Py_XDECREF(_obj); } operator PyObject *() const { return _obj; } PyObject *operator->() const { return _obj; } }; } namespace swig { struct SwigVar_PyObject : SwigPtr_PyObject { SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; return *this; } }; } #include "params/EtherDevBase.hh" #include <cstddef> #include "base/inet.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include "base/types.hh" #include <cstddef> #include <cstddef> #include <cstddef> #include "base/types.hh" #include <cstddef> /** * This is a workaround for bug in swig. Prior to gcc 4.6.1 the STL * headers like vector, string, etc. used to automatically pull in * the cstddef header but starting with gcc 4.6.1 they no longer do. * This leads to swig generated a file that does not compile so we * explicitly include cstddef. Additionally, including version 2.0.4, * swig uses ptrdiff_t without the std:: namespace prefix which is * required with gcc 4.6.1. We explicitly provide access to it. */ #include <cstddef> using std::ptrdiff_t; #include "base/inet.hh" SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; if (!init) { info = SWIG_TypeQuery("_p_char"); init = 1; } return info; } SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 if (PyUnicode_Check(obj)) #else if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 if (!alloc && cptr) { /* We can't allow converting without allocation, since the internal representation of string in Python 3 is UCS-2/UCS-4 but we require a UTF-8 representation. TODO(bhy) More detailed explanation */ return SWIG_RuntimeError; } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner string representation. To warranty that, if you define SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string buffer is always returned. The default behavior is just to return the pointer value, so, be careful. */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) if (*alloc != SWIG_OLDOBJ) #else if (*alloc == SWIG_NEWOBJ) #endif { *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *alloc = SWIG_NEWOBJ; } else { *cptr = cstr; *alloc = SWIG_OLDOBJ; } } else { #if PY_VERSION_HEX>=0x03000000 assert(0); /* Should never reach here in Python 3 */ #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; #if PY_VERSION_HEX>=0x03000000 Py_XDECREF(obj); #endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); if (pchar_descriptor) { void* vptr = 0; if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { if (cptr) *cptr = (char *) vptr; if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; if (alloc) *alloc = SWIG_OLDOBJ; return SWIG_OK; } } } return SWIG_TypeError; } SWIGINTERN int SWIG_AsPtr_std_string (PyObject * obj, std::string **val) { char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { if (buf) { if (val) *val = new std::string(buf, size - 1); if (alloc == SWIG_NEWOBJ) delete[] buf; return SWIG_NEWOBJ; } else { if (val) *val = 0; return SWIG_OLDOBJ; } } else { static int init = 0; static swig_type_info* descriptor = 0; if (!init) { descriptor = SWIG_TypeQuery("std::string" " *"); init = 1; } if (descriptor) { std::string *vptr; int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); if (SWIG_IsOK(res) && val) *val = vptr; return res; } } return SWIG_ERROR; } #include <limits.h> #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) # define LLONG_MAX __LONG_LONG_MAX__ # define LLONG_MIN (-LLONG_MAX - 1LL) # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) # endif #endif SWIGINTERN int SWIG_AsVal_double (PyObject *obj, double *val) { int res = SWIG_TypeError; if (PyFloat_Check(obj)) { if (val) *val = PyFloat_AsDouble(obj); return SWIG_OK; } else if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { double v = PyLong_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; double d = PyFloat_AsDouble(obj); if (!PyErr_Occurred()) { if (val) *val = d; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); } else { PyErr_Clear(); } } } #endif return res; } #include <float.h> #include <math.h> SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) { double x = *d; if ((min <= x && x <= max)) { double fx = floor(x); double cx = ceil(x); double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ if ((errno == EDOM) || (errno == ERANGE)) { errno = 0; } else { double summ, reps, diff; if (rd < x) { diff = x - rd; } else if (rd > x) { diff = rd - x; } else { return 1; } summ = rd + x; reps = diff/summ; if (reps < 8*DBL_EPSILON) { *d = rd; return 1; } } } return 0; } SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { if (PyInt_Check(obj)) { long v = PyInt_AsLong(obj); if (v >= 0) { if (val) *val = v; return SWIG_OK; } else { return SWIG_OverflowError; } } else if (PyLong_Check(obj)) { unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; unsigned long v = PyLong_AsUnsignedLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { if (val) *val = (unsigned long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UINT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned int >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > UCHAR_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned char >(v); } } return res; } SWIGINTERN int SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) { unsigned long v; int res = SWIG_AsVal_unsigned_SS_long (obj, &v); if (SWIG_IsOK(res)) { if ((v > USHRT_MAX)) { return SWIG_OverflowError; } else { if (val) *val = static_cast< unsigned short >(v); } } return res; } namespace swig { struct stop_iteration { }; struct SwigPyIterator { private: SwigPtr_PyObject _seq; protected: SwigPyIterator(PyObject *seq) : _seq(seq) { } public: virtual ~SwigPyIterator() {} // Access iterator method, required by Python virtual PyObject *value() const = 0; // Forward iterator method, required by Python virtual SwigPyIterator *incr(size_t n = 1) = 0; // Backward iterator method, very common in C++, but not required in Python virtual SwigPyIterator *decr(size_t /*n*/ = 1) { throw stop_iteration(); } // Random access iterator methods, but not required in Python virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } virtual bool equal (const SwigPyIterator &/*x*/) const { throw std::invalid_argument("operation not supported"); } // C++ common/needed methods virtual SwigPyIterator *copy() const = 0; PyObject *next() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); incr(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } /* Make an alias for Python 3.x */ PyObject *__next__() { return next(); } PyObject *previous() { SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); PyObject *obj = value(); SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads return obj; } SwigPyIterator *advance(ptrdiff_t n) { return (n > 0) ? incr(n) : decr(-n); } bool operator == (const SwigPyIterator& x) const { return equal(x); } bool operator != (const SwigPyIterator& x) const { return ! operator==(x); } SwigPyIterator& operator += (ptrdiff_t n) { return *advance(n); } SwigPyIterator& operator -= (ptrdiff_t n) { return *advance(-n); } SwigPyIterator* operator + (ptrdiff_t n) const { return copy()->advance(n); } SwigPyIterator* operator - (ptrdiff_t n) const { return copy()->advance(-n); } ptrdiff_t operator - (const SwigPyIterator& x) const { return x.distance(*this); } static swig_type_info* descriptor() { static int init = 0; static swig_type_info* desc = 0; if (!init) { desc = SWIG_TypeQuery("swig::SwigPyIterator *"); init = 1; } return desc; } }; } namespace swig { template <class Type> struct noconst_traits { typedef Type noconst_type; }; template <class Type> struct noconst_traits<const Type> { typedef Type noconst_type; }; /* type categories */ struct pointer_category { }; struct value_category { }; /* General traits that provides type_name and type_info */ template <class Type> struct traits { }; template <class Type> inline const char* type_name() { return traits<typename noconst_traits<Type >::noconst_type >::type_name(); } template <class Type> struct traits_info { static swig_type_info *type_query(std::string name) { name += " *"; return SWIG_TypeQuery(name.c_str()); } static swig_type_info *type_info() { static swig_type_info *info = type_query(type_name<Type>()); return info; } }; template <class Type> inline swig_type_info *type_info() { return traits_info<Type>::type_info(); } /* Partial specialization for pointers */ template <class Type> struct traits <Type *> { typedef pointer_category category; static std::string make_ptr_name(const char* name) { std::string ptrname = name; ptrname += " *"; return ptrname; } static const char* type_name() { static std::string name = make_ptr_name(swig::type_name<Type>()); return name.c_str(); } }; template <class Type, class Category> struct traits_as { }; template <class Type, class Category> struct traits_check { }; } namespace swig { /* Traits that provides the from method */ template <class Type> struct traits_from_ptr { static PyObject *from(Type *val, int owner = 0) { return SWIG_NewPointerObj(val, type_info<Type>(), owner); } }; template <class Type> struct traits_from { static PyObject *from(const Type& val) { return traits_from_ptr<Type>::from(new Type(val), 1); } }; template <class Type> struct traits_from<Type *> { static PyObject *from(Type* val) { return traits_from_ptr<Type>::from(val, 0); } }; template <class Type> struct traits_from<const Type *> { static PyObject *from(const Type* val) { return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0); } }; template <class Type> inline PyObject *from(const Type& val) { return traits_from<Type>::from(val); } template <class Type> inline PyObject *from_ptr(Type* val, int owner) { return traits_from_ptr<Type>::from(val, owner); } /* Traits that provides the asval/as/check method */ template <class Type> struct traits_asptr { static int asptr(PyObject *obj, Type **val) { Type *p; int res = SWIG_ConvertPtr(obj, (void**)&p, type_info<Type>(), 0); if (SWIG_IsOK(res)) { if (val) *val = p; } return res; } }; template <class Type> inline int asptr(PyObject *obj, Type **vptr) { return traits_asptr<Type>::asptr(obj, vptr); } template <class Type> struct traits_asval { static int asval(PyObject *obj, Type *val) { if (val) { Type *p = 0; int res = traits_asptr<Type>::asptr(obj, &p); if (!SWIG_IsOK(res)) return res; if (p) { typedef typename noconst_traits<Type>::noconst_type noconst_type; *(const_cast<noconst_type*>(val)) = *p; if (SWIG_IsNewObj(res)){ delete p; res = SWIG_DelNewMask(res); } return res; } else { return SWIG_ERROR; } } else { return traits_asptr<Type>::asptr(obj, (Type **)(0)); } } }; template <class Type> struct traits_asval<Type*> { static int asval(PyObject *obj, Type **val) { if (val) { typedef typename noconst_traits<Type>::noconst_type noconst_type; noconst_type *p = 0; int res = traits_asptr<noconst_type>::asptr(obj, &p); if (SWIG_IsOK(res)) { *(const_cast<noconst_type**>(val)) = p; } return res; } else { return traits_asptr<Type>::asptr(obj, (Type **)(0)); } } }; template <class Type> inline int asval(PyObject *obj, Type *val) { return traits_asval<Type>::asval(obj, val); } template <class Type> struct traits_as<Type, value_category> { static Type as(PyObject *obj, bool throw_error) { Type v; int res = asval(obj, &v); if (!obj || !SWIG_IsOK(res)) { if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); } if (throw_error) throw std::invalid_argument("bad type"); } return v; } }; template <class Type> struct traits_as<Type, pointer_category> { static Type as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res) && v) { if (SWIG_IsNewObj(res)) { Type r(*v); delete v; return r; } else { return *v; } } else { // Uninitialized return value, no Type() constructor required. static Type *v_def = (Type*) malloc(sizeof(Type)); if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); } if (throw_error) throw std::invalid_argument("bad type"); memset(v_def,0,sizeof(Type)); return *v_def; } } }; template <class Type> struct traits_as<Type*, pointer_category> { static Type* as(PyObject *obj, bool throw_error) { Type *v = 0; int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR); if (SWIG_IsOK(res)) { return v; } else { if (!PyErr_Occurred()) { SWIG_Error(SWIG_TypeError, swig::type_name<Type>()); } if (throw_error) throw std::invalid_argument("bad type"); return 0; } } }; template <class Type> inline Type as(PyObject *obj, bool te = false) { return traits_as<Type, typename traits<Type>::category>::as(obj, te); } template <class Type> struct traits_check<Type, value_category> { static bool check(PyObject *obj) { int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template <class Type> struct traits_check<Type, pointer_category> { static bool check(PyObject *obj) { int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; return SWIG_IsOK(res) ? true : false; } }; template <class Type> inline bool check(PyObject *obj) { return traits_check<Type, typename traits<Type>::category>::check(obj); } } #include <functional> namespace std { template <> struct less <PyObject *>: public binary_function<PyObject *, PyObject *, bool> { bool operator()(PyObject * v, PyObject *w) const { bool res; SWIG_PYTHON_THREAD_BEGIN_BLOCK; res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false; /* This may fall into a case of inconsistent eg. ObjA > ObjX > ObjB but ObjA < ObjB */ if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) ) { /* Objects can't be compared, this mostly occurred in Python 3.0 */ /* Compare their ptr directly for a workaround */ res = (v < w); PyErr_Clear(); } SWIG_PYTHON_THREAD_END_BLOCK; return res; } }; template <> struct less <swig::SwigPtr_PyObject>: public binary_function<swig::SwigPtr_PyObject, swig::SwigPtr_PyObject, bool> { bool operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const { return std::less<PyObject *>()(v, w); } }; template <> struct less <swig::SwigVar_PyObject>: public binary_function<swig::SwigVar_PyObject, swig::SwigVar_PyObject, bool> { bool operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const { return std::less<PyObject *>()(v, w); } }; } namespace swig { template <> struct traits<PyObject *> { typedef value_category category; static const char* type_name() { return "PyObject *"; } }; template <> struct traits_asval<PyObject * > { typedef PyObject * value_type; static int asval(PyObject *obj, value_type *val) { if (val) *val = obj; return SWIG_OK; } }; template <> struct traits_check<PyObject *, value_category> { static bool check(PyObject *) { return true; } }; template <> struct traits_from<PyObject *> { typedef PyObject * value_type; static PyObject *from(const value_type& val) { Py_XINCREF(val); return val; } }; } namespace swig { inline size_t check_index(ptrdiff_t i, size_t size, bool insert = false) { if ( i < 0 ) { if ((size_t) (-i) <= size) return (size_t) (i + size); } else if ( (size_t) i < size ) { return (size_t) i; } else if (insert && ((size_t) i == size)) { return size; } throw std::out_of_range("index out of range"); } inline size_t slice_index(ptrdiff_t i, size_t size) { if ( i < 0 ) { if ((size_t) (-i) <= size) { return (size_t) (i + size); } else { throw std::out_of_range("index out of range"); } } else { return ( (size_t) i < size ) ? ((size_t) i) : size; } } template <class Sequence, class Difference> inline typename Sequence::iterator getpos(Sequence* self, Difference i) { typename Sequence::iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template <class Sequence, class Difference> inline typename Sequence::const_iterator cgetpos(const Sequence* self, Difference i) { typename Sequence::const_iterator pos = self->begin(); std::advance(pos, check_index(i,self->size())); return pos; } template <class Sequence, class Difference> inline Sequence* getslice(const Sequence* self, Difference i, Difference j) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj > ii) { typename Sequence::const_iterator vb = self->begin(); typename Sequence::const_iterator ve = self->begin(); std::advance(vb,ii); std::advance(ve,jj); return new Sequence(vb, ve); } else { return new Sequence(); } } template <class Sequence, class Difference, class InputSeq> inline void setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size, true); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj < ii) jj = ii; size_t ssize = jj - ii; if (ssize <= v.size()) { typename Sequence::iterator sb = self->begin(); typename InputSeq::const_iterator vmid = v.begin(); std::advance(sb,ii); std::advance(vmid, jj - ii); self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end()); } else { typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); self->insert(sb, v.begin(), v.end()); } } template <class Sequence, class Difference> inline void delslice(Sequence* self, Difference i, Difference j) { typename Sequence::size_type size = self->size(); typename Sequence::size_type ii = swig::check_index(i, size, true); typename Sequence::size_type jj = swig::slice_index(j, size); if (jj > ii) { typename Sequence::iterator sb = self->begin(); typename Sequence::iterator se = self->begin(); std::advance(sb,ii); std::advance(se,jj); self->erase(sb,se); } } } #if defined(__SUNPRO_CC) && defined(_RWSTD_VER) # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL) # define SWIG_STD_NOITERATOR_TRAITS_STL # endif #endif #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) #include <iterator> #else namespace std { template <class Iterator> struct iterator_traits { typedef ptrdiff_t difference_type; typedef typename Iterator::value_type value_type; }; template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance> struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > { typedef Distance difference_type; typedef T value_type; }; template <class T> struct iterator_traits<T*> { typedef T value_type; typedef ptrdiff_t difference_type; }; template<typename _InputIterator> inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } } #endif namespace swig { template<typename OutIterator> class SwigPyIterator_T : public SwigPyIterator { public: typedef OutIterator out_iterator; typedef typename std::iterator_traits<out_iterator>::value_type value_type; typedef SwigPyIterator_T<out_iterator> self_type; SwigPyIterator_T(out_iterator curr, PyObject *seq) : SwigPyIterator(seq), current(curr) { } const out_iterator& get_current() const { return current; } bool equal (const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast<const self_type *>(&iter); if (iters) { return (current == iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } ptrdiff_t distance(const SwigPyIterator &iter) const { const self_type *iters = dynamic_cast<const self_type *>(&iter); if (iters) { return std::distance(current, iters->get_current()); } else { throw std::invalid_argument("bad iterator type"); } } protected: out_iterator current; }; template <class ValueType> struct from_oper { typedef const ValueType& argument_type; typedef PyObject *result_type; result_type operator()(argument_type v) const { return swig::from(v); } }; template<typename OutIterator, typename ValueType = typename std::iterator_traits<OutIterator>::value_type, typename FromOper = from_oper<ValueType> > class SwigPyIteratorOpen_T : public SwigPyIterator_T<OutIterator> { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T<out_iterator> base; typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type; SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq) : SwigPyIterator_T<OutIterator>(curr, seq) { } PyObject *value() const { return from(static_cast<const value_type&>(*(base::current))); } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { ++base::current; } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { --base::current; } return this; } }; template<typename OutIterator, typename ValueType = typename std::iterator_traits<OutIterator>::value_type, typename FromOper = from_oper<ValueType> > class SwigPyIteratorClosed_T : public SwigPyIterator_T<OutIterator> { public: FromOper from; typedef OutIterator out_iterator; typedef ValueType value_type; typedef SwigPyIterator_T<out_iterator> base; typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type; SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last) { } PyObject *value() const { if (base::current == end) { throw stop_iteration(); } else { return from(static_cast<const value_type&>(*(base::current))); } } SwigPyIterator *copy() const { return new self_type(*this); } SwigPyIterator *incr(size_t n = 1) { while (n--) { if (base::current == end) { throw stop_iteration(); } else { ++base::current; } } return this; } SwigPyIterator *decr(size_t n = 1) { while (n--) { if (base::current == begin) { throw stop_iteration(); } else { --base::current; } } return this; } private: out_iterator begin; out_iterator end; }; template<typename OutIter> inline SwigPyIterator* make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) { return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq); } template<typename OutIter> inline SwigPyIterator* make_output_iterator(const OutIter& current, PyObject *seq = 0) { return new SwigPyIteratorOpen_T<OutIter>(current, seq); } } namespace swig { template <class T> struct SwigPySequence_Ref { SwigPySequence_Ref(PyObject* seq, int index) : _seq(seq), _index(index) { } operator T () const { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index); try { return swig::as<T>(item, true); } catch (std::exception& e) { char msg[1024]; sprintf(msg, "in sequence element %d ", _index); if (!PyErr_Occurred()) { ::SWIG_Error(SWIG_TypeError, swig::type_name<T>()); } SWIG_Python_AddErrorMsg(msg); SWIG_Python_AddErrorMsg(e.what()); throw; } } SwigPySequence_Ref& operator=(const T& v) { PySequence_SetItem(_seq, _index, swig::from<T>(v)); return *this; } private: PyObject* _seq; int _index; }; template <class T> struct SwigPySequence_ArrowProxy { SwigPySequence_ArrowProxy(const T& x): m_value(x) {} const T* operator->() const { return &m_value; } operator const T*() const { return &m_value; } T m_value; }; template <class T, class Reference > struct SwigPySequence_InputIterator { typedef SwigPySequence_InputIterator<T, Reference > self; typedef std::random_access_iterator_tag iterator_category; typedef Reference reference; typedef T value_type; typedef T* pointer; typedef int difference_type; SwigPySequence_InputIterator() { } SwigPySequence_InputIterator(PyObject* seq, int index) : _seq(seq), _index(index) { } reference operator*() const { return reference(_seq, _index); } SwigPySequence_ArrowProxy<T> operator->() const { return SwigPySequence_ArrowProxy<T>(operator*()); } bool operator==(const self& ri) const { return (_index == ri._index) && (_seq == ri._seq); } bool operator!=(const self& ri) const { return !(operator==(ri)); } self& operator ++ () { ++_index; return *this; } self& operator -- () { --_index; return *this; } self& operator += (difference_type n) { _index += n; return *this; } self operator +(difference_type n) const { return self(_seq, _index + n); } self& operator -= (difference_type n) { _index -= n; return *this; } self operator -(difference_type n) const { return self(_seq, _index - n); } difference_type operator - (const self& ri) const { return _index - ri._index; } bool operator < (const self& ri) const { return _index < ri._index; } reference operator[](difference_type n) const { return reference(_seq, _index + n); } private: PyObject* _seq; difference_type _index; }; template <class T> struct SwigPySequence_Cont { typedef SwigPySequence_Ref<T> reference; typedef const SwigPySequence_Ref<T> const_reference; typedef T value_type; typedef T* pointer; typedef int difference_type; typedef int size_type; typedef const pointer const_pointer; typedef SwigPySequence_InputIterator<T, reference> iterator; typedef SwigPySequence_InputIterator<T, const_reference> const_iterator; SwigPySequence_Cont(PyObject* seq) : _seq(0) { if (!PySequence_Check(seq)) { throw std::invalid_argument("a sequence is expected"); } _seq = seq; Py_INCREF(_seq); } ~SwigPySequence_Cont() { Py_XDECREF(_seq); } size_type size() const { return static_cast<size_type>(PySequence_Size(_seq)); } bool empty() const { return size() == 0; } iterator begin() { return iterator(_seq, 0); } const_iterator begin() const { return const_iterator(_seq, 0); } iterator end() { return iterator(_seq, size()); } const_iterator end() const { return const_iterator(_seq, size()); } reference operator[](difference_type n) { return reference(_seq, n); } const_reference operator[](difference_type n) const { return const_reference(_seq, n); } bool check(bool set_err = true) const { int s = size(); for (int i = 0; i < s; ++i) { swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i); if (!swig::check<value_type>(item)) { if (set_err) { char msg[1024]; sprintf(msg, "in sequence element %d", i); SWIG_Error(SWIG_RuntimeError, msg); } return false; } } return true; } private: PyObject* _seq; }; } SWIGINTERN int SWIG_AsVal_long (PyObject *obj, long* val) { if (PyInt_Check(obj)) { if (val) *val = PyInt_AsLong(obj); return SWIG_OK; } else if (PyLong_Check(obj)) { long v = PyLong_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } #ifdef SWIG_PYTHON_CAST_MODE { int dispatch = 0; long v = PyInt_AsLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_AddCast(SWIG_OK); } else { PyErr_Clear(); } if (!dispatch) { double d; int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { if (val) *val = (long)(d); return res; } } } #endif return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_long_SS_long (PyObject *obj, long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { long long v = PyLong_AsLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { long v; res = SWIG_AsVal_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; const double mant_min = -mant_max; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) { if (val) *val = (long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } #define SWIG_From_long PyInt_FromLong SWIGINTERNINLINE PyObject* SWIG_From_long_SS_long (long long value) { return ((value < LONG_MIN) || (value > LONG_MAX)) ? PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value)); } SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) { int res = SWIG_TypeError; if (PyLong_Check(obj)) { unsigned long long v = PyLong_AsUnsignedLongLong(obj); if (!PyErr_Occurred()) { if (val) *val = v; return SWIG_OK; } else { PyErr_Clear(); } } else { unsigned long v; res = SWIG_AsVal_unsigned_SS_long (obj,&v); if (SWIG_IsOK(res)) { if (val) *val = v; return res; } } #ifdef SWIG_PYTHON_CAST_MODE { const double mant_max = 1LL << DBL_MANT_DIG; double d; res = SWIG_AsVal_double (obj,&d); if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { if (val) *val = (unsigned long long)(d); return SWIG_AddCast(res); } res = SWIG_TypeError; } #endif return res; } SWIGINTERNINLINE PyObject* SWIG_From_unsigned_SS_long_SS_long (unsigned long long value) { return (value > LONG_MAX) ? PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value)); } SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { int r = PyObject_IsTrue(obj); if (r == -1) return SWIG_ERROR; if (val) *val = r ? true : false; return SWIG_OK; } SWIGINTERNINLINE PyObject* SWIG_From_bool (bool value) { return PyBool_FromLong(value ? 1 : 0); } #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_new_EthAddr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::EthAddr *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_EthAddr",0,0)) SWIG_fail; result = (Net::EthAddr *)new Net::EthAddr(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__EthAddr, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_EthAddr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint8_t *arg1 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Net::EthAddr *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_EthAddr",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EthAddr" "', argument " "1"" of type '" "uint8_t const [6]""'"); } arg1 = reinterpret_cast< uint8_t * >(argp1); result = (Net::EthAddr *)new Net::EthAddr((uint8_t const (*))arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__EthAddr, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_EthAddr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; std::string *arg1 = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; Net::EthAddr *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_EthAddr",1,1,&obj0)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(obj0, &ptr); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EthAddr" "', argument " "1"" of type '" "std::string const &""'"); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EthAddr" "', argument " "1"" of type '" "std::string const &""'"); } arg1 = ptr; } result = (Net::EthAddr *)new Net::EthAddr((std::string const &)*arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__EthAddr, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: if (SWIG_IsNewObj(res1)) delete arg1; return NULL; } SWIGINTERN PyObject *_wrap_new_EthAddr(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_EthAddr__SWIG_0(self, args); } if (argc == 1) { int _v; void *vptr = 0; int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_EthAddr__SWIG_1(self, args); } } if (argc == 1) { int _v; int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_EthAddr__SWIG_2(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_EthAddr'.\n" " Possible C/C++ prototypes are:\n" " Net::EthAddr()\n" " Net::EthAddr(uint8_t const [6])\n" " Net::EthAddr(std::string const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_EthAddr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::EthAddr *arg1 = (Net::EthAddr *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_EthAddr",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Net__EthAddr, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EthAddr" "', argument " "1"" of type '" "Net::EthAddr *""'"); } arg1 = reinterpret_cast< Net::EthAddr * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *EthAddr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Net__EthAddr, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_IpAddress__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::IpAddress *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_IpAddress",0,0)) SWIG_fail; result = (Net::IpAddress *)new Net::IpAddress(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__IpAddress, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IpAddress__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint32_t arg1 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; Net::IpAddress *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_IpAddress",1,1,&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IpAddress" "', argument " "1"" of type '" "uint32_t""'"); } arg1 = static_cast< uint32_t >(val1); result = (Net::IpAddress *)new Net::IpAddress(arg1); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__IpAddress, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IpAddress(PyObject *self, PyObject *args) { int argc; PyObject *argv[2]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IpAddress__SWIG_0(self, args); } if (argc == 1) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IpAddress__SWIG_1(self, args); } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IpAddress'.\n" " Possible C/C++ prototypes are:\n" " Net::IpAddress()\n" " Net::IpAddress(uint32_t const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_IpAddress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::IpAddress *arg1 = (Net::IpAddress *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_IpAddress",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Net__IpAddress, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IpAddress" "', argument " "1"" of type '" "Net::IpAddress *""'"); } arg1 = reinterpret_cast< Net::IpAddress * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IpAddress_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Net__IpAddress, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_IpNetmask__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::IpNetmask *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_IpNetmask",0,0)) SWIG_fail; result = (Net::IpNetmask *)new Net::IpNetmask(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__IpNetmask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IpNetmask__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint32_t arg1 ; uint8_t arg2 ; unsigned int val1 ; int ecode1 = 0 ; unsigned char val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Net::IpNetmask *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_IpNetmask",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IpNetmask" "', argument " "1"" of type '" "uint32_t""'"); } arg1 = static_cast< uint32_t >(val1); ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IpNetmask" "', argument " "2"" of type '" "uint8_t""'"); } arg2 = static_cast< uint8_t >(val2); result = (Net::IpNetmask *)new Net::IpNetmask(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__IpNetmask, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IpNetmask(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IpNetmask__SWIG_0(self, args); } if (argc == 2) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_unsigned_SS_char(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IpNetmask__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IpNetmask'.\n" " Possible C/C++ prototypes are:\n" " Net::IpNetmask()\n" " Net::IpNetmask(uint32_t const,uint8_t const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_IpNetmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::IpNetmask *arg1 = (Net::IpNetmask *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_IpNetmask",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Net__IpNetmask, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IpNetmask" "', argument " "1"" of type '" "Net::IpNetmask *""'"); } arg1 = reinterpret_cast< Net::IpNetmask * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IpNetmask_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Net__IpNetmask, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_IpWithPort__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::IpWithPort *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_IpWithPort",0,0)) SWIG_fail; result = (Net::IpWithPort *)new Net::IpWithPort(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__IpWithPort, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IpWithPort__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; uint32_t arg1 ; uint16_t arg2 ; unsigned int val1 ; int ecode1 = 0 ; unsigned short val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; Net::IpWithPort *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_IpWithPort",2,2,&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IpWithPort" "', argument " "1"" of type '" "uint32_t""'"); } arg1 = static_cast< uint32_t >(val1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IpWithPort" "', argument " "2"" of type '" "uint16_t""'"); } arg2 = static_cast< uint16_t >(val2); result = (Net::IpWithPort *)new Net::IpWithPort(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__IpWithPort, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_IpWithPort(PyObject *self, PyObject *args) { int argc; PyObject *argv[3]; int ii; if (!PyTuple_Check(args)) SWIG_fail; argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 0) { return _wrap_new_IpWithPort__SWIG_0(self, args); } if (argc == 2) { int _v; { int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); _v = SWIG_CheckState(res); } if (_v) { { int res = SWIG_AsVal_unsigned_SS_short(argv[1], NULL); _v = SWIG_CheckState(res); } if (_v) { return _wrap_new_IpWithPort__SWIG_1(self, args); } } } fail: SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_IpWithPort'.\n" " Possible C/C++ prototypes are:\n" " Net::IpWithPort()\n" " Net::IpWithPort(uint32_t const,uint16_t const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_IpWithPort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Net::IpWithPort *arg1 = (Net::IpWithPort *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_IpWithPort",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Net__IpWithPort, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IpWithPort" "', argument " "1"" of type '" "Net::IpWithPort *""'"); } arg1 = reinterpret_cast< Net::IpWithPort * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *IpWithPort_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Net__IpWithPort, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *EtherDevBase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_EtherDevBase, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_hardware_address_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Net::EthAddr *arg2 = (Net::EthAddr *) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_hardware_address_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_hardware_address_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Net__EthAddr, 0 | 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EtherDevBaseParams_hardware_address_set" "', argument " "2"" of type '" "Net::EthAddr *""'"); } arg2 = reinterpret_cast< Net::EthAddr * >(argp2); if (arg1) (arg1)->hardware_address = *arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_hardware_address_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Net::EthAddr *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_hardware_address_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_hardware_address_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Net::EthAddr *)& ((arg1)->hardware_address); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Net__EthAddr, 0 | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_delay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_delay_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_delay_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_rx_delay_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->rx_delay = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_delay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_delay_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_delay_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->rx_delay); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_tx_fifo_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_tx_fifo_size_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_tx_fifo_size_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_tx_fifo_size_set" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = static_cast< uint64_t >(val2); if (arg1) (arg1)->tx_fifo_size = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_tx_fifo_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint64_t result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_tx_fifo_size_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_tx_fifo_size_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (uint64_t) ((arg1)->tx_fifo_size); resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_write_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_write_factor_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_write_factor_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_dma_write_factor_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->dma_write_factor = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_write_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_write_factor_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_write_factor_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->dma_write_factor); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_clock_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_clock_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_clock_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_clock_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->clock = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_clock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_clock_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_clock_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->clock); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_write_delay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_write_delay_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_write_delay_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_dma_write_delay_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->dma_write_delay = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_write_delay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_write_delay_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_write_delay_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->dma_write_delay); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_filter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_filter_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_filter_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_rx_filter_set" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); if (arg1) (arg1)->rx_filter = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_filter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_filter_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_filter_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (bool) ((arg1)->rx_filter); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_read_delay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_read_delay_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_read_delay_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_dma_read_delay_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->dma_read_delay = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_read_delay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_read_delay_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_read_delay_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->dma_read_delay); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_intr_delay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_intr_delay_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_intr_delay_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_intr_delay_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->intr_delay = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_intr_delay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_intr_delay_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_intr_delay_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->intr_delay); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_read_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_read_factor_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_read_factor_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_dma_read_factor_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->dma_read_factor = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_dma_read_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_dma_read_factor_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_dma_read_factor_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->dma_read_factor); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_fifo_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; uint64_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_fifo_size_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_fifo_size_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_rx_fifo_size_set" "', argument " "2"" of type '" "uint64_t""'"); } arg2 = static_cast< uint64_t >(val2); if (arg1) (arg1)->rx_fifo_size = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_fifo_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; uint64_t result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_fifo_size_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_fifo_size_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (uint64_t) ((arg1)->rx_fifo_size); resultobj = SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_thread_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_thread_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_thread_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_rx_thread_set" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); if (arg1) (arg1)->rx_thread = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rx_thread_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rx_thread_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rx_thread_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (bool) ((arg1)->rx_thread); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_tx_thread_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_tx_thread_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_tx_thread_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_tx_thread_set" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); if (arg1) (arg1)->tx_thread = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_tx_thread_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_tx_thread_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_tx_thread_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (bool) ((arg1)->tx_thread); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_tx_delay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; Tick arg2 ; void *argp1 = 0 ; int res1 = 0 ; long long val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_tx_delay_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_tx_delay_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_tx_delay_set" "', argument " "2"" of type '" "Tick""'"); } arg2 = static_cast< Tick >(val2); if (arg1) (arg1)->tx_delay = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_tx_delay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; Tick result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_tx_delay_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_tx_delay_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (Tick) ((arg1)->tx_delay); resultobj = SWIG_From_long_SS_long(static_cast< long long >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rss_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; bool arg2 ; void *argp1 = 0 ; int res1 = 0 ; bool val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rss_set",2,2,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rss_set" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EtherDevBaseParams_rss_set" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); if (arg1) (arg1)->rss = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_EtherDevBaseParams_rss_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; bool result; if(!PyArg_UnpackTuple(args,(char *)"EtherDevBaseParams_rss_get",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EtherDevBaseParams_rss_get" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); result = (bool) ((arg1)->rss); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_new_EtherDevBaseParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_EtherDevBaseParams",0,0)) SWIG_fail; result = (EtherDevBaseParams *)new EtherDevBaseParams(); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EtherDevBaseParams, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } SWIGINTERN PyObject *_wrap_delete_EtherDevBaseParams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; EtherDevBaseParams *arg1 = (EtherDevBaseParams *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if(!PyArg_UnpackTuple(args,(char *)"delete_EtherDevBaseParams",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_EtherDevBaseParams, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EtherDevBaseParams" "', argument " "1"" of type '" "EtherDevBaseParams *""'"); } arg1 = reinterpret_cast< EtherDevBaseParams * >(argp1); delete arg1; resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; } SWIGINTERN PyObject *EtherDevBaseParams_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_EtherDevBaseParams, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } static PyMethodDef SwigMethods[] = { { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"new_EthAddr", _wrap_new_EthAddr, METH_VARARGS, NULL}, { (char *)"delete_EthAddr", _wrap_delete_EthAddr, METH_VARARGS, NULL}, { (char *)"EthAddr_swigregister", EthAddr_swigregister, METH_VARARGS, NULL}, { (char *)"new_IpAddress", _wrap_new_IpAddress, METH_VARARGS, NULL}, { (char *)"delete_IpAddress", _wrap_delete_IpAddress, METH_VARARGS, NULL}, { (char *)"IpAddress_swigregister", IpAddress_swigregister, METH_VARARGS, NULL}, { (char *)"new_IpNetmask", _wrap_new_IpNetmask, METH_VARARGS, NULL}, { (char *)"delete_IpNetmask", _wrap_delete_IpNetmask, METH_VARARGS, NULL}, { (char *)"IpNetmask_swigregister", IpNetmask_swigregister, METH_VARARGS, NULL}, { (char *)"new_IpWithPort", _wrap_new_IpWithPort, METH_VARARGS, NULL}, { (char *)"delete_IpWithPort", _wrap_delete_IpWithPort, METH_VARARGS, NULL}, { (char *)"IpWithPort_swigregister", IpWithPort_swigregister, METH_VARARGS, NULL}, { (char *)"EtherDevBase_swigregister", EtherDevBase_swigregister, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_hardware_address_set", _wrap_EtherDevBaseParams_hardware_address_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_hardware_address_get", _wrap_EtherDevBaseParams_hardware_address_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_delay_set", _wrap_EtherDevBaseParams_rx_delay_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_delay_get", _wrap_EtherDevBaseParams_rx_delay_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_tx_fifo_size_set", _wrap_EtherDevBaseParams_tx_fifo_size_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_tx_fifo_size_get", _wrap_EtherDevBaseParams_tx_fifo_size_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_write_factor_set", _wrap_EtherDevBaseParams_dma_write_factor_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_write_factor_get", _wrap_EtherDevBaseParams_dma_write_factor_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_clock_set", _wrap_EtherDevBaseParams_clock_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_clock_get", _wrap_EtherDevBaseParams_clock_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_write_delay_set", _wrap_EtherDevBaseParams_dma_write_delay_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_write_delay_get", _wrap_EtherDevBaseParams_dma_write_delay_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_filter_set", _wrap_EtherDevBaseParams_rx_filter_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_filter_get", _wrap_EtherDevBaseParams_rx_filter_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_read_delay_set", _wrap_EtherDevBaseParams_dma_read_delay_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_read_delay_get", _wrap_EtherDevBaseParams_dma_read_delay_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_intr_delay_set", _wrap_EtherDevBaseParams_intr_delay_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_intr_delay_get", _wrap_EtherDevBaseParams_intr_delay_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_read_factor_set", _wrap_EtherDevBaseParams_dma_read_factor_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_dma_read_factor_get", _wrap_EtherDevBaseParams_dma_read_factor_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_fifo_size_set", _wrap_EtherDevBaseParams_rx_fifo_size_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_fifo_size_get", _wrap_EtherDevBaseParams_rx_fifo_size_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_thread_set", _wrap_EtherDevBaseParams_rx_thread_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rx_thread_get", _wrap_EtherDevBaseParams_rx_thread_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_tx_thread_set", _wrap_EtherDevBaseParams_tx_thread_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_tx_thread_get", _wrap_EtherDevBaseParams_tx_thread_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_tx_delay_set", _wrap_EtherDevBaseParams_tx_delay_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_tx_delay_get", _wrap_EtherDevBaseParams_tx_delay_get, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rss_set", _wrap_EtherDevBaseParams_rss_set, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_rss_get", _wrap_EtherDevBaseParams_rss_get, METH_VARARGS, NULL}, { (char *)"new_EtherDevBaseParams", _wrap_new_EtherDevBaseParams, METH_VARARGS, NULL}, { (char *)"delete_EtherDevBaseParams", _wrap_delete_EtherDevBaseParams, METH_VARARGS, NULL}, { (char *)"EtherDevBaseParams_swigregister", EtherDevBaseParams_swigregister, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ static void *_p_Net__IpWithPortTo_p_Net__IpAddress(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Net::IpAddress *) ((Net::IpWithPort *) x)); } static void *_p_Net__IpNetmaskTo_p_Net__IpAddress(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Net::IpAddress *) ((Net::IpNetmask *) x)); } static void *_p_EtherDevBaseTo_p_PciDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PciDevice *) (EtherDevice *) ((EtherDevBase *) x)); } static void *_p_EtherDeviceTo_p_PciDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PciDevice *) ((EtherDevice *) x)); } static void *_p_EtherDevBaseTo_p_DmaDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((DmaDevice *) (PciDevice *)(EtherDevice *) ((EtherDevBase *) x)); } static void *_p_EtherDeviceTo_p_DmaDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((DmaDevice *) (PciDevice *) ((EtherDevice *) x)); } static void *_p_PciDeviceTo_p_DmaDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((DmaDevice *) ((PciDevice *) x)); } static void *_p_EtherDevBaseTo_p_PioDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDevice *) (DmaDevice *)(PciDevice *)(EtherDevice *) ((EtherDevBase *) x)); } static void *_p_EtherDeviceTo_p_PioDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDevice *) (DmaDevice *)(PciDevice *) ((EtherDevice *) x)); } static void *_p_DmaDeviceTo_p_PioDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDevice *) ((DmaDevice *) x)); } static void *_p_PciDeviceTo_p_PioDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDevice *) (DmaDevice *) ((PciDevice *) x)); } static void *_p_EtherDevBaseParamsTo_p_EtherDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((EtherDeviceParams *) ((EtherDevBaseParams *) x)); } static void *_p_EtherDeviceParamsTo_p_PciDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PciDeviceParams *) ((EtherDeviceParams *) x)); } static void *_p_EtherDevBaseParamsTo_p_PciDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PciDeviceParams *) (EtherDeviceParams *) ((EtherDevBaseParams *) x)); } static void *_p_PciDeviceParamsTo_p_DmaDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((DmaDeviceParams *) ((PciDeviceParams *) x)); } static void *_p_EtherDeviceParamsTo_p_DmaDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((DmaDeviceParams *) (PciDeviceParams *) ((EtherDeviceParams *) x)); } static void *_p_EtherDevBaseParamsTo_p_DmaDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((DmaDeviceParams *) (PciDeviceParams *)(EtherDeviceParams *) ((EtherDevBaseParams *) x)); } static void *_p_DmaDeviceParamsTo_p_PioDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDeviceParams *) ((DmaDeviceParams *) x)); } static void *_p_PciDeviceParamsTo_p_PioDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDeviceParams *) (DmaDeviceParams *) ((PciDeviceParams *) x)); } static void *_p_EtherDeviceParamsTo_p_PioDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDeviceParams *) (DmaDeviceParams *)(PciDeviceParams *) ((EtherDeviceParams *) x)); } static void *_p_EtherDevBaseParamsTo_p_PioDeviceParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((PioDeviceParams *) (DmaDeviceParams *)(PciDeviceParams *)(EtherDeviceParams *) ((EtherDevBaseParams *) x)); } static void *_p_AbstractMemoryTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) ((AbstractMemory *) x)); } static void *_p_EtherDevBaseTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) (PioDevice *)(DmaDevice *)(PciDevice *)(EtherDevice *) ((EtherDevBase *) x)); } static void *_p_SystemTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) ((System *) x)); } static void *_p_EtherDeviceTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) (PioDevice *)(DmaDevice *)(PciDevice *) ((EtherDevice *) x)); } static void *_p_PioDeviceTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) ((PioDevice *) x)); } static void *_p_DmaDeviceTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) (PioDevice *) ((DmaDevice *) x)); } static void *_p_PciDeviceTo_p_MemObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObject *) (PioDevice *)(DmaDevice *) ((PciDevice *) x)); } static void *_p_AbstractMemoryTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *) ((AbstractMemory *) x)); } static void *_p_IntrControlTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) ((IntrControl *) x)); } static void *_p_EtherDevBaseTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *)(PioDevice *)(DmaDevice *)(PciDevice *)(EtherDevice *) ((EtherDevBase *) x)); } static void *_p_SystemTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *) ((System *) x)); } static void *_p_MemObjectTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) ((MemObject *) x)); } static void *_p_PlatformTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) ((Platform *) x)); } static void *_p_EtherDeviceTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *)(PioDevice *)(DmaDevice *)(PciDevice *) ((EtherDevice *) x)); } static void *_p_PioDeviceTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *) ((PioDevice *) x)); } static void *_p_DmaDeviceTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *)(PioDevice *) ((DmaDevice *) x)); } static void *_p_PciDeviceTo_p_SimObject(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObject *) (MemObject *)(PioDevice *)(DmaDevice *) ((PciDevice *) x)); } static void *_p_EtherDevBaseTo_p_EtherDevice(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((EtherDevice *) ((EtherDevBase *) x)); } static void *_p_AbstractMemoryParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) ((AbstractMemoryParams *) x)); } static void *_p_SystemParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) ((SystemParams *) x)); } static void *_p_PioDeviceParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) ((PioDeviceParams *) x)); } static void *_p_DmaDeviceParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) (PioDeviceParams *) ((DmaDeviceParams *) x)); } static void *_p_PciDeviceParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) (PioDeviceParams *)(DmaDeviceParams *) ((PciDeviceParams *) x)); } static void *_p_EtherDeviceParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) (PioDeviceParams *)(DmaDeviceParams *)(PciDeviceParams *) ((EtherDeviceParams *) x)); } static void *_p_EtherDevBaseParamsTo_p_MemObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((MemObjectParams *) (PioDeviceParams *)(DmaDeviceParams *)(PciDeviceParams *)(EtherDeviceParams *) ((EtherDevBaseParams *) x)); } static void *_p_MemObjectParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) ((MemObjectParams *) x)); } static void *_p_IntrControlParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) ((IntrControlParams *) x)); } static void *_p_AbstractMemoryParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *) ((AbstractMemoryParams *) x)); } static void *_p_SystemParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *) ((SystemParams *) x)); } static void *_p_PlatformParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) ((PlatformParams *) x)); } static void *_p_PioDeviceParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *) ((PioDeviceParams *) x)); } static void *_p_DmaDeviceParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *)(PioDeviceParams *) ((DmaDeviceParams *) x)); } static void *_p_PciDeviceParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *)(PioDeviceParams *)(DmaDeviceParams *) ((PciDeviceParams *) x)); } static void *_p_EtherDeviceParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *)(PioDeviceParams *)(DmaDeviceParams *)(PciDeviceParams *) ((EtherDeviceParams *) x)); } static void *_p_EtherDevBaseParamsTo_p_SimObjectParams(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((SimObjectParams *) (MemObjectParams *)(PioDeviceParams *)(DmaDeviceParams *)(PciDeviceParams *)(EtherDeviceParams *) ((EtherDevBaseParams *) x)); } static swig_type_info _swigt__p_AbstractMemory = {"_p_AbstractMemory", "AbstractMemory *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_DmaDevice = {"_p_DmaDevice", "DmaDevice *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_DmaDeviceParams = {"_p_DmaDeviceParams", "DmaDeviceParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_EtherDevBase = {"_p_EtherDevBase", "EtherDevBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_EtherDevBaseParams = {"_p_EtherDevBaseParams", "EtherDevBaseParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_EtherDevice = {"_p_EtherDevice", "EtherDevice *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_EtherDeviceParams = {"_p_EtherDeviceParams", "EtherDeviceParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_MemObject = {"_p_MemObject", "MemObject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_System = {"_p_System", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_MemObjectParams = {"_p_MemObjectParams", "MemObjectParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_AbstractMemoryParams = {"_p_AbstractMemoryParams", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_SystemParams = {"_p_SystemParams", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Net__EthAddr = {"_p_Net__EthAddr", "Net::EthAddr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Net__IpAddress = {"_p_Net__IpAddress", "Net::IpAddress *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Net__IpNetmask = {"_p_Net__IpNetmask", "Net::IpNetmask *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Net__IpWithPort = {"_p_Net__IpWithPort", "Net::IpWithPort *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PciDevice = {"_p_PciDevice", "PciDevice *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PciDeviceParams = {"_p_PciDeviceParams", "PciDeviceParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PioDevice = {"_p_PioDevice", "PioDevice *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_PioDeviceParams = {"_p_PioDeviceParams", "PioDeviceParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_RefCountingPtrT_FaultBase_t = {"_p_RefCountingPtrT_FaultBase_t", "Fault *|RefCountingPtr< FaultBase > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SimObject = {"_p_SimObject", "SimObject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IntrControl = {"_p_IntrControl", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Platform = {"_p_Platform", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_SimObjectParams = {"_p_SimObjectParams", "SimObjectParams *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IntrControlParams = {"_p_IntrControlParams", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_PlatformParams = {"_p_PlatformParams", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_const_reference = {"_p_const_reference", "const_reference *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|Counter *|Tick *|intmax_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_AbstractMemory = {"_p_p_AbstractMemory", "AbstractMemory **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_short = {"_p_short", "short *|ThreadID *|PortID *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|Addr *|uintmax_t *|UTick *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|MicroPC *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_AbstractMemory, &_swigt__p_AbstractMemoryParams, &_swigt__p_DmaDevice, &_swigt__p_DmaDeviceParams, &_swigt__p_EtherDevBase, &_swigt__p_EtherDevBaseParams, &_swigt__p_EtherDevice, &_swigt__p_EtherDeviceParams, &_swigt__p_IntrControl, &_swigt__p_IntrControlParams, &_swigt__p_MemObject, &_swigt__p_MemObjectParams, &_swigt__p_Net__EthAddr, &_swigt__p_Net__IpAddress, &_swigt__p_Net__IpNetmask, &_swigt__p_Net__IpWithPort, &_swigt__p_PciDevice, &_swigt__p_PciDeviceParams, &_swigt__p_PioDevice, &_swigt__p_PioDeviceParams, &_swigt__p_Platform, &_swigt__p_PlatformParams, &_swigt__p_RefCountingPtrT_FaultBase_t, &_swigt__p_SimObject, &_swigt__p_SimObjectParams, &_swigt__p_System, &_swigt__p_SystemParams, &_swigt__p_allocator_type, &_swigt__p_char, &_swigt__p_const_reference, &_swigt__p_difference_type, &_swigt__p_int, &_swigt__p_long_long, &_swigt__p_p_AbstractMemory, &_swigt__p_reference, &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, &_swigt__p_unsigned_long_long, &_swigt__p_unsigned_short, }; static swig_cast_info _swigc__p_AbstractMemory[] = { {&_swigt__p_AbstractMemory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DmaDevice[] = { {&_swigt__p_EtherDevBase, _p_EtherDevBaseTo_p_DmaDevice, 0, 0}, {&_swigt__p_EtherDevice, _p_EtherDeviceTo_p_DmaDevice, 0, 0}, {&_swigt__p_DmaDevice, 0, 0, 0}, {&_swigt__p_PciDevice, _p_PciDeviceTo_p_DmaDevice, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_DmaDeviceParams[] = { {&_swigt__p_DmaDeviceParams, 0, 0, 0}, {&_swigt__p_PciDeviceParams, _p_PciDeviceParamsTo_p_DmaDeviceParams, 0, 0}, {&_swigt__p_EtherDeviceParams, _p_EtherDeviceParamsTo_p_DmaDeviceParams, 0, 0}, {&_swigt__p_EtherDevBaseParams, _p_EtherDevBaseParamsTo_p_DmaDeviceParams, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_EtherDevBase[] = { {&_swigt__p_EtherDevBase, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_EtherDevBaseParams[] = { {&_swigt__p_EtherDevBaseParams, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_EtherDevice[] = { {&_swigt__p_EtherDevBase, _p_EtherDevBaseTo_p_EtherDevice, 0, 0}, {&_swigt__p_EtherDevice, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_EtherDeviceParams[] = { {&_swigt__p_EtherDeviceParams, 0, 0, 0}, {&_swigt__p_EtherDevBaseParams, _p_EtherDevBaseParamsTo_p_EtherDeviceParams, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_System[] = {{&_swigt__p_System, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MemObject[] = { {&_swigt__p_AbstractMemory, _p_AbstractMemoryTo_p_MemObject, 0, 0}, {&_swigt__p_EtherDevBase, _p_EtherDevBaseTo_p_MemObject, 0, 0}, {&_swigt__p_MemObject, 0, 0, 0}, {&_swigt__p_System, _p_SystemTo_p_MemObject, 0, 0}, {&_swigt__p_EtherDevice, _p_EtherDeviceTo_p_MemObject, 0, 0}, {&_swigt__p_PioDevice, _p_PioDeviceTo_p_MemObject, 0, 0}, {&_swigt__p_DmaDevice, _p_DmaDeviceTo_p_MemObject, 0, 0}, {&_swigt__p_PciDevice, _p_PciDeviceTo_p_MemObject, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_AbstractMemoryParams[] = {{&_swigt__p_AbstractMemoryParams, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SystemParams[] = {{&_swigt__p_SystemParams, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MemObjectParams[] = { {&_swigt__p_MemObjectParams, 0, 0, 0}, {&_swigt__p_AbstractMemoryParams, _p_AbstractMemoryParamsTo_p_MemObjectParams, 0, 0}, {&_swigt__p_SystemParams, _p_SystemParamsTo_p_MemObjectParams, 0, 0}, {&_swigt__p_PioDeviceParams, _p_PioDeviceParamsTo_p_MemObjectParams, 0, 0}, {&_swigt__p_DmaDeviceParams, _p_DmaDeviceParamsTo_p_MemObjectParams, 0, 0}, {&_swigt__p_PciDeviceParams, _p_PciDeviceParamsTo_p_MemObjectParams, 0, 0}, {&_swigt__p_EtherDeviceParams, _p_EtherDeviceParamsTo_p_MemObjectParams, 0, 0}, {&_swigt__p_EtherDevBaseParams, _p_EtherDevBaseParamsTo_p_MemObjectParams, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Net__EthAddr[] = { {&_swigt__p_Net__EthAddr, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Net__IpAddress[] = { {&_swigt__p_Net__IpWithPort, _p_Net__IpWithPortTo_p_Net__IpAddress, 0, 0}, {&_swigt__p_Net__IpNetmask, _p_Net__IpNetmaskTo_p_Net__IpAddress, 0, 0}, {&_swigt__p_Net__IpAddress, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Net__IpNetmask[] = { {&_swigt__p_Net__IpNetmask, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Net__IpWithPort[] = { {&_swigt__p_Net__IpWithPort, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PciDevice[] = { {&_swigt__p_EtherDevBase, _p_EtherDevBaseTo_p_PciDevice, 0, 0}, {&_swigt__p_EtherDevice, _p_EtherDeviceTo_p_PciDevice, 0, 0}, {&_swigt__p_PciDevice, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PciDeviceParams[] = { {&_swigt__p_PciDeviceParams, 0, 0, 0}, {&_swigt__p_EtherDeviceParams, _p_EtherDeviceParamsTo_p_PciDeviceParams, 0, 0}, {&_swigt__p_EtherDevBaseParams, _p_EtherDevBaseParamsTo_p_PciDeviceParams, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PioDevice[] = { {&_swigt__p_EtherDevBase, _p_EtherDevBaseTo_p_PioDevice, 0, 0}, {&_swigt__p_EtherDevice, _p_EtherDeviceTo_p_PioDevice, 0, 0}, {&_swigt__p_PioDevice, 0, 0, 0}, {&_swigt__p_DmaDevice, _p_DmaDeviceTo_p_PioDevice, 0, 0}, {&_swigt__p_PciDevice, _p_PciDeviceTo_p_PioDevice, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PioDeviceParams[] = { {&_swigt__p_PioDeviceParams, 0, 0, 0}, {&_swigt__p_DmaDeviceParams, _p_DmaDeviceParamsTo_p_PioDeviceParams, 0, 0}, {&_swigt__p_PciDeviceParams, _p_PciDeviceParamsTo_p_PioDeviceParams, 0, 0}, {&_swigt__p_EtherDeviceParams, _p_EtherDeviceParamsTo_p_PioDeviceParams, 0, 0}, {&_swigt__p_EtherDevBaseParams, _p_EtherDevBaseParamsTo_p_PioDeviceParams, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_RefCountingPtrT_FaultBase_t[] = { {&_swigt__p_RefCountingPtrT_FaultBase_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntrControl[] = {{&_swigt__p_IntrControl, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Platform[] = {{&_swigt__p_Platform, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SimObject[] = { {&_swigt__p_AbstractMemory, _p_AbstractMemoryTo_p_SimObject, 0, 0}, {&_swigt__p_IntrControl, _p_IntrControlTo_p_SimObject, 0, 0}, {&_swigt__p_EtherDevBase, _p_EtherDevBaseTo_p_SimObject, 0, 0}, {&_swigt__p_SimObject, 0, 0, 0}, {&_swigt__p_System, _p_SystemTo_p_SimObject, 0, 0}, {&_swigt__p_MemObject, _p_MemObjectTo_p_SimObject, 0, 0}, {&_swigt__p_EtherDevice, _p_EtherDeviceTo_p_SimObject, 0, 0}, {&_swigt__p_Platform, _p_PlatformTo_p_SimObject, 0, 0}, {&_swigt__p_PioDevice, _p_PioDeviceTo_p_SimObject, 0, 0}, {&_swigt__p_DmaDevice, _p_DmaDeviceTo_p_SimObject, 0, 0}, {&_swigt__p_PciDevice, _p_PciDeviceTo_p_SimObject, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntrControlParams[] = {{&_swigt__p_IntrControlParams, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_PlatformParams[] = {{&_swigt__p_PlatformParams, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SimObjectParams[] = { {&_swigt__p_SimObjectParams, 0, 0, 0}, {&_swigt__p_MemObjectParams, _p_MemObjectParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_IntrControlParams, _p_IntrControlParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_AbstractMemoryParams, _p_AbstractMemoryParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_SystemParams, _p_SystemParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_PioDeviceParams, _p_PioDeviceParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_DmaDeviceParams, _p_DmaDeviceParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_PciDeviceParams, _p_PciDeviceParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_EtherDeviceParams, _p_EtherDeviceParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_EtherDevBaseParams, _p_EtherDevBaseParamsTo_p_SimObjectParams, 0, 0}, {&_swigt__p_PlatformParams, _p_PlatformParamsTo_p_SimObjectParams, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_const_reference[] = { {&_swigt__p_const_reference, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_AbstractMemory[] = { {&_swigt__p_p_AbstractMemory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_reference[] = { {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_AbstractMemory, _swigc__p_AbstractMemoryParams, _swigc__p_DmaDevice, _swigc__p_DmaDeviceParams, _swigc__p_EtherDevBase, _swigc__p_EtherDevBaseParams, _swigc__p_EtherDevice, _swigc__p_EtherDeviceParams, _swigc__p_IntrControl, _swigc__p_IntrControlParams, _swigc__p_MemObject, _swigc__p_MemObjectParams, _swigc__p_Net__EthAddr, _swigc__p_Net__IpAddress, _swigc__p_Net__IpNetmask, _swigc__p_Net__IpWithPort, _swigc__p_PciDevice, _swigc__p_PciDeviceParams, _swigc__p_PioDevice, _swigc__p_PioDeviceParams, _swigc__p_Platform, _swigc__p_PlatformParams, _swigc__p_RefCountingPtrT_FaultBase_t, _swigc__p_SimObject, _swigc__p_SimObjectParams, _swigc__p_System, _swigc__p_SystemParams, _swigc__p_allocator_type, _swigc__p_char, _swigc__p_const_reference, _swigc__p_difference_type, _swigc__p_int, _swigc__p_long_long, _swigc__p_p_AbstractMemory, _swigc__p_reference, _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, _swigc__p_unsigned_char, _swigc__p_unsigned_int, _swigc__p_unsigned_long_long, _swigc__p_unsigned_short, }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ static swig_const_info swig_const_table[] = { {0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back * to swig_type_info structures, we need some lookup code at initialization. * The idea is that swig generates all the structures that are needed. * The runtime then collects these partially filled structures. * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * * The generated swig_type_info structures are assigned staticly to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. * ----------------------------------------------------------------------------- */ #ifdef __cplusplus extern "C" { #if 0 } /* c-mode */ #endif #endif #if 0 #define SWIGRUNTIME_DEBUG #endif SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; clientdata = clientdata; /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; init = 1; } else { init = 0; } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ found=0; iter=module_head; do { if (iter==&swig_module) { found=1; break; } iter=iter->next; } while (iter!= module_head); /* if the is found in the list, then all is done and we may leave */ if (found) return; /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found type %s\n", type->name); #endif if (swig_module.type_initial[i]->clientdata) { type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif } if (ret) { if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif cast->type = ret; ret = 0; } else { /* Check for casting already in the list */ swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif if (!ocast) ret = 0; } } if (!ret) { #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } cast++; } /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; #ifdef SWIGRUNTIME_DEBUG printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { int j = 0; swig_cast_info *cast = swig_module.cast_initial[i]; printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); cast++; ++j; } printf("---- Total casts: %d\n",j); } printf("**** SWIG_InitializeModule: Cast List ******\n"); #endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ SWIGRUNTIME void SWIG_PropagateClientData(void) { size_t i; swig_cast_info *equiv; static int init_run = 0; if (init_run) return; init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { if (equiv->type && !equiv->type->clientdata) SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); } equiv = equiv->next; } } } } #ifdef __cplusplus #if 0 { /* c-mode */ #endif } #endif #ifdef __cplusplus extern "C" { #endif /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) /* ----------------------------------------------------------------------------- * global variable support code. * ----------------------------------------------------------------------------- */ typedef struct swig_globalvar { char *name; /* Name of global variable */ PyObject *(*get_attr)(void); /* Return the current value */ int (*set_attr)(PyObject *); /* Set the value */ struct swig_globalvar *next; } swig_globalvar; typedef struct swig_varlinkobject { PyObject_HEAD swig_globalvar *vars; } swig_varlinkobject; SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { #if PY_VERSION_HEX >= 0x03000000 return PyUnicode_InternFromString("<Swig global variables>"); #else return PyString_FromString("<Swig global variables>"); #endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { #if PY_VERSION_HEX >= 0x03000000 PyObject *str = PyUnicode_InternFromString("("); PyObject *tail; PyObject *joined; swig_globalvar *var; for (var = v->vars; var; var=var->next) { tail = PyUnicode_FromString(var->name); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; if (var->next) { tail = PyUnicode_InternFromString(", "); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; } } tail = PyUnicode_InternFromString(")"); joined = PyUnicode_Concat(str, tail); Py_DecRef(str); Py_DecRef(tail); str = joined; #else PyObject *str = PyString_FromString("("); swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); #endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v) { swig_globalvar *var = v->vars; while (var) { swig_globalvar *n = var->next; free(var->name); free(var); var = n; } } SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n) { PyObject *res = NULL; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->get_attr)(); break; } var = var->next; } if (res == NULL && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { int res = 1; swig_globalvar *var = v->vars; while (var) { if (strcmp(var->name,n) == 0) { res = (*var->set_attr)(p); break; } var = var->next; } if (res == 1 && !PyErr_Occurred()) { PyErr_SetString(PyExc_NameError,"Unknown C global variable"); } return res; } SWIGINTERN PyTypeObject* swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; static int type_init = 0; if (!type_init) { const PyTypeObject tmp = { /* PyObject header changed in Python 3 */ #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(&PyType_Type, 0) #else PyObject_HEAD_INIT(NULL) 0, /* Number of items in variable part (ob_size) */ #endif (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ (printfunc) swig_varlink_print, /* Print (tp_print) */ (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ varlink__doc__, /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif type_init = 1; } return &varlink_type; } /* Create a variable linking object for use later */ SWIGINTERN PyObject * SWIG_Python_newvarlink(void) { swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); if (result) { result->vars = 0; } return ((PyObject*) result); } SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { swig_varlinkobject *v = (swig_varlinkobject *) p; swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); if (gv) { size_t size = strlen(name)+1; gv->name = (char *)malloc(size); if (gv->name) { strncpy(gv->name,name,size); gv->get_attr = get_attr; gv->set_attr = set_attr; gv->next = v->vars; } } v->vars = gv; } SWIGINTERN PyObject * SWIG_globals(void) { static PyObject *_SWIG_globals = 0; if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); return _SWIG_globals; } /* ----------------------------------------------------------------------------- * constants/methods manipulation * ----------------------------------------------------------------------------- */ /* Install Constants */ SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { PyObject *obj = 0; size_t i; for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); break; default: obj = 0; break; } if (obj) { PyDict_SetItemString(d, constants[i].name, obj); Py_DECREF(obj); } } } /* -----------------------------------------------------------------------------*/ /* Fix SwigMethods to carry the callback ptrs when needed */ /* -----------------------------------------------------------------------------*/ SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { ci = &(const_table[j]); break; } } if (ci) { size_t shift = (ci->ptype) - types; swig_type_info *ty = types_initial[shift]; size_t ldoc = (c - methods[i].ml_doc); size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; char *ndoc = (char*)malloc(ldoc + lptr + 10); if (ndoc) { char *buff = ndoc; void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; if (ptr) { strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); buff += 10; SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); methods[i].ml_doc = ndoc; } } } } } } #ifdef __cplusplus } #endif /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/ #ifdef __cplusplus extern "C" #endif SWIGEXPORT #if PY_VERSION_HEX >= 0x03000000 PyObject* #else void #endif SWIG_init(void) { PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, (char *) SWIG_name, NULL, -1, SwigMethods, NULL, NULL, NULL, NULL }; #endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif d = PyModule_GetDict(m); SWIG_InitializeModule(0); SWIG_InstallConstants(d,swig_const_table); #if PY_VERSION_HEX >= 0x03000000 return m; #else return; #endif }
silkyar/570_Big_Little
build/ARM/python/m5/internal/param_EtherDevBase_wrap.cc
C++
bsd-3-clause
212,215
--- title: 8차 천일 결사 4차 백일 기도 정진 29일째 date: 2015-02-15 07:18:07 tags: - 8-400th - 29th --- #수행일지 감사합니다. 세상일은 네 마음대로 되지 않습니다. 않되는것이 이치고 순리입니다. 이 않되는것을 가지고 탓하고 고통스러워한다면 나는 이 괴로움에서 벗어나올 수 있는 방법이 없습니다. 먼 미래에 어떤 조건이 충족되면 행복할 것이라며 나의 행복을 자꾸 미루지 않습니다. 지금 당장 저는 행복합니다. 저는 편안합니다. 감사합니다. 부처님!
ygpark2/docpad_test
src/documents/10000/2015/02/15/8_4_29.html.md
Markdown
bsd-3-clause
598
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>File: xml_node_set.rb [nokogiri-1.4.4.1-x86-mingw32 Documentation]</title> <link type="text/css" media="screen" href="../../../../rdoc.css" rel="stylesheet" /> <script src="../../../../js/jquery.js" type="text/javascript" charset="utf-8"></script> <script src="../../../../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script> <script src="../../../../js/quicksearch.js" type="text/javascript" charset="utf-8"></script> <script src="../../../../js/darkfish.js" type="text/javascript" charset="utf-8"></script> </head> <body class="file file-popup"> <div id="metadata"> <dl> <dt class="modified-date">Last Modified</dt> <dd class="modified-date">2011-05-24 13:26:34 +1000</dd> <dt class="requires">Requires</dt> <dd class="requires"> <ul> </ul> </dd> </dl> </div> <div id="documentation"> <div class="description"> <h2>Description</h2> </div> </div> </body> </html>
MitjaBezensek/shouldly
lib/gems/doc/nokogiri-1.4.4.1-x86-mingw32/rdoc/lib/nokogiri/ffi/structs/xml_node_set_rb.html
HTML
bsd-3-clause
1,278
package interdroid.swan.test; import interdroid.swan.ExpressionListener; import interdroid.swan.ExpressionManager; import interdroid.swan.R; import interdroid.swan.SwanException; import interdroid.swan.ValueExpressionListener; import interdroid.swan.swansong.Expression; import interdroid.swan.swansong.ExpressionFactory; import interdroid.swan.swansong.ExpressionParseException; import interdroid.swan.swansong.TimestampedValue; import interdroid.swan.swansong.TriState; import interdroid.swan.swansong.ValueExpression; import java.util.Date; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.TextView; import android.widget.Toast; public class TestActivity extends Activity { private void toast(final String text) { runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(TestActivity.this, text, Toast.LENGTH_LONG) .show(); } }); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); Expression proximity; Expression accelerometer = null; Expression avgAccelerometer = null; try { // .parse("Roelof@movement:total{MAX,5000}>15.0"); // .parse("self@wifi:level?bssid='b8:f6:b1:12:9d:77'&discovery_interval=5000{ANY,0}"); // .parse("self@movement:total?accuracy=0{MAX,5000}>12.0"); // .parse("self@movement:total?accuracy=3{ANY,0}"); proximity = ExpressionFactory .parse("self@proximity:distance?accuracy=0{ANY,0}"); accelerometer = ExpressionFactory .parse("self@movement:total?accuracy=0{ANY,0}"); avgAccelerometer = ExpressionFactory .parse("self@movement:total?accuracy=0{MEAN,10000}>12.0"); } catch (ExpressionParseException e1) { e1.printStackTrace(System.out); finish(); proximity = null; } final Expression proximityExpression = proximity; final Expression accelerometerExpression = accelerometer; final Expression avgExpression = avgAccelerometer; findViewById(R.id.register).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { try { // ExpressionManager.registerExpression( // TestActivity.this, "proximity", // proximityExpression, // new ExpressionListener() { // // @Override // public void onNewState(final String id, // final long timestamp, // final TriState newState) { // runOnUiThread(new Runnable() { // public void run() { // ((TextView) findViewById(R.id.text)) // .setText(new Date( // timestamp) // + ": " // + newState); // Toast.makeText( // TestActivity.this, // id + ": " // + newState, // Toast.LENGTH_LONG) // .show(); // } // }); // System.out.println(id + ": " // + newState); // } // // @Override // public void onNewValues( // String id, // final TimestampedValue[] newValues) { // runOnUiThread(new Runnable() { // public void run() { // if (newValues == null // || newValues.length == 0) { // ((TextView) findViewById(R.id.text)) // .setText("n.a."); // } else { // ((TextView) findViewById(R.id.text)) // .setText(new Date( // newValues[0] // .getTimestamp()) // + ": " // + newValues[0] // .getValue()); // } // } // }); // // // System.out.println(id // // + ": " // // + Arrays.toString(newValues)); // } // // }); // // ExpressionManager.registerExpression( // TestActivity.this, "accelerometer", // accelerometerExpression, // new ExpressionListener() { // // @Override // public void onNewState(final String id, // final long timestamp, // final TriState newState) { // runOnUiThread(new Runnable() { // public void run() { // ((TextView) findViewById(R.id.text)) // .setText(new Date( // timestamp) // + ": " // + newState); // Toast.makeText( // TestActivity.this, // id + ": " // + newState, // Toast.LENGTH_LONG) // .show(); // } // }); // System.out.println(id + ": " // + newState); // } // // @Override // public void onNewValues( // String id, // final TimestampedValue[] newValues) { // runOnUiThread(new Runnable() { // public void run() { // if (newValues == null // || newValues.length == 0) { // ((TextView) findViewById(R.id.text)) // .setText("n.a."); // } else { // ((TextView) findViewById(R.id.text)) // .setText(new Date( // newValues[0] // .getTimestamp()) // + ": " // + newValues[0] // .getValue()); // } // } // }); // // // System.out.println(id // // + ": " // // + Arrays.toString(newValues)); // } // // }); ExpressionManager.registerExpression( TestActivity.this, "accelerometerAvg", avgExpression, new ExpressionListener() { @Override public void onNewState(final String id, final long timestamp, final TriState newState) { runOnUiThread(new Runnable() { public void run() { ((TextView) findViewById(R.id.text)) .setText(new Date( timestamp) + ": " + newState); Toast.makeText( TestActivity.this, id + ": " + newState, Toast.LENGTH_LONG) .show(); } }); System.out.println(id + ": " + newState); } @Override public void onNewValues( String id, final TimestampedValue[] newValues) { runOnUiThread(new Runnable() { public void run() { if (newValues == null || newValues.length == 0) { ((TextView) findViewById(R.id.text)) .setText("n.a."); } else { ((TextView) findViewById(R.id.text)) .setText(new Date( newValues[0] .getTimestamp()) + ": " + newValues[0] .getValue()); } } }); // System.out.println(id // + ": " // + Arrays.toString(newValues)); } }); } catch (SwanException e) { e.printStackTrace(); } } }); findViewById(R.id.unregister).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { ExpressionManager.unregisterExpression( TestActivity.this, "proximity"); ExpressionManager.unregisterExpression( TestActivity.this, "accelerometer"); ExpressionManager.unregisterExpression( TestActivity.this, "accelerometerAvg"); } }); } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 1234) { if (resultCode == RESULT_OK) { try { Expression expression = ExpressionFactory.parse(data .getStringExtra("Expression")); ExpressionManager.registerValueExpression( TestActivity.this, "test", (ValueExpression) expression, new ValueExpressionListener() { @Override public void onNewValues(String id, TimestampedValue[] newValues) { if (newValues.length > 0) { System.out.println("got new values: " + newValues[0]); } } }); toast("registered expression!"); } catch (ExpressionParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SwanException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } }
interdroid/interdroid-swan
test/interdroid/swan/test/TestActivity.java
Java
bsd-3-clause
8,736