answer
stringlengths
15
1.25M
#!/usr/bin/env python import logging import os import shutil import subprocess import sys import tempfile import warnings from argparse import ArgumentParser import django from django.apps import apps from django.conf import settings from django.db import connection from django.test import TestCase, TransactionTestCase from django.test.utils import get_runner from django.utils import six from django.utils._os import upath from django.utils.deprecation import ( <API key>, <API key>, ) # Make deprecation warnings errors to ensure no usage of deprecated features. warnings.simplefilter("error", <API key>) warnings.simplefilter("error", <API key>) # Make runtime warning errors to ensure no usage of error prone patterns. warnings.simplefilter("error", RuntimeWarning) # Ignore known warnings in test dependencies. warnings.filterwarnings("ignore", "'U' mode is deprecated", DeprecationWarning, module='docutils.io') RUNTESTS_DIR = os.path.abspath(os.path.dirname(upath(__file__))) TEMPLATE_DIR = os.path.join(RUNTESTS_DIR, 'templates') # Create a specific subdirectory for the duration of the test suite. TMPDIR = tempfile.mkdtemp(prefix='django_') # Set the TMPDIR environment variable in addition to tempfile.tempdir # so that children processes inherit it. tempfile.tempdir = os.environ['TMPDIR'] = TMPDIR SUBDIRS_TO_SKIP = [ 'data', '<API key>', '<API key>', '<API key>', '<API key>', ] <API key> = [ 'django.contrib.contenttypes', 'django.contrib.auth', 'django.contrib.sites', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.admin.apps.SimpleAdminConfig', 'django.contrib.staticfiles', ] <API key> = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.<API key>, 'django.contrib.messages.middleware.MessageMiddleware', ) # Need to add the associated contrib app to INSTALLED_APPS in some cases to # avoid "RuntimeError: Model class X doesn't declare an explicit app_label # and either isn't in an application in INSTALLED_APPS or else was imported # before its application was loaded." <API key> = { 'flatpages_tests': 'django.contrib.flatpages', 'redirects_tests': 'django.contrib.redirects', } def get_test_modules(): modules = [] discovery_paths = [ (None, RUNTESTS_DIR), ] # GIS tests are in nested apps if connection.features.gis_enabled: discovery_paths.append( ('gis_tests', os.path.join(RUNTESTS_DIR, 'gis_tests')) ) for modpath, dirpath in discovery_paths: for f in os.listdir(dirpath): if ('.' in f or f.startswith('sql') or os.path.basename(f) in SUBDIRS_TO_SKIP or os.path.isfile(f) or not os.path.exists(os.path.join(dirpath, f, '__init__.py'))): continue if connection.vendor != 'postgresql' and f == 'postgres_tests': continue modules.append((modpath, f)) return modules def get_installed(): return [app_config.name for app_config in apps.get_app_configs()] def setup(verbosity, test_labels): print("Testing against Django installed in '%s'" % os.path.dirname(django.__file__)) # Force declaring available_apps in TransactionTestCase for faster tests. def no_available_apps(self): raise Exception("Please define available_apps in TransactionTestCase " "and its subclasses.") TransactionTestCase.available_apps = property(no_available_apps) TestCase.available_apps = None state = { 'INSTALLED_APPS': settings.INSTALLED_APPS, 'ROOT_URLCONF': getattr(settings, "ROOT_URLCONF", ""), 'TEMPLATES': settings.TEMPLATES, 'LANGUAGE_CODE': settings.LANGUAGE_CODE, 'STATIC_URL': settings.STATIC_URL, 'STATIC_ROOT': settings.STATIC_ROOT, 'MIDDLEWARE_CLASSES': settings.MIDDLEWARE_CLASSES, } # Redirect some settings for the duration of these tests. settings.INSTALLED_APPS = <API key> settings.ROOT_URLCONF = 'urls' settings.STATIC_URL = '/static/' settings.STATIC_ROOT = os.path.join(TMPDIR, 'static') settings.TEMPLATES = [{ 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [TEMPLATE_DIR], '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', ], }, }] settings.LANGUAGE_CODE = 'en' settings.SITE_ID = 1 settings.MIDDLEWARE_CLASSES = <API key> # Ensure the middleware classes are seen as overridden otherwise we get a compatibility warning. settings._explicit_settings.add('MIDDLEWARE_CLASSES') settings.MIGRATION_MODULES = { # these 'tests.migrations' modules don't actually exist, but this lets # us skip creating migrations for the test models. 'auth': 'django.contrib.auth.tests.migrations', 'contenttypes': 'contenttypes_tests.migrations', } if verbosity > 0: # Ensure any warnings captured to logging are piped through a verbose # logging handler. If any -W options were passed explicitly on command # line, warnings are not captured, and this has no effect. logger = logging.getLogger('py.warnings') handler = logging.StreamHandler() logger.addHandler(handler) warnings.filterwarnings( 'ignore', 'django.contrib.webdesign will be removed in Django 1.10.', <API key> ) # Load all the <API key>. django.setup() # Load all the test model apps. test_modules = get_test_modules() # Reduce given test labels to just the app module path test_labels_set = set() for label in test_labels: bits = label.split('.')[:1] test_labels_set.add('.'.join(bits)) installed_app_names = set(get_installed()) for modpath, module_name in test_modules: if modpath: module_label = '.'.join([modpath, module_name]) else: module_label = module_name # if the module (or an ancestor) was named on the command line, or # no modules were named (i.e., run all), import # this module and add it to INSTALLED_APPS. if not test_labels: <API key> = True else: <API key> = any( # exact match or ancestor match module_label == label or module_label.startswith(label + '.') for label in test_labels_set) if module_name in <API key> and <API key>: settings.INSTALLED_APPS.append(<API key>[module_name]) if <API key> and module_label not in installed_app_names: if verbosity >= 2: print("Importing application %s" % module_name) settings.INSTALLED_APPS.append(module_label) # Add contrib.gis to INSTALLED_APPS if needed (rather than requiring # @override_settings(INSTALLED_APPS=...) on all test cases. gis = 'django.contrib.gis' if connection.features.gis_enabled and gis not in settings.INSTALLED_APPS: if verbosity >= 2: print("Importing application %s" % gis) settings.INSTALLED_APPS.append(gis) apps.set_installed_apps(settings.INSTALLED_APPS) return state def teardown(state): try: # Removing the temporary TMPDIR. Ensure we pass in unicode # so that it will successfully remove temp trees containing # non-ASCII filenames on Windows. (We're assuming the temp dir # name itself does not contain non-ASCII characters.) shutil.rmtree(six.text_type(TMPDIR)) except OSError: print('Failed to remove temp directory: %s' % TMPDIR) # Restore the old settings. for key, value in state.items(): setattr(settings, key, value) def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels, debug_sql): state = setup(verbosity, test_labels) extra_tests = [] if test_labels and 'postgres_tests' in test_labels and connection.vendor != 'postgresql': if verbosity >= 2: print("Removed postgres_tests from tests as we're not running with PostgreSQL.") test_labels.remove('postgres_tests') # Run the test suite, including the extra validation tests. if not hasattr(settings, 'TEST_RUNNER'): settings.TEST_RUNNER = 'django.test.runner.DiscoverRunner' TestRunner = get_runner(settings) test_runner = TestRunner( verbosity=verbosity, interactive=interactive, failfast=failfast, keepdb=keepdb, reverse=reverse, debug_sql=debug_sql, ) # Catch warnings thrown in test DB setup -- remove in Django 1.9 with warnings.catch_warnings(): warnings.filterwarnings( 'ignore', "Custom SQL location '<app_label>/models/sql' is deprecated, " "use '<app_label>/sql' instead.", <API key> ) warnings.filterwarnings( 'ignore', 'initial_data fixtures are deprecated. Use data migrations instead.', <API key> ) failures = test_runner.run_tests( test_labels or get_installed(), extra_tests=extra_tests) teardown(state) return failures def bisect_tests(bisection_label, options, test_labels): state = setup(options.verbosity, test_labels) test_labels = test_labels or get_installed() print('***** Bisecting test suite: %s' % ' '.join(test_labels)) # Make sure the bisection point isn't in the test list # Also remove tests that need to be run in specific combinations for label in [bisection_label, '<API key>']: try: test_labels.remove(label) except ValueError: pass subprocess_args = [ sys.executable, upath(__file__), '--settings=%s' % options.settings] if options.failfast: subprocess_args.append('--failfast') if options.verbosity: subprocess_args.append('--verbosity=%s' % options.verbosity) if not options.interactive: subprocess_args.append('--noinput') iteration = 1 while len(test_labels) > 1: midpoint = len(test_labels) test_labels_a = test_labels[:midpoint] + [bisection_label] test_labels_b = test_labels[midpoint:] + [bisection_label] print('***** Pass %da: Running the first half of the test suite' % iteration) print('***** Test labels: %s' % ' '.join(test_labels_a)) failures_a = subprocess.call(subprocess_args + test_labels_a) print('***** Pass %db: Running the second half of the test suite' % iteration) print('***** Test labels: %s' % ' '.join(test_labels_b)) print('') failures_b = subprocess.call(subprocess_args + test_labels_b) if failures_a and not failures_b: print("***** Problem found in first half. Bisecting again...") iteration = iteration + 1 test_labels = test_labels_a[:-1] elif failures_b and not failures_a: print("***** Problem found in second half. Bisecting again...") iteration = iteration + 1 test_labels = test_labels_b[:-1] elif failures_a and failures_b: print("***** Multiple sources of failure found") break else: print("***** No source of failure found... try pair execution (--pair)") break if len(test_labels) == 1: print("***** Source of error: %s" % test_labels[0]) teardown(state) def paired_tests(paired_test, options, test_labels): state = setup(options.verbosity, test_labels) test_labels = test_labels or get_installed() print('***** Trying paired execution') # Make sure the constant member of the pair isn't in the test list # Also remove tests that need to be run in specific combinations for label in [paired_test, '<API key>']: try: test_labels.remove(label) except ValueError: pass subprocess_args = [ sys.executable, upath(__file__), '--settings=%s' % options.settings] if options.failfast: subprocess_args.append('--failfast') if options.verbosity: subprocess_args.append('--verbosity=%s' % options.verbosity) if not options.interactive: subprocess_args.append('--noinput') for i, label in enumerate(test_labels): print('***** %d of %d: Check test pairing with %s' % ( i + 1, len(test_labels), label)) failures = subprocess.call(subprocess_args + [label, paired_test]) if failures: print('***** Found problem pair with %s' % label) return print('***** No problem pair found') teardown(state) if __name__ == "__main__": parser = ArgumentParser(description="Run the Django test suite.") parser.add_argument('modules', nargs='*', metavar='module', help='Optional path(s) to test modules; e.g. "i18n" or ' '"i18n.tests.TranslationTests.test_lazy_objects".') parser.add_argument( '-v', '--verbosity', default=1, type=int, choices=[0, 1, 2, 3], help='Verbosity level; 0=minimal output, 1=normal output, 2=all output') parser.add_argument( '--noinput', action='store_false', dest='interactive', default=True, help='Tells Django to NOT prompt the user for input of any kind.') parser.add_argument( '--failfast', action='store_true', dest='failfast', default=False, help='Tells Django to stop running the test suite after first failed ' 'test.') parser.add_argument( '-k', '--keepdb', action='store_true', dest='keepdb', default=False, help='Tells Django to preserve the test database between runs.') parser.add_argument( '--settings', help='Python path to settings module, e.g. "myproject.settings". If ' 'this isn\'t provided, either the <API key> ' 'environment variable or "test_sqlite" will be used.') parser.add_argument('--bisect', help='Bisect the test suite to discover a test that causes a test ' 'failure when combined with the named test.') parser.add_argument('--pair', help='Run the test suite in pairs with the named test to find problem ' 'pairs.') parser.add_argument('--reverse', action='store_true', default=False, help='Sort test suites and test cases in opposite order to debug ' 'test side effects not apparent with normal execution lineup.') parser.add_argument('--liveserver', help='Overrides the default address where the live server (used with ' 'LiveServerTestCase) is expected to run from. The default value ' 'is localhost:8081.') parser.add_argument( '--selenium', action='store_true', dest='selenium', default=False, help='Run the Selenium tests as well (if Selenium is installed)') parser.add_argument( '--debug-sql', action='store_true', dest='debug_sql', default=False, help='Turn on the SQL query logger within tests') options = parser.parse_args() # mock is a required dependency try: from django.test import mock # NOQA except ImportError: print( "Please install test dependencies first: \n" "$ pip install -r requirements/py%s.txt" % sys.version_info.major ) sys.exit(1) # Allow including a trailing slash on app_labels for tab completion convenience options.modules = [os.path.normpath(labels) for labels in options.modules] if options.settings: os.environ['<API key>'] = options.settings else: if "<API key>" not in os.environ: os.environ['<API key>'] = 'test_sqlite' options.settings = os.environ['<API key>'] if options.liveserver is not None: os.environ['<API key>'] = options.liveserver if options.selenium: os.environ['<API key>'] = '1' if options.bisect: bisect_tests(options.bisect, options, options.modules) elif options.pair: paired_tests(options.pair, options, options.modules) else: failures = django_tests(options.verbosity, options.interactive, options.failfast, options.keepdb, options.reverse, options.modules, options.debug_sql) if failures: sys.exit(bool(failures))
import * as m from "mithril"; export class GenericForm { view(vnode){ return ( m("div", m( "form.form-inline#login", vnode.attrs.prop, m(".form-group", vnode.children) ) ) ) } }
import os SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY =';pkj;lkj;lkjh;lkj;oi' db = os.environ.get('DBENGINE', None) if db == 'pg': DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django_uuid_pk', 'HOST': '127.0.0.1', 'PORT': '', 'USER': 'postgres', 'PASSWORD': '', 'OPTIONS': { 'autocommit': True, # same value for all versions of django (is the default in 1.6) }}} elif db == 'mysql': DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'django_uuid_pk', 'HOST': '127.0.0.1', 'PORT': '', 'USER': 'root', 'PASSWORD': ''}} else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'django_uuid_pk.sqlite', 'HOST': '', 'PORT': ''}} INSTALLED_APPS = ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django_uuid_pk.tests') ALLOWED_HOSTS = ('127.0.0.1',) LOGGING = { 'version': 1, '<API key>': False, 'formatters': { 'simple': { 'format': '%(levelname)-8s: %(asctime)s %(name)10s: %(funcName)40s %(message)s' } }, 'handlers': { 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'simple' }, }, }
html, body, svg, rect { margin: 0; padding: 0; border: 0; } html, body { margin: 0; background-color: #B3D1FF; font-family: 'RobotoDraft', sans-serif; font-size: 14px; } #networkfilename { font-size: 14px; } #visualizebtn { /*width: 150px; height: 30px; margin: 0; padding: 0; padding-bottom: 5px;*/ text-align: center; /*background: rgb(25, 92, 193);*/ background: rgb(6, 149, 29); color: #fff; } #mainmap { position: absolute; left: 0; top: 0; } google-map { height: 600px; } #container { width: 100%; margin: 0; padding: 0; border: 0; background-color: yellow; } background-color: #B3D1FF;/*#B0D3FF; border: 0; cursor: pointer; }*/ .overlay { fill: none; pointer-events: all; } #tooltip { position: absolute; z-index: 2; background: rgba(0, 153, 76, 0.8); width: 130px; height: 20px; color: white; font-size: 14px; padding: 5px; top: -150px; left: -150px; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; } .d3-tip { line-height: 1; /*font-weight: bold;*/ padding: 12px; background: rgba(0, 0, 0, 0.8); color: #fff; border-radius: 2px; font-size: 8pt; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; } /* Creates a small triangle extender for the tooltip */ .d3-tip:after { box-sizing: border-box; display: inline; font-size: 10px; width: 100%; line-height: 1; color: rgba(0, 0, 0, 0.8); content: "\25BC"; position: absolute; text-align: center; } /* Style northward tooltips differently */ .d3-tip.n:after { margin: -1px 0 0 0; top: 100%; left: 0; } .remove-padding { padding: 0; } .left-padding { padding-left: 20px; padding-right: 20px; } .SvgOverlay { position: relative; width: 500px; height: 500px; } .SvgOverlay svg { position: absolute; top: -4000px; left: -4000px; width: 8000px; height: 8000px; } .SvgOverlay path { stroke: Orange; stroke-width: 2px; fill: Orange; fill-opacity: .3; } #gradientsamples { text-align: center; } .palette { cursor: pointer; display: inline-block; vertical-align: bottom; /*margin: 4px 0 4px 6px;*/ /*padding: 4px;*/ padding-right: 5px; background: #fff; /*border: solid 1px #aaa;*/ } .swatch { display: block; vertical-align: middle; width: 10px; height: 10px; } #drawer { padding-bottom: 30px; }
package ca.carleton.gcrc.couch.simplifiedGeometry; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.StringWriter; import java.util.List; import java.util.zip.GZIPOutputStream; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONArray; import org.json.JSONObject; import org.json.JSONTokener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ca.carleton.gcrc.json.servlet.JsonServlet; @SuppressWarnings("serial") public class <API key> extends JsonServlet { final protected Logger logger = LoggerFactory.getLogger(this.getClass()); private <API key> configuration = null; private <API key> actions = null; public <API key>() { } public void init(ServletConfig config) throws ServletException { super.init(config); // Pick up configuration Object configurationObj = config.getServletContext().getAttribute(<API key>.CONFIGURATION_KEY); if( null == configurationObj ) { throw new ServletException("Can not find configuration object"); } if( configurationObj instanceof <API key> ){ configuration = (<API key>)configurationObj; actions = new <API key>( configuration.getCouchDb() ); } else { throw new ServletException("Invalid class for configuration: "+configurationObj.getClass().getName()); } } public void destroy() { } @SuppressWarnings("unused") protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { List<String> paths = computeRequestPath(request); if( paths.size() < 1 ) { JSONObject result = new JSONObject(); result.put("ok", true); result.put("service", "simplifiedGeometry"); sendJsonResponse(response, result); } else if( paths.size() == 1 && "getAttachment".equals(paths.get(0)) ) { // Parameter 'id' String[] ids = request.getParameterValues("id"); if( null == ids || ids.length != 1 ){ throw new Exception("Parameter 'id' must be specified exactly once"); } String id = ids[0]; // Parameter 'att' String[] atts = request.getParameterValues("att"); if( null == atts || atts.length != 1 ){ throw new Exception("Parameter 'att' must be specified exactly once"); } String att = atts[0]; <API key> <API key> = new <API key>(); <API key>.addRequest(id, att); // Parameter 'sizeLimit' { String[] sizeLimits = request.getParameterValues("sizeLimit"); if( null != sizeLimits && sizeLimits.length != 1 ){ throw new Exception("If parameter 'sizeLimit' is specified, it must be provided exactly once"); } if( null != sizeLimits ){ long sizeLimit = Long.parseLong( sizeLimits[0] ); <API key>.setSizeLimit(sizeLimit); } } // Parameter 'timeLimit' { String[] timeLimits = request.getParameterValues("timeLimit"); if( null != timeLimits && timeLimits.length != 1 ){ throw new Exception("If parameter 'timeLimit' is specified, it must be provided exactly once"); } if( null != timeLimits ){ long timeLimit = Long.parseLong( timeLimits[0] ); <API key>.setSizeLimit(timeLimit); } } if( true ){ // Start response response.setStatus(200); response.setContentType("application/json"); response.<API key>("utf-8"); response.addHeader("Cache-Control", "no-cache"); response.addHeader("Pragma", "no-cache"); response.addHeader("Expires", "-1"); OutputStream os = response.getOutputStream(); // Perform request actions.getAttachments(<API key>, os); } else { // Perform request JSONObject result = actions.getAttachments(<API key>); sendJsonResponse(response, result); } } else { throw new Exception("Unrecognized request"); } } catch (Exception e) { reportError(e, response); } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { List<String> paths = computeRequestPath(request); if( paths.size() < 1 ) { throw new Exception("Unrecognized request"); } else if( paths.size() == 1 && "getAttachments".equals(paths.get(0)) ) { // Read body InputStream is = request.getInputStream(); InputStreamReader isr = new InputStreamReader(is,"UTF-8"); StringWriter sw = new StringWriter(); int c = isr.read(); while( c >= 0 ){ sw.write(c); c = isr.read(); } // Decode JSON request JSONTokener tokener = new JSONTokener( sw.toString() ); Object obj = tokener.nextValue(); JSONObject jsonRequest = (JSONObject)obj; JSONArray geometryRequests = jsonRequest.getJSONArray("geometryRequests"); // Process attachment requests <API key> <API key> = new <API key>(); for(int i=0; i<geometryRequests.length(); ++i){ JSONObject geomRequest = geometryRequests.getJSONObject(i); String id = geomRequest.getString("id"); String attName = geomRequest.getString("attName"); <API key>.addRequest(id, attName); } // Size limit option { long limit = jsonRequest.optLong("sizeLimit", -1); if( limit > 0 ){ <API key>.setSizeLimit(limit); } } // Time limit option { int limit = jsonRequest.optInt("timeLimit", -1); if( limit > 0 ){ <API key>.setTimeLimit(limit); } } // Accept-Encoding header boolean useGZipEncoding = false; { String encodings = request.getHeader("Accept-Encoding"); if( encodings != null && encodings.indexOf("gzip") != -1 ) { useGZipEncoding = true; } } // Start response response.setStatus(200); response.setContentType("application/json"); response.<API key>("utf-8"); response.addHeader("Cache-Control", "no-cache"); response.addHeader("Pragma", "no-cache"); response.addHeader("Expires", "-1"); OutputStream os = null; if( useGZipEncoding ){ response.setHeader("Content-Encoding", "gzip"); OutputStream respOs = response.getOutputStream(); os = new GZIPOutputStream(respOs); } else { os = response.getOutputStream(); } // Perform request actions.getAttachments(<API key>, os); os.flush(); os.close(); } else { throw new Exception("Unrecognized request"); } } catch (Exception e) { reportError(e, response); } } }
#!/usr/bin/env python3 from collections import defaultdict prompt = "> " cart = defaultdict(int) product_tpl = "%d) %-15s [ $%d ]" products = { 1: ("Yoda", 10), 2: ("DVD", 20), 3: ("Lego Set", 200) } def product_menu(): while True: print("Select item to order, 'f' when finished.") for pid, prod in products.items(): print(product_tpl % (pid, prod[0], prod[1])) inp = input(prompt) if inp == 'f': return product = getproduct(inp) if product : cart[product] += 1 else : print("Invalid Input") print() def getproduct(inp): try: return products[int(inp)] except (ValueError, KeyError): return None def main(): product_menu() for (name, price), count in cart.items(): print("product: %s, price: %d, count: %d" % (name, price, count)) total = sum(price*count for (name, price), count in cart.items()) print("Total for the order is: $%d" % total) main()
'use strict'; var metal = require('gulp-metal'); metal.registerTasks({ bundleCssFileName: 'tooltip.css', bundleFileName: 'tooltip.js', moduleName: 'metal-tooltip' });
<!doctype html> <html> <head> <title>polymer api</title> <style> html, body { font-family: Arial, sans-serif; white-space: nowrap; overflow: hidden; } [noviewer] [ifnoviewer] { display: block; } [detector], [ifnoviewer], [noviewer] [ifviewer] { display: none; } [ifviewer], [ifnoviewer] { position: absolute; top: 0; right: 0; bottom: 0; left: 0; } iframe { border: none; margin: 0; width: 100%; height: 100%; } #remote { position: absolute; top: 0; right: 0; } </style> <script src="../platform/platform.js"></script> <link rel="import" href="../polymer-home-page/polymer-home-page.html"> </head> <body> <img detector src="../polymer-home-page/bowager-logo.png" onerror="noviewer()"> <polymer-home-page ifviewer></polymer-home-page> <div ifnoviewer> <span id="remote">[remote]</span> <iframe></iframe> </div> <script> var remoteDocs = 'http://turbogadgetry.com/bowertopia/components/'; // if no local info viewer, load it remotely function noviewer() { document.body.setAttribute('noviewer', ''); var path = location.pathname.split('../../index.html'); var module = path.pop() || path.pop(); document.querySelector('iframe').src = remoteDocs + module; document.querySelector('title').textContent = module; } // for testing only var opts = window.location.search; if (opts.indexOf('noviewer') >= 0) { noviewer(); } </script> </body> </html>
#ifndef <API key> #define <API key> #include <windows.h> #include "base/base_export.h" #include "starboard/types.h" namespace base { namespace debug { // Crashes the process, using base::debug::Alias to leave valuable debugging // information in the crash dump. Pass values for |header| and |shared_section| // in the event of a bitmap allocation failure, to gather information about // those as well. void BASE_EXPORT <API key>(BITMAPINFOHEADER* header = nullptr, HANDLE shared_section = nullptr); } // namespace debug } // namespace base #endif // <API key>
require 'spec_helper' def version_of *args OKKO.VersionOf(*args) end describe "creation" do it "should store name" do version_of('ruby').name.should == 'ruby' end it "should accept versions, optionally" do version_of('ruby').version.should == nil version_of('ruby', '1.8').version.to_s.should == '1.8' version_of('ruby', '1.8'.to_version).version.to_s.should == '1.8' end it "should accept name & version in one string" do version_of('ruby 1.8').version.to_s.should == '1.8' version_of('ruby >= 1.9').version.to_s.should == '>= 1.9' end it "should handle array args" do version_of(['ruby', '1.8']).version.to_s.should == '1.8' end it "should accept existing VersionOf instances" do version_of(version_of('ruby')).should == version_of('ruby') version_of(version_of('ruby', '1.8')).should == version_of('ruby', '1.8') version_of(version_of('ruby', '1.8'), '1.9').should == version_of('ruby', '1.9') end it "should accept name with space" do version_of('Google Chrome.app').name.should == 'Google Chrome.app' version_of('Google Chrome.app').version.should == nil end # #TODO:0 This is tricky, e.g. splitting "Sublime Text 2 >= 2.0.1". # it "should accept name with space and version" end describe "to_s" do describe "versionless" do it "should be just the name" do version_of('ruby').to_s.should == 'ruby' end end describe "nameless" do it "should be just the version" do version_of(nil, '1.8').to_s.should == '1.8' end end describe "versioned" do it "should be separated with - when no operator is specified" do version_of('ruby', '1.8').to_s.should == 'ruby-1.8' end it "should be separated with - when the operator is ==" do version_of('ruby', '== 1.8').to_s.should == 'ruby-1.8' end it "should be separated with - when no version is specified" do version_of('ruby', '>= 1.8').to_s.should == 'ruby >= 1.8' end end end describe '#exact?' do it "should be false when there is no version" do version_of('ruby').should_not be_exact end it "should be true when there is a just version number" do version_of('ruby', '1.8').should be_exact end it "should be true when the operator is ==" do version_of('ruby', '== 1.8').should be_exact end it "should be false when the operator is not ==" do version_of('ruby', '>= 1.8').should_not be_exact end end describe "equality" do it "should compare to versionless strings" do version_of('ruby' ).should == version_of('ruby') version_of('ruby', '1.8').should_not == version_of('ruby') end it "should compare to versioned strings" do version_of('ruby' ).should_not == version_of('ruby', '1.8') version_of('ruby', '1.8').should == version_of('ruby', '1.8') version_of('ruby', '1.8').should_not == version_of('ruby', '1.9') end it "should compare to versionless VersionOfs" do version_of('ruby' ).should == version_of('ruby') version_of('ruby', '1.8').should_not == version_of('ruby') end it "should compare to versioned VersionOfs" do version_of('ruby' ).should_not == version_of('ruby', '1.8') version_of('ruby', '1.8').should == version_of('ruby', '1.8') version_of('ruby', '1.8').should_not == version_of('ruby', '1.9') end end describe "comparisons" do it "should fail when the names don't match" do L{ version_of('ruby', '1.8') <=> version_of('mongo', '1.4.2') }.should raise_error(ArgumentError, "You can't compare the versions of two different things (ruby, mongo).") end it "should defer to VersionStr (version_of('ruby', '1.8') <=> version_of('ruby', '1.9')).should == -1 (version_of('ruby', '1.8') <=> version_of('ruby', '1.8')).should == 0 (version_of('ruby', '1.8.7') <=> version_of('ruby', '1.8')).should == 1 (version_of('ruby', '1.8.7') <=> version_of('ruby', '1.9.1')).should == -1 end end describe "matching" do describe "against strings" do it "should match all versions when unversioned" do version_of('ruby').matches?('1.8').should be_true version_of('ruby').matches?('1.9').should be_true end it "should only match the correct version" do version_of('ruby', '1.8').matches?('1.8').should be_true version_of('ruby', '1.9').matches?('1.8').should be_false version_of('ruby', '>= 1.7').matches?('1.8').should be_true version_of('ruby', '~> 1.8').matches?('1.9').should be_true version_of('ruby', '~> 1.8').matches?('2.0').should be_false end end describe "against VersionStrs" do it "should match all versions when unversioned" do version_of('ruby').matches?('1.8'.to_version).should be_true version_of('ruby').matches?('1.9'.to_version).should be_true end it "should only match the correct version" do version_of('ruby', '1.8').matches?('1.8'.to_version).should be_true version_of('ruby', '1.9').matches?('1.8'.to_version).should be_false version_of('ruby', '>= 1.7').matches?('1.8'.to_version).should be_true version_of('ruby', '~> 1.8').matches?('1.9'.to_version).should be_true version_of('ruby', '~> 1.8').matches?('2.0'.to_version).should be_false end end end
<?php namespace Technology; use Phalcon\Loader, Phalcon\Mvc\Dispatcher, Phalcon\Mvc\View, Phalcon\Mvc\<API key>; class Module implements <API key> { /** * Register a specific autoloader for the module */ public function registerAutoloaders() { $loader = new Loader(); $loader->registerDirs( array( '../app/oubdoor/controllers' )); $loader->registerNamespaces( array( 'Technology\Controllers' => '../app/technology/controllers/', 'Technology\Models' => '../app/technology/models/', 'Technology\Components' => '../app/technology/components/', ) ); $loader->register(); } /** * Register specific services for the module */ public function registerServices($di) { //Registering a dispatcher $di->set('dispatcher', function() { $dispatcher = new Dispatcher(); $dispatcher->setDefaultNamespace("Technology\Controllers"); return $dispatcher; }); //Registering the view component $di->set('view', function() { $view = new View(); $view->setViewsDir('../app/technology/views/'); return $view; }); } }
#if defined <API key> || defined <API key> // INCLUDE FILES #include <coemain.h> #include <coecontrolarray.h> #include <aknutils.h> #include <eiklabel.h> #include <aknsutils.h> #include <gdi.h> #include <eikapp.h> #include <gulicon.h> #include "RsgInclude.h" #include "WFLayoutUtils.h" #include "<API key>.h" #define TITLE_LABEL_HEIGHT 0.8 _LIT(KDefaultText, ""); enum TControls { ECurrStreetTitleId, ECurrStreetLabelId, ENextStreetTitleId, ENextStreetLabelId, EDistLeftTitleId, EDistLeftLabelId, ETimeLeftTitleId, ETimeLeftLabelId, EArrTimeTitleId, EArrTimeLabelId }; <API key>* <API key>::NewL() { <API key>* self = <API key>::NewLC(); CleanupStack::Pop(self); return self; } <API key>* <API key>::NewLC() { <API key>* self = new (ELeave) <API key>(); CleanupStack::PushL(self); self->ConstructL(); return self; } void <API key>::ConstructL() { /* Do not call CreateWindowL() as the parent <API key> has a window. But when ConstructL() is called this has not yet been created (as the <API key> has not been created) so defer all construction which requires a window to InitialiseL() which is called after <API key> has been constructed. */ } void <API key>::InitialiseL(const TRect& aRect) { // Do not call CreateWindowL() as parent <API key> owns window InitComponentArrayL(); MAknsSkinInstance* skin = AknsUtils::SkinInstance(); AknsUtils::GetCachedColor(skin, iSkinTextColor, <API key>, <API key>); HBufC* tmp = NULL; // Create all the labels. tmp = CCoeEnv::Static()->AllocReadResourceLC(R_WF_YOU_ARE_ON); iCurrStreetTitle = new (ELeave) CEikLabel(); iCurrStreetTitle->SetContainerWindowL(*this); Components().AppendLC(iCurrStreetTitle, ECurrStreetTitleId); iCurrStreetTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iCurrStreetTitle->SetTextL(*tmp); CleanupStack::Pop(iCurrStreetTitle); CleanupStack::PopAndDestroy(tmp); iCurrStreetLabel = new (ELeave) CEikLabel(); iCurrStreetLabel->SetContainerWindowL(*this); Components().AppendLC(iCurrStreetLabel, ECurrStreetLabelId); iCurrStreetLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iCurrStreetLabel->SetTextL(KDefaultText); CleanupStack::Pop(iCurrStreetLabel); tmp = CCoeEnv::Static()->AllocReadResourceLC(R_WF_NEXT_STREET); iNextStreetTitle = new (ELeave) CEikLabel(); iNextStreetTitle->SetContainerWindowL(*this); Components().AppendLC(iNextStreetTitle, ENextStreetTitleId); iNextStreetTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iNextStreetTitle->SetTextL(*tmp); CleanupStack::Pop(iNextStreetTitle); CleanupStack::PopAndDestroy(tmp); iNextStreetLabel = new (ELeave) CEikLabel(); iNextStreetLabel->SetContainerWindowL(*this); Components().AppendLC(iNextStreetLabel, ENextStreetLabelId); iNextStreetLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iNextStreetLabel->SetTextL(KDefaultText); CleanupStack::Pop(iNextStreetLabel); tmp = CCoeEnv::Static()->AllocReadResourceLC(R_WF_DISTANCE_LEFT); iDistLeftTitle = new (ELeave) CEikLabel(); iDistLeftTitle->SetContainerWindowL(*this); Components().AppendLC(iDistLeftTitle, EDistLeftTitleId); iDistLeftTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iDistLeftTitle->SetTextL(*tmp); CleanupStack::Pop(iDistLeftTitle); CleanupStack::PopAndDestroy(tmp); iDistLeftLabel = new (ELeave) CEikLabel(); iDistLeftLabel->SetContainerWindowL(*this); Components().AppendLC(iDistLeftLabel, EDistLeftLabelId); iDistLeftLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iDistLeftLabel->SetTextL(KDefaultText); CleanupStack::Pop(iDistLeftLabel); tmp = CCoeEnv::Static()->AllocReadResourceLC(R_WF_TIME_LEFT); iTimeLeftTitle = new (ELeave) CEikLabel(); iTimeLeftTitle->SetContainerWindowL(*this); Components().AppendLC(iTimeLeftTitle, ETimeLeftTitleId); iTimeLeftTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iTimeLeftTitle->SetTextL(*tmp); CleanupStack::Pop(iTimeLeftTitle); CleanupStack::PopAndDestroy(tmp); iTimeLeftLabel = new (ELeave) CEikLabel(); iTimeLeftLabel->SetContainerWindowL(*this); Components().AppendLC(iTimeLeftLabel, ETimeLeftLabelId); iTimeLeftLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iTimeLeftLabel->SetTextL(KDefaultText); CleanupStack::Pop(iTimeLeftLabel); tmp = CCoeEnv::Static()->AllocReadResourceLC(<API key>); iArrTimeTitle = new (ELeave) CEikLabel(); iArrTimeTitle->SetContainerWindowL(*this); Components().AppendLC(iArrTimeTitle, EArrTimeTitleId); iArrTimeTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iArrTimeTitle->SetTextL(*tmp); CleanupStack::Pop(iArrTimeTitle); CleanupStack::PopAndDestroy(tmp); iArrTimeLabel = new (ELeave) CEikLabel(); iArrTimeLabel->SetContainerWindowL(*this); Components().AppendLC(iArrTimeLabel, EArrTimeLabelId); iArrTimeLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iArrTimeLabel->SetTextL(KDefaultText); CleanupStack::Pop(iArrTimeLabel); // Create a font for the title labels based on the standard label // font but a little bit smaller. UpdateLabelsFont(); // Set the standard rect. iComponentRect = aRect; // Set the windows size SetRect(aRect); // Activate the window, which makes it ready to be drawn ActivateL(); } <API key>::<API key>() : iIsNightMode(EFalse) { } <API key>::~<API key>() { } void <API key>::SizeChanged() { TRect rect = Rect(); iComponentRect = rect; iComponentRect.Shrink(iPadding, iPadding); // Update the font for the title labels based on the standard label // font but a bit smaller. (We need to do this before using fonts below). UpdateLabelsFont(); // Get some size info on the different fonts. TInt titleFontHeight = iCurrStreetTitle->Font()->HeightInPixels(); TInt titleFontDescent = iCurrStreetTitle->Font()->DescentInPixels(); // The height of one title label. TInt titleLabelHeight = titleFontHeight + titleFontDescent; TInt textFontHeight = iCurrStreetLabel->Font()->HeightInPixels(); TInt textFontDescent = iCurrStreetLabel->Font()->DescentInPixels(); // The height of one text label. TInt textLabelHeight = textFontHeight + textFontDescent; if (WFLayoutUtils::LandscapeMode()) { // Phone is in landscape layout it accordingly. // Get the max width needed by any of the title labels.. TInt maxWidth= Max(iCurrStreetTitle->MinimumSize().iWidth, iNextStreetTitle->MinimumSize().iWidth); maxWidth = Max(maxWidth, iDistLeftTitle->MinimumSize().iWidth); maxWidth = Max(maxWidth, iTimeLeftTitle->MinimumSize().iWidth); maxWidth = Max(maxWidth, iArrTimeTitle->MinimumSize().iWidth); // The rect available to title labels. TRect titleLabelRect = TRect(iComponentRect.iTl, TSize(maxWidth + iPadding * 3, titleLabelHeight)); // The rect available to text labels. TRect textLabelRect = TRect(TPoint(titleLabelRect.iBr.iX, iComponentRect.iTl.iY), TSize(iComponentRect.Width() - titleLabelRect.Width(), textLabelHeight)); // The difference in height between the two fonts. TInt fontHeightDiff = textFontHeight - titleFontHeight; // Set the rects for the labels in landscape mode. titleLabelRect.Move(0, fontHeightDiff); iCurrStreetTitle->SetRect(titleLabelRect); iCurrStreetLabel->SetRect(textLabelRect); titleLabelRect.Move(0, textLabelHeight); textLabelRect.Move(0, textLabelHeight); iNextStreetTitle->SetRect(titleLabelRect); iNextStreetLabel->SetRect(textLabelRect); titleLabelRect.Move(0, textLabelHeight); textLabelRect.Move(0, textLabelHeight); iDistLeftTitle->SetRect(titleLabelRect); iDistLeftLabel->SetRect(textLabelRect); titleLabelRect.Move(0, textLabelHeight); textLabelRect.Move(0, textLabelHeight); iTimeLeftTitle->SetRect(titleLabelRect); iTimeLeftLabel->SetRect(textLabelRect); titleLabelRect.Move(0, textLabelHeight); textLabelRect.Move(0, textLabelHeight); iArrTimeTitle->SetRect(titleLabelRect); iArrTimeLabel->SetRect(textLabelRect); } else { // Phone is in portrait use that layout. // The rect available to title labels. TRect titleLabelRect = TRect(iComponentRect.iTl, TSize(iComponentRect.Width(), titleLabelHeight)); // The rect available to text labels. TRect textLabelRect = TRect(iComponentRect.iTl, TSize(iComponentRect.Width(), textLabelHeight)); // Set the rects for the labels in portrait mode. iCurrStreetTitle->SetRect(titleLabelRect); textLabelRect.Move(0, titleLabelHeight); iCurrStreetLabel->SetRect(textLabelRect); titleLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iNextStreetTitle->SetRect(titleLabelRect); textLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iNextStreetLabel->SetRect(textLabelRect); titleLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iDistLeftTitle->SetRect(titleLabelRect); textLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iDistLeftLabel->SetRect(textLabelRect); titleLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iTimeLeftTitle->SetRect(titleLabelRect); textLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iTimeLeftLabel->SetRect(textLabelRect); titleLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iArrTimeTitle->SetRect(titleLabelRect); textLabelRect.Move(0, titleLabelHeight + textLabelHeight + iPadding); iArrTimeLabel->SetRect(textLabelRect); } // Hide labels if they are outside our allowed rect. <API key>(); //Window().Invalidate(); } void <API key>::UpdateLabelsFont() { // Create a font for the title labels based on the standard label // font but a little bit smaller. CWsScreenDevice* screenDev = CEikonEnv::Static()->ScreenDevice(); const CFont* tmpFont = iCurrStreetLabel->Font(); TFontSpec fontSpec = tmpFont->FontSpecInTwips(); fontSpec.iHeight = TInt(fontSpec.iHeight * TITLE_LABEL_HEIGHT); fontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightNormal); CFont* font; screenDev-><API key>(font, fontSpec); // Set the title labels fonts, we need to re-set them in SizeChanged // since a layout switch might cause us having to use a different font. iCurrStreetTitle->SetFont(font); iCurrStreetTitle->SetAlignment(EHLeftVCenter); iNextStreetTitle->SetFont(font); iNextStreetTitle->SetAlignment(EHLeftVCenter); iDistLeftTitle->SetFont(font); iDistLeftTitle->SetAlignment(EHLeftVCenter); iTimeLeftTitle->SetFont(font); iTimeLeftTitle->SetAlignment(EHLeftVCenter); iArrTimeTitle->SetFont(font); iArrTimeTitle->SetAlignment(EHLeftVCenter); // Release the font. screenDev->ReleaseFont(font); } void <API key>::<API key>() { // Hide labels if they are outside our allowed rect. TInt xPos = iComponentRect.iBr.iX / 2; if (!iComponentRect.Contains(TPoint(xPos, iDistLeftLabel->Rect().iBr.iY)) || !iComponentRect.Contains(TPoint(xPos, iDistLeftTitle->Rect().iBr.iY))) { Components().RemoveById(EDistLeftTitleId); Components().RemoveById(EDistLeftLabelId); } else { CCoeControlArray::TCursor it = Components().Find(EDistLeftTitleId); if (!it.IsValid()) { Components().AppendLC(iDistLeftTitle, EDistLeftTitleId); CleanupStack::Pop(iDistLeftTitle); } it = Components().Find(EDistLeftLabelId); if (!it.IsValid()) { Components().AppendLC(iDistLeftLabel, EDistLeftLabelId); CleanupStack::Pop(iDistLeftLabel); } } if (!iComponentRect.Contains(TPoint(xPos, iTimeLeftLabel->Rect().iBr.iY)) || !iComponentRect.Contains(TPoint(xPos, iTimeLeftTitle->Rect().iBr.iY))) { Components().RemoveById(ETimeLeftTitleId); Components().RemoveById(ETimeLeftLabelId); } else { CCoeControlArray::TCursor it = Components().Find(ETimeLeftTitleId); if (!it.IsValid()) { Components().AppendLC(iTimeLeftTitle, ETimeLeftTitleId); CleanupStack::Pop(iTimeLeftTitle); } it = Components().Find(ETimeLeftLabelId); if (!it.IsValid()) { Components().AppendLC(iTimeLeftLabel, ETimeLeftLabelId); CleanupStack::Pop(iTimeLeftLabel); } } if (!iComponentRect.Contains(TPoint(xPos, iArrTimeLabel->Rect().iBr.iY)) || !iComponentRect.Contains(TPoint(xPos, iArrTimeTitle->Rect().iBr.iY))) { Components().RemoveById(EArrTimeTitleId); Components().RemoveById(EArrTimeLabelId); } else { CCoeControlArray::TCursor it = Components().Find(EArrTimeTitleId); if (!it.IsValid()) { Components().AppendLC(iArrTimeTitle, EArrTimeTitleId); CleanupStack::Pop(iArrTimeTitle); } it = Components().Find(EArrTimeLabelId); if (!it.IsValid()) { Components().AppendLC(iArrTimeLabel, EArrTimeLabelId); CleanupStack::Pop(iArrTimeLabel); } } } TSize <API key>::MinimumSize() { TRect rect(Rect()); TSize size(rect.Width(), rect.Height()); return size; } void <API key>::Draw(const TRect& /*aRect*/) const { // Get the standard graphics context CWindowGc& gc = SystemGc(); TRect rect(Rect()); gc.SetClippingRect(rect); if (iIsNightMode) { TRect rect(Rect()); gc.SetPenColor(iNightBackColor); gc.SetPenStyle(CGraphicsContext::ESolidPen); gc.SetBrushColor(iNightBackColor); gc.SetBrushStyle(CGraphicsContext::ESolidBrush); gc.DrawRect(rect); } } void <API key>::SetSizeAndLayout(TRect aRect, TInt aPadding) { iComponentRect = aRect; iComponentRect.Shrink(aPadding, aPadding); iPadding = aPadding; SetRect(aRect); } void <API key>::SetStreetsL(const TDesC& aCurrName, const TDesC& aNextName) { if (iCurrStreetLabel && iNextStreetLabel) { iCurrStreetLabel->SetTextL(aCurrName); iCurrStreetLabel->CropText(); Window().Invalidate(iCurrStreetLabel->Rect()); //iCurrStreetLabel->DrawDeferred(); iNextStreetLabel->SetTextL(aNextName); iNextStreetLabel->CropText(); Window().Invalidate(iNextStreetLabel->Rect()); //iCurrStreetLabel->DrawDeferred(); } } void <API key>::SetDistanceToGoalL(const TDesC& aDistance) { if (iDistLeftLabel) { iDistLeftLabel->SetTextL(aDistance); Window().Invalidate(iDistLeftLabel->Rect()); } } void <API key>::SetEtgL(const TDesC& aTimeLeft) { if (iTimeLeftLabel) { iTimeLeftLabel->SetTextL(aTimeLeft); Window().Invalidate(iTimeLeftLabel->Rect()); } } void <API key>::SetEtaL(const TDesC& aArrivalTime) { if (iArrTimeLabel) { iArrTimeLabel->SetTextL(aArrivalTime); Window().Invalidate(iArrTimeLabel->Rect()); } } void <API key>::SetNightModeL(TBool aNightMode, TRgb aFgColor, TRgb aBgColor) { iIsNightMode = aNightMode; iNightTextColor = aFgColor; iNightBackColor = aBgColor; if (aNightMode) { // Night mode on, set label colors to nightmode color. iCurrStreetTitle->OverrideColorL(EColorLabelText, iNightTextColor); iCurrStreetLabel->OverrideColorL(EColorLabelText, iNightTextColor); iNextStreetTitle->OverrideColorL(EColorLabelText, iNightTextColor); iNextStreetLabel->OverrideColorL(EColorLabelText, iNightTextColor); iDistLeftTitle->OverrideColorL(EColorLabelText, iNightTextColor); iDistLeftLabel->OverrideColorL(EColorLabelText, iNightTextColor); iTimeLeftTitle->OverrideColorL(EColorLabelText, iNightTextColor); iTimeLeftLabel->OverrideColorL(EColorLabelText, iNightTextColor); iArrTimeTitle->OverrideColorL(EColorLabelText, iNightTextColor); iArrTimeLabel->OverrideColorL(EColorLabelText, iNightTextColor); } else { // Night mode off, set label colors to standard skin color. iCurrStreetTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iCurrStreetLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iNextStreetTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iNextStreetLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iDistLeftTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iDistLeftLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iTimeLeftTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iTimeLeftLabel->OverrideColorL(EColorLabelText, iSkinTextColor); iArrTimeTitle->OverrideColorL(EColorLabelText, iSkinTextColor); iArrTimeLabel->OverrideColorL(EColorLabelText, iSkinTextColor); } Window().Invalidate(); } #endif //<API key>
#ifndef <API key> #define <API key> #include "ThreadTimer.h" #include "detail/_time.h" #include <boost/thread/tss.hpp> #include <map> using std::multimap; using std::map; namespace sdo{ namespace common{ class CThreadTimer; class CTimerManager { typedef multimap<struct timeval_a,CThreadTimer *> MMTimer; public: void Reset(); void DetectTimerList(); void AddTimer(CThreadTimer *pTimer); void RemoveTimer(CThreadTimer *pTimer); void Dump(); private: boost::thread_specific_ptr<MMTimer> m_times; }; } } #endif
<?php /** * Uploader class for CiiMS. All classes that do file uploads should extend from this class */ class CiiUploader { /** * Initialized config */ private $_core = array( 'allowedExtensions' => array( 'png', 'jpeg', 'jpg', 'gif', 'bmp' ), 'sizeLimit' => 10485760 ); /** * Config options */ private $_config; /** * The file */ public $file; /** * __constructor * @param $config */ public function __construct($config=array()) { $this->_config = CMap::mergeArray($this->_core, $config); $this->checkServerSettings(); if (Cii::get($_FILES, 'file') !== NULL) $this->file = new CiiFile(); $this->verifyFile(); } /** * __getter * @param string $name * @return mixed */ public function __get($name) { if (isset($this->_config[$name])) return $this->_config[$name]; return NULL; } /** * Verifies that a file is valid * @return array */ public function verifyFile() { if (!$this->file) return array('error' => Yii::t('ciims.misc', 'No files were uploaded.')); $size = $this->file->size; if ($size == 0) return array('error' => Yii::t('ciims.misc', 'File is empty')); if ($size > $this->sizeLimit) return array('error' => Yii::t('ciims.misc', 'File is too large')); $pathinfo = pathinfo($this->file->name); $filename = $pathinfo['filename']; //$filename = md5(uniqid()); $ext = $pathinfo['extension']; if(!in_array(strtolower($ext), $this->allowedExtensions)) { $these = implode(', ', $this->allowedExtensions); return array('error' => Yii::t('ciims.misc', "File has an invalid extension, it should be one of {{these}}.", array('{{these}}' => $these))); } return array('success' => $filename); } /** * Checks that the server size settings are implemented appropriatly * @return boolean */ private function checkServerSettings() { $postSize = $this->toBytes(ini_get('post_max_size')); $uploadSize = $this->toBytes(ini_get('upload_max_filesize')); if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit) { $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M'; throw new CException(Yii::t('ciims.misc', 'Increase post_max_size and upload_max_filesize to {{size}}', array('{{size}}' => $size))); } return true; } /** * Converts ini settings to an integer * @param string $str The file size to check * @return int */ private function toBytes($str) { $val = trim($str); $last = strtolower($str[strlen($str)-1]); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $val; } }
import { createElement } from "lwc"; import <API key> from "c/<API key>"; import { <API key> } from "lightning/navigation"; import <API key> from "@salesforce/apex/<API key>.<API key>"; // Import mock data for <API key> const <API key> = require("./data/<API key>.json"); const settingsButtonLabel = "settingsButtonLabel"; const <API key> = "<API key>"; const <API key> = "<API key>"; jest.mock( "@salesforce/label/c.stgBtnSettings", () => { return { default: settingsButtonLabel }; }, { virtual: true } ); jest.mock( "@salesforce/label/c.stgBtnDocumentation", () => { return { default: <API key> }; }, { virtual: true } ); jest.mock( "@salesforce/label/c.stgBtnTrailhead", () => { return { default: <API key> }; }, { virtual: true } ); jest.mock( "@salesforce/apex/<API key>.<API key>", () => { const { <API key> } = require("@salesforce/sfdx-lwc-jest"); return { default: <API key>(jest.fn()), }; }, { virtual: true } ); describe("<API key>", () => { afterEach(() => { clearDOM(); }); async function flushPromises() { return Promise.resolve(); } it("Check if EDC Settings Product Card is shown and it has the parameter data", async () => { // Assign mock value for resolved Apex promise <API key>.mockResolvedValue(<API key>); const element = createElement("<API key>", { is: <API key>, }); element.productRegistry = { classname: "testClassName", namespace: "testNamespace", apiVersion: 2.0, }; element.displayProductCards = true; document.body.appendChild(element); await flushPromises(); //Assert the data is populated correctly on the product card const productTitleSpan = element.shadowRoot.querySelector(".productTitle"); expect(productTitleSpan).not.toBeNull(); expect(productTitleSpan.textContent).toBe("testName"); const productIcon = element.shadowRoot.querySelector(".productIcon"); expect(productIcon).not.toBeNull(); expect(productIcon.initials).toBe("testInitials"); expect(productIcon.fallbackIconName).toBe("testIcon"); const <API key> = element.shadowRoot.querySelector(".productDescription"); expect(<API key>).not.toBeNull(); expect(<API key>.textContent).toBe("testDescription"); const <API key> = element.shadowRoot.querySelector(".<API key>"); expect(<API key>).not.toBeNull(); expect(<API key>.title).toBe('<API key>'); expect(<API key>.label).toBe(settingsButtonLabel); const btnDocumentationUrl = element.shadowRoot.querySelector(".btnDocumentationUrl"); expect(btnDocumentationUrl).not.toBeNull(); expect(btnDocumentationUrl.title).toBe('<API key>'); expect(btnDocumentationUrl.label).toBe(<API key>); const btnTrailheadUrl = element.shadowRoot.querySelector(".btnTrailheadUrl"); expect(btnTrailheadUrl).not.toBeNull(); expect(btnTrailheadUrl.title).toBe('<API key>'); expect(btnTrailheadUrl.label).toBe(<API key>); }); it("Check the button <API key> works and navigates correctly", async () => { // Assign mock value for resolved Apex promise <API key>.mockResolvedValue(<API key>); const element = createElement("<API key>", { is: <API key>, }); element.productRegistry = { classname: "testClassName", namespace: "testNamespace", apiVersion: 2.0, }; element.displayProductCards = true; document.body.appendChild(element); await flushPromises(); const <API key> = element.shadowRoot.querySelector(".<API key>"); expect(<API key>).not.toBeNull(); <API key>.click(); const { pageReference } = <API key>(); //Get the details expect(pageReference.type).toBe("standard__component"); expect(pageReference.attributes.componentName).toBe("<API key>"); }); it("Check the button btnDocumentationUrl works and navigates correctly", async () => { // Assign mock value for resolved Apex promise <API key>.mockResolvedValue(<API key>); const element = createElement("<API key>", { is: <API key>, }); element.productRegistry = { classname: "testClassName", namespace: "testNamespace", apiVersion: 2.0, }; element.displayProductCards = true; document.body.appendChild(element); await flushPromises(); const btnDocumentationUrl = element.shadowRoot.querySelector(".btnDocumentationUrl"); expect(btnDocumentationUrl).not.toBeNull(); btnDocumentationUrl.click(); const { pageReference } = <API key>(); //Get the details expect(pageReference.type).toBe("standard__webPage"); expect(pageReference.attributes.url).toBe("<API key>"); }); it("Check the button btnTrailheadUrl works and navigates correctly", async () => { // Assign mock value for resolved Apex promise <API key>.mockResolvedValue(<API key>); const element = createElement("<API key>", { is: <API key>, }); element.productRegistry = { classname: "testClassName", namespace: "testNamespace", apiVersion: 2.0, }; element.displayProductCards = true; document.body.appendChild(element); await flushPromises(); const btnTrailheadUrl = element.shadowRoot.querySelector(".btnTrailheadUrl"); expect(btnTrailheadUrl).not.toBeNull(); btnTrailheadUrl.click(); const { pageReference } = <API key>(); //Get the details expect(pageReference.type).toBe("standard__webPage"); expect(pageReference.attributes.url).toBe("testTrailheadUrl"); }); });
from __future__ import division import unittest from FRETUtils.TransferMatrices import TransferMatrix, <API key>, <API key>, <API key>, genEffIndex, generateBinMid, modifyR0 from FRETUtils.Helpers import rToEff, genRandomVec, getKappa from FRETUtils.Efficiencies import efficiencyDeltaFix import tempfile, os, shutil, random import numpy from math import sqrt from matplotlib import pyplot def matDiff(mat1, mat2): diff = sqrt(((mat1 - mat2) ** 2).max()) return diff def <API key>(burstsize): return burstsize def getShotNoise(myeff, effbins, samples, samplesize): effs = numpy.zeros(effbins) for _ in range(samples): rnds = numpy.random.random(samplesize) accs = (rnds < myeff).sum() eff = efficiencyDeltaFix((accs / samplesize,)) ndx = genEffIndex(eff[0], effbins) effs[ndx] += 1 / samples return effs class TransferMatrixTests(unittest.TestCase): def setUp(self): self.<API key> = lambda :<API key>(5000) self.constant5Burstgen = lambda :<API key>(5) self.constant50Burstgen = lambda :<API key>(50) self.constant500Burstgen = lambda :<API key>(500) def tearDown(self): pass def <API key>(self, m1, m2, delta = 0.05): diff = matDiff(m1, m2) mmax = m1.max() if m2.max() > max: mmax = m2.max() diff /= mmax print "Matrix difference is %f percent" % (diff * 100) print "Matrix1 sum", m1.sum() print "Matrix1 sum", m2.sum() if diff > delta: pyplot.figure() pyplot.subplot(221) pyplot.imshow(m1.T, origin = "lower", interpolation = 'nearest', aspect = "auto") pyplot.title("Matrix1") pyplot.subplot(222) pyplot.imshow(m2.T, origin = "lower", interpolation = 'nearest', aspect = "auto") pyplot.title("Matrix2") pyplot.subplot(223) pyplot.imshow((numpy.sqrt((m1 - m2) ** 2)).T, origin = "lower", interpolation = 'nearest', aspect = "auto") pyplot.title("abs differences") pyplot.subplot(224) pyplot.imshow((((m1 - m2))).T, origin = "lower", interpolation = 'nearest', aspect = "auto") pyplot.title("differences") pyplot.show() self.assertAlmostEqual(diff, 0.0, delta = delta) def <API key>(self): self.assertEqual(genEffIndex(1., 10), 9) def testAbstract(self): tm = TransferMatrix(20, 11, [5, 6]) self.assertRaises(NotImplementedError, tm.generateMatrix) def <API key>(self): R = numpy.linspace(4.95, 6.05, 22) kappa = [ 2. / 3 ] * 22 weights = [ 1. ] * 22 tm = <API key>(20, 11, 200, self.<API key>, 5.475, R, kappa, weights, RRange = (5., 6)) tm.generateMatrix() self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertAlmostEqual(tm.getMatrix()[9][5], 1., delta = 0.01) tmref = <API key>(20, 11, 200, self.<API key>, 5.475, (5, 6)) self.<API key>(tm.getMatrix() , tmref.getMatrix(), delta = 0.15) def <API key>(self): R = numpy.linspace(4.95, 6.05, 22) kappa = [ 2. / 3 ] * 22 weights = [ 1. ] * 22 tm = <API key>(20, 11, 5, self.<API key>, 5.475, R, kappa, weights, RRange = (5., 7)) self.assertRaises(ValueError, tm.generateMatrix) tm = <API key>(20, 11, 5, self.<API key>, 5.475, R, kappa, weights, RRange = (5., 7)) self.assertRaises(ValueError, tm.generateMatrix) def testGlobal(self): tm = <API key>(20, 11, 5, self.<API key>, 5.475, (5, 6)) self.assertEqual(tm.getMatrix().shape, (20, 11)) self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertEqual(tm.getMatrix()[9][5], 1.) def testGlobalShotNoise(self): for sn, sng in ((5, self.constant5Burstgen), (50, self.constant50Burstgen), (500, self.constant500Burstgen), (5000, self.<API key>)): tm = <API key>(20, 11, 1000, sng, 5.475, (5, 6)) tmx = tm.getMatrix() print "Burstsizes %d" % sn for _ in range(7): mbin = random.choice(range(20)) binmid = generateBinMid(1, mbin, 20, 5) eff = rToEff(binmid, R0 = 5.475) print "Testing mbin %d at pos %f with efficiency %f" % (mbin, binmid, eff) shotnoise = getShotNoise(eff, 11, 1000, sn) tmxvec = tmx[mbin, :] tmxvec.shape = (11, 1) self.assertAlmostEqual((tmxvec - shotnoise).sum(), 0.0, delta = 0.005) def testDistanceAVG(self): R = numpy.linspace(5, 6, 1100) kappa = [ 2. / 3 ] * 1100 weights = [ 1. ] * 1100 tm = <API key>(20, 11, 5, self.<API key>, 5.475, R, kappa, weights) tm.generateMatrix() self.assertEqual(tm.getMatrix().shape, (20, 11)) self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertEqual(tm.getMatrix()[9][5], 1.) def <API key>(self): R = numpy.linspace(5, 6, 1100) kappa = [ 2. / 3 ] * 200 + [ 1. / 3 ] * 400 + [ 2. / 3 ] * 500 weights = [ 1. ] * 1100 tm = <API key>(20, 11, 5, self.<API key>, 5.475, R, kappa, weights) tm.generateMatrix() self.assertEqual(tm.getMatrix().shape, (20, 11)) self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) R0neu = modifyR0(5.475, 1. / 3) print "New R0 is %f" % R0neu eff = rToEff(5.475, R0 = R0neu) effndx = int(eff * 11) self.assertAlmostEqual(tm.getMatrix()[9][effndx], 1, delta = 0.01) def <API key>(self): R = numpy.linspace(5, 6, 1100) kappa = [ 2. / 3 ] * 1100 weights = [ 1. ] * 1100 for sn, sng in ((5, self.constant5Burstgen), (50, self.constant50Burstgen), (500, self.constant500Burstgen), (5000, self.<API key>)): tm = <API key>(20, 11, 1000, sng, 5.475, R, kappa, weights, RRange = (5, 6)) tmx = tm.getMatrix() print "Burstsizes %d" % sn for _ in range(7): mbin = random.choice(range(20)) binmid = generateBinMid(1, mbin, 20, 5) eff = rToEff(binmid, R0 = 5.475) print "Testing mbin %d at pos %f with efficiency %f" % (mbin, binmid, eff) shotnoise = getShotNoise(eff, 11, 1000, sn) tmxvec = tmx[mbin, :] tmxvec.shape = (11, 1) self.assertAlmostEqual((tmxvec - shotnoise).sum(), 0.0, delta = 0.005) def testDistanceKappa(self): R = numpy.linspace(5, 6, 1100) kappa = [ 2. / 3 ] * 1100 weights = [ 1. ] * 1100 tm = <API key>(20, 11, 5, self.<API key>, 5.475, R, kappa, weights) tm.generateMatrix() self.assertEqual(tm.getMatrix().shape, (20, 11)) self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertEqual(tm.getMatrix()[9][5], 1.) def <API key>(self): R = numpy.linspace(5.05, 5.95, 20) kappa = [ 2. / 3 ] * 20 weights = [ 1. ] * 20 tm = <API key>(20, 11, 5000, self.<API key>, 5.475, R, kappa, weights, RRange = (5, 6)) tm.generateMatrix() self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertAlmostEqual(tm.getMatrix()[9][5], 1., delta = 0.01) tmref = <API key>(20, 11, 5000, self.<API key>, 5.475, [5, 6]) self.<API key>(tm.getMatrix(), tmref.getMatrix(), delta = 0.05) def testGlobalVsGlobal(self): R = numpy.linspace(5.05, 5.95, 20) kappa = [ 2. / 3 ] * 20 weights = [ 1. ] * 20 bursts = 500 tm = <API key>(20, 11, bursts, self.<API key>, 5.475, R, kappa, weights, RRange = (5, 6)) tm.generateMatrix() self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertAlmostEqual(tm.getMatrix()[9][5], 1., delta = 0.01) tmref = <API key>(20, 11, bursts, self.<API key>, 5.475, [5, 6]) tmref2 = <API key>(20, 11, bursts, self.<API key>, 5.475, [5, 6]) self.<API key>(tmref2.getMatrix(), tmref.getMatrix(), delta = 0.05) # def <API key>(self): # R = numpy.linspace(5.05, 5.95, 20) # kappa = [ 2. / 3 ] * 20 # weights = [ 1. ] * 20 # tm = <API key>(20, 11, 5000, self.<API key>, 5.475, R, kappa, weights, RRange = (5, 6)) # tm.generateMatrix() # self.assertEqual(tm.RRange[0], 5) # self.assertEqual(tm.RRange[1], 6) # self.assertAlmostEqual(tm.getMatrix()[9][5], 1., delta = 0.01) # tmref = <API key>(20, 11, 5000, self.<API key>, 5.475, [5, 6]) # self.<API key>(tm.getMatrix(), tmref.getMatrix(), delta = 0.05) def <API key>(self): R = numpy.concatenate((numpy.linspace(5.05, 5.95, 20), numpy.linspace(5.05, 5.95, 20), numpy.linspace(5.05, 5.95, 20))) kappa = [ 1. ] * 20 + [ 1. ] * 20 + [ 0. ] * 20 weights = [ 1. ] * 60 tm = <API key>(20, 11, 5, self.<API key>, 5.475, R, kappa, weights, RRange = (5, 6)) self.assertEqual(tm.getKappaAVG()[2], 2. / 3) self.assertEqual(tm.RRange[0], 5) self.assertEqual(tm.RRange[1], 6) self.assertEqual(tm.getMatrix()[9][5], 1.) def testPlotting(self): tm = <API key>(20, 11, 5, self.<API key>, 5.475, [5, 6]) odir = tempfile.mkdtemp(suffix = "plottest") ofl = os.path.join(odir, "plot.png") tm.plotToFile(ofl) self.assertEqual(os.path.exists(ofl), True) shutil.rmtree(odir) def testRandomUncorr(self): length = 100000 startdist = 4 enddist = 7 rbins = 10 ebins = 20 bursts = 10000 R0 = 5.475 bgen = self.constant50Burstgen R = numpy.random.random(length) * (enddist - startdist) + startdist kappa2 = numpy.array(list(getKappa(genRandomVec(), genRandomVec(), genRandomVec()) ** 2 for _ in range(length))) print "Kappa^2 mean is ", kappa2.mean() R0mod = modifyR0(R0, kappa2.mean()) prbs = numpy.ones(length) globaltm = <API key>(rbins, ebins, bursts, bgen, R0mod, (startdist, enddist)) localtm = <API key>(rbins, ebins, bursts, bgen, R0, R, kappa2, prbs, RRange = (startdist, enddist)) self.<API key>(globaltm.getMatrix(), localtm.getMatrix(), delta = 0.10) # nonetm = <API key>(rbins, ebins, bursts, bgen, R0, R, kappa2, prbs, RRange = (startdist, enddist)) # self.<API key>(globaltm.getMatrix(), nonetm.getMatrix(), delta = 0.05) # def <API key>(self): # length = 100000 # startdist = 4 # enddist = 7 # rbins = 10 # ebins = 11 # bursts = 5000 # R0 = 5.475 # bgen = self.constant500Burstgen # R = numpy.random.random(length) * (enddist - startdist) + startdist # ktmp = [] # for i in range(length): # ktmp.append(getKappa(genRandomVec(), genRandomVec(), genRandomVec()) ** 2 * startdist / R[i]) # kappa2 = numpy.array(ktmp) # prbs = numpy.ones(length) # globaltm = <API key>(rbins, ebins, bursts, bgen, R0, (startdist, enddist)) # localtm = <API key>(rbins, ebins, bursts, bgen, R0, R, kappa2, prbs, RRange = (startdist, enddist)) # self.<API key>(matDiff(globaltm.getMatrix(), localtm.getMatrix()), 0.0, delta = 0.1) # nonetm = <API key>(rbins, ebins, bursts, bgen, R0, R, kappa2, prbs, RRange = (startdist, enddist)) # self.<API key>(localtm.getMatrix(), nonetm.getMatrix(), delta = 0.05) if __name__ == "__main__": # import sys;sys.argv = ['', 'Test.testName'] unittest.main()
<?php namespace lukisongroup\efenbi\rasasayang\models; use Yii; use yii\base\Model; use yii\data\ActiveDataProvider; use lukisongroup\efenbi\rasasayang\models\ItemFormula; /** * ItemFormulaSearch represents the model behind the search form about `api\modules\efenbi\rasasayang\models\ItemFormula`. */ class ItemFormulaSearch extends ItemFormula { /** * @inheritdoc */ public function rules() { return [ [['CREATE_AT', 'UPDATE_AT','FORMULA_DCRIP','FORMULA_NM'], 'safe'], [['STATUS'], 'integer'], [['CREATE_BY', 'UPDATE_BY','FORMULA_ID'], 'string', 'max' => 50], // [['CREATE_AT', 'UPDATE_AT', 'DISCOUNT_WAKTU1','DISCOUNT_WAKTU2','DISCOUNT_VALUE','FORMULA_DCRIP','FORMULA_NM'], 'safe'], // [['STATUS','DISCOUNT_QTY'], 'integer'], // [['CREATE_BY', 'UPDATE_BY','FORMULA_ID','OUTLET_BARCODE','DISCOUNT_HARI'], 'string', 'max' => 50], ]; } /** * @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 = ItemFormula::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, 'FORMULA_ID' => $this->FORMULA_ID, 'STATUS' => $this->STATUS ]); $query->andFilterWhere(['like', 'CREATE_AT', $this->CREATE_AT]) ->andFilterWhere(['like', 'CREATE_AT', $this->CREATE_AT]) ->andFilterWhere(['like', 'UPDATE_BY', $this->UPDATE_BY]) ->andFilterWhere(['like', 'UPDATE_AT', $this->UPDATE_AT]); return $dataProvider; } }
// a config info from CMAKE #define PROJECT_NAME "" #define PROJECT_VESION "1.1.0" #define SVN_VESION "Path: /home/guofutan/workspace/MTRpc_proj \nWorking Copy Root Path: /home/guofutan/workspace/MTRpc_proj \nURL: http: #define BUILD_TIME __DATE__ " " __TIME__ #define BUILD_FLAGS "/usr/bin/c++ -ggdb -g3 -fPIC -rdynamic -fpermissive -Wall -Wextra -Wl,--eh-frame-hdr -msse -msse2 -msse3 -msse4.1 -std=c++0x -O2 -g -DNDEBUG" static void print_version() { printf("PROJECT_NAME : %s\n",PROJECT_NAME); printf("PROJECT_VESION : %s\n",PROJECT_VESION); printf("SVN_VESION : %s\n",SVN_VESION); printf("BUILD_TIME : %s\n",BUILD_TIME); printf("BUILD_FLAGS: %s\n",BUILD_FLAGS); } static void print_help(char const * execname) { printf("Usage:%s [option]\n", execname); printf("Options:\n"); printf(" -h print this message\n"); printf(" -v print the version\n"); printf(" -f cfgfilepath\n"); } static void parse_argv(int argc,char * argv[]){ if(argc == 2 && 0 == strcmp(argv[1],"-v")){ print_version(); exit(0); } }
#pragma once #include <memory> #include <THPP/THPP.h> #include "torch/csrc/autograd/function.h" #include "torch/csrc/autograd/variable.h" namespace torch { namespace autograd { struct BatchNormParams { std::shared_ptr<thpp::Tensor> running_mean; std::shared_ptr<thpp::Tensor> running_var; bool training; double momentum; double eps; bool cudnn_enabled; }; struct BatchNormForward : public Function, public BatchNormParams { BatchNormForward(BatchNormParams params) : BatchNormParams(std::move(params)) {} virtual variable_list apply(const variable_list& inputs) override; }; struct BatchNormBackward : public Function, public BatchNormParams { BatchNormBackward( FunctionFlags flags, BatchNormParams params, std::unique_ptr<thpp::Tensor> save_mean, std::unique_ptr<thpp::Tensor> save_std, SavedVariable input, SavedVariable weight, SavedVariable bias) : Function(std::move(flags)) , BatchNormParams(std::move(params)) , save_mean(std::move(save_mean)) , save_std(std::move(save_std)) , input(std::move(input)) , weight(std::move(weight)) , bias(std::move(bias)) {} virtual variable_list apply(const variable_list& gradOutputs) override; virtual void releaseVariables() override; std::unique_ptr<thpp::Tensor> save_mean; std::unique_ptr<thpp::Tensor> save_std; SavedVariable input; SavedVariable weight; SavedVariable bias; }; }}
from .concept import Concept, Relationship, <API key> from .device import Device from .encounter import Encounter from .events import Event from .instruction import Instruction from .location import Location from .notification import Notification from .observation import Observation from .observer import Observer, Surgeon, SurgicalAdvocate from .procedure import Procedure from .subject import Subject, SurgicalSubject __all__ = ['Concept', 'Relationship','<API key>', 'Device', 'Encounter', 'Event', 'Instruction', 'Location', 'Notification', 'Observation', 'Observer', 'Procedure', 'Subject', 'SurgicalSubject', 'Surgeon', 'SurgicalAdvocate']
from bitcoin import network from bitcoin import messages from io import BytesIO from mock import patch from gevent import socket import mock import os import unittest __author__ = 'cdecker' BASENAME = os.path.dirname(__file__) class TestNetworkClient(unittest.TestCase): def test_parser(self): """Test parser selection. Test to see whether we are selecting the correct parser. """ tx = BytesIO(open( os.path.join(BASENAME, 'resources', 'tx-9c0f7b2.dmp'), 'r' ).read()) connection = network.Connection(None, ('host', 8333)) message = connection.parse_message('tx', tx) self.assertEqual('tx', message.type) self.assertIsInstance(message, messages.TxPacket) def test_misc(self): nc = network.NetworkClient() self.assertRaises(NotImplementedError, nc.run_forever) v = mock.Mock() c = mock.Mock() nc.handle_version(c, v) self.assertEquals(v.version, c.version) class TestConnection(unittest.TestCase): def test_misc(self): c = network.Connection(None, ('127.0.0.1', 8333)) self.assertRaises(NotImplementedError, c.disconnect) def <API key>(self): nc = network.NetworkClient() nc.connection_class = mock.MagicMock() conn = nc.connect(('1.2.3.4', 8333)) nc.connect(('1.2.3.4', 8334)) nc.connect(('1.2.3.5', 8333)) self.assertRaises(ValueError, nc.connect, ('1.2.3.4', 8333)) self.assertTrue(('1.2.3.4', 8333) in nc.connections) self.assertEqual(len(nc.connections), 3) self.assertFalse(conn.disconnect.called) nc.disconnect(('1.2.3.4', 8333)) self.assertTrue(conn.disconnect.called) self.assertTrue(('1.2.3.4', 8333) not in nc.connections) self.assertEqual(len(nc.connections), 2) self.assertRaises(ValueError, nc.disconnect, ('1.2.3.4', 8333)) self.assertEqual(len(nc.connections), 2) def test_roundtrip(self): """ Do a full roundtrip of the network stack. Use Connection to serialize a message and GeventConnection to deserialize it again. """ network_client = mock.MagicMock() connection = network.GeventConnection(network_client, ('127.0.0.1', 8333), False) connection.socket = mock.Mock() p = messages.GetDataPacket() connection.send(p.type, p) wire = BytesIO(connection.socket.send.call_args[0][0]) def recv(n): return wire.read(n) connection.socket.recv = recv message = connection.read_message() self.assertTrue(isinstance(message, messages.GetDataPacket)) # This should produce a short read wire = BytesIO(connection.socket.send.call_args[0][0][:-2]) self.assertRaises(ValueError, connection.read_message) # This will raise a non-matching magic error wire = BytesIO("BEEF" + connection.socket.send.call_args[0][0][4:]) self.assertRaises(ValueError, connection.read_message) class <API key>(unittest.TestCase): def test_init(self): network.GeventNetworkClient() @mock.patch('bitcoin.network.gevent') def test_connect(self, mgevent): nc = network.GeventNetworkClient() conn = nc.connect(('10.0.0.1', 8333)) self.assertTrue(conn) self.assertTrue(mgevent.spawn.called) def test_run_forever(self): nc = network.GeventNetworkClient() nc.connection_group = mock.Mock() nc.run_forever() self.assertTrue(nc.connection_group.join.called) @mock.patch('bitcoin.network.socket') def test_listen(self, msocket): nc = network.GeventNetworkClient() group_size = len(nc.connection_group) nc.listen() self.assertTrue(nc.socket.bind.called) self.assertTrue(nc.socket.listen.called) self.assertEquals(len(nc.connection_group), group_size + 1) @mock.patch('bitcoin.network.gevent.spawn_later') @mock.patch('bitcoin.network.gevent.spawn') def test_accept(self, mspawn, mspawn_later): nc = network.GeventNetworkClient() nc.socket = mock.Mock() connection_handler = mock.Mock() nc.register_handler( network.<API key>.type, connection_handler ) nc.socket.accept = mock.Mock(side_effect=[ (mock.Mock(), ('10.0.0.1', 8333)), StopIteration() ]) self.assertRaises(StopIteration, nc.accept) self.assertTrue(connection_handler.called) @mock.patch('bitcoin.network.gevent.spawn_later') @mock.patch('bitcoin.network.gevent.spawn') def <API key>(self, mspawn, mspawn_later): nc = network.GeventNetworkClient() nc.socket = mock.Mock() connection_handler = mock.Mock() nc.register_handler( network.ConnectionLostEvent.type, connection_handler ) nc.socket.accept = mock.Mock(side_effect=[ (mock.Mock(), ('10.0.0.1', 8333)), StopIteration() ]) def spawn_later(t, callable, *args, **kwargs): callable(*args, **kwargs) # Wire the idle timeout handler to be called immediately mspawn_later.side_effect = spawn_later self.assertRaises(StopIteration, nc.accept) self.assertEquals(len(nc.connections), 0) self.assertTrue(connection_handler.called) class TestUtil(unittest.TestCase): def test_bootstrap(self): res = network.bootstrap() self.assertTrue(res) @patch('bitcoin.network.socket.getaddrinfo') def test_bootstrap_fail(self, getaddrinfo): """ socket.getaddrinfo may return None. """ def side_effect(a, b): if a == network.DNS_SEEDS[0]: raise socket.gaierror() else: return [(2, 2, 17, '', ('68.48.214.241', 0))] getaddrinfo.side_effect = side_effect res = network.bootstrap() self.assertListEqual(res, [('68.48.214.241', 8333)]) class TestBehavior(unittest.TestCase): def setUp(self): self.network_client = mock.Mock() self.network_client.bytes_sent = 0 self.connection = mock.Mock(incoming=False, host=('127.0.0.1', 8333)) def <API key>(self): network.ClientBehavior(self.network_client) args = self.network_client.register_handler.call_args_list types = [a[0][0] for a in args] # Ensure we have at least handlers for the connection established event # and an incoming version message self.assertTrue(network.<API key>.type in types) self.assertTrue(messages.VersionPacket.type in types) def <API key>(self): b = network.ClientBehavior(self.network_client) message = mock.Mock(type=network.<API key>.type) # We should not send anything on new incoming connections self.connection.incoming = True b.on_connect(self.connection, message) self.assertFalse(self.connection.send.called) # On outgoing connections we initiate the handshake self.connection.incoming = False b.on_connect(self.connection, message) self.assertTrue(self.connection.send.called) def <API key>(self): b = network.ClientBehavior(self.network_client) b.send_verack(self.connection) self.connection.send.assert_called_with('verack', '') self.assertEquals(self.connection.send.call_count, 1) def <API key>(self): b = network.ClientBehavior(self.network_client) b.send_version = mock.Mock() b.send_verack = mock.Mock() # This is an outgoing connection, so we should send just one verack self.connection.incoming = False b.on_version(self.connection, mock.Mock()) self.assertFalse(b.send_version.called) self.assertEquals(b.send_verack.call_count, 1) # Now on an incoming connection, we also respond with a version self.connection.incoming = True b.send_verack.reset() b.on_version(self.connection, mock.Mock()) self.assertTrue(b.send_verack.call_count, 1) self.assertTrue(b.send_version.call_count, 1) if __name__ == '__main__': unittest.main()
<!-- BEGIN: content --> <span class="image"> <!-- BEGIN: item --> <span class="item image_id_{GET.relation}{ITEM.id}"><span class="imageWrap"><img id="image_id_{GET.relation}{ITEM.id}" alt="{ITEM.title|htmlspecialchars}" title="{ITEM.title|htmlspecialchars}" src="{ITEM.path}{ITEM.src}" /></span></span> <!-- END: item --> </span> <!-- END: content -->
import { AspectAdvice } from 'dojo-compose/compose'; /** * This mixin provides the ability to view discrete 'pages' of rows. The type is expressed using a class becase, as with * the case of editor and decorator, it is more concise to express a mixture of complex types and function * implementations in a class than with an interface and associated object. None of the built in class functionality * is being leveraged though(e.g. Its constructor will be ignored). */ export class Pagination { rowsPerPage: number; pageNumber: number; data: { [ index: string ]: string }[]; render: (data: { [ index: string ]: string }[]) => void; gotoPage(page: number): void { this.pageNumber = page; this.render(this.data); } } const paginationAdvice: AspectAdvice = { 'around': { render: function (inherited: (data: { [ index: string ]: string }[]) => void): (data: { [index: string ]: string }[]) => void { return function (data: { [index: string ]: string }[]) { const start = this.pageNumber * this.rowsPerPage; const end = start + this.rowsPerPage; this.data = data; inherited.call(this, data.slice(start, end)); let paginationNode = this.domNode.querySelector('.paginationNode'); if (paginationNode) { this.domNode.removeChild(paginationNode); } paginationNode = document.createElement('div'); paginationNode.classList.add('paginationNode'); let nextButton = document.createElement('button'); let previousButton = document.createElement('button'); nextButton.textContent = 'Next'; previousButton.textContent = 'Previous'; nextButton.onclick = function () { this.gotoPage(this.pageNumber + 1); }.bind(this); previousButton.onclick = function () { this.gotoPage(this.pageNumber - 1); }.bind(this); paginationNode.appendChild(previousButton); paginationNode.appendChild(nextButton); this.domNode.appendChild(paginationNode); }; } } }; function paginationInit(grid: Pagination, options: { [index: string ]: any }) { grid.rowsPerPage = options['rowsPerPage']; grid.pageNumber = options['pageNumber']; } export default { mixin: Pagination, initialize: paginationInit, aspectAdvice: paginationAdvice };
#include <sys/klog.h> #include <sys/sleepq.h> #include <sys/runq.h> #include <sys/ktest.h> #include <sys/errno.h> #include <sys/sched.h> #define T 6 #define RAND_COUNT 13 /* obtained with totally fair d6 rolls (1-3 true; 4-6 false) */ static bool kinda_random_values[RAND_COUNT] = {true, true, false, true, false, false, true, false, true, true, false, false, false}; /* Puts one thread to sleep and aborts it with a second thread. */ static int <API key>(void); /* Runs a couple of threads that sleep on a specified channel and one thread * that kinda randomly wakes them up or aborts their sleep. Keeps track of * the number of threads that were interrupted and woken up normally and * of the number of apparently successful aborts and regular wake-ups. */ static int <API key>(void); /* some random ordering for waiters (values from 0 to T-1) */ static int waiters_ord[T] = {5, 2, 1, 3, 4, 0}; static thread_t *waiters[T]; static thread_t *waker; /* just to have some unused waiting channel */ static int some_val; static volatile int wakened_gracefully; static volatile int interrupted; /* Waiters have higher priority so that waker will only execute * when waiters can't. * Therefore there should be only one waiter active at once */ static void waiter_routine(void *_arg) { int rsn = sleepq_wait_intr(&some_val, __caller(0)); if (rsn == EINTR) interrupted++; else if (rsn == 0) wakened_gracefully++; else panic("unknown wakeup reason: %d", rsn); } static void waker_routine(void *_arg) { int wakened = 0; /* total */ int aborted = 0; int next_abort = 0; int rand_next = 0; while (wakened < T) { /* this is a terrible way for randomizing variables * (especially when it's probably not even needed) */ bool wake = kinda_random_values[rand_next % RAND_COUNT]; rand_next++; if (wake) { bool succ = sleepq_signal(&some_val); assert(succ); wakened++; } else { bool succ = false; while (!succ) { assert(next_abort < T && waiters_ord[next_abort] < T); succ = sleepq_abort(waiters[waiters_ord[next_abort]]); next_abort++; } aborted++; wakened++; } } assert(T == wakened); assert(interrupted == aborted); assert(T == interrupted + wakened_gracefully); } static int <API key>(void) { wakened_gracefully = 0; interrupted = 0; /* HACK: Priorities differ by RQ_PPQ so that threads occupy different runq. */ waker = thread_create("test-sleepq-waker", waker_routine, NULL, prio_kthread(0) + RQ_PPQ); for (int i = 0; i < T; i++) { char name[20]; snprintf(name, sizeof(name), "test-sleepq-waiter-%d", i); waiters[i] = thread_create(name, waiter_routine, NULL, prio_kthread(0)); } for (int i = 0; i < T; i++) sched_add(waiters[i]); sched_add(waker); /* now only wait until the threads finish */ thread_join(waker); for (int i = 0; i < T; i++) thread_join(waiters[i]); return KTEST_SUCCESS; } static void <API key>(void *_arg) { sleepq_abort(waiters[0]); } /* waiter routine is shared with test_mult */ static int <API key>(void) { /* HACK: Priorities differ by RQ_PPQ so that threads occupy different runq. */ waiters[0] = thread_create("waiter", waiter_routine, NULL, prio_kthread(0)); waker = thread_create("simp-waker", <API key>, NULL, prio_kthread(0) + RQ_PPQ); sched_add(waiters[0]); sched_add(waker); thread_join(waiters[0]); thread_join(waker); return KTEST_SUCCESS; } KTEST_ADD(sleepq_abort_simple, <API key>, 0); KTEST_ADD(sleepq_abort_mult, <API key>, 0);
using System; using System.Collections.Generic; using System.Data; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using entCMS.DAL; using entCMS.Model; using jtSoft.Data; using System.Configuration; namespace entCMS.Manage.Module { public partial class NewsListEx : BasePage { NewsService ns = new NewsService(); NewsCatalogService ncs = new NewsCatalogService(); protected string type = ""; public NewsListEx() : base(PagePurviewType.PPT_NEWS) { } protected void Page_Load(object sender, EventArgs e) { type = string.IsNullOrEmpty(Request["t"]) ? "0" : Request["t"]; base.<API key>(pager, gv); if (!IsPostBack) { InitControls(); BindGrid(); } } private void InitControls() { txtAddTime1.Attributes.Add("readonly", "true"); txtAddTime2.Attributes.Add("readonly", "true"); txtEditTime1.Attributes.Add("readonly", "true"); txtEditTime2.Attributes.Add("readonly", "true"); lblPosition.Text = ncs.GetNavStr(NodeCode, " >> "); ddlAudit.SelectedValue = type; ddlAudit.Enabled = false; } private void BindGrid() { bool isAdmin = IsAdmin; string role = <API key>.AppSettings["CheckRoleId"]; int roleId = Convert.ToInt32(role); UserRoleService urs = new UserRoleService(); if (urs.Exists(cmsUserRole._.UserId == UserID && cmsUserRole._.RoleId == roleId)) { isAdmin = true; } int recordCount = 0; DataTable dt = ns.GetListByFilter2( "", txtTitle.Text, txtSource.Text, txtAuthor.Text, txtTags.Text, Convert.ToInt32(ddlIndex.SelectedValue), Convert.ToInt32(ddlTop.SelectedValue), Convert.ToInt32(type), txtAddTime1.Text, txtAddTime2.Text, txtEditTime1.Text, txtEditTime2.Text, UserID, isAdmin, pager.CurrentPageIndex, pager.PageSize, ref recordCount); // GridView base.BindGrid(recordCount, dt); } protected void gv_RowDataBound(object sender, <API key> e) { if (e.Row.RowType == DataControlRowType.DataRow) { DataRowView drv = e.Row.DataItem as DataRowView; string audit = drv["IsAudit"]+""; LinkButton btnEdit = e.Row.FindControl("btnEdit") as LinkButton; LinkButton btnDel = e.Row.FindControl("btnDel") as LinkButton; LinkButton btnRst = e.Row.FindControl("btnRst") as LinkButton; LinkButton btnDelete = e.Row.FindControl("btnDelete") as LinkButton; LinkButton btnAudit = e.Row.FindControl("btnAudit") as LinkButton; if (audit.Equals("3")) { btnRst.Visible = true; btnRst.OnClientClick = "return restore(\"" + drv["Id"] + "\");"; } else { btnEdit.Visible = true; btnEdit.OnClientClick = "return edit(\"" + drv["Id"] + "\");"; btnEdit.Attributes["href"] = "NewsAdd.aspx?node=" + drv["NodeCode"] + "&id=" + drv["Id"] + "&action=edit"; btnDel.Visible = true; btnDel.OnClientClick = "return del(\"" + drv["Id"] + "\", 0);"; btnAudit.Visible = true; btnAudit.OnClientClick = "return audit(\"" + NodeCode + "\",\"" + drv["Id"] + "\");"; } if (IsAdmin) { btnDelete.Visible = true; btnDelete.OnClientClick = "return del(\"" + drv["Id"] + "\", 1);"; } } } protected void pager_PageChanged(object src, EventArgs e) { BindGrid(); } protected void btnQuery_Click(object sender, EventArgs e) { BindGrid(); } protected void btnReset_Click(object sender, EventArgs e) { txtTitle.Text = ""; txtSource.Text = ""; txtAuthor.Text = ""; txtTags.Text = ""; ddlIndex.SelectedIndex = 0; ddlTop.SelectedIndex = 0; ddlAudit.SelectedIndex = 0; txtAddTime1.Text = ""; txtAddTime2.Text = ""; txtEditTime1.Text = ""; txtEditTime2.Text = ""; } string[] status = { "", "", "", "" }; protected string getAuditStatus(object dataItem) { DataRowView drv = dataItem as DataRowView; if (!DBNull.Value.Equals(drv["IsAudit"])) { int isAudit = Convert.ToInt32(drv["IsAudit"]); if (isAudit == 2) { string s = "<a href='javascript:void(0);' class='tooltip' title='{0}'>{1}</a>"; string c = Convert.ToString(drv["AuditComment"]); c = c.Replace("\r", "").Replace("\n", "<br/>"); c = Server.HtmlEncode(c); return string.Format(s, c, status[2]); } else { return status[isAudit]; } } else { return status[0]; } } } }
{% from "includes/common_macros.html" import list_view_item %} {% from "includes/common_macros.html" import favicon with context %} {% from "wiki/includes/document_macros.html" import show_for with context %} {% from "search/basic-form.html" import mobile_nav_form with context %} <!DOCTYPE html> <html lang="{{ request.LANGUAGE_CODE }}"{% if dir %} dir="{{ dir }}"{% endif %}{% if settings.GTM_CONTAINER_ID %} <API key>="{{ settings.GTM_CONTAINER_ID }}"{% endif %} class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" media="(device-height: 568px)"> <meta name="<API key>" content="yes" /> <meta name="<API key>" content="black" /> <!-- Don't index mobile optimized pages --> <meta name="robots" content="noindex" /> <title>{{ title }} | {{ pgettext('site_title', 'Mozilla Support') }}</title> {{ favicon() }} <link rel="search" type="application/<API key>+xml" title="{{ _('Mozilla Support') }}" href="{{ url('search.plugin') }}"/> {% stylesheet 'mobile-common' %} {% for style in styles %} {% stylesheet style %} {% endfor %} {% if meta %} {% for tag in meta %} <meta name="{{ tag[0] }}" content="{{ tag[1] }}"/> {% endfor %} {% endif %} {% if canonical_url %} <link rel="canonical" href="{{ canonical_url }}" /> {% endif %} {% block head %} {% endblock %} {% include "includes/google-analytics.html" %} </head> <body class="{{ classes }}" data-readonly="{{ settings.READ_ONLY|json }}" data-static-url="{{ STATIC_URL }}" data-orientation="{% if page_align %}{{ page_align }}{% else %}right{% endif %}" {% if ga_alternate_url %} <API key>="{{ ga_alternate_url }}" {% endif %} data-usernames-api="{{ url('users.api.usernames') }}" {% if extra_body_attrs -%} {% for attr, val in extra_body_attrs.items() %}{{ attr }}="{{ val }}" {% endfor %} {%- endif %}> <nav class="scrollable"> <div id="search-bar"> {{ mobile_nav_form(q, search_params) }} </div> <a href="{{ url('products') }}">{{ _('Home') }}</a> {% if request.LANGUAGE_CODE == settings.<API key> %} {% set ask_url = url('questions.aaq_step1') %} {% else %} {% set ask_url = url('wiki.document', '<API key>') %} {% endif %} <a href="{{ ask_url }}">{{ _('Ask a question') }}</a> <a href="{{ url('questions.home') }}">{{ _('Support Forum') }}</a> <header>{{ _('Navigation') }}</header> <a href="{{ url('landings.get_involved') }}">{{ _('Help other users') }}</a> <a href="?{{ request.QUERY_STRING}}&amp;mobile=0">{{ _('Switch to desktop site') }}</a> <header>{{ _('Profile') }}</header> {% if user.is_authenticated() %} <a href="{{ profile_url(user) }}">{{ display_name(user) }}</a> <a href="{{ url('messages.inbox') }}"> {{ _('Inbox') }} {% if <API key> > 0 %} ({{ <API key> }}) {% endif %} </a> <a href="{{ url('users.edit_settings') }}">{{ _('Settings') }}</a> <form id="sign-out" action="{{ url('users.logout') }}" method="post"> {% csrf_token %} </form> <a class="sign-out" data-submit="sign-out" href="#sign-out">{{ _('Sign Out') }}</a> {% else %} <a href="{{ url('users.login') }}">{{ _('Sign in') }}</a> {% endif %} {% if not <API key> %} <header>{{ _('Languages') }}</header> {% set locale_url = url('sumo.locales') %} {% if localizable_url %} {% set locale_url = locale_url|urlparams(next=localizable_url) %} {% endif %} <a href="{{ locale_url }}" class="locale-picker">{{ _('Switch language') }}</a> {% endif %} </nav> <header class="slide-on-exposed"> <div id="menu-button" class="icon-sprite"></div> <div id="search-button"></div> <div id="header-components"> {% block header_buttons %}{% endblock %} {% if cancel_url %} <a href="{{ cancel_url }}" id="cancel-button" class="icon-sprite">Cancel</a> {% endif %} {% if return_url and False %} <a href="{{ return_url }}" class="return-button icon-sprite">Back</a> {% endif %} {% block header %} <h1> {% if headline %} {{ headline }} {% else %} {{ _('Mozilla Support') }} {% endif %} </h1> {% endblock %} </div> <form id="instant-search-form" data-instant-search="form"> <input type="search" placeholder="{{ _('Start typing to search...') }}"> </form> </header> {% block after_header %}{% endblock %} <div id="main-content" class="wrapper slide-on-exposed"> <section id="content"> {% block content %}{% endblock %} {% if include_showfor %} <article> <header>{{ _('Get support for another platform:') }}</header> {{ show_for(products, '') }} </article> {% endif %} </section> <footer> {% block footer %}{% endblock %} </footer> <ul id="notifications"> {% for message in messages %} <li>{{ message }}</li> {% endfor %} {% for an in get_announcements() %} <li class="announcement" id="announcement-{{ an.id }}">{{ an.content }}</li> {% endfor %} </ul> </div> {% block after_main %}{% endblock %} {# TODO: The JS url changes whenever our js code changes. But this should get cached busted whenever a locale is updated. It's complicatred to fix. But for now it isn't more broken than before. {% if request.LANGUAGE_CODE %} <script src="{{ static('jsi18n/{lang}/djangojs.js'|f(lang=request.LANGUAGE_CODE|lower)) }}"></script> {% endif %} {% javascript 'mobile-common' %} {% for script in scripts %} {% javascript script %} {% endfor %} </body> </html>
#include "talk/p2p/base/stunport.h" #include "talk/base/common.h" #include "talk/base/logging.h" #include "talk/base/helpers.h" #include "talk/base/nethelpers.h" #include "talk/p2p/base/common.h" #include "talk/p2p/base/stun.h" namespace cricket { // TODO: Move these to a common place (used in relayport too) const int KEEPALIVE_DELAY = 10 * 1000; // 10 seconds - sort timeouts const int RETRY_DELAY = 50; // 50ms, from ICE spec const int RETRY_TIMEOUT = 50 * 1000; // ICE says 50 secs // Handles a binding request sent to the STUN server. class <API key> : public StunRequest { public: <API key>(StunPort* port, bool keep_alive, const talk_base::SocketAddress& addr) : port_(port), keep_alive_(keep_alive), server_addr_(addr) { start_time_ = talk_base::Time(); } virtual ~<API key>() { } const talk_base::SocketAddress& server_addr() const { return server_addr_; } virtual void Prepare(StunMessage* request) { request->SetType(<API key>); } virtual void OnResponse(StunMessage* response) { const <API key>* addr_attr = response->GetAddress(<API key>); if (!addr_attr) { LOG(LS_ERROR) << "Binding response missing mapped address."; } else if (addr_attr->family() != STUN_ADDRESS_IPV4 && addr_attr->family() != STUN_ADDRESS_IPV6) { LOG(LS_ERROR) << "Binding address has bad family"; } else { talk_base::SocketAddress addr(addr_attr->ipaddr(), addr_attr->port()); port_->AddAddress(addr, port_->socket_->GetLocalAddress(), "udp", true); } // We will do a keep-alive regardless of whether this request suceeds. // This should have almost no impact on network usage. if (keep_alive_) { port_->requests_.SendDelayed( new <API key>(port_, true, server_addr_), KEEPALIVE_DELAY); } } virtual void OnErrorResponse(StunMessage* response) { const <API key>* attr = response->GetErrorCode(); if (!attr) { LOG(LS_ERROR) << "Bad allocate response error code"; } else { LOG(LS_ERROR) << "Binding error response:" << " class=" << attr->eclass() << " number=" << attr->number() << " reason='" << attr->reason() << "'"; } port_->SignalAddressError(port_); if (keep_alive_ && (talk_base::TimeSince(start_time_) <= RETRY_TIMEOUT)) { port_->requests_.SendDelayed( new <API key>(port_, true, server_addr_), KEEPALIVE_DELAY); } } virtual void OnTimeout() { LOG(LS_ERROR) << "Binding request timed out from " << port_->GetLocalAddress().ToString() << " (" << port_->Network()->name() << ")"; port_->SignalAddressError(port_); if (keep_alive_ && (talk_base::TimeSince(start_time_) <= RETRY_TIMEOUT)) { port_->requests_.SendDelayed( new <API key>(port_, true, server_addr_), RETRY_DELAY); } } private: StunPort* port_; bool keep_alive_; talk_base::SocketAddress server_addr_; uint32 start_time_; }; StunPort::StunPort(talk_base::Thread* thread, talk_base::PacketSocketFactory* factory, talk_base::Network* network, const talk_base::IPAddress& ip, int min_port, int max_port, const std::string& username, const std::string& password, const talk_base::SocketAddress& server_addr) : Port(thread, STUN_PORT_TYPE, <API key>, factory, network, ip, min_port, max_port, username, password), server_addr_(server_addr), requests_(thread), socket_(NULL), error_(0), resolver_(NULL) { requests_.SignalSendPacket.connect(this, &StunPort::OnSendPacket); } bool StunPort::Init() { socket_ = socket_factory()->CreateUdpSocket( talk_base::SocketAddress(ip(), 0), min_port(), max_port()); if (!socket_) { LOG_J(LS_WARNING, this) << "UDP socket creation failed"; return false; } socket_->SignalAddressReady.connect(this, &StunPort::OnAddressReady); socket_->SignalReadPacket.connect(this, &StunPort::OnReadPacket); return true; } StunPort::~StunPort() { if (resolver_) { resolver_->Destroy(false); } delete socket_; } void StunPort::PrepareAddress() { ASSERT(requests_.empty()); // We will keep pinging the stun server to make sure our NAT pin-hole stays // open during the call. // TODO: Support multiple stun servers, or make ResolveStunAddress find a // server with the correct family, or something similar. if (server_addr_.IsUnresolved()) { ResolveStunAddress(); } else if (socket_->GetState() == talk_base::AsyncPacketSocket::STATE_BOUND) { if (server_addr_.family() == ip().family()) { requests_.Send(new <API key>(this, true, server_addr_)); } } } void StunPort::<API key>() { // DNS resolution of the secondary address is not currently supported. ASSERT(!server_addr2_.IsNil()); requests_.Send(new <API key>(this, false, server_addr2_)); } Connection* StunPort::CreateConnection(const Candidate& address, CandidateOrigin origin) { if (address.protocol() != "udp") return NULL; if (!IsCompatibleAddress(address.address())) { return NULL; } Connection* conn = new ProxyConnection(this, 0, address); AddConnection(conn); return conn; } int StunPort::SendTo(const void* data, size_t size, const talk_base::SocketAddress& addr, bool payload) { int sent = socket_->SendTo(data, size, addr); if (sent < 0) { error_ = socket_->GetError(); LOG_J(LS_ERROR, this) << "UDP send of " << size << " bytes failed with error " << error_; } return sent; } int StunPort::SetOption(talk_base::Socket::Option opt, int value) { return socket_->SetOption(opt, value); } int StunPort::GetError() { return error_; } void StunPort::OnAddressReady(talk_base::AsyncPacketSocket* socket, const talk_base::SocketAddress& address) { PrepareAddress(); } void StunPort::OnReadPacket(talk_base::AsyncPacketSocket* socket, const char* data, size_t size, const talk_base::SocketAddress& remote_addr) { ASSERT(socket == socket_); // Look for a response from the STUN server. // Even if the response doesn't match one of our outstanding requests, we // will eat it because it might be a response to a retransmitted packet, and // we already cleared the request when we got the first response. ASSERT(!server_addr_.IsUnresolved()); if (remote_addr == server_addr_ || remote_addr == server_addr2_) { requests_.CheckResponse(data, size); return; } if (Connection* conn = GetConnection(remote_addr)) { conn->OnReadPacket(data, size); } else { Port::OnReadPacket(data, size, remote_addr, PROTO_UDP); } } void StunPort::ResolveStunAddress() { if (resolver_) return; resolver_ = new talk_base::AsyncResolver(); resolver_->SignalWorkDone.connect(this, &StunPort::OnResolveResult); resolver_->set_address(server_addr_); resolver_->Start(); } void StunPort::OnResolveResult(talk_base::SignalThread* t) { ASSERT(t == resolver_); if (resolver_->error() != 0) { LOG_J(LS_WARNING, this) << "StunPort: stun host lookup received error " << resolver_->error(); SignalAddressError(this); } server_addr_ = resolver_->address(); PrepareAddress(); } // TODO: merge this with SendTo above. void StunPort::OnSendPacket(const void* data, size_t size, StunRequest* req) { <API key>* sreq = static_cast<<API key>*>(req); if (socket_->SendTo(data, size, sreq->server_addr()) < 0) PLOG(LERROR, socket_->GetError()) << "sendto"; } } // namespace cricket
<?php Rhaco::import("tag.feed.Atom"); Rhaco::import("io.FileUtil"); Rhaco::import("util.UnitTest"); Rhaco::import("network.http.Browser"); class AtomTest extends UnitTest { function testOutput(){ $b = new Browser(); $this->assertEquals(<<< __RSS__ <?xml version="1.0" encoding="utf-8"?> __RSS__ ,$b->get(Rhaco::url("tag/feed/AtomOutput.php"))); $this->assertTrue(strpos($b->header(0),'Content-Type: application/atom+xml; name=') !== false); } } ?>
package handle import ( //"html/template" "net/http" ) // HTTPErrorPipeline contains information about error. type HTTPErrorPipeline struct { Code int Message string Global GlobalPipeline } // Returns template pipeline containing error info. func NewError(code int, message string) HTTPErrorPipeline { return HTTPErrorPipeline{ Code: code, Message: message, Global: <API key>, } } // ReturnError writes error page into http.ResponseWriter. func ReturnError(w http.ResponseWriter, code int) int { w.WriteHeader(code) tpl, _ := OpenTemplate(ERROR_TPL) tpl.Execute(w, NewError(code, http.StatusText(code))) return code }
#ifndef _IC_ESP_H_ #define _IC_ESP_H_ /* * Definitions for Hayes ESP serial cards. */ /* * CMD1 and CMD2 are the command ports, offsets from <esp_iobase>. */ #define ESP_CMD1 4 #define ESP_CMD2 5 /* * STAT1 and STAT2 are to get return values and status bytes; * they overload CMD1 and CMD2. */ #define ESP_STATUS1 ESP_CMD1 #define ESP_STATUS2 ESP_CMD2 /* * Commands. Commands are given by writing the command value to * ESP_CMD1 and then writing or reading some number of bytes from * ESP_CMD2 or ESP_STATUS2. */ #define ESP_GETTEST 0x01 /* self-test command (1 byte + extras) */ #define ESP_GETDIPS 0x02 /* get on-board DIP switches (1 byte) */ #define ESP_SETFLOWTYPE 0x08 /* set type of flow-control (2 bytes) */ #define ESP_SETRXFLOW 0x0a /* set Rx FIFO flow control levels (4 bytes) */ #define ESP_SETMODE 0x10 /* set board mode (1 byte) */ /* Mode bits (ESP_SETMODE). */ #define ESP_MODE_FIFO 0x02 /* act like a 16550 (compatibility mode) */ #define ESP_MODE_RTS 0x04 /* use RTS hardware flow control */ #define ESP_MODE_SCALE 0x80 /* scale FIFO trigger levels */ /* Flow control type bits (ESP_SETFLOWTYPE). */ #define ESP_FLOW_RTS 0x04 /* cmd1: local Rx sends RTS flow control */ #define ESP_FLOW_CTS 0x10 /* cmd2: local transmitter responds to CTS */ /* Used by ESP_SETRXFLOW. */ #define HIBYTE(w) (((w) >> 8) & 0xff) #define LOBYTE(w) ((w) & 0xff) #endif /* !_IC_ESP_H_ */
/* $NetBSD: ecc_plb.c,v 1.8 2003/07/15 02:54:44 lukem Exp $ */ #include <sys/cdefs.h> __KERNEL_RCSID(0, "$NetBSD: ecc_plb.c,v 1.8 2003/07/15 02:54:44 lukem Exp $"); #include "locators.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/device.h> #include <sys/properties.h> #include <machine/cpu.h> #include <powerpc/ibm4xx/dcr405gp.h> #include <powerpc/ibm4xx/dev/plbvar.h> struct ecc_plb_softc { struct device sc_dev; u_quad_t sc_ecc_tb; u_quad_t sc_ecc_iv; /* Interval */ u_int32_t sc_ecc_cnt; u_int sc_memsize; int sc_irq; }; static int ecc_plbmatch(struct device *, struct cfdata *, void *); static void ecc_plbattach(struct device *, struct device *, void *); static void ecc_plb_deferred(struct device *); static int ecc_plb_intr(void *); CFATTACH_DECL(ecc_plb, sizeof(struct ecc_plb_softc), ecc_plbmatch, ecc_plbattach, NULL, NULL); static int ecc_plb_found; static int ecc_plbmatch(struct device *parent, struct cfdata *cf, void *aux) { struct plb_attach_args *paa = aux; if (strcmp(paa->plb_name, cf->cf_name) != 0) return (0); if (cf->cf_loc[PLBCF_IRQ] == PLBCF_IRQ_DEFAULT) panic("ecc_plbmatch: wildcard IRQ not allowed"); paa->plb_irq = cf->cf_loc[PLBCF_IRQ]; return (!ecc_plb_found); } static void ecc_plbattach(struct device *parent, struct device *self, void *aux) { struct ecc_plb_softc *sc = (struct ecc_plb_softc *)self; struct plb_attach_args *paa = aux; unsigned int processor_freq; unsigned int memsiz; ecc_plb_found++; if (board_info_get("processor-frequency", &processor_freq, sizeof(processor_freq)) == -1) panic("no processor-frequency"); if (board_info_get("mem-size", &memsiz, sizeof(memsiz)) == -1) panic("no mem-size"); printf(": ECC controller\n"); sc->sc_ecc_tb = 0; sc->sc_ecc_cnt = 0; sc->sc_ecc_iv = processor_freq; /* Set interval */ sc->sc_memsize = memsiz; sc->sc_irq = paa->plb_irq; /* * Defer hooking the interrupt until all PLB devices have attached * since the interrupt controller may well be one of those devices... */ config_defer(self, ecc_plb_deferred); } static void ecc_plb_deferred(struct device *self) { struct ecc_plb_softc *sc = (struct ecc_plb_softc *)self; intr_establish(sc->sc_irq, IST_LEVEL, IPL_SERIAL, ecc_plb_intr, NULL); } /* * ECC fault handler. */ static int ecc_plb_intr(void *arg) { struct ecc_plb_softc *sc = arg; u_int32_t esr, ear; int ce, ue; u_quad_t tb; u_long tmp, msr, dat; /* This code needs to be improved to handle double-bit errors */ /* in some intelligent fashion. */ mtdcr(DCR_SDRAM0_CFGADDR, DCR_SDRAM0_ECCESR); esr = mfdcr(DCR_SDRAM0_CFGDATA); mtdcr(DCR_SDRAM0_CFGADDR, DCR_SDRAM0_BEAR); ear = mfdcr(DCR_SDRAM0_CFGDATA); /* Always clear the error to stop the intr ASAP. */ mtdcr(DCR_SDRAM0_CFGADDR, DCR_SDRAM0_ECCESR); mtdcr(DCR_SDRAM0_CFGDATA, 0xffffffff); if (esr == 0x00) { /* No current error. Could happen due to intr. nesting */ return(1); } /* * Only report errors every once per second max. Do this using the TB, * because the system time (via microtime) may be adjusted when the * date is set and can't reliably be used to measure intervals. */ asm ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw %0,%1; bne 1b" : "=r"(tb), "=r"(tmp)); sc->sc_ecc_cnt++; if ((tb - sc->sc_ecc_tb) < sc->sc_ecc_iv) return(1); ce = (esr & SDRAM0_ECCESR_CE) != 0x00; ue = (esr & SDRAM0_ECCESR_UE) != 0x00; printf("ECC: Error CNT=%d ESR=%x EAR=%x %s BKNE=%d%d%d%d " "BLCE=%d%d%d%d CBE=%d%d.\n", sc->sc_ecc_cnt, esr, ear, (ue) ? "Uncorrectable" : "Correctable", ((esr & SDRAM0_ECCESR_BKEN(0)) != 0x00), ((esr & SDRAM0_ECCESR_BKEN(1)) != 0x00), ((esr & SDRAM0_ECCESR_BKEN(2)) != 0x00), ((esr & SDRAM0_ECCESR_BKEN(3)) != 0x00), ((esr & SDRAM0_ECCESR_BLCEN(0)) != 0x00), ((esr & SDRAM0_ECCESR_BLCEN(1)) != 0x00), ((esr & SDRAM0_ECCESR_BLCEN(2)) != 0x00), ((esr & SDRAM0_ECCESR_BLCEN(3)) != 0x00), ((esr & SDRAM0_ECCESR_CBEN(0)) != 0x00), ((esr & SDRAM0_ECCESR_CBEN(1)) != 0x00)); /* Should check for uncorrectable errors and panic... */ if (sc->sc_ecc_cnt > 1000) { printf("ECC: Too many errors, recycling entire " "SDRAM (size = %d).\n", sc->sc_memsize); /* * Can this code be changed to run without disabling data MMU * and disabling intrs? * Does kernel always map all of physical RAM VA=PA? If so, * just loop over lowmem. */ asm volatile( "mfmsr %0;" "li %1, 0x00;" "ori %1, %1, 0x8010;" "andc %1, %0, %1;" "mtmsr %1;" "sync;isync;" "li %1, 0x00;" "1:" "dcbt 0, %1;" "sync;isync;" "lwz %2, 0(%1);" "stw %2, 0(%1);" "sync;isync;" "dcbf 0, %1;" "sync;isync;" "addi %1, %1, 0x20;" "addic. %3, %3, -0x20;" "bge 1b;" "mtmsr %0;" "sync;isync;" : "=&r" (msr), "=&r" (tmp), "=&r" (dat) : "r" (sc->sc_memsize) : "0" ); mtdcr(DCR_SDRAM0_CFGADDR, DCR_SDRAM0_ECCESR); esr = mfdcr(DCR_SDRAM0_CFGDATA); mtdcr(DCR_SDRAM0_CFGADDR, DCR_SDRAM0_ECCESR); mtdcr(DCR_SDRAM0_CFGDATA, 0xffffffff); /* * Correctable errors here are OK, mem should be clean now. * * Should check for uncorrectable errors and panic... */ printf("ECC: Recycling complete, ESR=%x. " "Checking for persistent errors.\n", esr); asm volatile( "mfmsr %0;" "li %1, 0x00;" "ori %1, %1, 0x8010;" "andc %1, %0, %1;" "mtmsr %1;" "sync;isync;" "li %1, 0x00;" "1:" "dcbt 0, %1;" "sync;isync;" "lwz %2, 0(%1);" "stw %2, 0(%1);" "sync;isync;" "dcbf 0, %1;" "sync;isync;" "addi %1, %1, 0x20;" "addic. %3, %3, -0x20;" "bge 1b;" "mtmsr %0;" "sync;isync;" : "=&r" (msr), "=&r" (tmp), "=&r" (dat) : "r" (sc->sc_memsize) : "0" ); mtdcr(DCR_SDRAM0_CFGADDR, DCR_SDRAM0_ECCESR); esr = mfdcr(DCR_SDRAM0_CFGDATA); /* * If esr is non zero here, we're screwed. * Should check this and panic. */ printf("ECC: Persistent error check complete, " "final ESR=%x.\n", esr); } sc->sc_ecc_tb = tb; sc->sc_ecc_cnt = 0; return(1); }
#include <stdio.h> int main() { int a,b,c,median; printf("Please enter 3 numbers separated by spaces > "); scanf ("%d%d%d", &a,&b,&c); if ((b>=a && a>=c)||(c<=a && a<=b)||(a<b && a<c)) printf("%d is the median\n", a); else if ((a>=b && b>=c)||(a<=b && b<=c)||(b<c && b<a)) printf("%d is the median\n", b); else if ((a>=c && c>=b)||(a<=c && c<=b)||(c<a && c<b)) printf("%d is the median\n", c); else return 1; return 0; }
import React from 'react'; // <API key> import/<API key> import { storiesOf } from '@storybook/react'; import DatetimeField from 'components/DatetimeField/DatetimeField'; import ValueTracker from 'stories/ValueTracker'; const props = { name: 'MyField', title: 'Field title', lang: 'en_NZ' }; storiesOf('Admin/DatetimeField', module) .addDecorator((storyFn) => ( <ValueTracker>{storyFn()}</ValueTracker> )) .add('Basic', () => ( <DatetimeField {...props} />)) .add('HTML5', () => ( <DatetimeField {...props} data={{ html5: true }} /> ));
#undef DEBUG /* Not sure this has any effect */ #define _LARGEFILE_SOURCE 1 #define _LARGEFILE64_SOURCE 1 #include "zincludes.h" #include <errno.h> #include <zip.h> #include "fbits.h" #include "ncpathmgr.h" #undef CACHESEARCH #define VERIFY /*Mnemonic*/ #define FLAG_ISDIR 1 #define FLAG_CREATE 1 #define SKIPLAST 1 #define WHOLEPATH 0 #define NCZM_ZIP_V1 1 #define ZIP_PROPERTIES (NCZM_WRITEONCE|NCZM_ZEROSTART) /* Do a simple mapping of our simplified map model to a zip-file Every dataset is assumed to be rooted at some directory in the zip file tree. So, its location is defined by some path to a zip file representing the dataset. For the object API, the mapping is as follows: 1. Every content-bearing object (e.g. .zgroup or .zarray) is mapped to a zip entry. This means that if a key points to a content bearing object then no other key can have that content bearing key as a suffix. 2. The meta data containing files are assumed to contain UTF-8 character data. 3. The chunk containing files are assumed to contain raw unsigned 8-bit byte data. 4. The objects may or may not be compressed; this implementation writes uncompressed objects. */ /* define the var name containing an objects content */ #define ZCONTENT "data" /* Define the "subclass" of NCZMAP */ typedef struct ZZMAP { NCZMAP map; char* root; char* dataset; /* prefix for all keys in zip file */ zip_t* archive; char** searchcache; } ZZMAP; typedef zip_int64_t ZINDEX;; /* Forward */ static NCZMAP_API zapi; static int zipclose(NCZMAP* map, int delete); static int zzcreategroup(ZZMAP*, const char* key, int nskip); static int zzlookupobj(ZZMAP*, const char* key, ZINDEX* fd); static int zzlen(ZZMAP* zzmap, ZINDEX zindex, size64_t* lenp); static int zipmaperr(ZZMAP* zzmap); static int ziperr(zip_error_t* zerror); static int ziperrno(int zerror); static void freesearchcache(char** cache); static int zzinitialized = 0; static void zipinitialize(void) { if(!zzinitialized) { ZTRACE(7,NULL); zzinitialized = 1; (void)ZUNTRACE(NC_NOERR); } } /* Define the Dataset level API */ /* @param datasetpath abs path in the file tree of the root of the dataset' might be a relative path. @param mode the netcdf-c mode flags @param flags extra flags @param flags extra parameters @param mapp return the map object in this */ static int zipcreate(const char *path, int mode, size64_t flags, void* parameters, NCZMAP** mapp) { int stat = NC_NOERR; ZZMAP* zzmap = NULL; NCURI* url = NULL; zip_flags_t zipflags = 0; int zerrno = ZIP_ER_OK; ZINDEX zindex = -1; char* abspath = NULL; NC_UNUSED(parameters); ZTRACE(6,"path=%s mode=%d flag=%llu",path,mode,flags); if(!zzinitialized) zipinitialize(); /* Fixup mode flags */ mode = (NC_NETCDF4 | NC_WRITE | mode); /* path must be a url with file: protocol*/ ncuriparse(path,&url); if(url == NULL) {stat = NC_EURL; goto done;} if(strcasecmp(url->protocol,"file") != 0) {stat = NC_EURL; goto done;} /* Build the zz state */ if((zzmap = calloc(1,sizeof(ZZMAP))) == NULL) {stat = NC_ENOMEM; goto done;} zzmap->map.format = NCZM_ZIP; zzmap->map.url = ncuribuild(url,NULL,NULL,NCURIALL); zzmap->map.flags = flags; /* create => NC_WRITE */ zzmap->map.mode = mode; zzmap->map.api = &zapi; /* Since root is in canonical form, we need to convert to local form */ if((zzmap->root = NCpathcvt(url->path))==NULL) {stat = NC_ENOMEM; goto done;} /* Make the root path be absolute */ if((abspath = NCpathabsolute(zzmap->root)) == NULL) {stat = NC_EURL; goto done;} nullfree(zzmap->root); zzmap->root = abspath; abspath = NULL; /* Extract the dataset name */ if((stat = nczm_basename(url->path,&zzmap->dataset))) goto done; /* Set zip openflags */ zipflags |= ZIP_CREATE; if(fIsSet(mode,NC_NOCLOBBER)) zipflags |= ZIP_EXCL; else zipflags |= ZIP_TRUNCATE; #ifdef VERIFY zipflags |= ZIP_CHECKCONS; #endif if((zzmap->archive = zip_open(zzmap->root,zipflags,&zerrno))==NULL) {stat = ziperrno(zerrno); goto done;} /* Tell it about the dataset as a dir */ if((zindex = zip_dir_add(zzmap->archive, zzmap->dataset, ZIP_FL_ENC_UTF_8))<0) {stat = zipmaperr(zzmap); goto done;} /* Dataset superblock will be written by higher layer */ if(mapp) {*mapp = (NCZMAP*)zzmap; zzmap = NULL;} done: nullfree(abspath); ncurifree(url); if(zzmap) zipclose((NCZMAP*)zzmap,1); return ZUNTRACE(stat); } /* @param datasetpath abs path in the file tree of the root of the dataset' might be a relative path. @param mode the netcdf-c mode flags @param flags extra flags @param flags extra parameters @param mapp return the map object in this */ static int zipopen(const char *path, int mode, size64_t flags, void* parameters, NCZMAP** mapp) { int stat = NC_NOERR; ZZMAP* zzmap = NULL; NCURI*url = NULL; zip_flags_t zipflags = 0; int zerrno = ZIP_ER_OK; char* abspath = NULL; NC_UNUSED(parameters); ZTRACE(6,"path=%s mode=%d flags=%llu",path,mode,flags); if(!zzinitialized) zipinitialize(); /* Fixup mode flags */ mode = (NC_NETCDF4 | mode); /* path must be a url with file: protocol*/ ncuriparse(path,&url); if(url == NULL) {stat = NC_EURL; goto done;} if(strcasecmp(url->protocol,"file") != 0) {stat = NC_EURL; goto done;} /* Build the zz state */ if((zzmap = calloc(1,sizeof(ZZMAP))) == NULL) {stat = NC_ENOMEM; goto done;} zzmap->map.format = NCZM_ZIP; zzmap->map.url = ncuribuild(url,NULL,NULL,NCURIALL); zzmap->map.flags = flags; zzmap->map.mode = mode; zzmap->map.api = (NCZMAP_API*)&zapi; /* Since root is in canonical form, we need to convert to local form */ if((zzmap->root = NCpathcvt(url->path))==NULL) {stat = NC_ENOMEM; goto done;} /* Make the root path be absolute */ if((abspath = NCpathabsolute(zzmap->root)) == NULL) {stat = NC_EURL; goto done;} nullfree(zzmap->root); zzmap->root = abspath; abspath = NULL; /* Set zip open flags */ zipflags |= ZIP_CHECKCONS; if(!fIsSet(mode,NC_WRITE)) zipflags |= ZIP_RDONLY; #ifdef VERIFY zipflags |= ZIP_CHECKCONS; #endif /* Open the file */ if((zzmap->archive = zip_open(zzmap->root,zipflags,&zerrno))==NULL) {stat = ziperrno(zerrno); goto done;} /* Use entry 0 to obtain the dataset name */ { const char* name; zip_int64_t num_entries; num_entries = zip_get_num_entries(zzmap->archive, (zip_flags_t)0); if(num_entries == 0) {stat = NC_EEMPTY; goto done;} /* get 0'th entry name */ if((name = zip_get_name(zzmap->archive, 0, (zip_flags_t)0))==NULL) {stat = zipmaperr(zzmap); goto done;} if(name[0] == '\0' || name[0] == '/') {stat = NC_EBADID; goto done;} /* Extract the first segment as the dataset name */ if((nczm_segment1(name,&zzmap->dataset))) goto done; } /* Dataset superblock will be read by higher layer */ if(mapp) {*mapp = (NCZMAP*)zzmap; zzmap = NULL;} done: nullfree(abspath); ncurifree(url); if(zzmap) zipclose((NCZMAP*)zzmap,0); return ZUNTRACE(stat); } /* Object API */ static int zipexists(NCZMAP* map, const char* key) { int stat = NC_NOERR; ZZMAP* zzmap = (ZZMAP*)map; ZINDEX zindex = -1; ZTRACE(6,"map=%s key=%s",map->url,key); switch(stat=zzlookupobj(zzmap,key,&zindex)) { case NC_NOERR: break; case NC_ENOOBJECT: stat = NC_EEMPTY; break; case NC_EEMPTY: break; default: break; } return ZUNTRACE(stat); } static int ziplen(NCZMAP* map, const char* key, size64_t* lenp) { int stat = NC_NOERR; ZZMAP* zzmap = (ZZMAP*)map; size64_t len = 0; ZINDEX zindex = -1; ZTRACE(6,"map=%s key=%s",map->url,key); switch(stat = zzlookupobj(zzmap,key,&zindex)) { case NC_NOERR: if((stat = zzlen(zzmap,zindex,&len))) goto done; break; case NC_ENOOBJECT: stat = NC_EEMPTY; len = 0; break; case NC_EEMPTY: len = 0; break; /* |dir|==0 */ default: goto done; } if(lenp) *lenp = len; done: return ZUNTRACEX(stat,"len=%llu",(lenp?*lenp:777777777777)); } static int zipread(NCZMAP* map, const char* key, size64_t start, size64_t count, void* content) { int stat = NC_NOERR; ZZMAP* zzmap = (ZZMAP*)map; /* cast to true type */ zip_file_t* zfile = NULL; ZINDEX zindex = -1; zip_flags_t zipflags = 0; int zerrno; size64_t endpoint; char* buffer = NULL; char* truekey = NULL; zip_int64_t red = 0; ZTRACE(6,"map=%s key=%s start=%llu count=%llu",map->url,key,start,count); switch(stat = zzlookupobj(zzmap,key,&zindex)) { case NC_NOERR: break; case NC_ENOOBJECT: stat = NC_EEMPTY; /* fall thru */ case NC_EEMPTY: /* its a dir; fall thru*/ default: goto done; } /* Note, assume key[0] == '/' */ if((stat = nczm_appendn(&truekey,2,zzmap->dataset,key))) goto done; zfile = zip_fopen(zzmap->archive, truekey, zipflags); if(zfile == NULL) {stat = (zipmaperr(zzmap)); goto done;} /* Ideally, we would like to seek to the start point, but that will fail if the file is compressed, so we need to read whole thing and extract what we need */ /* read data starting at zero */ if(start == 0) { /*optimize to read directly into content */ if((red = zip_fread(zfile, content, (zip_uint64_t)count)) < 0) {stat = (zipmaperr(zzmap)); goto done;} if(red < count) {stat = NC_EINTERNAL; goto done;} } else { endpoint = start + count; if((buffer = malloc(endpoint))==NULL) /* consider caching this */ {stat = NC_ENOMEM; goto done;} if((red = zip_fread(zfile, buffer, (zip_uint64_t)endpoint)) < 0) {stat = (zipmaperr(zzmap)); goto done;} if(red < endpoint) {stat = NC_EINTERNAL; goto done;} /* Extract what we need */ memcpy(content,buffer+start,count); } done: nullfree(truekey); nullfree(buffer); if(zfile != NULL && (zerrno=zip_fclose(zfile)) != 0) {stat = ziperrno(zerrno);} return ZUNTRACE(stat); } static int zipwrite(NCZMAP* map, const char* key, size64_t start, size64_t count, const void* content) { int stat = NC_NOERR; ZZMAP* zzmap = (ZZMAP*)map; /* cast to true type */ char* truekey = NULL; zip_flags_t zflags = 0; zip_source_t* zs = NULL; ZINDEX zindex = -1; zip_int32_t compression = 0; zip_error_t zerror; void* localbuffer = NULL; ZTRACE(6,"map=%s key=%s start=%llu count=%llu",map->url,key,start,count); zip_error_init(&zerror); if(start != 0 && (ZIP_PROPERTIES & NCZM_ZEROSTART)) {stat = NC_EEDGE; goto done;} /* Create directories */ if((stat = zzcreategroup(zzmap,key,SKIPLAST))) goto done; switch(stat = zzlookupobj(zzmap,key,&zindex)) { case NC_NOERR: stat = NC_EOBJECT; //goto done; /* Zip files are write once */ zflags |= ZIP_FL_OVERWRITE; break; case NC_ENOOBJECT: stat = NC_NOERR; break; case NC_EEMPTY: /* its a dir; fall thru */ default: goto done; } zflags |= ZIP_FL_ENC_UTF_8; compression = ZIP_CM_STORE; /* prepend the dataset to get truekey */ /* Note, assume key[0] == '/' */ if((stat = nczm_appendn(&truekey,2,zzmap->dataset,key))) goto done; if(count > 0) { /* Apparently, the buffer to be written needs to be around at zip_close so we need to make a local copy that will be freed by libzip after it is no longer needed */ /* Duplicate the buffer */ if((localbuffer = malloc((size_t)count))==NULL) {stat = NC_ENOMEM; goto done;} memcpy(localbuffer,content,count); } if((zs = zip_source_buffer(zzmap->archive, localbuffer, (zip_uint64_t)count, 1)) == NULL) {stat = zipmaperr(zzmap); goto done;} if((zindex = zip_file_add(zzmap->archive, truekey, zs, zflags))<0) {stat = zipmaperr(zzmap); goto done;} zs = NULL; localbuffer = NULL; if(<API key>(zzmap->archive, zindex, compression, 0) < 0) {stat = zipmaperr(zzmap); goto done;} freesearchcache(zzmap->searchcache); zzmap->searchcache = NULL; done: if(zs) zip_source_free(zs); nullfree(localbuffer); zip_error_fini(&zerror); nullfree(truekey); return ZUNTRACE(stat); } static int zipclose(NCZMAP* map, int delete) { int stat = NC_NOERR; int zerrno = 0; ZZMAP* zzmap = (ZZMAP*)map; if(zzmap == NULL) return NC_NOERR; ZTRACE(6,"map=%s delete=%d",map->url,delete); /* Close the zip */ if(delete) zip_discard(zzmap->archive); else { if((zerrno=zip_close(zzmap->archive))) stat = ziperrno(zerrno); } if(delete) NCremove(zzmap->root); zzmap->archive = NULL; nczm_clear(map); nullfree(zzmap->root); nullfree(zzmap->dataset); zzmap->root = NULL; freesearchcache(zzmap->searchcache); free(zzmap); return ZUNTRACE(stat); } /* Return a list of full keys immediately under a specified prefix key. In theory, the returned list should be sorted in lexical order, but it possible that it is not. Note that for zip, it is not possible to get just the keys of length n+1, so, this search must get all keys and process them one by one. @return NC_NOERR if success, even if no keys returned. @return NC_EXXX return true error */ int zipsearch(NCZMAP* map, const char* prefix0, NClist* matches) { int stat = NC_NOERR; ZZMAP* zzmap = (ZZMAP*)map; char* trueprefix = NULL; size_t truelen; zip_int64_t num_entries, i; char** cache = NULL; size_t prefixlen; NClist* tmp = NULL; ZTRACE(6,"map=%s prefix0=%s",map->url,prefix0); /* prefix constraints: 1. prefix is "/" 2. or prefix has leading '/' and no trailing '/' */ /* Fix up the prefix; including adding the dataset name to the front */ if(prefix0 == NULL || strlen(prefix0)==0) prefix0 = "/"; /* make sure that prefix0 has leading '/' */ if(prefix0[0] != '/') {stat = NC_EINVAL; goto done;} prefixlen = strlen(prefix0); truelen = prefixlen+strlen(zzmap->dataset)+1; /* possible trailing '/'*/ if((trueprefix = (char*)malloc(truelen+1+1))==NULL) /* nul term */ {stat = NC_ENOMEM; goto done;} /* Build the true prefix */ trueprefix[0] = '\0'; strlcat(trueprefix,zzmap->dataset,truelen+1); strlcat(trueprefix,prefix0,truelen+1); /* recall prefix starts with '/' */ /* If the prefix did not end in '/', then add it */ if(prefixlen > 1 && prefix0[prefixlen-1] != '/') strlcat(trueprefix,"/",truelen+1); truelen = strlen(trueprefix); /* Get number of entries */ num_entries = zip_get_num_entries(zzmap->archive, (zip_flags_t)0); #ifdef CACHESEARCH if(num_entries > 0 && zzmap->searchcache == NULL) { /* Release the current cache */ freesearchcache(zzmap->searchcache); zzmap->searchcache = NULL; /* Re-build the searchcache */ if((cache = calloc(sizeof(char*),num_entries+1))==NULL) {stat = NC_ENOMEM; goto done;} for(i=0;i < num_entries; i++) { const char *name = NULL; /* get ith entry */ name = zip_get_name(zzmap->archive, i, (zip_flags_t)0); /* Add to cache */ if((cache[i] = strdup(name))==NULL) {stat = NC_ENOMEM; goto done;} } cache[num_entries] = NULL; zzmap->searchcache = cache; cache = NULL; } #endif #ifdef CACHESEARCH if(zzmap->searchcache != NULL) #endif { const char *key = NULL; size_t keylen = 0; char* match = NULL; const char* p; tmp = nclistnew(); /* Walk cache looking for names with prefix plus exactly one other segment */ for(i=0;i < num_entries; i++) { /* get ith entry */ #ifdef CACHESEARCH key = zzmap->searchcache[i]; #else key = zip_get_name(zzmap->archive, i, (zip_flags_t)0); #endif keylen = strlen(key); /* Does this name begin with trueprefix? */ if(keylen > 0 && (keylen <= truelen || strncmp(key,trueprefix,truelen) != 0)) continue; /* no match */ /* skip trueprefix and extract first segment */ p = (key+truelen); if(*p == '\0') continue; /* key is all there is, so ignore it */ /* get seg 1 */ if((nczm_segment1(p,&match))) goto done; nclistpush(tmp,match); match = NULL; } /* Now remove duplicates */ for(i=0;i<nclistlength(tmp);i++) { int j; int duplicate = 0; const char* is = nclistget(tmp,i); for(j=0;j<nclistlength(matches);j++) { const char* js = nclistget(matches,j); if(strcmp(js,is)==0) {duplicate = 1; break;} /* duplicate */ } if(!duplicate) nclistpush(matches,strdup(is)); } } done: nclistfreeall(tmp); if(cache != NULL) freesearchcache(cache); nullfree(trueprefix); return ZUNTRACEX(stat,"|matches|=%d",(int)nclistlength(matches)); } /* Utilities */ /* Guarantee existence of a group */ static int zzcreategroup(ZZMAP* zzmap, const char* key, int nskip) { int stat = NC_NOERR; int i, len; char* fullpath = NULL; NCbytes* path = ncbytesnew(); NClist* segments = nclistnew(); ZINDEX zindex; zip_flags_t zipflags = ZIP_FL_ENC_UTF_8; ZTRACE(7,"map=%s key=%s nskip=%d",zzmap->map.url,key,nskip); if((stat=nczm_split(key,segments))) goto done; len = nclistlength(segments); len -= nskip; /* leave off last nskip segments */ /* Start with the dataset */ ncbytescat(path,zzmap->dataset); for(i=0;i<len;i++) { const char* seg = nclistget(segments,i); ncbytescat(path,"/"); ncbytescat(path,seg); /* open and/or create the directory */ if((zindex = zip_dir_add(zzmap->archive, ncbytescontents(path), zipflags))<0) { switch(stat = zipmaperr(zzmap)) { case NC_EOBJECT: stat = NC_NOERR; break; default: goto done; } } } done: nullfree(fullpath); ncbytesfree(path); nclistfreeall(segments); return ZUNTRACE(stat); } /* Lookup a key @return NC_NOERR if found and is a content-bearing object @return NC_ENOOBJECT if not found @return NC_EEMPTY if a dir */ static int zzlookupobj(ZZMAP* zzmap, const char* key, ZINDEX* zindex) { int stat = NC_NOERR; char* zipfile = NULL; char* zipdir = NULL; ZTRACE(7,"map=%s key=%s",zzmap->map.url,key); if(key == NULL) {stat = NC_EINVAL; goto done;} /* Note, assume key[0] == '/' */ if((stat = nczm_appendn(&zipfile,2,zzmap->dataset,key))) goto done; /* See if exists as a file */ if((*zindex = zip_name_locate(zzmap->archive, zipfile, 0))<0) { /* do a second check to see if zippath as a dir */ if((stat = nczm_appendn(&zipdir,2,zipfile,"/"))) goto done; if((*zindex = zip_name_locate(zzmap->archive, zipdir, 0))<0) {stat = zipmaperr(zzmap); goto done;} stat = NC_EEMPTY; /* signal a directory */ } done: nullfree(zipfile); nullfree(zipdir); return ZUNTRACE(stat); } /* Get length given the index */ static int zzlen(ZZMAP* zzmap, ZINDEX zindex, size64_t* lenp) { int stat = NC_NOERR; size64_t len = 0; zip_stat_t statbuf; zip_flags_t zipflags = 0; assert(zindex >= 0); ZTRACE(6,"zzmap=%s index=%llu",zzmap,zindex); zip_stat_init(&statbuf); if(zip_stat_index(zzmap->archive,zindex,zipflags,&statbuf) < 0) {stat = (zipmaperr(zzmap)); goto done;} assert(statbuf.valid & ZIP_STAT_SIZE); len = statbuf.size; /* Always return uncompressed size */ if(lenp) *lenp = len; done: return ZUNTRACEX(stat,"len=%llu",(lenp?*lenp:777777777777)); } static void freesearchcache(char** cache) { char** p; if(cache == NULL) return; for(p=cache;*p;p++) { free(*p); } free(cache); } /* External API objects */ NCZMAP_DS_API zmap_zip = { NCZM_ZIP_V1, ZIP_PROPERTIES, zipcreate, zipopen, }; static NCZMAP_API zapi = { NCZM_ZIP_V1, zipclose, zipexists, ziplen, zipread, zipwrite, zipsearch, }; static int zipmaperr(ZZMAP* zzmap) { zip_error_t* zerr = (zip_error_t*)zip_get_error(zzmap->archive); return ziperr(zerr); } static int ziperr(zip_error_t* zerror) { int zerrno = zip_error_code_zip(zerror); return ziperrno(zerrno); } static int ziperrno(int zerror) { int stat = NC_NOERR; switch (zerror) { case ZIP_ER_OK: stat = NC_NOERR; break; case ZIP_ER_EXISTS: stat = NC_EOBJECT; break; case ZIP_ER_MEMORY: stat = NC_ENOMEM; break; case ZIP_ER_SEEK: case ZIP_ER_READ: case ZIP_ER_WRITE: case ZIP_ER_TMPOPEN: case ZIP_ER_CRC: stat = NC_EIO; break; case ZIP_ER_ZIPCLOSED: stat = NC_EBADID; break; case ZIP_ER_NOENT: stat = NC_ENOOBJECT; break; case ZIP_ER_OPEN: stat = NC_EACCESS; break; case ZIP_ER_INVAL: stat = NC_EINVAL; break; case ZIP_ER_INTERNAL: stat = NC_EINTERNAL; break; case ZIP_ER_REMOVE: stat = NC_ECANTREMOVE; break; case ZIP_ER_DELETED: stat = NC_ENOOBJECT; break; case ZIP_ER_RDONLY: stat = NC_EPERM; break; case ZIP_ER_CHANGED: stat = NC_EOBJECT; break; default: stat = NC_ENCZARR; break; } return stat; }
# -*- coding: utf-8 -*- import sys from warnings import warn from django.conf import settings from django.core.exceptions import <API key> if hasattr(settings, '<API key>'): <API key> =\ getattr(settings, '<API key>', None) elif hasattr(settings, '<API key>'): warn('The setting <API key> is deprecated, use ' '<API key> instead.', DeprecationWarning) <API key> = getattr(settings, '<API key>', None) else: raise <API key>("You haven't set the " "<API key> " "setting yet.") AVAILABLE_LANGUAGES = [l[0] for l in settings.LANGUAGES] DEFAULT_LANGUAGE = getattr(settings, '<API key>', None) if DEFAULT_LANGUAGE and DEFAULT_LANGUAGE not in AVAILABLE_LANGUAGES: raise <API key>('<API key> not ' 'in LANGUAGES setting.') elif not DEFAULT_LANGUAGE: DEFAULT_LANGUAGE = AVAILABLE_LANGUAGES[0] # FIXME: We can't seem to override this particular setting in tests.py CUSTOM_FIELDS =\ getattr(settings, '<API key>', ()) try: if sys.argv[1] == 'test': CUSTOM_FIELDS =\ getattr(settings, '<API key>', ('BooleanField',)) except IndexError: pass <API key> = getattr(settings, '<API key>', {})
#!/usr/bin/env python # Time-stamp: <2019-09-25 14:16:56 taoliu> import unittest from MACS2.IO.BedGraph import * class <API key>(unittest.TestCase): def setUp(self): self.test_regions1 = [(b"chrY",0,10593155,0.0), (b"chrY",10593155,10597655,0.0066254580149)] def test_add_loc1(self): # make sure the shuffled sequence does not lose any elements bdg = bedGraphTrackI() for a in self.test_regions1: bdg.add_loc(a[0],a[1],a[2],a[3]) #self.assertTrue( abs(result - expect) < 1e-5*result) #self.assertEqual(result, expect) #self.assertEqual(result, expect) class <API key>(unittest.TestCase): def setUp(self): self.test_regions1 = [(b"chrY",0,70,0.00), (b"chrY",70,80,7.00), (b"chrY",80,150,0.00)] self.test_regions2 = [(b"chrY",0,85,0.00), (b"chrY",85,90,75.00), (b"chrY",90,155,0.00)] self.test_regions3 = [(b"chrY",0,75,20.0), (b"chrY",75,90,35.0), (b"chrY",90,150,10.0)] self.test_overlie_max = [(b"chrY", 0, 75, 20.0), # max (b"chrY", 75, 85, 35.0), (b"chrY", 85, 90, 75.0), (b"chrY", 90,150, 10.0), (b"chrY",150,155, 0.0)] self.test_overlie_mean = [(b"chrY", 0, 70, 6.66667), # mean (b"chrY", 70, 75, 9), (b"chrY", 75, 80, 14), (b"chrY", 80, 85, 11.66667), (b"chrY", 85, 90, 36.66667), (b"chrY", 90,150, 3.33333), (b"chrY",150,155, 0.0)] self.test_overlie_fisher = [(b"chrY", 0, 70, (0,0,20), 92.10340371976183, 1.<API key>, 16.9557 ), # fisher (b"chrY", 70, 75, (7,0,20), 124.33959502167846, 1.<API key>, 23.6999 ), (b"chrY", 75, 80, (7,0,35), 193.41714781149986, 4.773982707347631e-39, 38.3211 ), (b"chrY", 80, 85, (0,0,35), 161.1809565095832, 3.329003070922764e-32, 31.4777), (b"chrY", 85, 90, (0,75,35), 506.56872045869005, 3.<API key>, 105.4904), (b"chrY", 90,150, (0,0,10), 46.051701859880914, 2.<API key>, 7.5389), (b"chrY",150,155, (0,0,0), 0, 1.0, 0.0)] self.bdg1 = bedGraphTrackI() self.bdg2 = bedGraphTrackI() self.bdg3 = bedGraphTrackI() for a in self.test_regions1: self.bdg1.safe_add_loc(a[0],a[1],a[2],a[3]) for a in self.test_regions2: self.bdg2.safe_add_loc(a[0],a[1],a[2],a[3]) for a in self.test_regions3: self.bdg3.safe_add_loc(a[0],a[1],a[2],a[3]) def assertEqual_float ( self, a, b, roundn = 4 ): self.assertEqual( round( a, roundn ), round( b, roundn ) ) def test_overlie_max(self): bdgb = self.bdg1.overlie([self.bdg2,self.bdg3], func="max") chrom = b"chrY" (p,v) = bdgb.get_data_by_chr(chrom) pre = 0 for i in range(len(p)): pos = p[i] value = v[i] self.assertEqual_float( self.test_overlie_max[i][1], pre ) self.assertEqual_float( self.test_overlie_max[i][2], pos ) self.assertEqual_float( self.test_overlie_max[i][3], value ) pre = pos def test_overlie_mean(self): bdgb = self.bdg1.overlie([self.bdg2,self.bdg3], func="mean") chrom = b"chrY" (p,v) = bdgb.get_data_by_chr(chrom) pre = 0 for i in range(len(p)): pos = p[i] value = v[i] self.assertEqual_float( self.test_overlie_mean[i][1], pre ) self.assertEqual_float( self.test_overlie_mean[i][2], pos ) self.assertEqual_float( self.test_overlie_mean[i][3], value ) pre = pos def test_overlie_fisher(self): bdgb = self.bdg1.overlie([self.bdg2,self.bdg3], func="fisher") chrom = b"chrY" (p,v) = bdgb.get_data_by_chr(chrom) pre = 0 for i in range(len(p)): pos = p[i] value = v[i] self.assertEqual_float( self.test_overlie_fisher[i][1], pre ) self.assertEqual_float( self.test_overlie_fisher[i][2], pos ) self.assertEqual_float( self.test_overlie_fisher[i][6], value ) pre = pos
# modification, are permitted provided that the following conditions # are met: # documentation and/or other materials provided with the distribution. # * Neither the name of The Bifrost Authors nor the names of its # contributors may be used to endorse or promote products derived # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # 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. # TODO: Add tests for data streams spanning multiple files import unittest import bifrost as bf from bifrost.blocks import * import os import shutil class TemporaryDirectory(object): def __init__(self, path): self.path = path os.makedirs(self.path) def remove(self): shutil.rmtree(self.path) def __enter__(self): return self def __exit__(self, type, value, tb): self.remove() def <API key>(filename): """Returns the header and data size of a sigproc file without reading the whole file. """ with open(filename, 'rb') as f: head = '' while 'HEADER_END' not in head: more_data = f.read(4096) try: more_data = more_data.decode(errors='replace') except AttributeError: # Python2 catch pass if len(more_data) == 0: raise IOError("Not a valid sigproc file: " + filename) head += more_data hdr_size = head.find('HEADER_END') + len('HEADER_END') file_size = os.path.getsize(filename) data_size = file_size - hdr_size return hdr_size, data_size def rename_sequence(hdr, name): hdr['name'] = name return hdr def rename_sequence(hdr, name): hdr['name'] = name return hdr class SerializeTest(unittest.TestCase): def setUp(self): self.fil_file = "./data/2chan16bitNoDM.fil" # Note: This is specific to 2chan16bitNoDM.fil self.time_tag = 3493024746386227200 hdr_size, self.data_size = <API key>(self.fil_file) with open(self.fil_file, 'rb') as f: self.data = f.read() self.data = self.data[hdr_size:] self.temp_path = '/tmp/<API key>' self.basename = os.path.basename(self.fil_file) self.basepath = os.path.join(self.temp_path, self.basename) self.gulp_nframe = 101 def <API key>(self, gulp_nframe_inc=0): with bf.Pipeline() as pipeline: data = read_sigproc([self.fil_file], self.gulp_nframe, core=0) for i in range(5): if gulp_nframe_inc != 0: data = copy(data, gulp_nframe=self.gulp_nframe+i*gulp_nframe_inc) else: data = copy(data) data = serialize(data, self.temp_path, core=0) with TemporaryDirectory(self.temp_path): pipeline.run() # Note: SerializeBlock uses os.path.basename if path is given hdrpath = self.basepath + '.bf.json' datpath = self.basepath + '.bf.' + '0' * 12 + '.dat' self.assertTrue(os.path.exists(hdrpath)) self.assertTrue(os.path.exists(datpath)) self.assertEqual(os.path.getsize(datpath), self.data_size) with open(datpath, 'rb') as f: data = f.read() self.assertEqual(data, self.data) def <API key>(self): self.<API key>() self.<API key>(gulp_nframe_inc=1) self.<API key>(gulp_nframe_inc=3) def <API key>(self): with bf.Pipeline() as pipeline: data = read_sigproc([self.fil_file], self.gulp_nframe) # Custom view sets sequence name to '', which causes SerializeBlock # to use the time_tag instead. data = bf.views.custom(data, lambda hdr: rename_sequence(hdr, '')) data = serialize(data, self.temp_path) with TemporaryDirectory(self.temp_path): pipeline.run() basepath = os.path.join(self.temp_path, '%020i' % self.time_tag) hdrpath = basepath + '.bf.json' datpath = basepath + '.bf.' + '0' * 12 + '.dat' self.assertTrue(os.path.exists(hdrpath)) self.assertTrue(os.path.exists(datpath)) self.assertEqual(os.path.getsize(datpath), self.data_size) with open(datpath, 'rb') as f: data = f.read() self.assertEqual(data, self.data) def <API key>(self): with bf.Pipeline() as pipeline: data = read_sigproc([self.fil_file], self.gulp_nframe) # Transpose so that freq becomes a ringlet dimension # TODO: Test multiple ringlet dimensions (e.g., freq + pol) once # SerializeBlock supports it. data = transpose(data, ['freq', 'time', 'pol']) data = serialize(data, self.temp_path) with TemporaryDirectory(self.temp_path): pipeline.run() # Note: SerializeBlock uses os.path.basename if path is given hdrpath = self.basepath + '.bf.json' datpath0 = self.basepath + '.bf.' + '0' * 12 + '.0.dat' datpath1 = self.basepath + '.bf.' + '0' * 12 + '.1.dat' self.assertTrue(os.path.exists(hdrpath)) self.assertTrue(os.path.exists(datpath0)) self.assertTrue(os.path.exists(datpath1)) self.assertEqual(os.path.getsize(datpath0), self.data_size self.assertEqual(os.path.getsize(datpath1), self.data_size def <API key>(self): with TemporaryDirectory(self.temp_path): with bf.Pipeline() as pipeline: data = read_sigproc([self.fil_file], self.gulp_nframe) serialize(data, self.temp_path) pipeline.run() datpath = self.basepath + '.bf.' + '0' * 12 + '.dat' with bf.Pipeline() as pipeline: data = deserialize([self.basepath + '.bf'], self.gulp_nframe) # Note: Must rename the sequence to avoid overwriting the input # file. data = bf.views.custom( data, lambda hdr: rename_sequence(hdr, hdr['name'] + '.2')) serialize(data, self.temp_path) pipeline.run() datpath = self.basepath + '.2.bf.' + '0' * 12 + '.dat' with open(datpath, 'rb') as f: data = f.read() self.assertEqual(len(data), len(self.data)) self.assertEqual(data, self.data) def <API key>(self): with TemporaryDirectory(self.temp_path): with bf.Pipeline() as pipeline: data = read_sigproc([self.fil_file], self.gulp_nframe) data = transpose(data, ['freq', 'time', 'pol']) serialize(data, self.temp_path) pipeline.run() datpath = self.basepath + '.bf.' + '0' * 12 + '.dat' with bf.Pipeline() as pipeline: data = deserialize([self.basepath + '.bf'], self.gulp_nframe) # Note: Must rename the sequence to avoid overwriting the input # file. data = bf.views.custom( data, lambda hdr: rename_sequence(hdr, hdr['name'] + '.2')) serialize(data, self.temp_path) pipeline.run() hdrpath = self.basepath + '.2.bf.json' datpath0 = self.basepath + '.2.bf.' + '0' * 12 + '.0.dat' datpath1 = self.basepath + '.2.bf.' + '0' * 12 + '.1.dat' self.assertTrue(os.path.exists(hdrpath)) self.assertTrue(os.path.exists(datpath0)) self.assertTrue(os.path.exists(datpath1)) self.assertEqual(os.path.getsize(datpath0), self.data_size self.assertEqual(os.path.getsize(datpath1), self.data_size
<?php namespace WebinoAppLib\Exception; use WebinoExceptionLib\<API key>; /** * Class <API key> */ class <API key> extends \<API key> implements ExceptionInterface { use <API key>; }
"use strict"; var _ = require('underscore'); var util = require('util'); var events = require('events'); var uuid = require('node-uuid'); var CONFIGS = require("./config.js"); var helper = require("./utils/helper.js"); var configHelper = require("./utils/config_helper.js"); var url = require('url'); var serializer = require("./utils/serializer.js"); var Item = require("./models/item.js"); function Service(name, log) { if (typeof name !== 'string' || name.trim() === '') { throw new Error(configHelper.buildMessage(CONFIGS.message.service_no_name)); } var _config = {}, self = this; // Initialization // Call the constructor for EventEmitter // Not necessary as handled by helper method util.inherits(Service, events.EventEmitter)? // however, no breakage detected with this commented out events.EventEmitter.call(this); this.log = log; this._name = helper.safeAssign('string', name, 'unknown'); // set the correct service config for the service instance // for the array of services on each tier _.each(CONFIGS.services.tiers, function(services) { // find a matching name for this service and assign its config to _config _.each(services, function(config, name) { if (name === self._name) { _config = config; } }); }); this._displayName = helper.safeAssign('string', _config.display_name, this._name); this._enabled = helper.safeAssign('boolean', _config.enabled, false); this._maxAttempts = helper.safeAssign('number', _config.max_attempts, 1); this._timeout = helper.safeAssign('number', _config.timeout, 30000); this._target = helper.safeAssign('string', _config.target, undefined); this.<API key> = helper.safeAssign('boolean', _config.<API key>, false); this._itemTypesReturned = _config.item_types_returned || []; this._referrerBlock = _config.<API key> || []; this._flattenJson = _config.<API key> || false; this._translator = helper.safeAssign('string', _config.translator, undefined); // Also emits 'success' and 'error' which are meant to be caught by the Tier this.on('response', function(data) { if (data instanceof Array) { this.emit('success', data); } else { this.emit('error', data); } }); } util.inherits(Service, events.EventEmitter); Service.prototype.getReport = function() { return {"service": this._name, "id": this._id, "item": this._itemId, "duration": this._duration, "status": this._status, "response:": this._response}; }; Service.prototype.<API key> = function(params) { this._requestorParams = params; }; Service.prototype.<API key> = function() { return this._requestorParams; }; Service.prototype.getName = function() { return this._name; }; Service.prototype.getDisplayName = function() { return this._displayName; }; Service.prototype.isEnabled = function() { return this._enabled; }; Service.prototype.getReferrerBlock = function() { return this._referrerBlock; }; Service.prototype.returnsItemType = function(type) { var self = this; return _.contains(self._itemTypesReturned, type); }; Service.prototype.toString = function() { return this._name; }; Service.prototype.call = function(item, headers) { var self = this; if (!self._target) { self.emit('response', self._buildError(_transactionId, 'fatal', '<API key>')); return; } var _transactionId = uuid.v4(), _data = serializer.<API key>(_transactionId, item, this._requestorParams), _now = new Date(), _out = '', _http, _aborted = false, _destination = url.parse(self._target), _options = {hostname: _destination.hostname, port: _destination.port, path: _destination.path, method: 'POST', headers: {'Content-Type': 'text/json; charset="utf-8"', 'Content-Length': Buffer.byteLength(_data), 'Accept': 'text/json', 'Accept-Charset': 'utf-8', 'Cache-Control': 'no-cache'}}; // Add any headers that were passed in onto the call _.forEach(headers, function(value) { _options.headers.key = value; }); self._id = _transactionId; self._itemId = item.getId(); self.log = self.log.child({service_id: _transactionId}); self.log.info({object: 'service.js', service_name: self._name, post_data: JSON.parse(_data)}, 'Calling service'); // Setup the correct library based on the URL's protocol if (_destination.protocol === 'https') { _http = require('https'); } else { _http = require('http'); } // Do the HTTP(S) Request var _request = _http.request(_options, function(response) { response.setEncoding('utf8'); response.on('data', function(chunk) { // Limit the response size so we don't ever accidentally get a Buffer overload if (_out.length > CONFIGS.application.<API key>) { _request.abort(); _aborted = true; self.log.error({object: 'service.js', service_name: self._name, response: _out}, CONFIGS.message.<API key>); self.emit('response', self._buildError(_transactionId, 'fatal', '<API key>')); } else { _out += chunk; } }); response.on('end', function() { var _rslt; var end = new Date().getTime(); self._duration = (end - _now.getTime()); self._status = response.statusCode; try { if (!_aborted) { switch (response.statusCode) { case 200: // SUCCESS var _json = JSON.parse(_out); self._response = _json; // If the result is for the current request then convert the json to objects if (_json.id === _transactionId) { if (typeof _json[item.getType() + 's'] !== 'undefined') { // If the result from the service is an Array, convert each item and add it to the result if (_json[item.getType() + 's'] instanceof Array) { _rslt = []; _.forEach(_json[item.getType() + 's'], function(it) { _rslt.push(helper.mapToItem(item.getType(), false, it)); }); } else { // Otherwise this is a single item so convert it and add it to the response _rslt = helper.mapToItem(item.getType(), false, _json[item.getType() + 's'][0]); } // If the result is undefined then we received an undefined item type, so throw an error if (typeof _rslt === 'undefined') { self.emit('response', self._buildError(_transactionId, 'error', '<API key>')); } else { // successfully processed JSON response from target self.log.debug({object: 'service.js', service_name: self._name, response: _json, response_status: response.statusCode}, 'Received response.'); self.emit('response', _rslt); } } else { self.emit('response', self._buildError(_transactionId, 'error', '<API key>')); } } else { self.emit('response', self._buildError(_transactionId, 'error', '<API key>')); } break; case 400: // BAD REQUEST self.emit('response', self._buildError(_transactionId, 'error', 'service_bad_request')); break; case 404: // NOT FOUND self.emit('response', [new Item(item.getType(), false, {})]); break; default: // ERROR!!! var json = JSON.parse(_out); self._response = json; self.log.error({object: 'service.js', service_name: self._name, response: _out, response_status: response.statusCode}, 'Unhandled HTTP response received.'); if (typeof json.error !== 'undefined') { if (typeof json.error.level !== 'undefined') { self.emit('response', self._buildError(_transactionId, json.error.level, json.error.message)); } else { self.emit('response', self._buildError(_transactionId, 'fatal', '<API key>')); } } else { // If there are multiple errors, send each one accordingly if (typeof json.errors !== 'undefined') { _.forEach(json.errors, function(err) { if (typeof err.level !== 'undefined') { self.emit('response', self._buildError(_transactionId, err.level, err.message)); } else { self.emit('response', self._buildError(_transactionId, 'fatal', '<API key>')); } }); } else { // Otherwise we were expecting an error to be there, but it had something else! self.emit('response', self._buildError(_transactionId, 'fatal', '<API key>')); } } break; } } // if(!_aborted) item.addTransaction(self.getReport()); } catch (e) { // If its invalid JSON if (e.message.indexOf('Unexpected token') >= 0) { self.emit('response', self._buildError(_transactionId, 'fatal', 'service_bad_json')); self.log.error({object: 'service.js', service_name: self._name}, CONFIGS.message.service_bad_json); } else { self.emit('response', self._buildError(_transactionId, 'error', '<API key>')); self.log.error({object: 'service.js', service_name: self._name}, CONFIGS.message.<API key>); } self.log.error(e); } }); }); // http.request _request.setTimeout(self._timeout, function() { self.log.warn({object: 'service.js', service_name: self._name}, 'Timeout while trying to connect to Service'); _request.abort(); self.emit('response', self._buildError(_transactionId, 'warning', 'service_timeout')); }); _request.on('error', function(e) { if (e.message.indexOf('ECONNREFUSED') >= 0) { self.log.error({object: 'service.js', service_name: self._name}, 'Service does not appear to be responding.'); // Send a message to all notifiers since the service is likely offline helper.contactAllNotifiers('The ' + self._name + ' service appears to be offline: ECONNREFUSED.', function() { }); self.emit('response', self._buildError(_transactionId, 'warning', '<API key>')); } else if (e.message.indexOf('socket hang up') >= 0) { self.log.error({object: 'service.js', service_name: self._name}, 'Timed out while trying to connect to service.'); self.emit('response', self._buildError(_transactionId, 'warning', 'service_timeout')); } else { self.log.error({object: 'service.js', service_name: self._name}, 'An error occurred while connecting to service'); self.emit('response', self._buildError(_transactionId, 'error', '<API key>')); } self.log.error({object: 'service.js', service_name: self._name}, e.message); }); // Send the JSON to the service target _request.write(_data); _request.end(); }; Service.prototype._buildError = function(transactionId, level, message) { var _msg = (typeof CONFIGS.message[message] !== 'undefined') ? configHelper.buildMessage(CONFIGS.message[message], [this._name]) : message; return new Item('error', true, {'level': level, 'message': _msg}); }; module.exports = exports = Service;
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_65) on Sun May 04 11:06:50 EDT 2014 --> <TITLE> Uses of Package com.zinibu.basic </TITLE> <META NAME="date" CONTENT="2014-05-04"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Package com.zinibu.basic"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <A NAME="navbar_top"></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/zinibu/basic/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <HR> <CENTER> <H2> <B>Uses of Package<br>com.zinibu.basic</B></H2> </CENTER> No usage of com.zinibu.basic <P> <HR> <A NAME="navbar_bottom"></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="<API key>"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?com/zinibu/basic/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <HR> </BODY> </HTML>
<?php $params = require(__DIR__ . '/params.php'); $config = [ 'id' => 'basic', 'name' => 'Yii2 приложение', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'layout' => 'basic', 'defaultRoute' => 'main/index', 'language' => 'ru_RU', 'charset' => 'UTF-8', 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => '<API key>', ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, 'loginUrl' => ['main/login'] ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. 'useFileTransport' => true, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => require(__DIR__ . '/db.php'), 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'enableStrictParsing' => true, 'rules' => [ [ 'pattern' => '', 'route' => 'main/index', 'suffix' => '' ], [ 'pattern' => 'найти-<search:\w*>-<year:\d{4}>', 'route' => 'main/search', 'suffix' => '.html' ], [ 'pattern' => 'найти-<search:\w*>', 'route' => 'main/search', 'suffix' => '.html' ], [ 'pattern' => '<controller>/<action>/<id:\d+>', 'route' => '<controller>/<action>', 'suffix' => '' ], [ 'pattern' => '<controller>/<action>', 'route' => '<controller>/<action>', 'suffix' => '.html' ], [ 'pattern' => '<module>/<controller>/<action>/<id:\d+>', 'route' => '<module>/<controller>/<action>', 'suffix' => '' ], [ 'pattern' => '<module>/<controller>/<action>', 'route' => '<module>/<controller>/<action>', 'suffix' => '.html' ], ] ] ], 'params' => $params, ]; if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = 'yii\debug\Module'; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = 'yii\gii\Module'; } return $config;
#ifndef <API key> #define <API key> #include <Ioss_CodeTypes.h> // for IntVector #include <<API key>.h> // for ElementTopology // STL Includes namespace Ioss { class TriShell6 : public Ioss::ElementTopology { public: static constexpr auto name = "trishell6"; static void factory(); ~TriShell6() override; ElementShape shape() const override { return ElementShape::TRI; } int spatial_dimension() const override; int <API key>() const override; bool is_element() const override { return true; } int order() const override; int number_corner_nodes() const override; int number_nodes() const override; int number_edges() const override; int number_faces() const override; int number_nodes_edge(int edge = 0) const override; int number_nodes_face(int face = 0) const override; int number_edges_face(int face = 0) const override; Ioss::IntVector edge_connectivity(int edge_number) const override; Ioss::IntVector face_connectivity(int face_number) const override; Ioss::IntVector <API key>() const override; Ioss::ElementTopology *face_type(int face_number = 0) const override; Ioss::ElementTopology *edge_type(int edge_number = 0) const override; protected: TriShell6(); private: static TriShell6 instance_; TriShell6(const TriShell6 &) = delete; }; } // namespace Ioss #endif // <API key>
// BUGBUG #include "platform.headers.hpp" // Self: #include "history.hpp" // Internal: #include "lang.hpp" #include "keys.hpp" #include "message.hpp" #include "clipboard.hpp" #include "config.hpp" #include "strmix.hpp" #include "dialog.hpp" #include "interf.hpp" #include "ctrlobj.hpp" #include "configdb.hpp" #include "datetime.hpp" #include "uuids.far.hpp" #include "uuids.far.dialogs.hpp" #include "scrbuf.hpp" #include "plugins.hpp" #include "string_utils.hpp" #include "vmenu.hpp" #include "vmenu2.hpp" #include "global.hpp" #include "FarDlgBuilder.hpp" // Platform: #include "platform.fs.hpp" // Common: #include "common/scope_exit.hpp" #include "common/uuid.hpp" // External: namespace { struct [[nodiscard]] time_point_hash { [[nodiscard]] size_t operator()(os::chrono::time_point const Time) const { return make_hash(Time.time_since_epoch().count()); } }; using known_records = std::unordered_set<os::chrono::time_point, time_point_hash>; class [[nodiscard]] <API key> { public: bool empty() const { return m_KnownRecords.empty(); } bool check(os::chrono::time_point const Time) const { return Time < m_StartTime || contains(m_KnownRecords, Time); } void add(os::chrono::time_point const Time) { m_KnownRecords.emplace(Time); } void remove(os::chrono::time_point const Time) { m_KnownRecords.erase(Time); } void assign(known_records&& Records) { m_KnownRecords = std::move(Records); } private: known_records m_KnownRecords; os::chrono::time_point m_StartTime{ os::chrono::nt_clock::now() }; }; static auto& history_white_list() { static <API key> Instance; return Instance; } } History::History(history_type TypeHistory, string_view const HistoryName, const Bool3Option& State, bool const KeepSelectedPos): m_TypeHistory(TypeHistory), m_HistoryName(HistoryName), m_State(State), m_KeepSelectedPos(KeepSelectedPos) { // Initialise with the current time history_white_list(); } void History::CompactHistory() { const auto& HistoryConfig = ConfigProvider().HistoryCfg(); SCOPED_ACTION(auto)(HistoryConfig->ScopedTransaction()); HistoryConfig->DeleteOldUnlocked(HISTORYTYPE_CMD, {}, Global->Opt->HistoryLifetime, Global->Opt->HistoryCount); HistoryConfig->DeleteOldUnlocked(HISTORYTYPE_FOLDER, {}, Global->Opt-><API key>, Global->Opt->FoldersHistoryCount); HistoryConfig->DeleteOldUnlocked(HISTORYTYPE_VIEW, {}, Global->Opt->ViewHistoryLifetime, Global->Opt->ViewHistoryCount); for(const auto& i: HistoryConfig-><API key>(HISTORYTYPE_DIALOG, Global->Opt->DialogsHistoryCount)) { HistoryConfig->DeleteOldUnlocked(HISTORYTYPE_DIALOG, i, Global->Opt-><API key>, Global->Opt->DialogsHistoryCount); } } void History::AddToHistory(string_view const Str, history_record_type const Type, const UUID* const Uuid, string_view const File, string_view const Data) { if (m_SuppressAdd) return; if (Global->CtrlObject->Macro.IsExecuting() && Global->CtrlObject->Macro.IsHistoryDisabled(static_cast<int>(m_TypeHistory))) return; if (m_TypeHistory!=HISTORYTYPE_DIALOG && (m_TypeHistory!=HISTORYTYPE_FOLDER || !Uuid || *Uuid == FarUuid) && Str.empty()) return; const auto Time = os::chrono::nt_clock::now(); bool Lock = false; const auto strUuid = Uuid? uuid::str(*Uuid) : L""s; unsigned long long DeleteId = 0; const bool ignore_data = m_TypeHistory == HISTORYTYPE_CMD; for (const auto& i: HistoryCfgRef()->Enumerator(m_TypeHistory, m_HistoryName, Str, true)) { if (!EqualType(Type, i.Type)) continue; if (!equal_icase(strUuid, i.Uuid)) continue; if (!equal_icase(File, i.File)) continue; if (!ignore_data && !equal_icase(Data, i.Data)) continue; Lock = Lock || i.Lock; DeleteId = i.Id; forget_record(i.Time); break; } HistoryCfgRef()->DeleteAndAddAsync(DeleteId, m_TypeHistory, m_HistoryName, Str, Type, Lock, Time, strUuid, File, Data); //Async - should never be used in a transaction introduce_record(Time); ResetPosition(); } string History::LastItem() { const auto CurrentItem = m_CurrentItem; ResetPosition(); SCOPE_EXIT{ m_CurrentItem = CurrentItem; }; return GetPrev(); } history_return_type History::Select(string_view const Title, string_view const HelpTopic, string &strStr, history_record_type &Type, UUID* Uuid, string *File, string *Data) { const auto Height = ScrY - 8; const auto HistoryMenu = VMenu2::create(string(Title), {}, Height); HistoryMenu->SetMenuFlags(VMENU_WRAPMODE); HistoryMenu->SetHelp(HelpTopic); HistoryMenu->SetPosition({ -1, -1, 0, 0 }); if (m_TypeHistory == HISTORYTYPE_CMD || m_TypeHistory == HISTORYTYPE_FOLDER || m_TypeHistory == HISTORYTYPE_VIEW) HistoryMenu->SetId(m_TypeHistory == HISTORYTYPE_CMD?HistoryCmdId:(m_TypeHistory == HISTORYTYPE_FOLDER?HistoryFolderId:HistoryEditViewId)); const auto ret = ProcessMenu(strStr, Uuid, File, Data, Title, *HistoryMenu, Height, Type, nullptr); Global->ScrBuf->Flush(); return ret; } history_return_type History::Select(VMenu2& HistoryMenu, int Height, Dialog const* const Dlg, string& strStr) { history_record_type Type; return ProcessMenu(strStr, {}, {}, {}, {}, HistoryMenu, Height, Type, Dlg); } history_return_type History::ProcessMenu(string& strStr, UUID* const Uuid, string* const File, string* const Data, string_view const Title, VMenu2& HistoryMenu, int const Height, history_record_type& Type, const Dialog* const Dlg) { struct { unsigned long long id = 0; string name, uuid, file, data; history_record_type type = HR_DEFAULT; } SelectedRecord; FarListPos Pos={sizeof(FarListPos)}; int MenuExitCode=-1; history_return_type RetCode = HRT_ENTER; bool Done=false; bool SetUpMenuPos=false; if (m_TypeHistory == HISTORYTYPE_DIALOG && !HistoryCfgRef()->Count(m_TypeHistory,m_HistoryName)) return HRT_CANCEL; while (!Done) { bool IsUpdate=false; HistoryMenu.clear(); { bool bSelected=false; int LastDay=0, LastMonth = 0, LastYear = 0; const auto GetTitle = [](auto RecordType) { switch (RecordType) { case HR_VIEWER: return msg(lng::MHistoryView); case HR_EDITOR: case HR_EDITOR_RO: return msg(lng::MHistoryEdit); case HR_EXTERNAL: case HR_EXTERNAL_WAIT: return msg(lng::MHistoryExt); } return L""s; }; for (auto& i: HistoryCfgRef()->Enumerator(m_TypeHistory, m_HistoryName, {}, m_TypeHistory == HISTORYTYPE_DIALOG)) { if (!is_known_record(i.Time)) continue; string strRecord; if (m_TypeHistory == HISTORYTYPE_VIEW) strRecord = concat(GetTitle(i.Type), L':', i.Type == HR_EDITOR_RO? L'-' : L' '); else if (m_TypeHistory == HISTORYTYPE_FOLDER) { if(const auto UuidOpt = uuid::try_parse(i.Uuid); UuidOpt && *UuidOpt != FarUuid) { const auto pPlugin = Global->CtrlObject->Plugins->FindPlugin(*UuidOpt); strRecord = (pPlugin ? pPlugin->Title() : L'{' + i.Uuid + L'}') + L':'; if(!i.File.empty()) strRecord += i.File + L':'; } } SYSTEMTIME SavedTime; utc_to_local(i.Time, SavedTime); if(LastDay != SavedTime.wDay || LastMonth != SavedTime.wMonth || LastYear != SavedTime.wYear) { LastDay = SavedTime.wDay; LastMonth = SavedTime.wMonth; LastYear = SavedTime.wYear; MenuItemEx Separator; Separator.Flags = LIF_SEPARATOR; string strTime; ConvertDate(i.Time, Separator.Name, strTime, 8, 1); HistoryMenu.AddItem(Separator); } strRecord += i.Name; if (m_TypeHistory != HISTORYTYPE_DIALOG) inplace::escape_ampersands(strRecord); MenuItemEx MenuItem(strRecord); i.Lock? MenuItem.SetCheck() : MenuItem.ClearCheck(); MenuItem.ComplexUserData = i.Id; if (!SetUpMenuPos && m_CurrentItem == i.Id) { MenuItem.SetSelect(true); bSelected=true; } HistoryMenu.AddItem(MenuItem); } if (!SetUpMenuPos && !bSelected && m_TypeHistory!=HISTORYTYPE_DIALOG && !HistoryMenu.empty()) { FarListPos p={sizeof(FarListPos)}; p.SelectPos = HistoryMenu.size() - 1; p.TopPos = 0; HistoryMenu.SetSelectPos(&p); } } if (m_TypeHistory == HISTORYTYPE_DIALOG) { if (!HistoryMenu.size()) return HRT_CANCEL; HistoryMenu.SetPosition(Dlg->CalcComboBoxPos(nullptr, HistoryMenu.size())); } else HistoryMenu.SetPosition({ -1, -1, 0, 0 }); if (SetUpMenuPos) { Pos.SelectPos = Pos.SelectPos < static_cast<intptr_t>(HistoryMenu.size()) ? Pos.SelectPos : static_cast<intptr_t>(HistoryMenu.size() - 1); Pos.TopPos = std::min(Pos.TopPos, static_cast<intptr_t>(HistoryMenu.size() - Height)); HistoryMenu.SetSelectPos(&Pos); SetUpMenuPos=false; } HistoryMenu.Redraw(); MenuExitCode=HistoryMenu.Run([&](const Manager::Key& RawKey) { const auto Key=RawKey(); if (m_TypeHistory == HISTORYTYPE_DIALOG && Key==KEY_TAB) { HistoryMenu.Close(); return 1; } HistoryMenu.GetSelectPos(&Pos); const auto CurrentRecordPtr = HistoryMenu.<API key><unsigned long long>(Pos.SelectPos); const auto CurrentRecord = CurrentRecordPtr? *CurrentRecordPtr : 0; int KeyProcessed = 1; switch (Key) { case KEY_CTRLR: case KEY_RCTRLR: { if (m_TypeHistory == HISTORYTYPE_FOLDER || m_TypeHistory == HISTORYTYPE_VIEW) { bool ModifiedHistory=false; SCOPED_ACTION(auto) = HistoryCfgRef()->ScopedTransaction(); for (const auto& i: HistoryCfgRef()->Enumerator(m_TypeHistory, m_HistoryName)) { if (i.Lock) continue; if (!is_known_record(i.Time)) continue; bool kill=false; if(const auto UuidOpt = uuid::try_parse(i.Uuid); UuidOpt && *UuidOpt != FarUuid) { if (!Global->CtrlObject->Plugins->FindPlugin(*UuidOpt) || (!i.File.empty() && !os::fs::exists(i.File))) kill = true; } else if (!os::fs::exists(i.Name)) kill=true; if(kill) { HistoryCfgRef()->Delete(i.Id); forget_record(i.Time); ModifiedHistory=true; } } if (ModifiedHistory) { IsUpdate=true; HistoryMenu.Close(Pos.SelectPos); } ResetPosition(); } break; } case <API key>: case <API key>: case KEY_CTRLNUMENTER: case KEY_RCTRLNUMENTER: case KEY_SHIFTNUMENTER: case KEY_CTRLSHIFTENTER: case KEY_RCTRLSHIFTENTER: case KEY_CTRLENTER: case KEY_RCTRLENTER: case KEY_SHIFTENTER: case KEY_CTRLALTENTER: case KEY_RCTRLRALTENTER: case KEY_CTRLRALTENTER: case KEY_RCTRLALTENTER: case KEY_CTRLALTNUMENTER: case <API key>: case <API key>: case <API key>: { if (m_TypeHistory == HISTORYTYPE_DIALOG) break; HistoryMenu.Close(Pos.SelectPos); Done=true; RetCode = flags::check_any(Key, KEY_CTRL | KEY_RCTRL) && flags::check_any(Key, KEY_ALT | KEY_RALT)? HRT_CTRLALTENTER : flags::check_any(Key, KEY_CTRL | KEY_RCTRL) && flags::check_any(Key, KEY_SHIFT)? HRT_CTRLSHIFTENTER : flags::check_any(Key, KEY_SHIFT)? HRT_SHIFTETNER : HRT_CTRLENTER; break; } case KEY_F3: case KEY_F4: case KEY_NUMPAD5: case KEY_SHIFTNUMPAD5: switch (m_TypeHistory) { case HISTORYTYPE_VIEW: HistoryMenu.Close(Pos.SelectPos); Done = true; RetCode = (Key == KEY_F4? HRT_F4 : HRT_F3); break; case HISTORYTYPE_CMD: if (Key == KEY_F3 && CurrentRecord) { string HistoryData; if (HistoryCfgRef()->Get(CurrentRecord, {}, {}, {}, {}, {}, &HistoryData)) { DialogBuilder Builder(lng::MHistoryInfoTitle); Builder.AddText(lng::MHistoryInfoFolder); Builder.AddConstEditField(HistoryData, std::max(20, std::min(static_cast<int>(HistoryData.size()), ScrX - 5 * 2))); Builder.AddOK(); Builder.ShowDialog(); } } break; default: break; } break; case KEY_CTRLC: case KEY_RCTRLC: case KEY_CTRLINS: case KEY_CTRLNUMPAD0: case KEY_RCTRLINS: case KEY_RCTRLNUMPAD0: { if (CurrentRecord) { string Name; if (HistoryCfgRef()->Get(CurrentRecord, &Name, {}, {}, {}, {}, {})) SetClipboardText(Name); } break; } // Lock/Unlock case KEY_INS: case KEY_NUMPAD0: { if (CurrentRecord) { HistoryCfgRef()->FlipLock(CurrentRecord); HistoryMenu.FlipCheck(Pos.SelectPos); } break; } case KEY_SHIFTNUMDEL: case KEY_SHIFTDEL: { if (CurrentRecord && !HistoryCfgRef()->IsLocked(CurrentRecord)) { HistoryCfgRef()->Delete(CurrentRecord); ResetPosition(); if (os::chrono::time_point Time; HistoryCfgRef()->Get(CurrentRecord, {}, {}, &Time, {}, {}, {})) forget_record(Time); HistoryMenu.DeleteItem(Pos.SelectPos); } break; } case KEY_NUMDEL: case KEY_DEL: { if (!HistoryMenu.empty() && (!Global->Opt->Confirm.HistoryClear || Message(MSG_WARNING, msg((m_TypeHistory==HISTORYTYPE_CMD || m_TypeHistory==HISTORYTYPE_DIALOG? lng::MHistoryTitle: (m_TypeHistory==HISTORYTYPE_FOLDER? lng::MFolderHistoryTitle : lng::MViewHistoryTitle))), { msg(lng::MHistoryClear) }, { lng::MClear, lng::MCancel }) == message_result::first_button)) { HistoryCfgRef()->DeleteAllUnlocked(m_TypeHistory,m_HistoryName); <API key>(); ResetPosition(); HistoryMenu.Close(Pos.SelectPos); IsUpdate=true; } break; } default: KeyProcessed = 0; } return KeyProcessed; }); HistoryMenu.ClearDone(); if (IsUpdate) continue; Done=true; if (MenuExitCode >= 0) { SelectedRecord.id = *HistoryMenu.<API key><unsigned long long>(MenuExitCode); if (!SelectedRecord.id) return HRT_CANCEL; if (!HistoryCfgRef()->Get(SelectedRecord.id, &SelectedRecord.name, &SelectedRecord.type, {}, &SelectedRecord.uuid, &SelectedRecord.file, &SelectedRecord.data)) return HRT_CANCEL; if (SelectedRecord.type != HR_EXTERNAL && SelectedRecord.type != HR_EXTERNAL_WAIT && RetCode != HRT_CTRLENTER && ((m_TypeHistory == HISTORYTYPE_FOLDER && SelectedRecord.uuid.empty()) || m_TypeHistory == HISTORYTYPE_VIEW) && !os::fs::exists(SelectedRecord.name)) { SetLastError(<API key>); const auto ErrorState = last_error(); if (SelectedRecord.type == HR_EDITOR && m_TypeHistory == HISTORYTYPE_VIEW) { if (Message(MSG_WARNING, ErrorState, Title, { SelectedRecord.name, msg(lng::<API key>) }, { lng::MHYes, lng::MHNo }) == message_result::first_button) break; } else { Message(MSG_WARNING, ErrorState, Title, { SelectedRecord.name }, { lng::MOk }); } Done=false; SetUpMenuPos=true; continue; } } } if (MenuExitCode < 0 || !SelectedRecord.id) return HRT_CANCEL; if (m_KeepSelectedPos) { m_CurrentItem = SelectedRecord.id; } strStr = SelectedRecord.name; if(Uuid) { if (const auto UuidOpt = uuid::try_parse(SelectedRecord.uuid)) *Uuid = *UuidOpt; else *Uuid = FarUuid; } if(File) *File = SelectedRecord.file; if(Data) *Data = SelectedRecord.data; switch(RetCode) { case HRT_CANCEL: break; case HRT_ENTER: case HRT_SHIFTETNER: case HRT_CTRLENTER: case HRT_CTRLSHIFTENTER: case HRT_CTRLALTENTER: Type = SelectedRecord.type; break; case HRT_F3: Type = HR_VIEWER; RetCode = HRT_ENTER; break; case HRT_F4: Type = HR_EDITOR; if (SelectedRecord.type == HR_EDITOR_RO) Type = HR_EDITOR_RO; RetCode = HRT_ENTER; break; } return RetCode; } string History::GetPrev() { string Result; os::chrono::time_point Time; for (;;) { const auto NewItem = HistoryCfgRef()->GetPrev(m_TypeHistory, m_HistoryName, m_CurrentItem, Result, Time); if (NewItem == m_CurrentItem) break; m_CurrentItem = NewItem; if (is_known_record(Time)) break; } return Result; } string History::GetNext() { string Result; os::chrono::time_point Time; for (;;) { const auto NewItem = HistoryCfgRef()->GetNext(m_TypeHistory, m_HistoryName, m_CurrentItem, Result, Time); if (NewItem == m_CurrentItem) break; m_CurrentItem = NewItem; if (is_known_record(Time)) break; } return Result; } bool History::GetSimilar(string &strStr, int LastCmdPartLength, bool bAppend) { auto Length=static_cast<int>(strStr.size()); if (LastCmdPartLength!=-1 && LastCmdPartLength<Length) Length=LastCmdPartLength; if (LastCmdPartLength==-1) { ResetPosition(); } string strName; os::chrono::time_point Time; auto CurrentItem = m_CurrentItem; auto FirstPreviousItem = CurrentItem; for (;;) { const auto NewItem = HistoryCfgRef()->CyclicGetPrev(m_TypeHistory, m_HistoryName, CurrentItem, strName, Time); // Empty history if (NewItem == CurrentItem) break; // Full circle if (NewItem == FirstPreviousItem) break; if (CurrentItem == m_CurrentItem) FirstPreviousItem = NewItem; CurrentItem = NewItem; // Empty item if (!NewItem) continue; if (!is_known_record(Time) || !starts_with_icase(strName, string_view(strStr).substr(0, Length)) || strStr == strName) continue; if (bAppend) strStr.append(strName, Length, string::npos); // gcc 7.3-8.1 bug: npos required. TODO: Remove after we move to 8.2 or later else strStr = strName; m_CurrentItem = CurrentItem; return true; } return false; } void History::GetAllSimilar(string_view const Str, function_ref<void(string_view Name, unsigned long long Id, bool IsLocked)> const Callback) const { for (const auto& i: HistoryCfgRef()->Enumerator(m_TypeHistory, m_HistoryName, {}, true)) { if (is_known_record(i.Time) && starts_with_icase(i.Name, Str)) { Callback(i.Name, i.Id, i.Lock); } } } bool History::DeleteIfUnlocked(unsigned long long id) { if (HistoryCfgRef()->IsLocked(id)) return false; HistoryCfgRef()->Delete(id); if (os::chrono::time_point Time; HistoryCfgRef()->Get(id, {}, {}, &Time, {}, {}, {})) forget_record(Time); ResetPosition(); return true; } bool History::EqualType(history_record_type Type1, history_record_type Type2) const { return Type1 == Type2 || (m_TypeHistory == HISTORYTYPE_VIEW && ((Type1 == HR_EDITOR_RO && Type2 == HR_EDITOR) || (Type1 == HR_EDITOR && Type2 == HR_EDITOR_RO))); } const std::unique_ptr<HistoryConfig>& History::HistoryCfgRef() const { return m_State == BSTATE_UNCHECKED? ConfigProvider().HistoryCfgMem() : ConfigProvider().HistoryCfg(); } void History::introduce_record(os::chrono::time_point Time) const { if (m_State == BSTATE_3STATE) history_white_list().add(Time); } void History::forget_record(os::chrono::time_point Time) const { if (m_State == BSTATE_3STATE) history_white_list().remove(Time); } bool History::is_known_record(os::chrono::time_point const Time) const { return m_State != BSTATE_3STATE || history_white_list().check(Time); } void History::<API key>() const { if (m_State != BSTATE_3STATE) return; if (history_white_list().empty()) return; known_records NewKnownRecords; for (const auto& i: HistoryCfgRef()->Enumerator(m_TypeHistory, m_HistoryName)) { if (is_known_record(i.Time)) { NewKnownRecords.emplace(i.Time); } } history_white_list().assign(std::move(NewKnownRecords)); } void History::suppress_add() { ++m_SuppressAdd; } void History::restore_add() { --m_SuppressAdd; }
<?php if(in_array('category_menu', $addons) & !isset($cat_menu)){ include_once 'data/auction.php'; $adb=new Auction(null); $cat_menu = 'true'; $addon = 'category_menu'; $valid_rows = "select * from nav_conditionals where menu_name = 'addons' and link_name = '$addon'"; $sql_check =db_fetch_array($valid_rows); if(db_num_rows(db_query($valid_rows)) == 0){ if(file_exists("include/addons/$addon/$template/index.php")){ include_once("include/addons/$addon/$template/index.php"); }else{ include_once("include/addons/$addon/index.php"); } }else{ if(<API key>($sql_check, $addon) >= 1){ include_once("include/addons/$addon/index.php"); } } } if(in_array('design_suite', $addons) & $admin >= 1){ include_once("include/addons/design_suite/ADDONS/edit_addons.php"); } ?>
<?php namespace app\modules\member\models; use Yii; use yii\base\Model; use yii\captcha\Captcha; use app\modules\user\models\User; /** * Signup form */ class RegisterForm extends Model { public $username; public $email; public $password; public $repassword; public $verifyCode; /** * @inheritdoc */ public function rules() { return [ ['username', 'filter', 'filter' => 'trim'], ['username', 'required'], ['username', 'unique', 'targetClass' => '\app\modules\user\models\User', 'message' => ',.'], ['username', 'string', 'min' => 2, 'max' => 255], ['email', 'filter', 'filter' => 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => '\app\modules\user\models\User', 'message' => ''], // ['password', 'required'], ['password', 'string', 'min' => 6], ['password', 'required'], ['repassword', 'required'], ['repassword', 'compare', 'compareAttribute'=>'password'], ['verifyCode', 'required'], ['verifyCode', 'captcha', 'captchaAction'=>'/member/default/captcha'], ]; } public function attributeLabels() { return array( 'username'=> '', 'email' => '', 'password' => '', 'repassword' => '', 'verifyCode' => '', ); } /** * Signs user up. * * @return User|null the saved model or null if saving fails */ public function create() { if ($this->validate()) { $user = new User(); $user->username = $this->username; $user->email = $this->email; $this->password = $this->password ? $this->password : '999999'; $user->setPassword($this->password); $user->generateAuthKey(); $user->is_staff = User::STAFF_NO; $user->status = User::STATUS_REGISTER; if ($user->save()) { return $user; } } return false; } }
from __future__ import print_function # Denis Engemann <denis.engemann@gmail.com> import os import os.path as op import glob from copy import deepcopy import warnings import itertools as itt import numpy as np from numpy.testing import (<API key>, assert_array_equal, assert_allclose, assert_equal) from nose.tools import assert_true, assert_raises, assert_not_equal from mne.datasets import testing from mne.io.constants import FIFF from mne.io import Raw, concatenate_raws, read_raw_fif from mne.io.tests.test_raw import _test_concat from mne import (concatenate_events, find_events, equalize_channels, compute_proj_raw, pick_types, pick_channels) from mne.utils import (_TempDir, requires_pandas, slow_test, requires_mne, run_subprocess, run_tests_if_main) from mne.externals.six.moves import zip, cPickle as pickle from mne.io.proc_history import _get_sss_rank from mne.io.pick import _picks_by_type warnings.simplefilter('always') # enable b/c these tests throw warnings data_dir = op.join(testing.data_path(download=False), 'MEG', 'sample') fif_fname = op.join(data_dir, '<API key>.fif') base_dir = op.join(op.dirname(__file__), '..', '..', 'tests', 'data') test_fif_fname = op.join(base_dir, 'test_raw.fif') test_fif_gz_fname = op.join(base_dir, 'test_raw.fif.gz') ctf_fname = op.join(base_dir, 'test_ctf_raw.fif') ctf_comp_fname = op.join(base_dir, 'test_ctf_comp_raw.fif') <API key> = op.join(base_dir, 'test_withbads_raw.fif') bad_file_works = op.join(base_dir, 'test_bads.txt') bad_file_wrong = op.join(base_dir, 'test_wrong_bads.txt') hp_fname = op.join(base_dir, 'test_chpi_raw_hp.txt') hp_fif_fname = op.join(base_dir, 'test_chpi_raw_sss.fif') @slow_test def test_concat(): """Test RawFIF concatenation""" _test_concat(read_raw_fif, test_fif_fname) @testing.<API key> def test_hash_raw(): """Test hashing raw objects """ raw = read_raw_fif(fif_fname) assert_raises(RuntimeError, raw.__hash__) raw = Raw(fif_fname).crop(0, 0.5, False) raw.preload_data() raw_2 = Raw(fif_fname).crop(0, 0.5, False) raw_2.preload_data() assert_equal(hash(raw), hash(raw_2)) # do NOT use assert_equal here, failing output is terrible assert_equal(pickle.dumps(raw), pickle.dumps(raw_2)) raw_2._data[0, 0] -= 1 assert_not_equal(hash(raw), hash(raw_2)) @testing.<API key> def test_subject_info(): """Test reading subject information """ tempdir = _TempDir() raw = Raw(fif_fname).crop(0, 1, False) assert_true(raw.info['subject_info'] is None) # fake some subject data keys = ['id', 'his_id', 'last_name', 'first_name', 'birthday', 'sex', 'hand'] vals = [1, 'foobar', 'bar', 'foo', (1901, 2, 3), 0, 1] subject_info = dict() for key, val in zip(keys, vals): subject_info[key] = val raw.info['subject_info'] = subject_info out_fname = op.join(tempdir, 'test_subj_info_raw.fif') raw.save(out_fname, overwrite=True) raw_read = Raw(out_fname) for key in keys: assert_equal(subject_info[key], raw_read.info['subject_info'][key]) raw_read.anonymize() assert_true(raw_read.info.get('subject_info') is None) out_fname_anon = op.join(tempdir, '<API key>.fif') raw_read.save(out_fname_anon, overwrite=True) raw_read = Raw(out_fname_anon) assert_true(raw_read.info.get('subject_info') is None) @testing.<API key> def test_copy_append(): """Test raw copying and appending combinations """ raw = Raw(fif_fname, preload=True).copy() raw_full = Raw(fif_fname) raw_full.append(raw) data = raw_full[:, :][0] assert_equal(data.shape[1], 2 * raw._data.shape[1]) @slow_test @testing.<API key> def <API key>(): """Test raw rank estimation """ iter_tests = itt.product( [fif_fname, hp_fif_fname], # sss ['norm', dict(mag=1e11, grad=1e9, eeg=1e5)] ) for fname, scalings in iter_tests: raw = Raw(fname) (_, picks_meg), (_, picks_eeg) = _picks_by_type(raw.info, meg_combined=True) n_meg = len(picks_meg) n_eeg = len(picks_eeg) raw = Raw(fname, preload=True) if 'proc_history' not in raw.info: expected_rank = n_meg + n_eeg else: mf = raw.info['proc_history'][0]['max_info'] expected_rank = _get_sss_rank(mf) + n_eeg assert_array_equal(raw.estimate_rank(scalings=scalings), expected_rank) assert_array_equal(raw.estimate_rank(picks=picks_eeg, scalings=scalings), n_eeg) raw = Raw(fname, preload=False) if 'sss' in fname: tstart, tstop = 0., 30. raw.add_proj(compute_proj_raw(raw)) raw.apply_proj() else: tstart, tstop = 10., 20. raw.apply_proj() n_proj = len(raw.info['projs']) assert_array_equal(raw.estimate_rank(tstart=tstart, tstop=tstop, scalings=scalings), expected_rank - (1 if 'sss' in fname else n_proj)) @testing.<API key> def test_output_formats(): """Test saving and loading raw data using multiple formats """ tempdir = _TempDir() formats = ['short', 'int', 'single', 'double'] tols = [1e-4, 1e-7, 1e-7, 1e-15] # let's fake a raw file with different formats raw = Raw(test_fif_fname).crop(0, 1, copy=False) temp_file = op.join(tempdir, 'raw.fif') for ii, (fmt, tol) in enumerate(zip(formats, tols)): # Let's test the overwriting error throwing while we're at it if ii > 0: assert_raises(IOError, raw.save, temp_file, fmt=fmt) raw.save(temp_file, fmt=fmt, overwrite=True) raw2 = Raw(temp_file) raw2_data = raw2[:, :][0] assert_allclose(raw2_data, raw[:, :][0], rtol=tol, atol=1e-25) assert_equal(raw2.orig_format, fmt) def _compare_combo(raw, new, times, n_times): for ti in times: # let's do a subset of points for speed orig = raw[:, ti % n_times][0] # these are almost_equals because of possible dtype differences assert_allclose(orig, new[:, ti][0]) @slow_test @testing.<API key> def test_multiple_files(): """Test loading multiple files simultaneously """ # split file tempdir = _TempDir() raw = Raw(fif_fname).crop(0, 10, False) raw.preload_data() raw.preload_data() # test no operation split_size = 3. # in seconds sfreq = raw.info['sfreq'] nsamp = (raw.last_samp - raw.first_samp) tmins = np.round(np.arange(0., nsamp, split_size * sfreq)) tmaxs = np.concatenate((tmins[1:] - 1, [nsamp])) tmaxs /= sfreq tmins /= sfreq assert_equal(raw.n_times, len(raw.times)) # going in reverse order so the last fname is the first file (need later) raws = [None] * len(tmins) for ri in range(len(tmins) - 1, -1, -1): fname = op.join(tempdir, 'test_raw_split-%d_raw.fif' % ri) raw.save(fname, tmin=tmins[ri], tmax=tmaxs[ri]) raws[ri] = Raw(fname) events = [find_events(r, stim_channel='STI 014') for r in raws] last_samps = [r.last_samp for r in raws] first_samps = [r.first_samp for r in raws] # test concatenation of split file assert_raises(ValueError, concatenate_raws, raws, True, events[1:]) all_raw_1, events1 = concatenate_raws(raws, preload=False, events_list=events) assert_equal(raw.first_samp, all_raw_1.first_samp) assert_equal(raw.last_samp, all_raw_1.last_samp) assert_allclose(raw[:, :][0], all_raw_1[:, :][0]) raws[0] = Raw(fname) all_raw_2 = concatenate_raws(raws, preload=True) assert_allclose(raw[:, :][0], all_raw_2[:, :][0]) # test proper event treatment for split files events2 = concatenate_events(events, first_samps, last_samps) events3 = find_events(all_raw_2, stim_channel='STI 014') assert_array_equal(events1, events2) assert_array_equal(events1, events3) # test various methods of combining files raw = Raw(fif_fname, preload=True) n_times = raw.n_times # make sure that all our data match times = list(range(0, 2 * n_times, 999)) # add potentially problematic points times.extend([n_times - 1, n_times, 2 * n_times - 1]) raw_combo0 = Raw([fif_fname, fif_fname], preload=True) _compare_combo(raw, raw_combo0, times, n_times) raw_combo = Raw([fif_fname, fif_fname], preload=False) _compare_combo(raw, raw_combo, times, n_times) raw_combo = Raw([fif_fname, fif_fname], preload='memmap8.dat') _compare_combo(raw, raw_combo, times, n_times) assert_raises(ValueError, Raw, [fif_fname, ctf_fname]) assert_raises(ValueError, Raw, [fif_fname, <API key>]) assert_equal(raw[:, :][0].shape[1] * 2, raw_combo0[:, :][0].shape[1]) assert_equal(raw_combo0[:, :][0].shape[1], raw_combo0.n_times) # with all data preloaded, result should be preloaded raw_combo = Raw(fif_fname, preload=True) raw_combo.append(Raw(fif_fname, preload=True)) assert_true(raw_combo.preload is True) assert_equal(raw_combo.n_times, raw_combo._data.shape[1]) _compare_combo(raw, raw_combo, times, n_times) # with any data not preloaded, don't set result as preloaded raw_combo = concatenate_raws([Raw(fif_fname, preload=True), Raw(fif_fname, preload=False)]) assert_true(raw_combo.preload is False) assert_array_equal(find_events(raw_combo, stim_channel='STI 014'), find_events(raw_combo0, stim_channel='STI 014')) _compare_combo(raw, raw_combo, times, n_times) # user should be able to force data to be preloaded upon concat raw_combo = concatenate_raws([Raw(fif_fname, preload=False), Raw(fif_fname, preload=True)], preload=True) assert_true(raw_combo.preload is True) _compare_combo(raw, raw_combo, times, n_times) raw_combo = concatenate_raws([Raw(fif_fname, preload=False), Raw(fif_fname, preload=True)], preload='memmap3.dat') _compare_combo(raw, raw_combo, times, n_times) raw_combo = concatenate_raws([Raw(fif_fname, preload=True), Raw(fif_fname, preload=True)], preload='memmap4.dat') _compare_combo(raw, raw_combo, times, n_times) raw_combo = concatenate_raws([Raw(fif_fname, preload=False), Raw(fif_fname, preload=False)], preload='memmap5.dat') _compare_combo(raw, raw_combo, times, n_times) # verify that combining raws with different projectors throws an exception raw.add_proj([], remove_existing=True) assert_raises(ValueError, raw.append, Raw(fif_fname, preload=True)) # now test event treatment for concatenated raw files events = [find_events(raw, stim_channel='STI 014'), find_events(raw, stim_channel='STI 014')] last_samps = [raw.last_samp, raw.last_samp] first_samps = [raw.first_samp, raw.first_samp] events = concatenate_events(events, first_samps, last_samps) events2 = find_events(raw_combo0, stim_channel='STI 014') assert_array_equal(events, events2) # check out the len method assert_equal(len(raw), raw.n_times) assert_equal(len(raw), raw.last_samp - raw.first_samp + 1) @testing.<API key> def test_split_files(): """Test writing and reading of split raw files """ tempdir = _TempDir() raw_1 = Raw(fif_fname, preload=True) split_fname = op.join(tempdir, 'split_raw.fif') raw_1.save(split_fname, buffer_size_sec=1.0, split_size='10MB') raw_2 = Raw(split_fname) data_1, times_1 = raw_1[:, :] data_2, times_2 = raw_2[:, :] assert_array_equal(data_1, data_2) assert_array_equal(times_1, times_2) # test the case where the silly user specifies the split files fnames = [split_fname] fnames.extend(sorted(glob.glob(op.join(tempdir, 'split_raw-*.fif')))) with warnings.catch_warnings(record=True): warnings.simplefilter('always') raw_2 = Raw(fnames) data_2, times_2 = raw_2[:, :] assert_array_equal(data_1, data_2) assert_array_equal(times_1, times_2) def <API key>(): """Test reading/writing of bad channels """ tempdir = _TempDir() # Load correctly marked file (manually done in mne_process_raw) raw_marked = Raw(<API key>) correct_bads = raw_marked.info['bads'] raw = Raw(test_fif_fname) # Make sure it starts clean assert_array_equal(raw.info['bads'], []) # Test normal case raw.load_bad_channels(bad_file_works) # Write it out, read it in, and check raw.save(op.join(tempdir, 'foo_raw.fif')) raw_new = Raw(op.join(tempdir, 'foo_raw.fif')) assert_equal(correct_bads, raw_new.info['bads']) # Reset it raw.info['bads'] = [] # Test bad case assert_raises(ValueError, raw.load_bad_channels, bad_file_wrong) # Test forcing the bad case with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always') raw.load_bad_channels(bad_file_wrong, force=True) n_found = sum(['1 bad channel' in str(ww.message) for ww in w]) assert_equal(n_found, 1) # there could be other irrelevant errors # write it out, read it in, and check raw.save(op.join(tempdir, 'foo_raw.fif'), overwrite=True) raw_new = Raw(op.join(tempdir, 'foo_raw.fif')) assert_equal(correct_bads, raw_new.info['bads']) # Check that bad channels are cleared raw.load_bad_channels(None) raw.save(op.join(tempdir, 'foo_raw.fif'), overwrite=True) raw_new = Raw(op.join(tempdir, 'foo_raw.fif')) assert_equal([], raw_new.info['bads']) @slow_test @testing.<API key> def test_io_raw(): """Test IO for raw data (Neuromag + CTF + gz) """ tempdir = _TempDir() # test unicode io for chars in [b'\xc3\xa4\xc3\xb6\xc3\xa9', b'a']: with Raw(fif_fname) as r: assert_true('Raw' in repr(r)) desc1 = r.info['description'] = chars.decode('utf-8') temp_file = op.join(tempdir, 'raw.fif') r.save(temp_file, overwrite=True) with Raw(temp_file) as r2: desc2 = r2.info['description'] assert_equal(desc1, desc2) # Let's construct a simple test for IO first raw = Raw(fif_fname).crop(0, 3.5, False) raw.preload_data() # put in some data that we know the values of data = np.random.randn(raw._data.shape[0], raw._data.shape[1]) raw._data[:, :] = data # save it somewhere fname = op.join(tempdir, 'test_copy_raw.fif') raw.save(fname, buffer_size_sec=1.0) # read it in, make sure the whole thing matches raw = Raw(fname) assert_allclose(data, raw[:, :][0], rtol=1e-6, atol=1e-20) # let's read portions across the 1-sec tag boundary, too inds = raw.time_as_index([1.75, 2.25]) sl = slice(inds[0], inds[1]) assert_allclose(data[:, sl], raw[:, sl][0], rtol=1e-6, atol=1e-20) # now let's do some real I/O fnames_in = [fif_fname, test_fif_gz_fname, ctf_fname] fnames_out = ['raw.fif', 'raw.fif.gz', 'raw.fif'] for fname_in, fname_out in zip(fnames_in, fnames_out): fname_out = op.join(tempdir, fname_out) raw = Raw(fname_in) nchan = raw.info['nchan'] ch_names = raw.info['ch_names'] meg_channels_idx = [k for k in range(nchan) if ch_names[k][0] == 'M'] n_channels = 100 meg_channels_idx = meg_channels_idx[:n_channels] start, stop = raw.time_as_index([0, 5]) data, times = raw[meg_channels_idx, start:(stop + 1)] meg_ch_names = [ch_names[k] for k in meg_channels_idx] # Set up pick list: MEG + STI 014 - bad channels include = ['STI 014'] include += meg_ch_names picks = pick_types(raw.info, meg=True, eeg=False, stim=True, misc=True, ref_meg=True, include=include, exclude='bads') # Writing with drop_small_buffer True raw.save(fname_out, picks, tmin=0, tmax=4, buffer_size_sec=3, drop_small_buffer=True, overwrite=True) raw2 = Raw(fname_out) sel = pick_channels(raw2.ch_names, meg_ch_names) data2, times2 = raw2[sel, :] assert_true(times2.max() <= 3) # Writing raw.save(fname_out, picks, tmin=0, tmax=5, overwrite=True) if fname_in == fif_fname or fname_in == fif_fname + '.gz': assert_equal(len(raw.info['dig']), 146) raw2 = Raw(fname_out) sel = pick_channels(raw2.ch_names, meg_ch_names) data2, times2 = raw2[sel, :] assert_allclose(data, data2, rtol=1e-6, atol=1e-20) assert_allclose(times, times2) assert_allclose(raw.info['sfreq'], raw2.info['sfreq'], rtol=1e-5) # check transformations for trans in ['dev_head_t', 'dev_ctf_t', 'ctf_head_t']: if raw.info[trans] is None: assert_true(raw2.info[trans] is None) else: assert_array_equal(raw.info[trans]['trans'], raw2.info[trans]['trans']) # check transformation 'from' and 'to' if trans.startswith('dev'): from_id = FIFF.FIFFV_COORD_DEVICE else: from_id = FIFF.<API key> if trans[4:8] == 'head': to_id = FIFF.FIFFV_COORD_HEAD else: to_id = FIFF.<API key> for raw_ in [raw, raw2]: assert_equal(raw_.info[trans]['from'], from_id) assert_equal(raw_.info[trans]['to'], to_id) if fname_in == fif_fname or fname_in == fif_fname + '.gz': assert_allclose(raw.info['dig'][0]['r'], raw2.info['dig'][0]['r']) # test warnings on bad filenames with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") raw_badname = op.join(tempdir, 'test-bad-name.fif.gz') raw.save(raw_badname) Raw(raw_badname) assert_true(len(w) > 0) # len(w) should be 2 but Travis sometimes has more @testing.<API key> def test_io_complex(): """Test IO with complex data types """ tempdir = _TempDir() dtypes = [np.complex64, np.complex128] raw = Raw(fif_fname, preload=True) picks = np.arange(5) start, stop = raw.time_as_index([0, 5]) data_orig, _ = raw[picks, start:stop] for di, dtype in enumerate(dtypes): imag_rand = np.array(1j * np.random.randn(data_orig.shape[0], data_orig.shape[1]), dtype) raw_cp = raw.copy() raw_cp._data = np.array(raw_cp._data, dtype) raw_cp._data[picks, start:stop] += imag_rand # this should throw an error because it's complex with warnings.catch_warnings(record=True) as w: warnings.simplefilter('always') raw_cp.save(op.join(tempdir, 'raw.fif'), picks, tmin=0, tmax=5, overwrite=True) # warning gets thrown on every instance b/c simplifilter('always') assert_equal(len(w), 1) raw2 = Raw(op.join(tempdir, 'raw.fif')) raw2_data, _ = raw2[picks, :] n_samp = raw2_data.shape[1] assert_allclose(raw2_data[:, :n_samp], raw_cp._data[picks, :n_samp]) # with preloading raw2 = Raw(op.join(tempdir, 'raw.fif'), preload=True) raw2_data, _ = raw2[picks, :] n_samp = raw2_data.shape[1] assert_allclose(raw2_data[:, :n_samp], raw_cp._data[picks, :n_samp]) @testing.<API key> def test_getitem(): """Test getitem/indexing of Raw """ for preload in [False, True, 'memmap.dat']: raw = Raw(fif_fname, preload=preload) data, times = raw[0, :] data1, times1 = raw[0] assert_array_equal(data, data1) assert_array_equal(times, times1) data, times = raw[0:2, :] data1, times1 = raw[0:2] assert_array_equal(data, data1) assert_array_equal(times, times1) data1, times1 = raw[[0, 1]] assert_array_equal(data, data1) assert_array_equal(times, times1) @testing.<API key> def test_proj(): """Test SSP proj operations """ tempdir = _TempDir() for proj in [True, False]: raw = Raw(fif_fname, preload=False, proj=proj) assert_true(all(p['active'] == proj for p in raw.info['projs'])) data, times = raw[0:2, :] data1, times1 = raw[0:2] assert_array_equal(data, data1) assert_array_equal(times, times1) # test adding / deleting proj if proj: assert_raises(ValueError, raw.add_proj, [], {'remove_existing': True}) assert_raises(ValueError, raw.del_proj, 0) else: projs = deepcopy(raw.info['projs']) n_proj = len(raw.info['projs']) raw.del_proj(0) assert_equal(len(raw.info['projs']), n_proj - 1) raw.add_proj(projs, remove_existing=False) assert_equal(len(raw.info['projs']), 2 * n_proj - 1) raw.add_proj(projs, remove_existing=True) assert_equal(len(raw.info['projs']), n_proj) # test apply_proj() with and without preload for preload in [True, False]: raw = Raw(fif_fname, preload=preload, proj=False) data, times = raw[:, 0:2] raw.apply_proj() data_proj_1 = np.dot(raw._projector, data) # load the file again without proj raw = Raw(fif_fname, preload=preload, proj=False) # write the file with proj. activated, make sure proj has been applied raw.save(op.join(tempdir, 'raw.fif'), proj=True, overwrite=True) raw2 = Raw(op.join(tempdir, 'raw.fif'), proj=False) data_proj_2, _ = raw2[:, 0:2] assert_allclose(data_proj_1, data_proj_2) assert_true(all(p['active'] for p in raw2.info['projs'])) # read orig file with proj. active raw2 = Raw(fif_fname, preload=preload, proj=True) data_proj_2, _ = raw2[:, 0:2] assert_allclose(data_proj_1, data_proj_2) assert_true(all(p['active'] for p in raw2.info['projs'])) # test that apply_proj works raw.apply_proj() data_proj_2, _ = raw[:, 0:2] assert_allclose(data_proj_1, data_proj_2) assert_allclose(data_proj_2, np.dot(raw._projector, data_proj_2)) tempdir = _TempDir() out_fname = op.join(tempdir, 'test_raw.fif') raw = read_raw_fif(test_fif_fname, preload=True).crop(0, 0.002, copy=False) raw.pick_types(meg=False, eeg=True) raw.info['projs'] = [raw.info['projs'][-1]] raw._data.fill(0) raw._data[-1] = 1. raw.save(out_fname) raw = read_raw_fif(out_fname, proj=True, preload=False) assert_allclose(raw[:, :][0][:1], raw[0, :][0]) @testing.<API key> def test_preload_modify(): """Test preloading and modifying data """ tempdir = _TempDir() for preload in [False, True, 'memmap.dat']: raw = Raw(fif_fname, preload=preload) nsamp = raw.last_samp - raw.first_samp + 1 picks = pick_types(raw.info, meg='grad', exclude='bads') data = np.random.randn(len(picks), nsamp try: raw[picks, :nsamp // 2] = data except RuntimeError as err: if not preload: continue else: raise err tmp_fname = op.join(tempdir, 'raw.fif') raw.save(tmp_fname, overwrite=True) raw_new = Raw(tmp_fname) data_new, _ = raw_new[picks, :nsamp / 2] assert_allclose(data, data_new) @slow_test @testing.<API key> def test_filter(): """Test filtering (FIR and IIR) and Raw.apply_function interface """ raw = Raw(fif_fname).crop(0, 7, False) raw.preload_data() sig_dec = 11 sig_dec_notch = 12 sig_dec_notch_fit = 12 picks_meg = pick_types(raw.info, meg=True, exclude='bads') picks = picks_meg[:4] raw_lp = raw.copy() raw_lp.filter(0., 4.0 - 0.25, picks=picks, n_jobs=2) raw_hp = raw.copy() raw_hp.filter(8.0 + 0.25, None, picks=picks, n_jobs=2) raw_bp = raw.copy() raw_bp.filter(4.0 + 0.25, 8.0 - 0.25, picks=picks) raw_bs = raw.copy() raw_bs.filter(8.0 + 0.25, 4.0 - 0.25, picks=picks, n_jobs=2) data, _ = raw[picks, :] lp_data, _ = raw_lp[picks, :] hp_data, _ = raw_hp[picks, :] bp_data, _ = raw_bp[picks, :] bs_data, _ = raw_bs[picks, :] <API key>(data, lp_data + bp_data + hp_data, sig_dec) <API key>(data, bp_data + bs_data, sig_dec) raw_lp_iir = raw.copy() raw_lp_iir.filter(0., 4.0, picks=picks, n_jobs=2, method='iir') raw_hp_iir = raw.copy() raw_hp_iir.filter(8.0, None, picks=picks, n_jobs=2, method='iir') raw_bp_iir = raw.copy() raw_bp_iir.filter(4.0, 8.0, picks=picks, method='iir') lp_data_iir, _ = raw_lp_iir[picks, :] hp_data_iir, _ = raw_hp_iir[picks, :] bp_data_iir, _ = raw_bp_iir[picks, :] summation = lp_data_iir + hp_data_iir + bp_data_iir <API key>(data[:, 100:-100], summation[:, 100:-100], sig_dec) # make sure we didn't touch other channels data, _ = raw[picks_meg[4:], :] bp_data, _ = raw_bp[picks_meg[4:], :] assert_array_equal(data, bp_data) bp_data_iir, _ = raw_bp_iir[picks_meg[4:], :] assert_array_equal(data, bp_data_iir) # do a very simple check on line filtering raw_bs = raw.copy() with warnings.catch_warnings(record=True): warnings.simplefilter('always') raw_bs.filter(60.0 + 0.5, 60.0 - 0.5, picks=picks, n_jobs=2) data_bs, _ = raw_bs[picks, :] raw_notch = raw.copy() raw_notch.notch_filter(60.0, picks=picks, n_jobs=2, method='fft') data_notch, _ = raw_notch[picks, :] <API key>(data_bs, data_notch, sig_dec_notch) # now use the sinusoidal fitting raw_notch = raw.copy() raw_notch.notch_filter(None, picks=picks, n_jobs=2, method='spectrum_fit') data_notch, _ = raw_notch[picks, :] data, _ = raw[picks, :] <API key>(data, data_notch, sig_dec_notch_fit) @testing.<API key> def test_crop(): """Test cropping raw files """ # split a concatenated file to test a difficult case raw = Raw([fif_fname, fif_fname], preload=False) split_size = 10. # in seconds sfreq = raw.info['sfreq'] nsamp = (raw.last_samp - raw.first_samp + 1) # do an annoying case (off-by-one splitting) tmins = np.r_[1., np.round(np.arange(0., nsamp - 1, split_size * sfreq))] tmins = np.sort(tmins) tmaxs = np.concatenate((tmins[1:] - 1, [nsamp - 1])) tmaxs /= sfreq tmins /= sfreq raws = [None] * len(tmins) for ri, (tmin, tmax) in enumerate(zip(tmins, tmaxs)): raws[ri] = raw.crop(tmin, tmax, True) all_raw_2 = concatenate_raws(raws, preload=False) assert_equal(raw.first_samp, all_raw_2.first_samp) assert_equal(raw.last_samp, all_raw_2.last_samp) assert_array_equal(raw[:, :][0], all_raw_2[:, :][0]) tmins = np.round(np.arange(0., nsamp - 1, split_size * sfreq)) tmaxs = np.concatenate((tmins[1:] - 1, [nsamp - 1])) tmaxs /= sfreq tmins /= sfreq # going in revere order so the last fname is the first file (need it later) raws = [None] * len(tmins) for ri, (tmin, tmax) in enumerate(zip(tmins, tmaxs)): raws[ri] = raw.copy() raws[ri].crop(tmin, tmax, False) # test concatenation of split file all_raw_1 = concatenate_raws(raws, preload=False) all_raw_2 = raw.crop(0, None, True) for ar in [all_raw_1, all_raw_2]: assert_equal(raw.first_samp, ar.first_samp) assert_equal(raw.last_samp, ar.last_samp) assert_array_equal(raw[:, :][0], ar[:, :][0]) @testing.<API key> def test_resample(): """Test resample (with I/O and multiple files) """ tempdir = _TempDir() raw = Raw(fif_fname).crop(0, 3, False) raw.preload_data() raw_resamp = raw.copy() sfreq = raw.info['sfreq'] # test parallel on upsample raw_resamp.resample(sfreq * 2, n_jobs=2) assert_equal(raw_resamp.n_times, len(raw_resamp.times)) raw_resamp.save(op.join(tempdir, 'raw_resamp-raw.fif')) raw_resamp = Raw(op.join(tempdir, 'raw_resamp-raw.fif'), preload=True) assert_equal(sfreq, raw_resamp.info['sfreq'] / 2) assert_equal(raw.n_times, raw_resamp.n_times / 2) assert_equal(raw_resamp._data.shape[1], raw_resamp.n_times) assert_equal(raw._data.shape[0], raw_resamp._data.shape[0]) # test non-parallel on downsample raw_resamp.resample(sfreq, n_jobs=1) assert_equal(raw_resamp.info['sfreq'], sfreq) assert_equal(raw._data.shape, raw_resamp._data.shape) assert_equal(raw.first_samp, raw_resamp.first_samp) assert_equal(raw.last_samp, raw.last_samp) # upsampling then downsampling doubles resampling error, but this still # works (hooray). Note that the stim channels had to be sub-sampled # without filtering to be accurately preserved # note we have to treat MEG and EEG+STIM channels differently (tols) assert_allclose(raw._data[:306, 200:-200], raw_resamp._data[:306, 200:-200], rtol=1e-2, atol=1e-12) assert_allclose(raw._data[306:, 200:-200], raw_resamp._data[306:, 200:-200], rtol=1e-2, atol=1e-7) # now check multiple file support w/resampling, as order of operations # (concat, resample) should not affect our data raw1 = raw.copy() raw2 = raw.copy() raw3 = raw.copy() raw4 = raw.copy() raw1 = concatenate_raws([raw1, raw2]) raw1.resample(10) raw3.resample(10) raw4.resample(10) raw3 = concatenate_raws([raw3, raw4]) assert_array_equal(raw1._data, raw3._data) assert_array_equal(raw1._first_samps, raw3._first_samps) assert_array_equal(raw1._last_samps, raw3._last_samps) assert_array_equal(raw1._raw_lengths, raw3._raw_lengths) assert_equal(raw1.first_samp, raw3.first_samp) assert_equal(raw1.last_samp, raw3.last_samp) assert_equal(raw1.info['sfreq'], raw3.info['sfreq']) @testing.<API key> def test_hilbert(): """Test computation of analytic signal using hilbert """ raw = Raw(fif_fname, preload=True) picks_meg = pick_types(raw.info, meg=True, exclude='bads') picks = picks_meg[:4] raw2 = raw.copy() raw.apply_hilbert(picks) raw2.apply_hilbert(picks, envelope=True, n_jobs=2) env = np.abs(raw._data[picks, :]) assert_allclose(env, raw2._data[picks, :], rtol=1e-2, atol=1e-13) @testing.<API key> def test_raw_copy(): """Test Raw copy """ raw = Raw(fif_fname, preload=True) data, _ = raw[:, :] copied = raw.copy() copied_data, _ = copied[:, :] assert_array_equal(data, copied_data) assert_equal(sorted(raw.__dict__.keys()), sorted(copied.__dict__.keys())) raw = Raw(fif_fname, preload=False) data, _ = raw[:, :] copied = raw.copy() copied_data, _ = copied[:, :] assert_array_equal(data, copied_data) assert_equal(sorted(raw.__dict__.keys()), sorted(copied.__dict__.keys())) @requires_pandas def test_to_data_frame(): """Test raw Pandas exporter""" raw = Raw(test_fif_fname, preload=True) _, times = raw[0, :10] df = raw.to_data_frame() assert_true((df.columns == raw.ch_names).all()) assert_array_equal(np.round(times * 1e3), df.index.values[:10]) df = raw.to_data_frame(index=None) assert_true('time' in df.index.names) assert_array_equal(df.values[:, 0], raw._data[0] * 1e13) assert_array_equal(df.values[:, 2], raw._data[2] * 1e15) @testing.<API key> def <API key>(): """ Test index as time conversion""" raw = Raw(fif_fname, preload=True) t0 = raw.index_as_time([0], True)[0] t1 = raw.index_as_time([100], False)[0] t2 = raw.index_as_time([100], True)[0] assert_equal(t2 - t1, t0) # ensure we can go back and forth t3 = raw.index_as_time(raw.time_as_index([0], True), True) <API key>(t3, [0.0], 2) t3 = raw.index_as_time(raw.time_as_index(raw.info['sfreq'], True), True) <API key>(t3, [raw.info['sfreq']], 2) t3 = raw.index_as_time(raw.time_as_index(raw.info['sfreq'], False), False) <API key>(t3, [raw.info['sfreq']], 2) i0 = raw.time_as_index(raw.index_as_time([0], True), True) assert_equal(i0[0], 0) i1 = raw.time_as_index(raw.index_as_time([100], True), True) assert_equal(i1[0], 100) # Have to add small amount of time because we truncate via int casting i1 = raw.time_as_index(raw.index_as_time([100.0001], False), False) assert_equal(i1[0], 100) @testing.<API key> def <API key>(): """ Test time as index conversion""" raw = Raw(fif_fname, preload=True) first_samp = raw.time_as_index([0], True)[0] assert_equal(raw.first_samp, -first_samp) @testing.<API key> def test_save(): """ Test saving raw""" tempdir = _TempDir() raw = Raw(fif_fname, preload=False) # can't write over file being read assert_raises(ValueError, raw.save, fif_fname) raw = Raw(fif_fname, preload=True) # can't overwrite file without overwrite=True assert_raises(IOError, raw.save, fif_fname) # test abspath support new_fname = op.join(op.abspath(op.curdir), 'break-raw.fif') raw.save(op.join(tempdir, new_fname), overwrite=True) new_raw = Raw(op.join(tempdir, new_fname), preload=False) assert_raises(ValueError, new_raw.save, new_fname) # make sure we can overwrite the file we loaded when preload=True new_raw = Raw(op.join(tempdir, new_fname), preload=True) new_raw.save(op.join(tempdir, new_fname), overwrite=True) os.remove(new_fname) @testing.<API key> def test_with_statement(): """ Test with statement """ for preload in [True, False]: with Raw(fif_fname, preload=preload) as raw_: print(raw_) def <API key>(): """Test Raw compensation """ tempdir = _TempDir() raw1 = Raw(ctf_comp_fname, compensation=None) assert_true(raw1.comp is None) data1, times1 = raw1[:, :] raw2 = Raw(ctf_comp_fname, compensation=3) data2, times2 = raw2[:, :] assert_true(raw2.comp is None) # unchanged (data come with grade 3) assert_array_equal(times1, times2) assert_array_equal(data1, data2) raw3 = Raw(ctf_comp_fname, compensation=1) data3, times3 = raw3[:, :] assert_true(raw3.comp is not None) assert_array_equal(times1, times3) # make sure it's different with a different compensation: assert_true(np.mean(np.abs(data1 - data3)) > 1e-12) assert_raises(ValueError, Raw, ctf_comp_fname, compensation=33) # Try IO with compensation temp_file = op.join(tempdir, 'raw.fif') raw1.save(temp_file, overwrite=True) raw4 = Raw(temp_file) data4, times4 = raw4[:, :] assert_array_equal(times1, times4) assert_array_equal(data1, data4) # Now save the file that has modified compensation # and make sure we can the same data as input ie. compensation # is undone raw3.save(temp_file, overwrite=True) raw5 = Raw(temp_file) data5, times5 = raw5[:, :] assert_array_equal(times1, times5) assert_allclose(data1, data5, rtol=1e-12, atol=1e-22) @requires_mne def <API key>(): """Test Raw compensation by comparing with MNE """ tempdir = _TempDir() def compensate_mne(fname, grad): tmp_fname = op.join(tempdir, 'mne_ctf_test_raw.fif') cmd = ['mne_process_raw', '--raw', fname, '--save', tmp_fname, '--grad', str(grad), '--projoff', '--filteroff'] run_subprocess(cmd) return Raw(tmp_fname, preload=True) for grad in [0, 2, 3]: raw_py = Raw(ctf_comp_fname, preload=True, compensation=grad) raw_c = compensate_mne(ctf_comp_fname, grad) assert_allclose(raw_py._data, raw_c._data, rtol=1e-6, atol=1e-17) @testing.<API key> def <API key>(): """Test channels-dropping functionality """ raw = Raw(fif_fname, preload=True) drop_ch = raw.ch_names[:3] ch_names = raw.ch_names[3:] ch_names_orig = raw.ch_names dummy = raw.drop_channels(drop_ch, copy=True) assert_equal(ch_names, dummy.ch_names) assert_equal(ch_names_orig, raw.ch_names) assert_equal(len(ch_names_orig), raw._data.shape[0]) raw.drop_channels(drop_ch) assert_equal(ch_names, raw.ch_names) assert_equal(len(ch_names), len(raw._cals)) assert_equal(len(ch_names), raw._data.shape[0]) @testing.<API key> def <API key>(): """Test channel-picking functionality """ # preload is True raw = Raw(fif_fname, preload=True) ch_names = raw.ch_names[:3] ch_names_orig = raw.ch_names dummy = raw.pick_channels(ch_names, copy=True) # copy is True assert_equal(ch_names, dummy.ch_names) assert_equal(ch_names_orig, raw.ch_names) assert_equal(len(ch_names_orig), raw._data.shape[0]) raw.pick_channels(ch_names, copy=False) # copy is False assert_equal(ch_names, raw.ch_names) assert_equal(len(ch_names), len(raw._cals)) assert_equal(len(ch_names), raw._data.shape[0]) raw = Raw(fif_fname, preload=False) assert_raises(RuntimeError, raw.pick_channels, ch_names) assert_raises(RuntimeError, raw.drop_channels, ch_names) @testing.<API key> def <API key>(): """Test equalization of channels """ raw1 = Raw(fif_fname, preload=True) raw2 = raw1.copy() ch_names = raw1.ch_names[2:] raw1.drop_channels(raw1.ch_names[:1]) raw2.drop_channels(raw2.ch_names[1:2]) my_comparison = [raw1, raw2] equalize_channels(my_comparison) for e in my_comparison: assert_equal(ch_names, e.ch_names) run_tests_if_main()
# -*- coding: utf-8 -*- REPO_BACKENDS = {} REPO_TYPES = [] class <API key>(Exception): pass try: from brigitte.backends import libgit REPO_BACKENDS['git'] = libgit.Repo REPO_TYPES.append(('git', 'GIT')) except ImportError: from brigitte.backends import git REPO_BACKENDS['git'] = git.Repo REPO_TYPES.append(('git', 'GIT')) try: from brigitte.backends import hg REPO_BACKENDS['hg'] = hg.Repo REPO_TYPES.append(('hg', 'Mercurial')) except ImportError: pass def get_backend(repo_type): if not repo_type in REPO_BACKENDS: raise <API key>(repo_type) return REPO_BACKENDS[repo_type]
result = { arrow = () => {} } = vals;
<?php use yii\bootstrap\Modal; use yii\helpers\Url; $this->title = ''; ?> <div class="dis-bread"><a href="/"></a>><a href="/cms/default/index"></a>><a href="/cms/push/index" class="bolde"></a></div> <div class="dis-main dis-mainnr" style="height:900px;"> <div class="d-titr"><a href="/cms/push/index"></a><h3> -- </h3></div> <form class="edito clinic" id="from1" name="from1" action="/cms/push/edit" method="post"> <div> <label><span>*</span></label> <select class="level levc" id="client" name="client"> <option value="" name="client" ></option> <option value="0" name="client" <?php if($data['client'] =='0'){echo'selected';}?>></option> <option value="1" name="client" <?php if($data['client'] =='1'){echo'selected';}?>></option> <option value="2" name="client" <?php if($data['client'] =='2'){echo'selected';}?>></option> </select> </div> <div> <label><span>*</span></label> <textarea class="woro" style="height:70px;width: 770px;" id="body" name="body" value=""><?php echo $data['body'];?></textarea> </div> <div> <label><span>*</span></label> <input type="text" class="txco" id="url" name="url" placeholder="" value="<?php echo $data['url']?>" style="width:640px;"> </div> <div> <label><span>*</span></label> <input type="text" name="pushtime" id="pushtime" class="mh_date" value="<?php echo date('Y-m-d H:i:s',$data['pushtime']);?>" style="width:180px;"> </div> <div class="d-heir"></div> <input type="hidden" value="<?php echo $data['id'];?>" name="id"> <div class="savew"><a href="javascript:void(0);" id="submit"></a></div> </form> </div> <script> $("#submit").click(function(){ var client = $("#client").val(); var body = $("#body").val(); var url = $("#url").val(); if(client==''){ alert(':\n'); return false; } if(body==''){ alert(':\n'); return false; } if(url==''){ alert(':\'); return false; } $('#from1').submit(); }); </script> <link rel="stylesheet" type="text/css" href="<?php echo Url::to('@domain/js/datetimepicker/jquery.datetimepicker.css')?>" /> <script src="<?php echo Url::to('@domain/js/datetimepicker/jquery.datetimepicker.js')?>"></script> <script> $(function(){ $('#pushtime').datetimepicker({ lang:'ch', format:'Y-m-d H:i:s', }); }); </script>
#!/usr/bin/python # -*- coding: utf-8 -*- # GEO: N55.703431,E37.623324 .. N48.742359,E44.536997 # modification, are permitted provided that the following conditions # are met: # documentation and/or other materials provided with the distribution. # 4. Neither the name of the Pyhrol nor the names of its contributors # may be used to endorse or promote products derived from this software # THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. import example_0050 try: example_0050.<API key>() except TypeError as ex: print '***', ex try: example_0050.<API key>(arg1 = 1) except TypeError as ex: print '***', ex example_0050.<API key>(counter = 1, description = "One") example_0050.<API key>(description = "Two", counter = 2)
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin from django.views.generic import TemplateView admin.autodiscover() urlpatterns = patterns('', (r'^accounts/', include('registration.urls')), url(r'^admin_tools/', include('admin_tools.urls')), (r'^admin/', include(admin.site.urls)), url(r'^users/(?P<username>\w+)/$', view='examples.views.userprofile', name='<API key>'), url(r'^users/(?P<username>\w+)/edit/$', view='examples.views.userprofile_edit', name='<API key>'), # example app's urls (r'^', include('examples.urls')), )
import * as React from 'react' import * as ConfigGen from '../actions/config-gen' import * as SettingsGen from '../actions/settings-gen' import * as Constants from '../constants/settings' import * as RouteTreeGen from '../actions/route-tree-gen' import SettingsContainer from './render' import * as Container from '../util/container' type OwnProps = { children: React.ReactNode routeSelected: Constants.SettingsTab } const Connected = Container.connect( (state: Container.TypedState) => ({ _badgeNumbers: state.notifications.navBadges, <API key>: state.settings.contacts.importEnabled, <API key>: state.wallets.acceptedDisclaimer, badgeNotifications: !state.push.hasPermissions, hasRandomPW: state.settings.password.randomPW, logoutInProgress: state.config.<API key>.size > 0, }), (dispatch: Container.TypedDispatch, ownProps: OwnProps) => ({ loadHasRandomPW: () => dispatch(SettingsGen.<API key>()), onLogout: () => dispatch(ConfigGen.createLogout()), onTabChange: (tab: Constants.SettingsTab, <API key>: boolean) => { if (tab === Constants.walletsTab && !<API key>) { dispatch(RouteTreeGen.<API key>({path: ['walletOnboarding']})) return } if (ownProps.routeSelected === Constants.accountTab && tab !== Constants.accountTab) { dispatch(SettingsGen.<API key>()) } dispatch(RouteTreeGen.<API key>({path: [tab]})) }, }), (stateProps, dispatchProps, ownProps: OwnProps) => ({ badgeNotifications: stateProps.badgeNotifications, badgeNumbers: stateProps._badgeNumbers, children: ownProps.children, contactsLabel: stateProps.<API key> ? 'Phone contacts' : 'Import phone contacts', hasRandomPW: stateProps.hasRandomPW || undefined, loadHasRandomPW: dispatchProps.loadHasRandomPW, logoutInProgress: stateProps.logoutInProgress, onLogout: dispatchProps.onLogout, onTabChange: (tab: Constants.SettingsTab) => dispatchProps.onTabChange(tab, stateProps.<API key>), selectedTab: ownProps.routeSelected, }) )(SettingsContainer) export default Connected
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model backend\models\BuscarSolicitudes */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="solicitudes-search"> <?php $form = ActiveForm::begin([ 'action' => ['index'], 'method' => 'get', ]); ?> <?= $form->field($model, 'id') ?> <?= $form->field($model, 'titulo') ?> <?= $form->field($model, 'fecha') ?> <?= $form->field($model, 'solicitante') ?> <?= $form->field($model, 'monto') ?> <?php // echo $form->field($model, 'comentario') ?> <?php // echo $form->field($model, 'usuario') ?> <?php // echo $form->field($model, 'fecha_actualizacion') ?> <div class="form-group"> <?= Html::submitButton(Yii::t('solicitudes', 'Search'), ['class' => 'btn btn-primary']) ?> <?= Html::resetButton(Yii::t('solicitudes', 'Reset'), ['class' => 'btn btn-default']) ?> </div> <?php ActiveForm::end(); ?> </div>
# Doxyfile 1.8.9.1 # This file describes the settings to be used by the documentation system # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). # Project related configuration options # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = "GRPC C++" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = 0.15.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = doc/ref/c++ # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the <API key> tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. <API key> = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = YES # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The <API key> tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. <API key> = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the <API key> tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. <API key> = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 2 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the <API key> tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. <API key> = YES # Set the <API key> tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. <API key> = NO # Set the <API key> tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. <API key> = NO # Set the <API key> tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. <API key> = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # Note: For files without extension you can use no_extension as a placeholder. # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. <API key> = YES # If member grouping is used in the documentation and the <API key> # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. <API key> = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the <API key> tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # Note that this feature does not work in combination with # <API key>. # The default value is: NO. <API key> = NO # When the <API key> tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. <API key> = NO # When <API key> tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. <API key> = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 # Build related configuration options # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = NO # If the <API key> tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. <API key> = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. <API key> = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. <API key> = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the <API key> tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. <API key> = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the <API key> tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. <API key>= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the <API key> tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. <API key> = NO # If the <API key> tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. <API key> = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the <API key> tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. <API key> = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the <API key> option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling <API key> doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. <API key> = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # The default value is: YES. GENERATE_BUGLIST = YES # The <API key> tag can be used to enable (YES) or disable (NO) # the documentation. # The default value is: YES. <API key>= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if <section_label> ... \endif and \cond <section_label> # ... \endcond blocks. ENABLED_SECTIONS = # The <API key> tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. <API key> = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = # Configuration options related to warning and progress messages # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the <API key> tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. <API key> = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = # Configuration options related to the input files # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. # Note: If this tag is empty the current directory is searched. INPUT = include/grpc++/alarm.h \ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ include/grpc++/create_channel.h \ include/grpc++/<API key>.h \ include/grpc++/generic/<API key>.h \ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/codegen/core_codegen.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/<API key>.h \ include/grpc++/impl/<API key>.h \ include/grpc++/impl/<API key>.h \ include/grpc++/impl/server_initializer.h \ include/grpc++/impl/service_type.h \ include/grpc++/impl/sync.h \ include/grpc++/impl/sync_cxx11.h \ include/grpc++/impl/sync_no_cxx11.h \ include/grpc++/impl/thd.h \ include/grpc++/impl/thd_cxx11.h \ include/grpc++/impl/thd_no_cxx11.h \ include/grpc++/security/auth_context.h \ include/grpc++/security/<API key>.h \ include/grpc++/security/credentials.h \ include/grpc++/security/server_credentials.h \ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ include/grpc++/server_posix.h \ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ include/grpc++/support/channel_arguments.h \ include/grpc++/support/config.h \ include/grpc++/support/slice.h \ include/grpc++/support/status.h \ include/grpc++/support/status_code_enum.h \ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ include/grpc++/impl/codegen/call_hook.h \ include/grpc++/impl/codegen/channel_interface.h \ include/grpc++/impl/codegen/client_context.h \ include/grpc++/impl/codegen/client_unary_call.h \ include/grpc++/impl/codegen/completion_queue.h \ include/grpc++/impl/codegen/<API key>.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/<API key>.h \ include/grpc++/impl/codegen/create_auth_context.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ include/grpc++/impl/codegen/rpc_method.h \ include/grpc++/impl/codegen/rpc_service_method.h \ include/grpc++/impl/codegen/security/auth_context.h \ include/grpc++/impl/codegen/<API key>.h \ include/grpc++/impl/codegen/server_context.h \ include/grpc++/impl/codegen/server_interface.h \ include/grpc++/impl/codegen/service_type.h \ include/grpc++/impl/codegen/status.h \ include/grpc++/impl/codegen/status_code_enum.h \ include/grpc++/impl/codegen/string_ref.h \ include/grpc++/impl/codegen/stub_options.h \ include/grpc++/impl/codegen/sync.h \ include/grpc++/impl/codegen/sync_cxx11.h \ include/grpc++/impl/codegen/sync_no_cxx11.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank the # following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, # *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, # *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, # *.qsf, *.as and *.js. FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # <filter> <input-file> # where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The <API key> tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. <API key> = # If the <API key> tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. <API key> = # Configuration options related to source browsing # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the <API key> tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. <API key> = NO # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = NO # If the <API key> tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # <API key> lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. <API key> = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # 4.8.6 or higher. # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # Configuration options related to the alphabetical class index # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = YES # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = # Configuration options related to the HTML output # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use <API key> instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The <API key> tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. <API key> = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The <API key> tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. <API key> = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to NO can help when comparing the output of multiple runs. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES # If the <API key> tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. <API key> = NO # With <API key> one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. <API key> = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The <API key> tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. <API key> = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # Windows. # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the <API key> tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # filters). # This tag requires that the tag GENERATE_QHP is set to YES. <API key> = # The <API key> tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # filters). # This tag requires that the tag GENERATE_QHP is set to YES. <API key> = # The <API key> tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # This tag requires that the tag GENERATE_QHP is set to YES. <API key> = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the <API key> tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. <API key> = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag <API key> is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see <API key>) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The <API key> tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. <API key> = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use <access key> + S # (what the <access key> is depends on the OS and browser, but it is typically # <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down # key> to jump into the search results window, the results can be navigated # using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel # the search. The filter options can be selected when the cursor is inside the # search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> # to select a filter and <Enter> or <escape> to activate or cancel the filter # option. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing # and searching needs to be provided by external tools. See the section # "External Indexing and Searching" for details. # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. SERVER_BASED_SEARCH = NO # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP # script for searching. Instead the search results are written to an XML file # which needs to be processed by an external indexer. Doxygen will invoke an # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # See the section "External Indexing and Searching" for details. # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the # SEARCHDATA_FILE tag the name of this file can be specified. # The default file is: searchdata.xml. # This tag requires that the tag SEARCHENGINE is set to YES. SEARCHDATA_FILE = searchdata.xml # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is # useful in combination with <API key> to search through multiple # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. EXTERNAL_SEARCH_ID = # The <API key> tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are # all added to the same external search index. Each project needs to have a # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of # to a relative location where the documentation can be found. The format is: # <API key> = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. <API key> = # Configuration options related to the LaTeX output # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # The default directory is: latex. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. # Note that when enabling USE_PDFLATEX this option is only used for generating # bitmaps for formulas in the HTML output, but not in the Makefile that is # written to the output directory. # The default file is: latex. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. # The default file is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used by the # printer. # 14 inches) and executive (7.25 x 10.5 inches). # The default value is: a4. # This tag requires that the tag GENERATE_LATEX is set to YES. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names # that should be included in the LaTeX output. To get the times font for # instance you can specify # EXTRA_PACKAGES=times # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first # chapter. If it is left blank doxygen will generate a standard header. See # section "Doxygen usage" for information on how to let doxygen write the # default header to a separate file. # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, # $projectbrief, $projectlogo. Doxygen will replace $title with the empty # string, for the replacement values of the other commands the user is referred # to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last # chapter. If it is left blank doxygen will generate a standard footer. See # LATEX_HEADER for more information on how to generate a default footer and what # special commands can be used inside the footer. # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_FOOTER = # The <API key> tag can be used to specify additional user-defined # LaTeX style sheets that are included after the standard style sheets created # by doxygen. Using this option one can overrule certain style aspects. Doxygen # will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). # This tag requires that the tag GENERATE_LATEX is set to YES. <API key> = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will # contain links (just like the HTML output) instead of page references. This # makes the output suitable for online browsing using a PDF viewer. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate # the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode # command to the generated LaTeX files. This will instruct LaTeX to keep running # if errors occur, instead of asking the user for help. This option is also used # when generating formulas in HTML. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_BATCHMODE = NO # If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the # index chapters (such as File Index, Compound Index, etc.) in the output. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HIDE_INDICES = NO # If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source # code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings such as # SOURCE_BROWSER. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_BIB_STYLE = plain # Configuration options related to the RTF output # If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # The default directory is: rtf. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. # This tag requires that the tag GENERATE_RTF is set to YES. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will # contain hyperlink fields. The RTF file will contain links (just like the HTML # output) instead of page references. This makes the output suitable for online # browsing using Word or some other Word compatible readers that support those # fields. # Note: WordPad (write) and others do not support links. # The default value is: NO. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's config # file, i.e. a series of assignments. You only have to provide replacements, # missing definitions are set to their default value. # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_EXTENSIONS_FILE = # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code # with syntax highlighting in the RTF output. # Note that which sources are shown also depends on other settings such as # SOURCE_BROWSER. # The default value is: NO. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_SOURCE_CODE = NO # Configuration options related to the man page output # If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. A directory man3 will be created inside the directory specified by # MAN_OUTPUT. # The default directory is: man. # This tag requires that the tag GENERATE_MAN is set to YES. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to the generated # man pages. In case the manual section does not start with a number, the number # 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is # optional. # The default value is: .3. # This tag requires that the tag GENERATE_MAN is set to YES. MAN_EXTENSION = .3 # The MAN_SUBDIR tag determines the name of the directory created within # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by # MAN_EXTENSION with the initial . removed. # This tag requires that the tag GENERATE_MAN is set to YES. MAN_SUBDIR = # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real # man page(s). These additional files only source the real man page, but without # them the man command would be unable to find the correct page. # The default value is: NO. # This tag requires that the tag GENERATE_MAN is set to YES. MAN_LINKS = NO # Configuration options related to the XML output # If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # The default directory is: xml. # This tag requires that the tag GENERATE_XML is set to YES. XML_OUTPUT = xml # If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. # The default value is: YES. # This tag requires that the tag GENERATE_XML is set to YES. XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output # If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. GENERATE_DOCBOOK = NO # The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be put in # front of it. # The default directory is: docbook. # This tag requires that the tag GENERATE_DOCBOOK is set to YES. DOCBOOK_OUTPUT = docbook # If the <API key> tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. # The default value is: NO. # This tag requires that the tag GENERATE_DOCBOOK is set to YES. <API key> = NO # Configuration options for the AutoGen Definitions output # If the <API key> tag is set to YES, doxygen will generate an # structure of the code including all documentation. Note that this feature is # still experimental and incomplete at the moment. # The default value is: NO. <API key> = NO # Configuration options related to the Perl module output # If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # Note that this feature is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. # This tag requires that the tag GENERATE_PERLMOD is set to YES. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to # understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. # This tag requires that the tag GENERATE_PERLMOD is set to YES. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file are # prefixed with the string contained in <API key>. This is useful # so different doxyrules.make files included by the same Makefile don't # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. <API key> = # Configuration options related to the preprocessor # If the <API key> tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. <API key> = YES # If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names # in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. # This tag requires that the tag <API key> is set to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then # the macro expansion is limited to the macros specified with the PREDEFINED and # EXPAND_AS_DEFINED tags. # The default value is: NO. # This tag requires that the tag <API key> is set to YES. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag <API key> is set to YES. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by the # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. INCLUDE_PATH = # You can use the <API key> tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will be # used. # This tag requires that the tag <API key> is set to YES. <API key> = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. # gcc). The argument of the tag is a list of macros of the form: name or # name=definition (no spaces). If the definition and the "=" are omitted, "=1" # is assumed. To prevent a macro definition from being undefined via #undef or # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag <API key> is set to YES. PREDEFINED = GRPC_FINAL= GRPC_OVERIDE= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The # macro definition that is found in the sources will be used. Use the PREDEFINED # tag if you want to use a different macro definition that overrules the # definition found in the source code. # This tag requires that the tag <API key> is set to YES. EXPAND_AS_DEFINED = # If the <API key> tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have # an all uppercase name, and do not end with a semicolon. Such function macros # are typically used for boiler-plate code, and will confuse the parser if not # removed. # The default value is: YES. # This tag requires that the tag <API key> is set to YES. <API key> = YES # Configuration options related to external references # The TAGFILES tag can be used to specify one or more tag files. For each tag # file the location of the external documentation should be added. The format of # a tag file without this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where loc1 and loc2 can be relative or absolute paths or URLs. See the # section "Linking to external documentation" for more information about the use # of tag files. # Note: Each tag file must have a unique name (where the name does NOT include # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be # listed. # The default value is: NO. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed # in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES # If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. EXTERNAL_PAGES = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of 'which perl'). # The default file (with absolute path) is: /usr/bin/perl. PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool # If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more # powerful graphs. # The default value is: YES. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see: # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. DIA_PATH = # If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. <API key> = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz (see: # Bell Labs. The other options in this section have no effect if this option is # set to NO # The default value is: NO. HAVE_DOT = YES # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed # to run in parallel. When set to 0 doxygen will base this on the number of # processors available in the system. You can set it explicitly to a value # larger than 0 to get control over the balance between CPU load and processing # speed. # Minimum value: 0, maximum value: 32, default value: 0. # This tag requires that the tag HAVE_DOT is set to YES. DOT_NUM_THREADS = 0 # When you want a differently looking font in the dot files that doxygen # generates you can specify the font name using DOT_FONTNAME. You need to make # sure dot is able to find the font, which can be done by putting it in a # standard location or by setting the DOTFONTPATH environment variable or by # setting DOT_FONTPATH to the directory containing the font. # The default value is: Helvetica. # This tag requires that the tag HAVE_DOT is set to YES. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size (in points) of the font of # dot graphs. # Minimum value: 4, maximum value: 24, default value: 10. # This tag requires that the tag HAVE_DOT is set to YES. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the default font as specified with # DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. # Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. CLASS_GRAPH = NO # If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a # graph for each documented class showing the direct and indirect implementation # dependencies (inheritance, containment, and class references variables) of the # class with other documented classes. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. COLLABORATION_GRAPH = NO # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for # groups, showing the direct groups dependencies. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. GROUP_GRAPHS = NO # If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside the # class node. If there are many fields or methods and many nodes the graph may # become too big to be useful. The <API key> threshold limits the # number of items for each type to make the size more manageable. Set this to 0 # for no limit. Note that the threshold may be exceeded by 50% before the limit # is enforced. So when you set the threshold to 10, up to 15 fields may appear, # but if the number exceeds 15, the total amount of fields shown is limited to # Minimum value: 0, maximum value: 100, default value: 10. # This tag requires that the tag HAVE_DOT is set to YES. <API key> = 10 # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and # collaboration graphs will show the relations between templates and their # instances. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. TEMPLATE_RELATIONS = NO # If the INCLUDE_GRAPH, <API key> and SEARCH_INCLUDES tags are set to # YES then doxygen will generate a graph for each documented file showing the # direct and indirect include dependencies of the file with other documented # files. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. INCLUDE_GRAPH = NO # If the INCLUDED_BY_GRAPH, <API key> and SEARCH_INCLUDES tags are # set to YES then doxygen will generate a graph for each documented file showing # the direct and indirect include dependencies of the file with other documented # files. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. INCLUDED_BY_GRAPH = NO # If the CALL_GRAPH tag is set to YES then doxygen will generate a call # dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. CALL_GRAPH = NO # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller # dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical # hierarchy of all classes instead of a textual one. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. GRAPHICAL_HIERARCHY = NO # If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the # dependencies a directory has on other directories in a graphical way. The # dependency relations are determined by the #include relations between the # files in the directories. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). # Possible values are: png, jpg, gif and svg. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. Tested # and working are Firefox, Chrome, Safari, and Opera. # Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make # the SVG files visible. Older versions of IE do not have SVG support. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. INTERACTIVE_SVG = NO # The DOT_PATH tag can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # path where java can find the plantuml.jar file. If left blank, it is assumed # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. PLANTUML_JAR_PATH = # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. <API key> = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized # by representing a node as a red box. Note that doxygen if the number of direct # children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that # the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. # Minimum value: 0, maximum value: 10000, default value: 50. # This tag requires that the tag HAVE_DOT is set to YES. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs # generated by dot. A depth value of 3 means that only nodes reachable from the # root by following a path via at most 3 edges will be shown. Nodes that lay # further from the root node will be omitted. Note that setting this option to 1 # or 2 may greatly reduce the computation time needed for large code bases. Also # note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. # Minimum value: 0, maximum value: 1000, default value: 0. # This tag requires that the tag HAVE_DOT is set to YES. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not seem # to support this out of the box. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page # explaining the meaning of the various boxes and arrows in the dot generated # graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. DOT_CLEANUP = YES
# -*- coding: utf-8 -*- """Test the various population analyses (MPA, LPA, CSPA) in cclib""" from __future__ import print_function import sys import os import logging import unittest import numpy sys.path.append("..") from test_data import getdatafile from cclib.method import MPA, LPA, CSPA from cclib.parser import Gaussian class GaussianMPATest(unittest.TestCase): """Mulliken Population Analysis test""" def setUp(self): self.data, self.logfile = getdatafile(Gaussian, "basicGaussian03", "dvb_un_sp.out") self.analysis = MPA(self.data) self.analysis.logger.setLevel(0) self.analysis.calculate() def testsumcharges(self): """Do the Mulliken charges sum up to the total formal charge?""" formalcharge = sum(self.data.atomnos) - self.data.charge totalpopulation = sum(self.analysis.fragcharges) self.assertAlmostEqual(totalpopulation, formalcharge, delta=1.0e-3) def testsumspins(self): """Do the Mulliken spins sum up to the total formal spin?""" formalspin = self.data.homos[0] - self.data.homos[1] totalspin = sum(self.analysis.fragspins) self.assertAlmostEqual(totalspin, formalspin, delta=1.0e-3) class GaussianLPATest(unittest.TestCase): """Lowdin Population Analysis test""" def setUp(self): self.data, self.logfile = getdatafile(Gaussian, "basicGaussian03", "dvb_un_sp.out") self.analysis = LPA(self.data) self.analysis.logger.setLevel(0) self.analysis.calculate() def testsumcharges(self): """Do the Lowdin charges sum up to the total formal charge?""" formalcharge = sum(self.data.atomnos) - self.data.charge totalpopulation = sum(self.analysis.fragcharges) self.assertAlmostEqual(totalpopulation, formalcharge, delta=0.001) def testsumspins(self): """Do the Lowdin spins sum up to the total formal spin?""" formalspin = self.data.homos[0] - self.data.homos[1] totalspin = sum(self.analysis.fragspins) self.assertAlmostEqual(totalspin, formalspin, delta=1.0e-3) class GaussianCSPATest(unittest.TestCase): """C-squared Population Analysis test""" def setUp(self): self.data, self.logfile = getdatafile(Gaussian, "basicGaussian03", "dvb_un_sp.out") self.analysis = CSPA(self.data) self.analysis.logger.setLevel(0) self.analysis.calculate() def testsumcharges(self): """Do the CSPA charges sum up to the total formal charge?""" formalcharge = sum(self.data.atomnos) - self.data.charge totalpopulation = sum(self.analysis.fragcharges) self.assertAlmostEqual(totalpopulation, formalcharge, delta=1.0e-3) def testsumspins(self): """Do the CSPA spins sum up to the total formal spin?""" formalspin = self.data.homos[0] - self.data.homos[1] totalspin = sum(self.analysis.fragspins) self.assertAlmostEqual(totalspin, formalspin, delta=1.0e-3) tests = [GaussianMPATest, GaussianLPATest, GaussianCSPATest] if __name__ == "__main__": for test in tests: thistest = unittest.makeSuite(test) unittest.TextTestRunner(verbosity=2).run(thistest)
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>&quot;scheduler/index&quot; | rot.js</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">rot.js</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="<API key>"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="<API key>" checked /> <label class="tsd-widget" for="<API key>">Inherited</label> <input type="checkbox" id="<API key>" checked /> <label class="tsd-widget" for="<API key>">Externals</label> <input type="checkbox" id="<API key>" /> <label class="tsd-widget" for="<API key>">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../index.html">Globals</a> </li> <li> <a href="_scheduler_index_.html">&quot;scheduler/index&quot;</a> </li> </ul> <h1>External module &quot;scheduler/index&quot;</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../index.html"><em>Globals</em></a> </li> <li class="current <API key>"> <a href="_scheduler_index_.html">&quot;scheduler/index&quot;</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="<API key>"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function <API key>"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="<API key>"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> <li class="tsd-kind-type-alias <API key>"><span class="tsd-kind-icon">Type alias with type parameter</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="<API key>"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property <API key>"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method <API key>"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface <API key>"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property <API key>"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method <API key>"><span class="tsd-kind-icon">Method</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class <API key>"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property <API key>"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method <API key>"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor <API key>"><span class="tsd-kind-icon">Accessor</span></li> <li class="<API key> <API key>"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="<API key> <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor <API key> tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property <API key> tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method <API key> tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor <API key> tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property <API key> tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method <API key> tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor <API key> tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property <API key> tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="<API key> <API key> tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
@import url("//fonts.googleapis.com/css?family=Lato:300,400,700"); html { font-family: sans-serif; -ms-text-size-adjust: 100%; -<API key>: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background: transparent; } a:active, a:hover { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } h1 { font-size: 2em; margin: 0.67em 0; } mark { background: #ff0; color: #000; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } pre { overflow: auto; } code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } button, input, optgroup, select, textarea { color: inherit; font: inherit; margin: 0; } button { overflow: visible; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } input { line-height: normal; } input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; } input[type="number"]::-<API key>, input[type="number"]::-<API key> { height: auto; } input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; } input[type="search"]::-<API key>, input[type="search"]::-<API key> { -webkit-appearance: none; } fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } legend { border: 0; padding: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } @media print { * { text-shadow: none !important; color: #000 !important; background: transparent !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } select { background: #fff !important; } .navbar { display: none; } .table td, .table th { background-color: #fff !important; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } @font-face { font-family: 'Glyphicons Halflings'; src: url('bootstrap-3.2.0/fonts/<API key>.eot'); src: url('bootstrap-3.2.0/fonts/<API key>.eot?#iefix') format('embedded-opentype'), url('bootstrap-3.2.0/fonts/<API key>.woff') format('woff'), url('bootstrap-3.2.0/fonts/<API key>.ttf') format('truetype'), url('bootstrap-3.2.0/fonts/<API key>.svg#<API key>') format('svg'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -<API key>: antialiased; -<API key>: grayscale; } .glyphicon-asterisk:before { content: "\2a"; } .glyphicon-plus:before { content: "\2b"; } .glyphicon-euro:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .<API key>:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .<API key>:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .<API key>:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .<API key>:before { content: "\e035"; } .<API key>:before { content: "\e036"; } .<API key>:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .<API key>:before { content: "\e050"; } .<API key>:before { content: "\e051"; } .<API key>:before { content: "\e052"; } .<API key>:before { content: "\e053"; } .<API key>:before { content: "\e054"; } .<API key>:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .<API key>:before { content: "\e057"; } .<API key>:before { content: "\e058"; } .<API key>:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .<API key>:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .<API key>:before { content: "\e069"; } .<API key>:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .<API key>:before { content: "\e076"; } .<API key>:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .<API key>:before { content: "\e079"; } .<API key>:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .<API key>:before { content: "\e082"; } .<API key>:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .<API key>:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .<API key>:before { content: "\e087"; } .<API key>:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .<API key>:before { content: "\e090"; } .<API key>:before { content: "\e091"; } .<API key>:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .<API key>:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .<API key>:before { content: "\e096"; } .<API key>:before { content: "\e097"; } .<API key>:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .<API key>:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .<API key>:before { content: "\e113"; } .<API key>:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .<API key>:before { content: "\e116"; } .<API key>:before { content: "\e117"; } .<API key>:before { content: "\e118"; } .<API key>:before { content: "\e119"; } .<API key>:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .<API key>:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .<API key>:before { content: "\e126"; } .<API key>:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .<API key>:before { content: "\e131"; } .<API key>:before { content: "\e132"; } .<API key>:before { content: "\e133"; } .<API key>:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .<API key>:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .<API key>:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .<API key>:before { content: "\e151"; } .<API key>:before { content: "\e152"; } .<API key>:before { content: "\e153"; } .<API key>:before { content: "\e154"; } .<API key>:before { content: "\e155"; } .<API key>:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .<API key>:before { content: "\e159"; } .<API key>:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .<API key>:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .<API key>:before { content: "\e172"; } .<API key>:before { content: "\e173"; } .<API key>:before { content: "\e174"; } .<API key>:before { content: "\e175"; } .<API key>:before { content: "\e176"; } .<API key>:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .<API key>:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .<API key>:before { content: "\e189"; } .<API key>:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .<API key>:before { content: "\e194"; } .<API key>:before { content: "\e195"; } .<API key>:before { content: "\e197"; } .<API key>:before { content: "\e198"; } .<API key>:before { content: "\e199"; } .<API key>:before { content: "\e200"; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 10px; -<API key>: rgba(0, 0, 0, 0); } body { font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.42857143; color: #ebebeb; background-color: #2b3e50; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #df691a; text-decoration: none; } a:hover, a:focus { color: #df691a; text-decoration: underline; } a:focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } figure { margin: 0; } img { vertical-align: middle; } .img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; width: 100% \9; max-width: 100%; height: auto; } .img-rounded { border-radius: 0; } .img-thumbnail { padding: 4px; line-height: 1.42857143; background-color: #2b3e50; border: 1px solid #dddddd; border-radius: 0; -webkit-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; display: inline-block; width: 100% \9; max-width: 100%; height: auto; } .img-circle { border-radius: 50%; } hr { margin-top: 21px; margin-bottom: 21px; border: 0; border-top: 1px solid #4e5d6c; } .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 300; line-height: 1.1; color: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #ebebeb; } h1, .h1, h2, .h2, h3, .h3 { margin-top: 21px; margin-bottom: 10.5px; } h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small, h1 .small, .h1 .small, h2 .small, .h2 .small, h3 .small, .h3 .small { font-size: 65%; } h4, .h4, h5, .h5, h6, .h6 { margin-top: 10.5px; margin-bottom: 10.5px; } h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small, h4 .small, .h4 .small, h5 .small, .h5 .small, h6 .small, .h6 .small { font-size: 75%; } h1, .h1 { font-size: 39px; } h2, .h2 { font-size: 32px; } h3, .h3 { font-size: 26px; } h4, .h4 { font-size: 19px; } h5, .h5 { font-size: 15px; } h6, .h6 { font-size: 13px; } p { margin: 0 0 10.5px; } .lead { margin-bottom: 21px; font-size: 17px; font-weight: 300; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 22.5px; } } small, .small { font-size: 86%; } cite { font-style: normal; } mark, .mark { background-color: #f0ad4e; padding: .2em; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } .text-justify { text-align: justify; } .text-nowrap { white-space: nowrap; } .text-lowercase { text-transform: lowercase; } .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-muted { color: #4e5d6c; } .text-primary { color: #df691a; } a.text-primary:hover { color: #b15315; } .text-success { color: #ebebeb; } a.text-success:hover { color: #d2d2d2; } .text-info { color: #ebebeb; } a.text-info:hover { color: #d2d2d2; } .text-warning { color: #ebebeb; } a.text-warning:hover { color: #d2d2d2; } .text-danger { color: #ebebeb; } a.text-danger:hover { color: #d2d2d2; } .bg-primary { color: #fff; background-color: #df691a; } a.bg-primary:hover { background-color: #b15315; } .bg-success { background-color: #5cb85c; } a.bg-success:hover { background-color: #449d44; } .bg-info { background-color: #5bc0de; } a.bg-info:hover { background-color: #31b0d5; } .bg-warning { background-color: #f0ad4e; } a.bg-warning:hover { background-color: #ec971f; } .bg-danger { background-color: #d9534f; } a.bg-danger:hover { background-color: #c9302c; } .page-header { padding-bottom: 9.5px; margin: 42px 0 21px; border-bottom: 1px solid #ebebeb; } ul, ol { margin-top: 0; margin-bottom: 10.5px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; list-style: none; margin-left: -5px; } .list-inline > li { display: inline-block; padding-left: 5px; padding-right: 5px; } dl { margin-top: 0; margin-bottom: 21px; } dt, dd { line-height: 1.42857143; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; clear: left; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #4e5d6c; } .initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10.5px 21px; margin: 0 0 21px; font-size: 18.75px; border-left: 5px solid #4e5d6c; } blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child { margin-bottom: 0; } blockquote footer, blockquote small, blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #ebebeb; } blockquote footer:before, blockquote small:before, blockquote .small:before { content: '\2014 \00A0'; } .blockquote-reverse, blockquote.pull-right { padding-right: 15px; padding-left: 0; border-right: 5px solid #4e5d6c; border-left: 0; text-align: right; } .blockquote-reverse footer:before, blockquote.pull-right footer:before, .blockquote-reverse small:before, blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { content: ''; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, .blockquote-reverse small:after, blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } blockquote:before, blockquote:after { content: ""; } address { margin-bottom: 21px; font-style: normal; line-height: 1.42857143; } code, kbd, pre, samp { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 0; } kbd { padding: 2px 4px; font-size: 90%; color: #ffffff; background-color: #333333; border-radius: 0; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); } kbd kbd { padding: 0; font-size: 100%; box-shadow: none; } pre { display: block; padding: 10px; margin: 0 0 10.5px; font-size: 14px; line-height: 1.42857143; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: 1px solid #cccccc; border-radius: 0; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } .container-fluid { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } .row { margin-left: -15px; margin-right: -15px; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666667%; } .col-xs-10 { width: 83.33333333%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666667%; } .col-xs-7 { width: 58.33333333%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666667%; } .col-xs-4 { width: 33.33333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.66666667%; } .col-xs-1 { width: 8.33333333%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666667%; } .col-xs-pull-10 { right: 83.33333333%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666667%; } .col-xs-pull-7 { right: 58.33333333%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666667%; } .col-xs-pull-4 { right: 33.33333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.66666667%; } .col-xs-pull-1 { right: 8.33333333%; } .col-xs-pull-0 { right: auto; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666667%; } .col-xs-push-10 { left: 83.33333333%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666667%; } .col-xs-push-7 { left: 58.33333333%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666667%; } .col-xs-push-4 { left: 33.33333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.66666667%; } .col-xs-push-1 { left: 8.33333333%; } .col-xs-push-0 { left: auto; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666667%; } .col-xs-offset-10 { margin-left: 83.33333333%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666667%; } .col-xs-offset-7 { margin-left: 58.33333333%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666667%; } .col-xs-offset-4 { margin-left: 33.33333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.66666667%; } .col-xs-offset-1 { margin-left: 8.33333333%; } .col-xs-offset-0 { margin-left: 0%; } @media (min-width: 768px) { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666667%; } .col-sm-10 { width: 83.33333333%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666667%; } .col-sm-7 { width: 58.33333333%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666667%; } .col-sm-4 { width: 33.33333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.66666667%; } .col-sm-1 { width: 8.33333333%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666667%; } .col-sm-pull-10 { right: 83.33333333%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666667%; } .col-sm-pull-7 { right: 58.33333333%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666667%; } .col-sm-pull-4 { right: 33.33333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.66666667%; } .col-sm-pull-1 { right: 8.33333333%; } .col-sm-pull-0 { right: auto; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666667%; } .col-sm-push-10 { left: 83.33333333%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666667%; } .col-sm-push-7 { left: 58.33333333%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666667%; } .col-sm-push-4 { left: 33.33333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.66666667%; } .col-sm-push-1 { left: 8.33333333%; } .col-sm-push-0 { left: auto; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666667%; } .col-sm-offset-10 { margin-left: 83.33333333%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666667%; } .col-sm-offset-7 { margin-left: 58.33333333%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666667%; } .col-sm-offset-4 { margin-left: 33.33333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.66666667%; } .col-sm-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-0 { margin-left: 0%; } } @media (min-width: 992px) { .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666667%; } .col-md-10 { width: 83.33333333%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666667%; } .col-md-7 { width: 58.33333333%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666667%; } .col-md-4 { width: 33.33333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.66666667%; } .col-md-1 { width: 8.33333333%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666667%; } .col-md-pull-10 { right: 83.33333333%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666667%; } .col-md-pull-7 { right: 58.33333333%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666667%; } .col-md-pull-4 { right: 33.33333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.66666667%; } .col-md-pull-1 { right: 8.33333333%; } .col-md-pull-0 { right: auto; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666667%; } .col-md-push-10 { left: 83.33333333%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666667%; } .col-md-push-7 { left: 58.33333333%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666667%; } .col-md-push-4 { left: 33.33333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.66666667%; } .col-md-push-1 { left: 8.33333333%; } .col-md-push-0 { left: auto; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666667%; } .col-md-offset-10 { margin-left: 83.33333333%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666667%; } .col-md-offset-7 { margin-left: 58.33333333%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666667%; } .col-md-offset-4 { margin-left: 33.33333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.66666667%; } .col-md-offset-1 { margin-left: 8.33333333%; } .col-md-offset-0 { margin-left: 0%; } } @media (min-width: 1200px) { .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666667%; } .col-lg-10 { width: 83.33333333%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666667%; } .col-lg-7 { width: 58.33333333%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666667%; } .col-lg-4 { width: 33.33333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.66666667%; } .col-lg-1 { width: 8.33333333%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666667%; } .col-lg-pull-10 { right: 83.33333333%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666667%; } .col-lg-pull-7 { right: 58.33333333%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666667%; } .col-lg-pull-4 { right: 33.33333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.66666667%; } .col-lg-pull-1 { right: 8.33333333%; } .col-lg-pull-0 { right: auto; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666667%; } .col-lg-push-10 { left: 83.33333333%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666667%; } .col-lg-push-7 { left: 58.33333333%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666667%; } .col-lg-push-4 { left: 33.33333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.66666667%; } .col-lg-push-1 { left: 8.33333333%; } .col-lg-push-0 { left: auto; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666667%; } .col-lg-offset-10 { margin-left: 83.33333333%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666667%; } .col-lg-offset-7 { margin-left: 58.33333333%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666667%; } .col-lg-offset-4 { margin-left: 33.33333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.66666667%; } .col-lg-offset-1 { margin-left: 8.33333333%; } .col-lg-offset-0 { margin-left: 0%; } } table { background-color: transparent; } th { text-align: left; } .table { width: 100%; max-width: 100%; margin-bottom: 21px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 6px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #4e5d6c; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #4e5d6c; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #4e5d6c; } .table .table { background-color: #2b3e50; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 3px; } .table-bordered { border: 1px solid #4e5d6c; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #4e5d6c; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-child(odd) > td, .table-striped > tbody > tr:nth-child(odd) > th { background-color: #4e5d6c; } .table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > th { background-color: #485563; } table col[class*="col-"] { position: static; float: none; display: table-column; } table td[class*="col-"], table th[class*="col-"] { position: static; float: none; display: table-cell; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #485563; } .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { background-color: #3d4954; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #5cb85c; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { background-color: #4cae4c; } .table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { background-color: #5bc0de; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { background-color: #46b8da; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #f0ad4e; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { background-color: #eea236; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #d9534f; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { background-color: #d43f3a; } @media screen and (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15.75px; overflow-y: hidden; overflow-x: auto; -ms-overflow-style: -<API key>; border: 1px solid #4e5d6c; -<API key>: touch; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { padding: 0; margin: 0; border: 0; min-width: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 21px; font-size: 22.5px; line-height: inherit; color: #ebebeb; border: 0; border-bottom: 1px solid #4e5d6c; } label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold; } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; line-height: normal; } input[type="file"] { display: block; } input[type="range"] { display: block; width: 100%; } select[multiple], select[size] { height: auto; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } output { display: block; padding-top: 9px; font-size: 15px; line-height: 1.42857143; color: #2b3e50; } .form-control { display: block; width: 100%; height: 39px; padding: 8px 16px; font-size: 15px; line-height: 1.42857143; color: #2b3e50; background-color: #ffffff; background-image: none; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { border-color: transparent; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6); } .form-control::-moz-placeholder { color: #cccccc; opacity: 1; } .form-control:-<API key> { color: #cccccc; } .form-control::-<API key> { color: #cccccc; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { cursor: not-allowed; background-color: #ebebeb; opacity: 1; } textarea.form-control { height: auto; } input[type="search"] { -webkit-appearance: none; } input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] { line-height: 39px; line-height: 1.42857143 \0; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm { line-height: 31px; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg { line-height: 52px; } .form-group { margin-bottom: 15px; } .radio, .checkbox { position: relative; display: block; min-height: 21px; margin-top: 10px; margin-bottom: 10px; } .radio label, .checkbox label { padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-left: -20px; margin-top: 4px \9; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { display: inline-block; padding-left: 20px; margin-bottom: 0; vertical-align: middle; font-weight: normal; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"].disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"] { cursor: not-allowed; } .radio-inline.disabled, .checkbox-inline.disabled, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .radio.disabled label, .checkbox.disabled label, fieldset[disabled] .radio label, fieldset[disabled] .checkbox label { cursor: not-allowed; } .form-control-static { padding-top: 9px; padding-bottom: 9px; margin-bottom: 0; } .form-control-static.input-lg, .form-control-static.input-sm { padding-left: 0; padding-right: 0; } .input-sm, .form-horizontal .form-group-sm .form-control { height: 31px; padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 0; } select.input-sm { height: 31px; line-height: 31px; } textarea.input-sm, select[multiple].input-sm { height: auto; } .input-lg, .form-horizontal .form-group-lg .form-control { height: 52px; padding: 12px 24px; font-size: 19px; line-height: 1.33; border-radius: 0; } select.input-lg { height: 52px; line-height: 52px; } textarea.input-lg, select[multiple].input-lg { height: auto; } .has-feedback { position: relative; } .has-feedback .form-control { padding-right: 48.75px; } .<API key> { position: absolute; top: 26px; right: 0; z-index: 2; display: block; width: 39px; height: 39px; line-height: 39px; text-align: center; } .input-lg + .<API key> { width: 52px; height: 52px; line-height: 52px; } .input-sm + .<API key> { width: 31px; height: 31px; line-height: 31px; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline { color: #ebebeb; } .has-success .form-control { border-color: #ebebeb; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-success .form-control:focus { border-color: #d2d2d2; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; } .has-success .input-group-addon { color: #ebebeb; border-color: #ebebeb; background-color: #5cb85c; } .has-success .<API key> { color: #ebebeb; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline { color: #ebebeb; } .has-warning .form-control { border-color: #ebebeb; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-warning .form-control:focus { border-color: #d2d2d2; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; } .has-warning .input-group-addon { color: #ebebeb; border-color: #ebebeb; background-color: #f0ad4e; } .has-warning .<API key> { color: #ebebeb; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline { color: #ebebeb; } .has-error .form-control { border-color: #ebebeb; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-error .form-control:focus { border-color: #d2d2d2; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff; } .has-error .input-group-addon { color: #ebebeb; border-color: #ebebeb; background-color: #d9534f; } .has-error .<API key> { color: #ebebeb; } .has-feedback label.sr-only ~ .<API key> { top: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #ffffff; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; } .form-inline .input-group { display: inline-table; vertical-align: middle; } .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { width: auto; } .form-inline .input-group > .form-control { width: 100%; } .form-inline .control-label { margin-bottom: 0; vertical-align: middle; } .form-inline .radio, .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .form-inline .radio label, .form-inline .checkbox label { padding-left: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .form-inline .has-feedback .<API key> { top: 0; } } .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { margin-top: 0; margin-bottom: 0; padding-top: 9px; } .form-horizontal .radio, .form-horizontal .checkbox { min-height: 30px; } .form-horizontal .form-group { margin-left: -15px; margin-right: -15px; } @media (min-width: 768px) { .form-horizontal .control-label { text-align: right; margin-bottom: 0; padding-top: 9px; } } .form-horizontal .has-feedback .<API key> { top: 0; right: 15px; } @media (min-width: 768px) { .form-horizontal .form-group-lg .control-label { padding-top: 16.96px; } } @media (min-width: 768px) { .form-horizontal .form-group-sm .control-label { padding-top: 6px; } } .btn { display: inline-block; margin-bottom: 0; font-weight: normal; text-align: center; vertical-align: middle; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 8px 16px; font-size: 15px; line-height: 1.42857143; border-radius: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .btn:focus, .btn:active:focus, .btn.active:focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } .btn:hover, .btn:focus { color: #ffffff; text-decoration: none; } .btn:active, .btn.active { outline: 0; background-image: none; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { cursor: not-allowed; pointer-events: none; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; } .btn-default { color: #ffffff; background-color: #4e5d6c; border-color: transparent; } .btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { color: #ffffff; background-color: #39444e; border-color: rgba(0, 0, 0, 0); } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #4e5d6c; border-color: transparent; } .btn-default .badge { color: #4e5d6c; background-color: #ffffff; } .btn-primary { color: #ffffff; background-color: #df691a; border-color: transparent; } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #ffffff; background-color: #b15315; border-color: rgba(0, 0, 0, 0); } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #df691a; border-color: transparent; } .btn-primary .badge { color: #df691a; background-color: #ffffff; } .btn-success { color: #ffffff; background-color: #5cb85c; border-color: transparent; } .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { color: #ffffff; background-color: #449d44; border-color: rgba(0, 0, 0, 0); } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #5cb85c; border-color: transparent; } .btn-success .badge { color: #5cb85c; background-color: #ffffff; } .btn-info { color: #ffffff; background-color: #5bc0de; border-color: transparent; } .btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { color: #ffffff; background-color: #31b0d5; border-color: rgba(0, 0, 0, 0); } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #5bc0de; border-color: transparent; } .btn-info .badge { color: #5bc0de; background-color: #ffffff; } .btn-warning { color: #ffffff; background-color: #f0ad4e; border-color: transparent; } .btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { color: #ffffff; background-color: #ec971f; border-color: rgba(0, 0, 0, 0); } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #f0ad4e; border-color: transparent; } .btn-warning .badge { color: #f0ad4e; background-color: #ffffff; } .btn-danger { color: #ffffff; background-color: #d9534f; border-color: transparent; } .btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { color: #ffffff; background-color: #c9302c; border-color: rgba(0, 0, 0, 0); } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #d9534f; border-color: transparent; } .btn-danger .badge { color: #d9534f; background-color: #ffffff; } .btn-link { color: #df691a; font-weight: normal; cursor: pointer; border-radius: 0; } .btn-link, .btn-link:active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #df691a; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #4e5d6c; text-decoration: none; } .btn-lg, .btn-group-lg > .btn { padding: 12px 24px; font-size: 19px; line-height: 1.33; border-radius: 0; } .btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 0; } .btn-xs, .btn-group-xs > .btn { padding: 1px 5px; font-size: 13px; line-height: 1.5; border-radius: 0; } .btn-block { display: block; width: 100%; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { display: none; } .collapse.in { display: block; } tr.collapse.in { display: table-row; } tbody.collapse.in { display: table-row-group; } .collapsing { position: relative; height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; -o-transition: height 0.35s ease; transition: height 0.35s ease; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; font-size: 15px; text-align: left; background-color: #4e5d6c; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9.5px 0; overflow: hidden; background-color: #2b3e50; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #ebebeb; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { text-decoration: none; color: #ebebeb; background-color: #485563; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #ffffff; text-decoration: none; outline: 0; background-color: #df691a; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #2b3e50; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); cursor: not-allowed; } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-menu-right { left: auto; right: 0; } .dropdown-menu-left { left: 0; right: auto; } .dropdown-header { display: block; padding: 3px 20px; font-size: 13px; line-height: 1.42857143; color: #2b3e50; white-space: nowrap; } .dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid; content: ""; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { left: auto; right: 0; } .navbar-right .dropdown-menu-left { left: 0; right: auto; } } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group > .btn:focus, .btn-group-vertical > .btn:focus { outline: 0; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar { margin-left: -5px; } .btn-toolbar .btn-group, .btn-toolbar .input-group { float: left; } .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { <API key>: 0; <API key>: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { <API key>: 0; <API key>: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child > .btn:last-child, .btn-group > .btn-group:first-child > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group > .btn-group:last-child > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-left: 8px; padding-right: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-left: 12px; padding-right: 12px; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { <API key>: 0; <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { <API key>: 0; <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; } .btn-group-justified > .btn, .btn-group-justified > .btn-group { float: none; display: table-cell; width: 1%; } .btn-group-justified > .btn-group .btn { width: 100%; } .btn-group-justified > .btn-group .dropdown-menu { left: auto; } [data-toggle="buttons"] > .btn > input[type="radio"], [data-toggle="buttons"] > .btn > input[type="checkbox"] { position: absolute; z-index: -1; opacity: 0; filter: alpha(opacity=0); } .input-group { position: relative; display: table; border-collapse: separate; } .input-group[class*="col-"] { float: none; padding-left: 0; padding-right: 0; } .input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 52px; padding: 12px 24px; font-size: 19px; line-height: 1.33; border-radius: 0; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 52px; line-height: 52px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn, select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 31px; padding: 5px 10px; font-size: 13px; line-height: 1.5; border-radius: 0; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 31px; line-height: 31px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn, select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 8px 16px; font-size: 15px; font-weight: normal; line-height: 1; color: #2b3e50; text-align: center; background-color: #4e5d6c; border: 1px solid transparent; border-radius: 0; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 13px; border-radius: 0; } .input-group-addon.input-lg { padding: 12px 24px; font-size: 19px; border-radius: 0; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { <API key>: 0; <API key>: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { <API key>: 0; <API key>: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; font-size: 0; white-space: nowrap; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -1px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { z-index: 2; } .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { margin-right: -1px; } .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { margin-left: -1px; } .nav { margin-bottom: 0; padding-left: 0; list-style: none; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #4e5d6c; } .nav > li.disabled > a { color: #4e5d6c; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #4e5d6c; text-decoration: none; background-color: transparent; cursor: not-allowed; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #4e5d6c; border-color: #df691a; } .nav .nav-divider { height: 1px; margin: 9.5px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid transparent; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 0 0 0 0; } .nav-tabs > li > a:hover { border-color: #4e5d6c #4e5d6c transparent; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #ebebeb; background-color: #2b3e50; border: 1px solid #4e5d6c; border-bottom-color: transparent; cursor: default; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { text-align: center; margin-bottom: 5px; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #4e5d6c; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #4e5d6c; border-radius: 0 0 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #4e5d6c; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 0; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #ffffff; background-color: #df691a; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { text-align: center; margin-bottom: 5px; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #4e5d6c; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #4e5d6c; border-radius: 0 0 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #4e5d6c; } } .tab-content > .tab-pane { display: none; } .tab-content > .active { display: block; } .nav-tabs .dropdown-menu { margin-top: -1px; <API key>: 0; <API key>: 0; } .navbar { position: relative; min-height: 40px; margin-bottom: 21px; border: 1px solid transparent; } @media (min-width: 768px) { .navbar { border-radius: 0; } } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { overflow-x: visible; padding-right: 15px; padding-left: 15px; border-top: 1px solid transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); -<API key>: touch; } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; box-shadow: none; } .navbar-collapse.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } .navbar-collapse.in { overflow-y: visible; } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-left: 0; padding-right: 0; } } .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 340px; } @media (max-width: 480px) and (orientation: landscape) { .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 200px; } } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; padding: 9.5px 15px; font-size: 19px; line-height: 21px; height: 40px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } @media (min-width: 768px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; margin-right: 15px; padding: 9px 10px; margin-top: 3px; margin-bottom: 3px; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 0; } .navbar-toggle:focus { outline: 0; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 4.75px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 21px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 21px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 9.5px; padding-bottom: 9.5px; } .navbar-nav.navbar-right:last-child { margin-right: -15px; } } @media (min-width: 768px) { .navbar-left { float: left !important; float: left; } .navbar-right { float: right !important; float: right; } } .navbar-form { margin-left: -15px; margin-right: -15px; padding: 10px 15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); margin-top: 0.5px; margin-bottom: 0.5px; } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; width: auto; vertical-align: middle; } .navbar-form .input-group { display: inline-table; vertical-align: middle; } .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn, .navbar-form .input-group .form-control { width: auto; } .navbar-form .input-group > .form-control { width: 100%; } .navbar-form .control-label { margin-bottom: 0; vertical-align: middle; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .navbar-form .radio label, .navbar-form .checkbox label { padding-left: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .navbar-form .has-feedback .<API key> { top: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } } @media (min-width: 768px) { .navbar-form { width: auto; border: 0; margin-left: 0; margin-right: 0; padding-top: 0; padding-bottom: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-form.navbar-right:last-child { margin-right: -15px; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; <API key>: 0; <API key>: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { <API key>: 0; <API key>: 0; } .navbar-btn { margin-top: 0.5px; margin-bottom: 0.5px; } .navbar-btn.btn-sm { margin-top: 4.5px; margin-bottom: 4.5px; } .navbar-btn.btn-xs { margin-top: 9px; margin-bottom: 9px; } .navbar-text { margin-top: 9.5px; margin-bottom: 9.5px; } @media (min-width: 768px) { .navbar-text { float: left; margin-left: 15px; margin-right: 15px; } .navbar-text.navbar-right:last-child { margin-right: 0; } } .navbar-default { background-color: #4e5d6c; border-color: transparent; } .navbar-default .navbar-brand { color: #ebebeb; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #ebebeb; background-color: transparent; } .navbar-default .navbar-text { color: #ebebeb; } .navbar-default .navbar-nav > li > a { color: #ebebeb; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #ebebeb; background-color: #485563; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #ebebeb; background-color: #485563; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #cccccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: transparent; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #485563; } .navbar-default .navbar-toggle .icon-bar { background-color: #ebebeb; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: transparent; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { background-color: #485563; color: #ebebeb; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #ebebeb; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #ebebeb; background-color: #485563; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #ebebeb; background-color: #485563; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #cccccc; background-color: transparent; } } .navbar-default .navbar-link { color: #ebebeb; } .navbar-default .navbar-link:hover { color: #ebebeb; } .navbar-default .btn-link { color: #ebebeb; } .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { color: #ebebeb; } .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:focus { color: #cccccc; } .navbar-inverse { background-color: #df691a; border-color: transparent; } .navbar-inverse .navbar-brand { color: #ebebeb; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #ebebeb; background-color: transparent; } .navbar-inverse .navbar-text { color: #ebebeb; } .navbar-inverse .navbar-nav > li > a { color: #ebebeb; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #ebebeb; background-color: #c85e17; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #ebebeb; background-color: #c85e17; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: transparent; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #c85e17; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #ebebeb; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #bf5a16; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { background-color: #c85e17; color: #ebebeb; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #ebebeb; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #ebebeb; background-color: #c85e17; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #ebebeb; background-color: #c85e17; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #ebebeb; } .navbar-inverse .navbar-link:hover { color: #ebebeb; } .navbar-inverse .btn-link { color: #ebebeb; } .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { color: #ebebeb; } .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444444; } .breadcrumb { padding: 8px 15px; margin-bottom: 21px; list-style: none; background-color: #4e5d6c; border-radius: 0; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { content: "/\00a0"; padding: 0 5px; color: #ebebeb; } .breadcrumb > .active { color: #ebebeb; } .pagination { display: inline-block; padding-left: 0; margin: 21px 0; border-radius: 0; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 8px 16px; line-height: 1.42857143; text-decoration: none; color: #ebebeb; background-color: #4e5d6c; border: 1px solid transparent; margin-left: -1px; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; <API key>: 0; <API key>: 0; } .pagination > li:last-child > a, .pagination > li:last-child > span { <API key>: 0; <API key>: 0; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { color: #ebebeb; background-color: #485563; border-color: transparent; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 2; color: #ebebeb; background-color: #df691a; border-color: transparent; cursor: default; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #323c46; background-color: #4e5d6c; border-color: transparent; cursor: not-allowed; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 12px 24px; font-size: 19px; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { <API key>: 0; <API key>: 0; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { <API key>: 0; <API key>: 0; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 13px; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { <API key>: 0; <API key>: 0; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { <API key>: 0; <API key>: 0; } .pager { padding-left: 0; margin: 21px 0; list-style: none; text-align: center; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #4e5d6c; border: 1px solid transparent; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #485563; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #323c46; background-color: #4e5d6c; cursor: not-allowed; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #ffffff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } a.label:hover, a.label:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .btn .label { position: relative; top: -1px; } .label-default { background-color: #4e5d6c; } .label-default[href]:hover, .label-default[href]:focus { background-color: #39444e; } .label-primary { background-color: #df691a; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #b15315; } .label-success { background-color: #5cb85c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover, .label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 13px; font-weight: 300; color: #ebebeb; line-height: 1; vertical-align: baseline; white-space: nowrap; text-align: center; background-color: #4e5d6c; border-radius: 10px; } .badge:empty { display: none; } .btn .badge { position: relative; top: -1px; } .btn-xs .badge { top: 0; padding: 1px 5px; } a.badge:hover, a.badge:focus { color: #ffffff; text-decoration: none; cursor: pointer; } a.list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #df691a; background-color: #ffffff; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding: 30px; margin-bottom: 30px; color: inherit; background-color: #4e5d6c; } .jumbotron h1, .jumbotron .h1 { color: inherit; } .jumbotron p { margin-bottom: 15px; font-size: 23px; font-weight: 200; } .jumbotron > hr { border-top-color: #39444e; } .container .jumbotron { border-radius: 0; } .jumbotron .container { max-width: 100%; } @media screen and (min-width: 768px) { .jumbotron { padding-top: 48px; padding-bottom: 48px; } .container .jumbotron { padding-left: 60px; padding-right: 60px; } .jumbotron h1, .jumbotron .h1 { font-size: 67.5px; } } .thumbnail { display: block; padding: 4px; margin-bottom: 21px; line-height: 1.42857143; background-color: #2b3e50; border: 1px solid #dddddd; border-radius: 0; -webkit-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } .thumbnail > img, .thumbnail a > img { margin-left: auto; margin-right: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #df691a; } .thumbnail .caption { padding: 9px; color: #ebebeb; } .alert { padding: 15px; margin-bottom: 21px; border: 1px solid transparent; border-radius: 0; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable, .alert-dismissible { padding-right: 35px; } .alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { background-color: #5cb85c; border-color: transparent; color: #ebebeb; } .alert-success hr { border-top-color: rgba(0, 0, 0, 0); } .alert-success .alert-link { color: #d2d2d2; } .alert-info { background-color: #5bc0de; border-color: transparent; color: #ebebeb; } .alert-info hr { border-top-color: rgba(0, 0, 0, 0); } .alert-info .alert-link { color: #d2d2d2; } .alert-warning { background-color: #f0ad4e; border-color: transparent; color: #ebebeb; } .alert-warning hr { border-top-color: rgba(0, 0, 0, 0); } .alert-warning .alert-link { color: #d2d2d2; } .alert-danger { background-color: #d9534f; border-color: transparent; color: #ebebeb; } .alert-danger hr { border-top-color: rgba(0, 0, 0, 0); } .alert-danger .alert-link { color: #d2d2d2; } @-webkit-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { overflow: hidden; height: 21px; margin-bottom: 21px; background-color: #4e5d6c; border-radius: 0; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress-bar { float: left; width: 0%; height: 100%; font-size: 13px; line-height: 21px; color: #ffffff; text-align: center; background-color: #df691a; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress-striped .progress-bar, .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: <API key> 2s linear infinite; -o-animation: <API key> 2s linear infinite; animation: <API key> 2s linear infinite; } .progress-bar[aria-valuenow="1"], .progress-bar[aria-valuenow="2"] { min-width: 30px; } .progress-bar[aria-valuenow="0"] { color: #4e5d6c; min-width: 30px; background-color: transparent; background-image: none; box-shadow: none; } .<API key> { background-color: #5cb85c; } .progress-striped .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .<API key> { background-color: #f0ad4e; } .progress-striped .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .media, .media-body { overflow: hidden; zoom: 1; } .media, .media .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-object { display: block; } .media-heading { margin: 0 0 5px; } .media > .pull-left { margin-right: 10px; } .media > .pull-right { margin-left: 10px; } .media-list { padding-left: 0; list-style: none; } .list-group { margin-bottom: 20px; padding-left: 0; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #4e5d6c; border: 1px solid transparent; } .list-group-item:first-child { <API key>: 0; <API key>: 0; } .list-group-item:last-child { margin-bottom: 0; <API key>: 0; <API key>: 0; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } a.list-group-item { color: #ebebeb; } a.list-group-item .<API key> { color: #ebebeb; } a.list-group-item:hover, a.list-group-item:focus { text-decoration: none; color: #ebebeb; background-color: #485563; } .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { background-color: #ebebeb; color: #4e5d6c; } .list-group-item.disabled .<API key>, .list-group-item.disabled:hover .<API key>, .list-group-item.disabled:focus .<API key> { color: inherit; } .list-group-item.disabled .<API key>, .list-group-item.disabled:hover .<API key>, .list-group-item.disabled:focus .<API key> { color: #4e5d6c; } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { z-index: 2; color: #ffffff; background-color: #df691a; border-color: #df691a; } .list-group-item.active .<API key>, .list-group-item.active:hover .<API key>, .list-group-item.active:focus .<API key>, .list-group-item.active .<API key> > small, .list-group-item.active:hover .<API key> > small, .list-group-item.active:focus .<API key> > small, .list-group-item.active .<API key> > .small, .list-group-item.active:hover .<API key> > .small, .list-group-item.active:focus .<API key> > .small { color: inherit; } .list-group-item.active .<API key>, .list-group-item.active:hover .<API key>, .list-group-item.active:focus .<API key> { color: #f9decc; } .<API key> { color: #ebebeb; background-color: #5cb85c; } a.<API key> { color: #ebebeb; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #ebebeb; background-color: #4cae4c; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #ebebeb; border-color: #ebebeb; } .<API key> { color: #ebebeb; background-color: #5bc0de; } a.<API key> { color: #ebebeb; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #ebebeb; background-color: #46b8da; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #ebebeb; border-color: #ebebeb; } .<API key> { color: #ebebeb; background-color: #f0ad4e; } a.<API key> { color: #ebebeb; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #ebebeb; background-color: #eea236; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #ebebeb; border-color: #ebebeb; } .<API key> { color: #ebebeb; background-color: #d9534f; } a.<API key> { color: #ebebeb; } a.<API key> .<API key> { color: inherit; } a.<API key>:hover, a.<API key>:focus { color: #ebebeb; background-color: #d43f3a; } a.<API key>.active, a.<API key>.active:hover, a.<API key>.active:focus { color: #fff; background-color: #ebebeb; border-color: #ebebeb; } .<API key> { margin-top: 0; margin-bottom: 5px; } .<API key> { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 21px; background-color: #4e5d6c; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); } .panel-body { padding: 15px; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; <API key>: -1; <API key>: -1; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 17px; color: inherit; } .panel-title > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #485563; border-top: 1px solid transparent; <API key>: -1; <API key>: -1; } .panel > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item { border-width: 1px 0; border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child { border-top: 0; <API key>: -1; <API key>: -1; } .panel > .list-group:last-child .list-group-item:last-child { border-bottom: 0; <API key>: -1; <API key>: -1; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .list-group + .panel-footer { border-top-width: 0; } .panel > .table, .panel > .table-responsive > .table, .panel > .panel-collapse > .table { margin-bottom: 0; } .panel > .table:first-child, .panel > .table-responsive:first-child > .table:first-child { <API key>: -1; <API key>: -1; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { <API key>: -1; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { <API key>: -1; } .panel > .table:last-child, .panel > .table-responsive:last-child > .table:last-child { <API key>: -1; <API key>: -1; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { <API key>: -1; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { <API key>: -1; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive { border-top: 1px solid #4e5d6c; } .panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child td { border-top: 0; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { border-bottom: 0; } .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { border-bottom: 0; } .panel > .table-responsive { border: 0; margin-bottom: 0; } .panel-group { margin-bottom: 21px; } .panel-group .panel { margin-bottom: 0; border-radius: 0; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse > .panel-body { border-top: 1px solid transparent; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid transparent; } .panel-default { border-color: transparent; } .panel-default > .panel-heading { color: #333333; background-color: #f5f5f5; border-color: transparent; } .panel-default > .panel-heading + .panel-collapse > .panel-body { border-top-color: transparent; } .panel-default > .panel-heading .badge { color: #f5f5f5; background-color: #333333; } .panel-default > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: transparent; } .panel-primary { border-color: transparent; } .panel-primary > .panel-heading { color: #ffffff; background-color: #df691a; border-color: transparent; } .panel-primary > .panel-heading + .panel-collapse > .panel-body { border-top-color: transparent; } .panel-primary > .panel-heading .badge { color: #df691a; background-color: #ffffff; } .panel-primary > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: transparent; } .panel-success { border-color: transparent; } .panel-success > .panel-heading { color: #ebebeb; background-color: #5cb85c; border-color: transparent; } .panel-success > .panel-heading + .panel-collapse > .panel-body { border-top-color: transparent; } .panel-success > .panel-heading .badge { color: #5cb85c; background-color: #ebebeb; } .panel-success > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: transparent; } .panel-info { border-color: transparent; } .panel-info > .panel-heading { color: #ebebeb; background-color: #5bc0de; border-color: transparent; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: transparent; } .panel-info > .panel-heading .badge { color: #5bc0de; background-color: #ebebeb; } .panel-info > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: transparent; } .panel-warning { border-color: transparent; } .panel-warning > .panel-heading { color: #ebebeb; background-color: #f0ad4e; border-color: transparent; } .panel-warning > .panel-heading + .panel-collapse > .panel-body { border-top-color: transparent; } .panel-warning > .panel-heading .badge { color: #f0ad4e; background-color: #ebebeb; } .panel-warning > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: transparent; } .panel-danger { border-color: transparent; } .panel-danger > .panel-heading { color: #ebebeb; background-color: #d9534f; border-color: transparent; } .panel-danger > .panel-heading + .panel-collapse > .panel-body { border-top-color: transparent; } .panel-danger > .panel-heading .badge { color: #d9534f; background-color: #ebebeb; } .panel-danger > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: transparent; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; } .embed-responsive .<API key>, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object { position: absolute; top: 0; left: 0; bottom: 0; height: 100%; width: 100%; border: 0; } .embed-responsive.<API key> { padding-bottom: 56.25%; } .embed-responsive.<API key> { padding-bottom: 75%; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #4e5d6c; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-lg { padding: 24px; border-radius: 0; } .well-sm { padding: 9px; border-radius: 0; } .close { float: right; font-size: 22.5px; font-weight: bold; line-height: 1; color: #ebebeb; text-shadow: none; opacity: 0.2; filter: alpha(opacity=20); } .close:hover, .close:focus { color: #ebebeb; text-decoration: none; cursor: pointer; opacity: 0.5; filter: alpha(opacity=50); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .modal-open { overflow: hidden; } .modal { display: none; overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; -<API key>: touch; outline: 0; } .modal.fade .modal-dialog { -webkit-transform: translate3d(0, -25%, 0); transform: translate3d(0, -25%, 0); -webkit-transition: -webkit-transform 0.3s ease-out; -moz-transition: -moz-transform 0.3s ease-out; -o-transition: -o-transform 0.3s ease-out; transition: transform 0.3s ease-out; } .modal.in .modal-dialog { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } .modal-dialog { position: relative; width: auto; margin: 10px; } .modal-content { position: relative; background-color: #4e5d6c; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); background-clip: padding-box; outline: 0; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000000; } .modal-backdrop.fade { opacity: 0; filter: alpha(opacity=0); } .modal-backdrop.in { opacity: 0.5; filter: alpha(opacity=50); } .modal-header { padding: 15px; border-bottom: 1px solid #2b3e50; min-height: 16.42857143px; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.42857143; } .modal-body { position: relative; padding: 20px; } .modal-footer { padding: 20px; text-align: right; border-top: 1px solid #2b3e50; } .modal-footer .btn + .btn { margin-left: 5px; margin-bottom: 0; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .<API key> { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } .modal-sm { width: 300px; } } @media (min-width: 992px) { .modal-lg { width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; visibility: visible; font-size: 13px; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); } .tooltip.in { opacity: 0.9; filter: alpha(opacity=90); } .tooltip.top { margin-top: -3px; padding: 5px 0; } .tooltip.right { margin-left: 3px; padding: 0 5px; } .tooltip.bottom { margin-top: 3px; padding: 5px 0; } .tooltip.left { margin-left: -3px; padding: 0 5px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; border-radius: 0; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.top-left .tooltip-arrow { bottom: 0; left: 5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.top-right .tooltip-arrow { bottom: 0; right: 5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .tooltip.bottom-left .tooltip-arrow { top: 0; left: 5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .tooltip.bottom-right .tooltip-arrow { top: 0; right: 5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; text-align: left; background-color: #4e5d6c; background-clip: padding-box; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); white-space: normal; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { margin: 0; padding: 8px 14px; font-size: 15px; font-weight: normal; line-height: 18px; background-color: #485563; border-bottom: 1px solid #3d4954; border-radius: -1 -1 0 0; } .popover-content { padding: 9px 14px; } .popover > .arrow, .popover > .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover > .arrow { border-width: 11px; } .popover > .arrow:after { border-width: 10px; content: ""; } .popover.top > .arrow { left: 50%; margin-left: -11px; border-bottom-width: 0; border-top-color: transparent; bottom: -11px; } .popover.top > .arrow:after { content: " "; bottom: 1px; margin-left: -10px; border-bottom-width: 0; border-top-color: #4e5d6c; } .popover.right > .arrow { top: 50%; left: -11px; margin-top: -11px; border-left-width: 0; border-right-color: transparent; } .popover.right > .arrow:after { content: " "; left: 1px; bottom: -10px; border-left-width: 0; border-right-color: #4e5d6c; } .popover.bottom > .arrow { left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: transparent; top: -11px; } .popover.bottom > .arrow:after { content: " "; top: 1px; margin-left: -10px; border-top-width: 0; border-bottom-color: #4e5d6c; } .popover.left > .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: transparent; } .popover.left > .arrow:after { content: " "; right: 1px; border-right-width: 0; border-left-color: #4e5d6c; bottom: -10px; } .carousel { position: relative; } .carousel-inner { position: relative; overflow: hidden; width: 100%; } .carousel-inner > .item { display: none; position: relative; -webkit-transition: 0.6s ease-in-out left; -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { line-height: 1; } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; left: 0; bottom: 0; width: 15%; opacity: 0.5; filter: alpha(opacity=50); font-size: 20px; color: #ffffff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .carousel-control.left { background-image: -<API key>(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } .carousel-control.right { left: auto; right: 0; background-image: -<API key>(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } .carousel-control:hover, .carousel-control:focus { outline: 0; color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .<API key>, .carousel-control .<API key> { position: absolute; top: 50%; z-index: 5; display: inline-block; } .carousel-control .icon-prev, .carousel-control .<API key> { left: 50%; margin-left: -10px; } .carousel-control .icon-next, .carousel-control .<API key> { right: 50%; margin-right: -10px; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; margin-top: -10px; font-family: serif; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; margin-left: -30%; padding-left: 0; list-style: none; text-align: center; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; border: 1px solid #ffffff; border-radius: 10px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); } .carousel-indicators .active { margin: 0; width: 12px; height: 12px; background-color: #ffffff; } .carousel-caption { position: absolute; left: 15%; right: 15%; bottom: 20px; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #ffffff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .<API key>, .carousel-control .<API key>, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; font-size: 30px; } .carousel-control .<API key>, .carousel-control .icon-prev { margin-left: -15px; } .carousel-control .<API key>, .carousel-control .icon-next { margin-right: -15px; } .carousel-caption { left: 20%; right: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-footer:before, .modal-footer:after, html.boxed-layout #<API key>:before, html.boxed-layout #<API key>:after, html.boxed-layout #<API key>:before, html.boxed-layout #<API key>:after, html.boxed-layout #layout-footer:before, html.boxed-layout #layout-footer:after, html.fixed-nav.boxed-layout #layout-navigation:before, html.fixed-nav.boxed-layout #layout-navigation:after, html.floating-nav.boxed-layout .navbar-wrapper:before, html.floating-nav.boxed-layout .navbar-wrapper:after, #layout-main:before, #layout-main:after, #layout-tripel:before, #layout-tripel:after, #footer-quad:before, #footer-quad:after, html.sticky-footer.boxed-layout #footer:before, html.sticky-footer.boxed-layout #footer:after, html.orchard-users form:before, html.orchard-users form:after { content: " "; display: table; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-footer:after, html.boxed-layout #<API key>:after, html.boxed-layout #<API key>:after, html.boxed-layout #layout-footer:after, html.fixed-nav.boxed-layout #layout-navigation:after, html.floating-nav.boxed-layout .navbar-wrapper:after, #layout-main:after, #layout-tripel:after, #footer-quad:after, html.sticky-footer.boxed-layout #footer:after, html.orchard-users form:after { clear: both; } .center-block { display: block; margin-left: auto; margin-right: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; visibility: hidden !important; } .affix { position: fixed; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } @-ms-viewport { width: device-width; } .visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; } .visible-xs-block, .visible-xs-inline, .<API key>, .visible-sm-block, .visible-sm-inline, .<API key>, .visible-md-block, .visible-md-inline, .<API key>, .visible-lg-block, .visible-lg-inline, .<API key> { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } table.visible-xs { display: table; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (max-width: 767px) { .visible-xs-block { display: block !important; } } @media (max-width: 767px) { .visible-xs-inline { display: inline !important; } } @media (max-width: 767px) { .<API key> { display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } table.visible-sm { display: table; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-block { display: block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline { display: inline !important; } } @media (min-width: 768px) and (max-width: 991px) { .<API key> { display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } table.visible-md { display: table; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-block { display: block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline { display: inline !important; } } @media (min-width: 992px) and (max-width: 1199px) { .<API key> { display: inline-block !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } table.visible-lg { display: table; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg-block { display: block !important; } } @media (min-width: 1200px) { .visible-lg-inline { display: inline !important; } } @media (min-width: 1200px) { .<API key> { display: inline-block !important; } } @media (max-width: 767px) { .hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: block !important; } table.visible-print { display: table; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } } .visible-print-block { display: none !important; } @media print { .visible-print-block { display: block !important; } } .<API key> { display: none !important; } @media print { .<API key> { display: inline !important; } } .<API key> { display: none !important; } @media print { .<API key> { display: inline-block !important; } } @media print { .hidden-print { display: none !important; } } @font-face { font-family: 'FontAwesome'; src: url('font-awesome-4.2.0/fonts/fontawesome-webfont.eot?v=4.2.0'); src: url('font-awesome-4.2.0/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('font-awesome-4.2.0/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('font-awesome-4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('font-awesome-4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } .fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -<API key>: antialiased; -<API key>: grayscale; } /* makes the font 33% larger relative to the icon container */ .fa-lg { font-size: 1.33333333em; line-height: 0.75em; vertical-align: -15%; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-fw { width: 1.28571429em; text-align: center; } .fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none; } .fa-ul > li { position: relative; } .fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center; } .fa-li.fa-lg { left: -1.85714286em; } .fa-border { padding: .2em .25em .15em; border: solid 0.08em #eeeeee; border-radius: .1em; } .pull-right { float: right; } .pull-left { float: left; } .fa.pull-left { margin-right: .3em; } .fa.pull-right { margin-left: .3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-rotate-90 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); -webkit-transform: scale(1, -1); -ms-transform: scale(1, -1); transform: scale(1, -1); } :root .fa-rotate-90, :root .fa-rotate-180, :root .fa-rotate-270, :root .fa-flip-horizontal, :root .fa-flip-vertical { filter: none; } .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa-stack-1x, .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-stack-1x { line-height: inherit; } .fa-stack-2x { font-size: 2em; } .fa-inverse { color: #ffffff; } /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ .fa-glass:before { content: "\f000"; } .fa-music:before { content: "\f001"; } .fa-search:before { content: "\f002"; } .fa-envelope-o:before { content: "\f003"; } .fa-heart:before { content: "\f004"; } .fa-star:before { content: "\f005"; } .fa-star-o:before { content: "\f006"; } .fa-user:before { content: "\f007"; } .fa-film:before { content: "\f008"; } .fa-th-large:before { content: "\f009"; } .fa-th:before { content: "\f00a"; } .fa-th-list:before { content: "\f00b"; } .fa-check:before { content: "\f00c"; } .fa-remove:before, .fa-close:before, .fa-times:before { content: "\f00d"; } .fa-search-plus:before { content: "\f00e"; } .fa-search-minus:before { content: "\f010"; } .fa-power-off:before { content: "\f011"; } .fa-signal:before { content: "\f012"; } .fa-gear:before, .fa-cog:before { content: "\f013"; } .fa-trash-o:before { content: "\f014"; } .fa-home:before { content: "\f015"; } .fa-file-o:before { content: "\f016"; } .fa-clock-o:before { content: "\f017"; } .fa-road:before { content: "\f018"; } .fa-download:before { content: "\f019"; } .<API key>:before { content: "\f01a"; } .<API key>:before { content: "\f01b"; } .fa-inbox:before { content: "\f01c"; } .fa-play-circle-o:before { content: "\f01d"; } .fa-rotate-right:before, .fa-repeat:before { content: "\f01e"; } .fa-refresh:before { content: "\f021"; } .fa-list-alt:before { content: "\f022"; } .fa-lock:before { content: "\f023"; } .fa-flag:before { content: "\f024"; } .fa-headphones:before { content: "\f025"; } .fa-volume-off:before { content: "\f026"; } .fa-volume-down:before { content: "\f027"; } .fa-volume-up:before { content: "\f028"; } .fa-qrcode:before { content: "\f029"; } .fa-barcode:before { content: "\f02a"; } .fa-tag:before { content: "\f02b"; } .fa-tags:before { content: "\f02c"; } .fa-book:before { content: "\f02d"; } .fa-bookmark:before { content: "\f02e"; } .fa-print:before { content: "\f02f"; } .fa-camera:before { content: "\f030"; } .fa-font:before { content: "\f031"; } .fa-bold:before { content: "\f032"; } .fa-italic:before { content: "\f033"; } .fa-text-height:before { content: "\f034"; } .fa-text-width:before { content: "\f035"; } .fa-align-left:before { content: "\f036"; } .fa-align-center:before { content: "\f037"; } .fa-align-right:before { content: "\f038"; } .fa-align-justify:before { content: "\f039"; } .fa-list:before { content: "\f03a"; } .fa-dedent:before, .fa-outdent:before { content: "\f03b"; } .fa-indent:before { content: "\f03c"; } .fa-video-camera:before { content: "\f03d"; } .fa-photo:before, .fa-image:before, .fa-picture-o:before { content: "\f03e"; } .fa-pencil:before { content: "\f040"; } .fa-map-marker:before { content: "\f041"; } .fa-adjust:before { content: "\f042"; } .fa-tint:before { content: "\f043"; } .fa-edit:before, .fa-pencil-square-o:before { content: "\f044"; } .fa-share-square-o:before { content: "\f045"; } .fa-check-square-o:before { content: "\f046"; } .fa-arrows:before { content: "\f047"; } .fa-step-backward:before { content: "\f048"; } .fa-fast-backward:before { content: "\f049"; } .fa-backward:before { content: "\f04a"; } .fa-play:before { content: "\f04b"; } .fa-pause:before { content: "\f04c"; } .fa-stop:before { content: "\f04d"; } .fa-forward:before { content: "\f04e"; } .fa-fast-forward:before { content: "\f050"; } .fa-step-forward:before { content: "\f051"; } .fa-eject:before { content: "\f052"; } .fa-chevron-left:before { content: "\f053"; } .fa-chevron-right:before { content: "\f054"; } .fa-plus-circle:before { content: "\f055"; } .fa-minus-circle:before { content: "\f056"; } .fa-times-circle:before { content: "\f057"; } .fa-check-circle:before { content: "\f058"; } .fa-question-circle:before { content: "\f059"; } .fa-info-circle:before { content: "\f05a"; } .fa-crosshairs:before { content: "\f05b"; } .fa-times-circle-o:before { content: "\f05c"; } .fa-check-circle-o:before { content: "\f05d"; } .fa-ban:before { content: "\f05e"; } .fa-arrow-left:before { content: "\f060"; } .fa-arrow-right:before { content: "\f061"; } .fa-arrow-up:before { content: "\f062"; } .fa-arrow-down:before { content: "\f063"; } .fa-mail-forward:before, .fa-share:before { content: "\f064"; } .fa-expand:before { content: "\f065"; } .fa-compress:before { content: "\f066"; } .fa-plus:before { content: "\f067"; } .fa-minus:before { content: "\f068"; } .fa-asterisk:before { content: "\f069"; } .<API key>:before { content: "\f06a"; } .fa-gift:before { content: "\f06b"; } .fa-leaf:before { content: "\f06c"; } .fa-fire:before { content: "\f06d"; } .fa-eye:before { content: "\f06e"; } .fa-eye-slash:before { content: "\f070"; } .fa-warning:before, .<API key>:before { content: "\f071"; } .fa-plane:before { content: "\f072"; } .fa-calendar:before { content: "\f073"; } .fa-random:before { content: "\f074"; } .fa-comment:before { content: "\f075"; } .fa-magnet:before { content: "\f076"; } .fa-chevron-up:before { content: "\f077"; } .fa-chevron-down:before { content: "\f078"; } .fa-retweet:before { content: "\f079"; } .fa-shopping-cart:before { content: "\f07a"; } .fa-folder:before { content: "\f07b"; } .fa-folder-open:before { content: "\f07c"; } .fa-arrows-v:before { content: "\f07d"; } .fa-arrows-h:before { content: "\f07e"; } .fa-bar-chart-o:before, .fa-bar-chart:before { content: "\f080"; } .fa-twitter-square:before { content: "\f081"; } .fa-facebook-square:before { content: "\f082"; } .fa-camera-retro:before { content: "\f083"; } .fa-key:before { content: "\f084"; } .fa-gears:before, .fa-cogs:before { content: "\f085"; } .fa-comments:before { content: "\f086"; } .fa-thumbs-o-up:before { content: "\f087"; } .fa-thumbs-o-down:before { content: "\f088"; } .fa-star-half:before { content: "\f089"; } .fa-heart-o:before { content: "\f08a"; } .fa-sign-out:before { content: "\f08b"; } .fa-linkedin-square:before { content: "\f08c"; } .fa-thumb-tack:before { content: "\f08d"; } .fa-external-link:before { content: "\f08e"; } .fa-sign-in:before { content: "\f090"; } .fa-trophy:before { content: "\f091"; } .fa-github-square:before { content: "\f092"; } .fa-upload:before { content: "\f093"; } .fa-lemon-o:before { content: "\f094"; } .fa-phone:before { content: "\f095"; } .fa-square-o:before { content: "\f096"; } .fa-bookmark-o:before { content: "\f097"; } .fa-phone-square:before { content: "\f098"; } .fa-twitter:before { content: "\f099"; } .fa-facebook:before { content: "\f09a"; } .fa-github:before { content: "\f09b"; } .fa-unlock:before { content: "\f09c"; } .fa-credit-card:before { content: "\f09d"; } .fa-rss:before { content: "\f09e"; } .fa-hdd-o:before { content: "\f0a0"; } .fa-bullhorn:before { content: "\f0a1"; } .fa-bell:before { content: "\f0f3"; } .fa-certificate:before { content: "\f0a3"; } .fa-hand-o-right:before { content: "\f0a4"; } .fa-hand-o-left:before { content: "\f0a5"; } .fa-hand-o-up:before { content: "\f0a6"; } .fa-hand-o-down:before { content: "\f0a7"; } .<API key>:before { content: "\f0a8"; } .<API key>:before { content: "\f0a9"; } .fa-arrow-circle-up:before { content: "\f0aa"; } .<API key>:before { content: "\f0ab"; } .fa-globe:before { content: "\f0ac"; } .fa-wrench:before { content: "\f0ad"; } .fa-tasks:before { content: "\f0ae"; } .fa-filter:before { content: "\f0b0"; } .fa-briefcase:before { content: "\f0b1"; } .fa-arrows-alt:before { content: "\f0b2"; } .fa-group:before, .fa-users:before { content: "\f0c0"; } .fa-chain:before, .fa-link:before { content: "\f0c1"; } .fa-cloud:before { content: "\f0c2"; } .fa-flask:before { content: "\f0c3"; } .fa-cut:before, .fa-scissors:before { content: "\f0c4"; } .fa-copy:before, .fa-files-o:before { content: "\f0c5"; } .fa-paperclip:before { content: "\f0c6"; } .fa-save:before, .fa-floppy-o:before { content: "\f0c7"; } .fa-square:before { content: "\f0c8"; } .fa-navicon:before, .fa-reorder:before, .fa-bars:before { content: "\f0c9"; } .fa-list-ul:before { content: "\f0ca"; } .fa-list-ol:before { content: "\f0cb"; } .fa-strikethrough:before { content: "\f0cc"; } .fa-underline:before { content: "\f0cd"; } .fa-table:before { content: "\f0ce"; } .fa-magic:before { content: "\f0d0"; } .fa-truck:before { content: "\f0d1"; } .fa-pinterest:before { content: "\f0d2"; } .fa-pinterest-square:before { content: "\f0d3"; } .<API key>:before { content: "\f0d4"; } .fa-google-plus:before { content: "\f0d5"; } .fa-money:before { content: "\f0d6"; } .fa-caret-down:before { content: "\f0d7"; } .fa-caret-up:before { content: "\f0d8"; } .fa-caret-left:before { content: "\f0d9"; } .fa-caret-right:before { content: "\f0da"; } .fa-columns:before { content: "\f0db"; } .fa-unsorted:before, .fa-sort:before { content: "\f0dc"; } .fa-sort-down:before, .fa-sort-desc:before { content: "\f0dd"; } .fa-sort-up:before, .fa-sort-asc:before { content: "\f0de"; } .fa-envelope:before { content: "\f0e0"; } .fa-linkedin:before { content: "\f0e1"; } .fa-rotate-left:before, .fa-undo:before { content: "\f0e2"; } .fa-legal:before, .fa-gavel:before { content: "\f0e3"; } .fa-dashboard:before, .fa-tachometer:before { content: "\f0e4"; } .fa-comment-o:before { content: "\f0e5"; } .fa-comments-o:before { content: "\f0e6"; } .fa-flash:before, .fa-bolt:before { content: "\f0e7"; } .fa-sitemap:before { content: "\f0e8"; } .fa-umbrella:before { content: "\f0e9"; } .fa-paste:before, .fa-clipboard:before { content: "\f0ea"; } .fa-lightbulb-o:before { content: "\f0eb"; } .fa-exchange:before { content: "\f0ec"; } .fa-cloud-download:before { content: "\f0ed"; } .fa-cloud-upload:before { content: "\f0ee"; } .fa-user-md:before { content: "\f0f0"; } .fa-stethoscope:before { content: "\f0f1"; } .fa-suitcase:before { content: "\f0f2"; } .fa-bell-o:before { content: "\f0a2"; } .fa-coffee:before { content: "\f0f4"; } .fa-cutlery:before { content: "\f0f5"; } .fa-file-text-o:before { content: "\f0f6"; } .fa-building-o:before { content: "\f0f7"; } .fa-hospital-o:before { content: "\f0f8"; } .fa-ambulance:before { content: "\f0f9"; } .fa-medkit:before { content: "\f0fa"; } .fa-fighter-jet:before { content: "\f0fb"; } .fa-beer:before { content: "\f0fc"; } .fa-h-square:before { content: "\f0fd"; } .fa-plus-square:before { content: "\f0fe"; } .<API key>:before { content: "\f100"; } .<API key>:before { content: "\f101"; } .fa-angle-double-up:before { content: "\f102"; } .<API key>:before { content: "\f103"; } .fa-angle-left:before { content: "\f104"; } .fa-angle-right:before { content: "\f105"; } .fa-angle-up:before { content: "\f106"; } .fa-angle-down:before { content: "\f107"; } .fa-desktop:before { content: "\f108"; } .fa-laptop:before { content: "\f109"; } .fa-tablet:before { content: "\f10a"; } .fa-mobile-phone:before, .fa-mobile:before { content: "\f10b"; } .fa-circle-o:before { content: "\f10c"; } .fa-quote-left:before { content: "\f10d"; } .fa-quote-right:before { content: "\f10e"; } .fa-spinner:before { content: "\f110"; } .fa-circle:before { content: "\f111"; } .fa-mail-reply:before, .fa-reply:before { content: "\f112"; } .fa-github-alt:before { content: "\f113"; } .fa-folder-o:before { content: "\f114"; } .fa-folder-open-o:before { content: "\f115"; } .fa-smile-o:before { content: "\f118"; } .fa-frown-o:before { content: "\f119"; } .fa-meh-o:before { content: "\f11a"; } .fa-gamepad:before { content: "\f11b"; } .fa-keyboard-o:before { content: "\f11c"; } .fa-flag-o:before { content: "\f11d"; } .fa-flag-checkered:before { content: "\f11e"; } .fa-terminal:before { content: "\f120"; } .fa-code:before { content: "\f121"; } .fa-mail-reply-all:before, .fa-reply-all:before { content: "\f122"; } .fa-star-half-empty:before, .fa-star-half-full:before, .fa-star-half-o:before { content: "\f123"; } .fa-location-arrow:before { content: "\f124"; } .fa-crop:before { content: "\f125"; } .fa-code-fork:before { content: "\f126"; } .fa-unlink:before, .fa-chain-broken:before { content: "\f127"; } .fa-question:before { content: "\f128"; } .fa-info:before { content: "\f129"; } .fa-exclamation:before { content: "\f12a"; } .fa-superscript:before { content: "\f12b"; } .fa-subscript:before { content: "\f12c"; } .fa-eraser:before { content: "\f12d"; } .fa-puzzle-piece:before { content: "\f12e"; } .fa-microphone:before { content: "\f130"; } .fa-microphone-slash:before { content: "\f131"; } .fa-shield:before { content: "\f132"; } .fa-calendar-o:before { content: "\f133"; } .<API key>:before { content: "\f134"; } .fa-rocket:before { content: "\f135"; } .fa-maxcdn:before { content: "\f136"; } .<API key>:before { content: "\f137"; } .<API key>:before { content: "\f138"; } .<API key>:before { content: "\f139"; } .<API key>:before { content: "\f13a"; } .fa-html5:before { content: "\f13b"; } .fa-css3:before { content: "\f13c"; } .fa-anchor:before { content: "\f13d"; } .fa-unlock-alt:before { content: "\f13e"; } .fa-bullseye:before { content: "\f140"; } .fa-ellipsis-h:before { content: "\f141"; } .fa-ellipsis-v:before { content: "\f142"; } .fa-rss-square:before { content: "\f143"; } .fa-play-circle:before { content: "\f144"; } .fa-ticket:before { content: "\f145"; } .fa-minus-square:before { content: "\f146"; } .fa-minus-square-o:before { content: "\f147"; } .fa-level-up:before { content: "\f148"; } .fa-level-down:before { content: "\f149"; } .fa-check-square:before { content: "\f14a"; } .fa-pencil-square:before { content: "\f14b"; } .<API key>:before { content: "\f14c"; } .fa-share-square:before { content: "\f14d"; } .fa-compass:before { content: "\f14e"; } .fa-toggle-down:before, .<API key>:before { content: "\f150"; } .fa-toggle-up:before, .<API key>:before { content: "\f151"; } .fa-toggle-right:before, .<API key>:before { content: "\f152"; } .fa-euro:before, .fa-eur:before { content: "\f153"; } .fa-gbp:before { content: "\f154"; } .fa-dollar:before, .fa-usd:before { content: "\f155"; } .fa-rupee:before, .fa-inr:before { content: "\f156"; } .fa-cny:before, .fa-rmb:before, .fa-yen:before, .fa-jpy:before { content: "\f157"; } .fa-ruble:before, .fa-rouble:before, .fa-rub:before { content: "\f158"; } .fa-won:before, .fa-krw:before { content: "\f159"; } .fa-bitcoin:before, .fa-btc:before { content: "\f15a"; } .fa-file:before { content: "\f15b"; } .fa-file-text:before { content: "\f15c"; } .fa-sort-alpha-asc:before { content: "\f15d"; } .fa-sort-alpha-desc:before { content: "\f15e"; } .fa-sort-amount-asc:before { content: "\f160"; } .fa-sort-amount-desc:before { content: "\f161"; } .fa-sort-numeric-asc:before { content: "\f162"; } .<API key>:before { content: "\f163"; } .fa-thumbs-up:before { content: "\f164"; } .fa-thumbs-down:before { content: "\f165"; } .fa-youtube-square:before { content: "\f166"; } .fa-youtube:before { content: "\f167"; } .fa-xing:before { content: "\f168"; } .fa-xing-square:before { content: "\f169"; } .fa-youtube-play:before { content: "\f16a"; } .fa-dropbox:before { content: "\f16b"; } .fa-stack-overflow:before { content: "\f16c"; } .fa-instagram:before { content: "\f16d"; } .fa-flickr:before { content: "\f16e"; } .fa-adn:before { content: "\f170"; } .fa-bitbucket:before { content: "\f171"; } .fa-bitbucket-square:before { content: "\f172"; } .fa-tumblr:before { content: "\f173"; } .fa-tumblr-square:before { content: "\f174"; } .fa-long-arrow-down:before { content: "\f175"; } .fa-long-arrow-up:before { content: "\f176"; } .fa-long-arrow-left:before { content: "\f177"; } .fa-long-arrow-right:before { content: "\f178"; } .fa-apple:before { content: "\f179"; } .fa-windows:before { content: "\f17a"; } .fa-android:before { content: "\f17b"; } .fa-linux:before { content: "\f17c"; } .fa-dribbble:before { content: "\f17d"; } .fa-skype:before { content: "\f17e"; } .fa-foursquare:before { content: "\f180"; } .fa-trello:before { content: "\f181"; } .fa-female:before { content: "\f182"; } .fa-male:before { content: "\f183"; } .fa-gittip:before { content: "\f184"; } .fa-sun-o:before { content: "\f185"; } .fa-moon-o:before { content: "\f186"; } .fa-archive:before { content: "\f187"; } .fa-bug:before { content: "\f188"; } .fa-vk:before { content: "\f189"; } .fa-weibo:before { content: "\f18a"; } .fa-renren:before { content: "\f18b"; } .fa-pagelines:before { content: "\f18c"; } .fa-stack-exchange:before { content: "\f18d"; } .<API key>:before { content: "\f18e"; } .<API key>:before { content: "\f190"; } .fa-toggle-left:before, .<API key>:before { content: "\f191"; } .fa-dot-circle-o:before { content: "\f192"; } .fa-wheelchair:before { content: "\f193"; } .fa-vimeo-square:before { content: "\f194"; } .fa-turkish-lira:before, .fa-try:before { content: "\f195"; } .fa-plus-square-o:before { content: "\f196"; } .fa-space-shuttle:before { content: "\f197"; } .fa-slack:before { content: "\f198"; } .fa-envelope-square:before { content: "\f199"; } .fa-wordpress:before { content: "\f19a"; } .fa-openid:before { content: "\f19b"; } .fa-institution:before, .fa-bank:before, .fa-university:before { content: "\f19c"; } .fa-mortar-board:before, .fa-graduation-cap:before { content: "\f19d"; } .fa-yahoo:before { content: "\f19e"; } .fa-google:before { content: "\f1a0"; } .fa-reddit:before { content: "\f1a1"; } .fa-reddit-square:before { content: "\f1a2"; } .<API key>:before { content: "\f1a3"; } .fa-stumbleupon:before { content: "\f1a4"; } .fa-delicious:before { content: "\f1a5"; } .fa-digg:before { content: "\f1a6"; } .fa-pied-piper:before { content: "\f1a7"; } .fa-pied-piper-alt:before { content: "\f1a8"; } .fa-drupal:before { content: "\f1a9"; } .fa-joomla:before { content: "\f1aa"; } .fa-language:before { content: "\f1ab"; } .fa-fax:before { content: "\f1ac"; } .fa-building:before { content: "\f1ad"; } .fa-child:before { content: "\f1ae"; } .fa-paw:before { content: "\f1b0"; } .fa-spoon:before { content: "\f1b1"; } .fa-cube:before { content: "\f1b2"; } .fa-cubes:before { content: "\f1b3"; } .fa-behance:before { content: "\f1b4"; } .fa-behance-square:before { content: "\f1b5"; } .fa-steam:before { content: "\f1b6"; } .fa-steam-square:before { content: "\f1b7"; } .fa-recycle:before { content: "\f1b8"; } .fa-automobile:before, .fa-car:before { content: "\f1b9"; } .fa-cab:before, .fa-taxi:before { content: "\f1ba"; } .fa-tree:before { content: "\f1bb"; } .fa-spotify:before { content: "\f1bc"; } .fa-deviantart:before { content: "\f1bd"; } .fa-soundcloud:before { content: "\f1be"; } .fa-database:before { content: "\f1c0"; } .fa-file-pdf-o:before { content: "\f1c1"; } .fa-file-word-o:before { content: "\f1c2"; } .fa-file-excel-o:before { content: "\f1c3"; } .<API key>:before { content: "\f1c4"; } .fa-file-photo-o:before, .fa-file-picture-o:before, .fa-file-image-o:before { content: "\f1c5"; } .fa-file-zip-o:before, .fa-file-archive-o:before { content: "\f1c6"; } .fa-file-sound-o:before, .fa-file-audio-o:before { content: "\f1c7"; } .fa-file-movie-o:before, .fa-file-video-o:before { content: "\f1c8"; } .fa-file-code-o:before { content: "\f1c9"; } .fa-vine:before { content: "\f1ca"; } .fa-codepen:before { content: "\f1cb"; } .fa-jsfiddle:before { content: "\f1cc"; } .fa-life-bouy:before, .fa-life-buoy:before, .fa-life-saver:before, .fa-support:before, .fa-life-ring:before { content: "\f1cd"; } .fa-circle-o-notch:before { content: "\f1ce"; } .fa-ra:before, .fa-rebel:before { content: "\f1d0"; } .fa-ge:before, .fa-empire:before { content: "\f1d1"; } .fa-git-square:before { content: "\f1d2"; } .fa-git:before { content: "\f1d3"; } .fa-hacker-news:before { content: "\f1d4"; } .fa-tencent-weibo:before { content: "\f1d5"; } .fa-qq:before { content: "\f1d6"; } .fa-wechat:before, .fa-weixin:before { content: "\f1d7"; } .fa-send:before, .fa-paper-plane:before { content: "\f1d8"; } .fa-send-o:before, .fa-paper-plane-o:before { content: "\f1d9"; } .fa-history:before { content: "\f1da"; } .fa-circle-thin:before { content: "\f1db"; } .fa-header:before { content: "\f1dc"; } .fa-paragraph:before { content: "\f1dd"; } .fa-sliders:before { content: "\f1de"; } .fa-share-alt:before { content: "\f1e0"; } .fa-share-alt-square:before { content: "\f1e1"; } .fa-bomb:before { content: "\f1e2"; } .fa-soccer-ball-o:before, .fa-futbol-o:before { content: "\f1e3"; } .fa-tty:before { content: "\f1e4"; } .fa-binoculars:before { content: "\f1e5"; } .fa-plug:before { content: "\f1e6"; } .fa-slideshare:before { content: "\f1e7"; } .fa-twitch:before { content: "\f1e8"; } .fa-yelp:before { content: "\f1e9"; } .fa-newspaper-o:before { content: "\f1ea"; } .fa-wifi:before { content: "\f1eb"; } .fa-calculator:before { content: "\f1ec"; } .fa-paypal:before { content: "\f1ed"; } .fa-google-wallet:before { content: "\f1ee"; } .fa-cc-visa:before { content: "\f1f0"; } .fa-cc-mastercard:before { content: "\f1f1"; } .fa-cc-discover:before { content: "\f1f2"; } .fa-cc-amex:before { content: "\f1f3"; } .fa-cc-paypal:before { content: "\f1f4"; } .fa-cc-stripe:before { content: "\f1f5"; } .fa-bell-slash:before { content: "\f1f6"; } .fa-bell-slash-o:before { content: "\f1f7"; } .fa-trash:before { content: "\f1f8"; } .fa-copyright:before { content: "\f1f9"; } .fa-at:before { content: "\f1fa"; } .fa-eyedropper:before { content: "\f1fb"; } .fa-paint-brush:before { content: "\f1fc"; } .fa-birthday-cake:before { content: "\f1fd"; } .fa-area-chart:before { content: "\f1fe"; } .fa-pie-chart:before { content: "\f200"; } .fa-line-chart:before { content: "\f201"; } .fa-lastfm:before { content: "\f202"; } .fa-lastfm-square:before { content: "\f203"; } .fa-toggle-off:before { content: "\f204"; } .fa-toggle-on:before { content: "\f205"; } .fa-bicycle:before { content: "\f206"; } .fa-bus:before { content: "\f207"; } .fa-ioxhost:before { content: "\f208"; } .fa-angellist:before { content: "\f209"; } .fa-cc:before { content: "\f20a"; } .fa-shekel:before, .fa-sheqel:before, .fa-ils:before { content: "\f20b"; } .fa-meanpath:before { content: "\f20c"; } html.boxed-layout #<API key>, html.boxed-layout #<API key>, html.boxed-layout #layout-footer { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { html.boxed-layout #<API key>, html.boxed-layout #<API key>, html.boxed-layout #layout-footer { width: 750px; } } @media (min-width: 992px) { html.boxed-layout #<API key>, html.boxed-layout #<API key>, html.boxed-layout #layout-footer { width: 970px; } } @media (min-width: 1200px) { html.boxed-layout #<API key>, html.boxed-layout #<API key>, html.boxed-layout #layout-footer { width: 1170px; } } html.boxed-layout #<API key> > .navbar-header, html.boxed-layout #<API key> > .navbar-header, html.boxed-layout #layout-footer > .navbar-header, html.boxed-layout #<API key> > .navbar-collapse, html.boxed-layout #<API key> > .navbar-collapse, html.boxed-layout #layout-footer > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { html.boxed-layout #<API key> > .navbar-header, html.boxed-layout #<API key> > .navbar-header, html.boxed-layout #layout-footer > .navbar-header, html.boxed-layout #<API key> > .navbar-collapse, html.boxed-layout #<API key> > .navbar-collapse, html.boxed-layout #layout-footer > .navbar-collapse { margin-right: 0; margin-left: 0; } } html.fluid-layout #<API key>, html.fluid-layout #<API key>, html.fluid-layout #layout-footer { padding: 0 15px; } html.fixed-nav.boxed-layout #layout-navigation { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { html.fixed-nav.boxed-layout #layout-navigation { width: 750px; } } @media (min-width: 992px) { html.fixed-nav.boxed-layout #layout-navigation { width: 970px; } } @media (min-width: 1200px) { html.fixed-nav.boxed-layout #layout-navigation { width: 1170px; } } html.fixed-nav.boxed-layout #layout-navigation > .navbar-header, html.fixed-nav.boxed-layout #layout-navigation > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { html.fixed-nav.boxed-layout #layout-navigation > .navbar-header, html.fixed-nav.boxed-layout #layout-navigation > .navbar-collapse { margin-right: 0; margin-left: 0; } } html.fixed-nav.fluid-layout #layout-navigation { padding: 0 15px; } html.floating-nav #layout-navigation { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { html.floating-nav #layout-navigation { float: left; width: 100%; } } html.floating-nav.boxed-layout .navbar-wrapper { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { html.floating-nav.boxed-layout .navbar-wrapper { width: 750px; } } @media (min-width: 992px) { html.floating-nav.boxed-layout .navbar-wrapper { width: 970px; } } @media (min-width: 1200px) { html.floating-nav.boxed-layout .navbar-wrapper { width: 1170px; } } html.floating-nav.boxed-layout .navbar-wrapper > .navbar-header, html.floating-nav.boxed-layout .navbar-wrapper > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { html.floating-nav.boxed-layout .navbar-wrapper > .navbar-header, html.floating-nav.boxed-layout .navbar-wrapper > .navbar-collapse { margin-right: 0; margin-left: 0; } } html.floating-nav.fluid-layout .navbar-wrapper { padding: 0 15px; } #layout-main, #layout-tripel, #footer-quad { margin-left: -15px; margin-right: -15px; } #layout-content { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { #layout-content { float: left; width: 100%; } } .aside-1 #layout-content, .aside-2 #layout-content { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .aside-1 #layout-content, .aside-2 #layout-content { float: left; width: 75%; } } .aside-12 #layout-content { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .aside-12 #layout-content { float: left; width: 50%; } } #aside-first, #aside-second { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { #aside-first, #aside-second { float: left; width: 25%; } } .tripel-1 #tripel-first, .tripel-2 #tripel-first, .tripel-3 #tripel-first, .tripel-1 #tripel-second, .tripel-2 #tripel-second, .tripel-3 #tripel-second, .tripel-1 #tripel-third, .tripel-2 #tripel-third, .tripel-3 #tripel-third { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .tripel-1 #tripel-first, .tripel-2 #tripel-first, .tripel-3 #tripel-first, .tripel-1 #tripel-second, .tripel-2 #tripel-second, .tripel-3 #tripel-second, .tripel-1 #tripel-third, .tripel-2 #tripel-third, .tripel-3 #tripel-third { float: left; width: 100%; } } .tripel-12 #tripel-first, .tripel-13 #tripel-first, .tripel-23 #tripel-first, .tripel-12 #tripel-second, .tripel-13 #tripel-second, .tripel-23 #tripel-second, .tripel-12 #tripel-third, .tripel-13 #tripel-third, .tripel-23 #tripel-third { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .tripel-12 #tripel-first, .tripel-13 #tripel-first, .tripel-23 #tripel-first, .tripel-12 #tripel-second, .tripel-13 #tripel-second, .tripel-23 #tripel-second, .tripel-12 #tripel-third, .tripel-13 #tripel-third, .tripel-23 #tripel-third { float: left; width: 50%; } } .tripel-123 #tripel-first, .tripel-123 #tripel-second, .tripel-123 #tripel-third { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .tripel-123 #tripel-first, .tripel-123 #tripel-second, .tripel-123 #tripel-third { float: left; width: 33.33333333%; } } .split-1 + #layout-footer #footer-quad-first, .split-2 + #layout-footer #footer-quad-first, .split-3 + #layout-footer #footer-quad-first, .split-4 + #layout-footer #footer-quad-first, .split-1 + #layout-footer #footer-quad-second, .split-2 + #layout-footer #footer-quad-second, .split-3 + #layout-footer #footer-quad-second, .split-4 + #layout-footer #footer-quad-second, .split-1 + #layout-footer #footer-quad-third, .split-2 + #layout-footer #footer-quad-third, .split-3 + #layout-footer #footer-quad-third, .split-4 + #layout-footer #footer-quad-third, .split-1 + #layout-footer #footer-quad-fourth, .split-2 + #layout-footer #footer-quad-fourth, .split-3 + #layout-footer #footer-quad-fourth, .split-4 + #layout-footer #footer-quad-fourth { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .split-1 + #layout-footer #footer-quad-first, .split-2 + #layout-footer #footer-quad-first, .split-3 + #layout-footer #footer-quad-first, .split-4 + #layout-footer #footer-quad-first, .split-1 + #layout-footer #footer-quad-second, .split-2 + #layout-footer #footer-quad-second, .split-3 + #layout-footer #footer-quad-second, .split-4 + #layout-footer #footer-quad-second, .split-1 + #layout-footer #footer-quad-third, .split-2 + #layout-footer #footer-quad-third, .split-3 + #layout-footer #footer-quad-third, .split-4 + #layout-footer #footer-quad-third, .split-1 + #layout-footer #footer-quad-fourth, .split-2 + #layout-footer #footer-quad-fourth, .split-3 + #layout-footer #footer-quad-fourth, .split-4 + #layout-footer #footer-quad-fourth { float: left; width: 100%; } } .split-12 + #layout-footer #footer-quad-first, .split-13 + #layout-footer #footer-quad-first, .split-14 + #layout-footer #footer-quad-first, .split-23 + #layout-footer #footer-quad-first, .split-24 + #layout-footer #footer-quad-first, .split-34 + #layout-footer #footer-quad-first, .split-12 + #layout-footer #footer-quad-second, .split-13 + #layout-footer #footer-quad-second, .split-14 + #layout-footer #footer-quad-second, .split-23 + #layout-footer #footer-quad-second, .split-24 + #layout-footer #footer-quad-second, .split-34 + #layout-footer #footer-quad-second, .split-12 + #layout-footer #footer-quad-third, .split-13 + #layout-footer #footer-quad-third, .split-14 + #layout-footer #footer-quad-third, .split-23 + #layout-footer #footer-quad-third, .split-24 + #layout-footer #footer-quad-third, .split-34 + #layout-footer #footer-quad-third, .split-12 + #layout-footer #footer-quad-fourth, .split-13 + #layout-footer #footer-quad-fourth, .split-14 + #layout-footer #footer-quad-fourth, .split-23 + #layout-footer #footer-quad-fourth, .split-24 + #layout-footer #footer-quad-fourth, .split-34 + #layout-footer #footer-quad-fourth { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .split-12 + #layout-footer #footer-quad-first, .split-13 + #layout-footer #footer-quad-first, .split-14 + #layout-footer #footer-quad-first, .split-23 + #layout-footer #footer-quad-first, .split-24 + #layout-footer #footer-quad-first, .split-34 + #layout-footer #footer-quad-first, .split-12 + #layout-footer #footer-quad-second, .split-13 + #layout-footer #footer-quad-second, .split-14 + #layout-footer #footer-quad-second, .split-23 + #layout-footer #footer-quad-second, .split-24 + #layout-footer #footer-quad-second, .split-34 + #layout-footer #footer-quad-second, .split-12 + #layout-footer #footer-quad-third, .split-13 + #layout-footer #footer-quad-third, .split-14 + #layout-footer #footer-quad-third, .split-23 + #layout-footer #footer-quad-third, .split-24 + #layout-footer #footer-quad-third, .split-34 + #layout-footer #footer-quad-third, .split-12 + #layout-footer #footer-quad-fourth, .split-13 + #layout-footer #footer-quad-fourth, .split-14 + #layout-footer #footer-quad-fourth, .split-23 + #layout-footer #footer-quad-fourth, .split-24 + #layout-footer #footer-quad-fourth, .split-34 + #layout-footer #footer-quad-fourth { float: left; width: 50%; } } .split-123 + #layout-footer #footer-quad-first, .split-124 + #layout-footer #footer-quad-first, .split-134 + #layout-footer #footer-quad-first, .split-234 + #layout-footer #footer-quad-first, .split-123 + #layout-footer #footer-quad-second, .split-124 + #layout-footer #footer-quad-second, .split-134 + #layout-footer #footer-quad-second, .split-234 + #layout-footer #footer-quad-second, .split-123 + #layout-footer #footer-quad-third, .split-124 + #layout-footer #footer-quad-third, .split-134 + #layout-footer #footer-quad-third, .split-234 + #layout-footer #footer-quad-third, .split-123 + #layout-footer #footer-quad-fourth, .split-124 + #layout-footer #footer-quad-fourth, .split-134 + #layout-footer #footer-quad-fourth, .split-234 + #layout-footer #footer-quad-fourth { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .split-123 + #layout-footer #footer-quad-first, .split-124 + #layout-footer #footer-quad-first, .split-134 + #layout-footer #footer-quad-first, .split-234 + #layout-footer #footer-quad-first, .split-123 + #layout-footer #footer-quad-second, .split-124 + #layout-footer #footer-quad-second, .split-134 + #layout-footer #footer-quad-second, .split-234 + #layout-footer #footer-quad-second, .split-123 + #layout-footer #footer-quad-third, .split-124 + #layout-footer #footer-quad-third, .split-134 + #layout-footer #footer-quad-third, .split-234 + #layout-footer #footer-quad-third, .split-123 + #layout-footer #footer-quad-fourth, .split-124 + #layout-footer #footer-quad-fourth, .split-134 + #layout-footer #footer-quad-fourth, .split-234 + #layout-footer #footer-quad-fourth { float: left; width: 33.33333333%; } } .split-1234 + #layout-footer #footer-quad-first, .split-1234 + #layout-footer #footer-quad-second, .split-1234 + #layout-footer #footer-quad-third, .split-1234 + #layout-footer #footer-quad-fourth { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { .split-1234 + #layout-footer #footer-quad-first, .split-1234 + #layout-footer #footer-quad-second, .split-1234 + #layout-footer #footer-quad-third, .split-1234 + #layout-footer #footer-quad-fourth { float: left; width: 25%; } } html.sticky-footer { min-height: 100%; position: relative; } html.sticky-footer #layout-footer { position: absolute; bottom: 0; width: 100%; } html.sticky-footer.boxed-layout #footer { margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } @media (min-width: 768px) { html.sticky-footer.boxed-layout #footer { width: 750px; } } @media (min-width: 992px) { html.sticky-footer.boxed-layout #footer { width: 970px; } } @media (min-width: 1200px) { html.sticky-footer.boxed-layout #footer { width: 1170px; } } html.sticky-footer.boxed-layout #footer > .navbar-header, html.sticky-footer.boxed-layout #footer > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { html.sticky-footer.boxed-layout #footer > .navbar-header, html.sticky-footer.boxed-layout #footer > .navbar-collapse { margin-right: 0; margin-left: 0; } } html.sticky-footer.fluid-layout #footer { padding: 0 15px; } .carousel-control .fa-chevron-left { width: 30px; height: 30px; margin-top: -15px; margin-left: -15px; font-size: 30px; left: 50%; position: absolute; top: 50%; z-index: 5; display: inline-block; } .carousel-control .fa-chevron-right { width: 30px; height: 30px; margin-top: -15px; margin-left: -15px; font-size: 30px; right: 50%; position: absolute; top: 50%; z-index: 5; display: inline-block; } .media .comment-avatar { margin-right: 10px; } ul.comments li { margin-top: 40px; } #toTop { position: fixed; right: 5px; bottom: 10px; cursor: pointer; display: none; text-align: center; z-index: 500; } #toTop:hover { opacity: .7; } /* add user icon before menu */ .menuUserName > a:before { content: "\f007"; font-family: "FontAwesome"; margin-right: 5px; } .widget-search-form { float: none !important; } .dropdown-menu ul { left: 100%; top: 0; } .dropdown .dropdown:hover > .dropdown-menu, .dropdown .dropdown .dropdown:hover > .dropdown-menu, .dropdown .dropdown .dropdown .dropdown:hover > .dropdown-menu, .dropdown .dropdown .dropdown .dropdown .dropdown:hover > .dropdown-menu { display: block; } .dropdown-menu i { line-height: 1.42857143; } .navbar-brand { padding-left: 0; } fieldset > div { margin-bottom: 15px; } input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="file"], input[type="month"], input[type="number"], input[type="password"], input[type="range"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"], select, textarea { display: block; width: 100%; height: 39px; padding: 8px 16px; font-size: 15px; line-height: 1.42857143; color: #2b3e50; background-color: #ffffff; background-image: none; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="email"]:focus, input[type="file"]:focus, input[type="month"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="range"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="week"]:focus, select:focus, textarea:focus { border-color: transparent; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6); } input[type="color"]::-moz-placeholder, input[type="date"]::-moz-placeholder, input[type="datetime"]::-moz-placeholder, input[type="datetime-local"]::-moz-placeholder, input[type="email"]::-moz-placeholder, input[type="file"]::-moz-placeholder, input[type="month"]::-moz-placeholder, input[type="number"]::-moz-placeholder, input[type="password"]::-moz-placeholder, input[type="range"]::-moz-placeholder, input[type="search"]::-moz-placeholder, input[type="tel"]::-moz-placeholder, input[type="text"]::-moz-placeholder, input[type="time"]::-moz-placeholder, input[type="url"]::-moz-placeholder, input[type="week"]::-moz-placeholder, select::-moz-placeholder, textarea::-moz-placeholder { color: #cccccc; opacity: 1; } input[type="color"]:-<API key>, input[type="date"]:-<API key>, input[type="datetime"]:-<API key>, input[type="datetime-local"]:-<API key>, input[type="email"]:-<API key>, input[type="file"]:-<API key>, input[type="month"]:-<API key>, input[type="number"]:-<API key>, input[type="password"]:-<API key>, input[type="range"]:-<API key>, input[type="search"]:-<API key>, input[type="tel"]:-<API key>, input[type="text"]:-<API key>, input[type="time"]:-<API key>, input[type="url"]:-<API key>, input[type="week"]:-<API key>, select:-<API key>, textarea:-<API key> { color: #cccccc; } input[type="color"]::-<API key>, input[type="date"]::-<API key>, input[type="datetime"]::-<API key>, input[type="datetime-local"]::-<API key>, input[type="email"]::-<API key>, input[type="file"]::-<API key>, input[type="month"]::-<API key>, input[type="number"]::-<API key>, input[type="password"]::-<API key>, input[type="range"]::-<API key>, input[type="search"]::-<API key>, input[type="tel"]::-<API key>, input[type="text"]::-<API key>, input[type="time"]::-<API key>, input[type="url"]::-<API key>, input[type="week"]::-<API key>, select::-<API key>, textarea::-<API key> { color: #cccccc; } input[type="color"][disabled], input[type="date"][disabled], input[type="datetime"][disabled], input[type="datetime-local"][disabled], input[type="email"][disabled], input[type="file"][disabled], input[type="month"][disabled], input[type="number"][disabled], input[type="password"][disabled], input[type="range"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="text"][disabled], input[type="time"][disabled], input[type="url"][disabled], input[type="week"][disabled], select[disabled], textarea[disabled], input[type="color"][readonly], input[type="date"][readonly], input[type="datetime"][readonly], input[type="datetime-local"][readonly], input[type="email"][readonly], input[type="file"][readonly], input[type="month"][readonly], input[type="number"][readonly], input[type="password"][readonly], input[type="range"][readonly], input[type="search"][readonly], input[type="tel"][readonly], input[type="text"][readonly], input[type="time"][readonly], input[type="url"][readonly], input[type="week"][readonly], select[readonly], textarea[readonly], fieldset[disabled] input[type="color"], fieldset[disabled] input[type="date"], fieldset[disabled] input[type="datetime"], fieldset[disabled] input[type="datetime-local"], fieldset[disabled] input[type="email"], fieldset[disabled] input[type="file"], fieldset[disabled] input[type="month"], fieldset[disabled] input[type="number"], fieldset[disabled] input[type="password"], fieldset[disabled] input[type="range"], fieldset[disabled] input[type="search"], fieldset[disabled] input[type="tel"], fieldset[disabled] input[type="text"], fieldset[disabled] input[type="time"], fieldset[disabled] input[type="url"], fieldset[disabled] input[type="week"], fieldset[disabled] select, fieldset[disabled] textarea { cursor: not-allowed; background-color: #ebebeb; opacity: 1; } textareainput[type="color"], textareainput[type="date"], textareainput[type="datetime"], textareainput[type="datetime-local"], textareainput[type="email"], textareainput[type="file"], textareainput[type="month"], textareainput[type="number"], textareainput[type="password"], textareainput[type="range"], textareainput[type="search"], textareainput[type="tel"], textareainput[type="text"], textareainput[type="time"], textareainput[type="url"], textareainput[type="week"], textareaselect, textareatextarea { height: auto; } textarea { height: auto; } button { display: inline-block; margin-bottom: 0; font-weight: normal; text-align: center; vertical-align: middle; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 8px 16px; font-size: 15px; line-height: 1.42857143; border-radius: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; font-weight: 300; color: #ffffff; background-color: #4e5d6c; border-color: transparent; } button:focus, button:active:focus, button.active:focus { outline: thin dotted; outline: 5px auto -<API key>; outline-offset: -2px; } button:hover, button:focus { color: #ffffff; text-decoration: none; } button:active, button.active { outline: 0; background-image: none; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } button.disabled, button[disabled], fieldset[disabled] button { cursor: not-allowed; pointer-events: none; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; } button-default:hover { background-color: #485563; } button-sm, button-xs { font-size: 12px; } button:hover, button:focus, button:active, button.active, .open > .<API key> { color: #ffffff; background-color: #39444e; border-color: rgba(0, 0, 0, 0); } button:active, button.active, .open > .<API key> { background-image: none; } button.disabled, button[disabled], fieldset[disabled] button, button.disabled:hover, button[disabled]:hover, fieldset[disabled] button:hover, button.disabled:focus, button[disabled]:focus, fieldset[disabled] button:focus, button.disabled:active, button[disabled]:active, fieldset[disabled] button:active, button.disabled.active, button[disabled].active, fieldset[disabled] button.active { background-color: #4e5d6c; border-color: transparent; } button .badge { color: #4e5d6c; background-color: #ffffff; } button.primaryAction { color: #ffffff; background-color: #df691a; border-color: transparent; } button.primaryAction:hover, button.primaryAction:focus, button.primaryAction:active, button.primaryAction.active, .open > .<API key>.primaryAction { color: #ffffff; background-color: #b15315; border-color: rgba(0, 0, 0, 0); } button.primaryAction:active, button.primaryAction.active, .open > .<API key>.primaryAction { background-image: none; } button.primaryAction.disabled, button.primaryAction[disabled], fieldset[disabled] button.primaryAction, button.primaryAction.disabled:hover, button.primaryAction[disabled]:hover, fieldset[disabled] button.primaryAction:hover, button.primaryAction.disabled:focus, button.primaryAction[disabled]:focus, fieldset[disabled] button.primaryAction:focus, button.primaryAction.disabled:active, button.primaryAction[disabled]:active, fieldset[disabled] button.primaryAction:active, button.primaryAction.disabled.active, button.primaryAction[disabled].active, fieldset[disabled] button.primaryAction.active { background-color: #df691a; border-color: transparent; } button.primaryAction .badge { color: #df691a; background-color: #ffffff; } ol, ul { padding-left: 0; list-style: none; } .pager { display: inline-block; padding-left: 0; margin: 21px 0; border-radius: 0; } .pager > li { display: inline; } .pager > li > a, .pager > li > span { position: relative; float: left; padding: 8px 16px; line-height: 1.42857143; text-decoration: none; color: #ebebeb; background-color: #4e5d6c; border: 1px solid transparent; margin-left: -1px; } .pager > li:first-child > a, .pager > li:first-child > span { margin-left: 0; <API key>: 0; <API key>: 0; } .pager > li:last-child > a, .pager > li:last-child > span { <API key>: 0; <API key>: 0; } .pager > li > a:hover, .pager > li > span:hover, .pager > li > a:focus, .pager > li > span:focus { color: #ebebeb; background-color: #485563; border-color: transparent; } .pager > .active > a, .pager > .active > span, .pager > .active > a:hover, .pager > .active > span:hover, .pager > .active > a:focus, .pager > .active > span:focus { z-index: 2; color: #ebebeb; background-color: #df691a; border-color: transparent; cursor: default; } .pager > .disabled > span, .pager > .disabled > span:hover, .pager > .disabled > span:focus, .pager > .disabled > a, .pager > .disabled > a:hover, .pager > .disabled > a:focus { color: #323c46; background-color: #4e5d6c; border-color: transparent; cursor: not-allowed; } html.orchard-users form { margin-left: -15px; margin-right: -15px; } html.orchard-users form fieldset { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; } @media (min-width: 992px) { html.orchard-users form fieldset { float: left; width: 50%; } } .<API key> { -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); border-color: #ebebeb !important; } .<API key> { display: block; margin-top: 5px; margin-bottom: 10px; color: #ffffff; font-size: 12px; font-weight: 300; color: #ebebeb; } .widget h1 { font-family: inherit; font-weight: 300; line-height: 1.1; color: inherit; margin-top: 21px; margin-bottom: 10.5px; font-size: 26px; } .widget h1 small, .widget h1 .small { font-weight: normal; line-height: 1; color: #ebebeb; } .widget h1 small, .widget h1 .small { font-size: 65%; } .tags, .comment-count { margin-right: 20px; } /* Z-INDEX */ .formError { z-index: 990; } .formError .formErrorContent { z-index: 991; } .formError .formErrorArrow { z-index: 996; } .ui-dialog .formError { z-index: 5000; } .ui-dialog .formError .formErrorContent { z-index: 5001; } .ui-dialog .formError .formErrorArrow { z-index: 5006; } .inputContainer { position: relative; float: left; } .formError { position: absolute; top: 300px; left: 300px; display: block; cursor: pointer; text-align: left; } .formError.inline { position: relative; top: 0; left: 0; display: inline-block; } .ajaxSubmit { padding: 20px; background: #55ea55; border: 0px solid #ffffff; display: none; } .formError .formErrorContent { width: 100%; background: #ee0101; position: relative; color: #ffffff; min-width: 120px; font-size: 11px; border: 0px solid #ffffff; box-shadow: 0 0 2px #333333; -moz-box-shadow: 0 0 2px #333333; -webkit-box-shadow: 0 0 2px #333333; -o-box-shadow: 0 0 2px #333333; padding: 4px 10px 4px 10px; border-radius: 6px; -moz-border-radius: 6px; -<API key>: 6px; -o-border-radius: 6px; } .formError.inline .formErrorContent { box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; -o-box-shadow: none; border: none; border-radius: 0; -moz-border-radius: 0; -<API key>: 0; -o-border-radius: 0; } .greenPopup .formErrorContent { background: #33be40; } .blackPopup .formErrorContent { background: #393939; color: #FFF; } .formError .formErrorArrow { width: 15px; margin: -2px 0 0 13px; position: relative; } body[dir='rtl'] .formError .formErrorArrow, body.rtl .formError .formErrorArrow { margin: -2px 13px 0 0; } .formError .<API key> { box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; -o-box-shadow: none; margin: 0px 0 0 12px; top: 2px; } .formError .formErrorArrow div { border-left: 0px solid #ffffff; border-right: 0px solid #ffffff; box-shadow: 0 1px 1px #4d4d4d; -moz-box-shadow: 0 1px 1px #4d4d4d; -webkit-box-shadow: 0 1px 1px #4d4d4d; -o-box-shadow: 0 1px 1px #4d4d4d; font-size: 0px; height: 1px; background: #ee0101; margin: 0 auto; line-height: 0; font-size: 0; display: block; } .formError .<API key> div { box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; -o-box-shadow: none; } .greenPopup .formErrorArrow div { background: #33be40; } .blackPopup .formErrorArrow div { background: #393939; color: #FFF; } .formError .formErrorArrow .line10 { width: 13px; border: none; } .formError .formErrorArrow .line9 { width: 11px; border: none; } .formError .formErrorArrow .line8 { width: 11px; } .formError .formErrorArrow .line7 { width: 9px; } .formError .formErrorArrow .line6 { width: 7px; } .formError .formErrorArrow .line5 { width: 5px; } .formError .formErrorArrow .line4 { width: 3px; } .formError .formErrorArrow .line3 { width: 0px; border-left: 0px solid #ffffff; border-right: 0px solid #ffffff; border-bottom: 0 solid #ffffff; } .formError .formErrorArrow .line2 { width: 3px; border: none; background: #ffffff; } .formError .formErrorArrow .line1 { width: 1px; border: none; background: #ffffff; } .portfolio-filter { padding: 25px 15px; text-transform: uppercase; font-size: 11px; } .portfolio-item { overflow: hidden; -webkit-transition: all 0.2s ease; transition: all 0.2s ease; border-radius: 3px; } .portfolio-item .portfolio-thumb { position: relative; overflow: hidden; } .portfolio-item .portfolio-thumb img { -webkit-transition: all 0.2s ease; transition: all 0.2s ease; } .portfolio-item .portfolio-details { text-align: center; padding: 20px; border-top: 0; overflow: hidden; } .portfolio-item .portfolio-details h5 { margin-top: 0; position: relative; } .portfolio-item .portfolio-details p { margin-top: 20px; margin-bottom: 0; } .isotope { -<API key>: height, width; -<API key>: height, width; -<API key>: height, width; -<API key>: height, width; transition-property: height, width; } .isotope, .isotope .isotope-item { -<API key>: 0.8s; -<API key>: 0.8s; -<API key>: 0.8s; -<API key>: 0.8s; transition-duration: 0.8s; } .latest-twitter-list h5 { display: inline-block; margin: 0; } .latest-twitter-list li { margin-bottom: 10px; } .navbar-nav > li > .dropdown-menu .dropdown-menu { margin-top: -6px; } .navbar { -webkit-box-shadow: none; box-shadow: none; border: none; font-size: 12px; } .navbar-default .badge { background-color: #fff; color: #4e5d6c; } .navbar-inverse .badge { background-color: #fff; color: #df691a; } .btn { font-weight: 300; } .btn-default:hover { background-color: #485563; } .btn-sm, .btn-xs { font-size: 12px; } body { font-weight: 300; } .text-primary, .text-primary:hover { color: #df691a; } .text-success, .text-success:hover { color: #5cb85c; } .text-danger, .text-danger:hover { color: #d9534f; } .text-warning, .text-warning:hover { color: #f0ad4e; } .text-info, .text-info:hover { color: #5bc0de; } .page-header { border-bottom-color: #4e5d6c; } .dropdown-menu { border: none; margin: 0; -webkit-box-shadow: none; box-shadow: none; } .dropdown-menu > li > a { font-size: 12px; font-weight: 300; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: none; box-shadow: none; } .dropdown-header { font-size: 12px; } table, .table { font-size: 12px; } table a:not(.btn), .table a:not(.btn) { color: #fff; text-decoration: underline; } table .text-muted, .table .text-muted { color: #4e5d6c; } table > thead > tr > th, .table > thead > tr > th, table > tbody > tr > th, .table > tbody > tr > th, table > tfoot > tr > th, .table > tfoot > tr > th, table > thead > tr > td, .table > thead > tr > td, table > tbody > tr > td, .table > tbody > tr > td, table > tfoot > tr > td, .table > tfoot > tr > td { border-color: transparent; } input, textarea { color: #2b3e50; } label, .radio label, .checkbox label, .help-block { font-size: 12px; font-weight: 300; } .input-addon, .input-group-addon { color: #ebebeb; } .has-warning .help-block, .has-warning .control-label, .has-warning .<API key> { color: #f0ad4e; } .has-warning .input-group-addon { border: none; } .has-error .help-block, .has-error .control-label, .has-error .<API key> { color: #d9534f; } .has-error .input-group-addon { border: none; } .has-success .help-block, .has-success .control-label, .has-success .<API key> { color: #5cb85c; } .has-success .input-group-addon { border: none; } .form-control:focus { -webkit-box-shadow: none; box-shadow: none; } .has-warning .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus { -webkit-box-shadow: none; box-shadow: none; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { border-color: transparent; } .nav-tabs > li > a { color: #ebebeb; } .nav-pills > li > a { color: #ebebeb; } .pager a { color: #ebebeb; } .label { font-weight: 300; } .alert { color: #fff; } .alert a, .alert .alert-link { color: #fff; } .close { opacity: 0.4; } .close:hover, .close:focus { opacity: 1; } .well { -webkit-box-shadow: none; box-shadow: none; } .panel { border: none; } .panel-default > .panel-heading { background-color: #485563; color: #ebebeb; } .thumbnail { background-color: #4e5d6c; border: none; } .modal { padding: 0; } .modal-header, .modal-footer { background-color: #485563; border: none; border-radius: 0; } .popover-title { border: none; } .navbar-nav > li > .dropdown-menu { margin-top: 1px; } .navbar-nav > li > .dropdown-menu .dropdown-menu { margin-top: -5px; } /*# sourceMappingURL=site-superhero.css.map */
""" The IRAF plugin implements a remote control interface for the Ginga FITS viewer from an IRAF session. In particular it supports the use of the IRAF 'display' and 'imexamine' commands. Instructions for use: Set the environment variable IMTDEV appropriately, e.g. $ export IMTDEV=inet:45005 (or) $ export IMTDEV=unix:/tmp/.imtg45 Ginga will try to use the default value if none is assigned. Start IRAF plugin (Plugins->Start IRAF). From Ginga you can load images and then use 'imexamine' from IRAF to load them, do photometry, etc. You can also use the 'display' command from IRAF to show images in Ginga. The 'IRAF' tab will show the mapping from Ginga channels to IRAF numerical 'frames'. When using imexamine, the plugin disables normal UI processing on the channel image so that keystrokes, etc. are passed through to IRAF. You can toggle back and forth between local Ginga control and IRAF control using the radio buttons at the top of the tab or using the space bar. IRAF commands that have been tested: display, imexam, rimcur and tvmark. """ import sys, os import logging import threading import socket import ginga.util.six as six if six.PY2: import Queue else: import queue as Queue import array import numpy import time from ginga import GingaPlugin, AstroImage from ginga import cmap, imap from ginga.gw import Widgets, Viewers from ginga.misc import Bunch # XImage protocol support import IIS_DataListener as iis class IRAF(GingaPlugin.GlobalPlugin): def __init__(self, fv): # superclass defines some variables for us, like logger super(IRAF, self).__init__(fv) self.keyqueue = Queue.Queue() self.keyevent = threading.Event() self.keymap = { 'comma': ',', } self.ctrldown = False self.layertag = 'iraf-canvas' # this will be set in initialize() self.canvas = None self.dc = fv.get_draw_classes() self.addr = iis.get_interface() self.ev_quit = self.fv.ev_quit self.dataTask = None # Holds frame buffers self.fb = {} self.current_frame = 0 # cursor position self.cursor_x = 1.0 self.cursor_y = 1.0 self.mode = 'ginga' self.imexam_active = False self.imexam_chname = None # init the first frame(frame 0) self.init_frame(0) # colormap for use with IRAF displays self.cm_iis = cmap.ColorMap('iis_iraf', cmap_iis_iraf) self.im_iis = imap.get_imap('ultrasmooth') fv.add_callback('add-channel', self.add_channel) fv.add_callback('delete-channel', self.delete_channel) #fv.set_callback('channel-change', self.focus_cb) self.gui_up = False def build_gui(self, container): canvas = self.dc.DrawingCanvas() canvas.enable_draw(False) ## canvas.set_callback('none-move', self.cursormotion) canvas.add_callback('key-press', self.window_key_press) canvas.add_callback('key-release', self.window_key_release) self.canvas = canvas vbox = Widgets.VBox() fr = Widgets.Frame("IRAF") captions = [ ("Addr:", 'label', "Addr", 'llabel', 'Restart', 'button'), ("Set Addr:", 'label', "Set Addr", 'entry'), ("Control", 'hbox'), ("Channel:", 'label', 'Channel', 'llabel'), ] w, b = Widgets.build_info(captions) self.w.update(b) addr = str(self.addr.name) b.addr.set_text(addr) b.restart.set_tooltip("Restart the server") b.restart.add_callback('activated', self.restart_cb) b.set_addr.set_length(100) b.addr.set_text(addr) b.set_addr.set_tooltip("Set address to run remote control server") b.set_addr.add_callback('activated', self.set_addr_cb) self.w.mode_d = {} btn1 = Widgets.RadioButton("Ginga") btn1.set_state(True) btn1.add_callback('activated', lambda w, val: self.switchMode('ginga')) self.w.mode_d['ginga'] = btn1 self.w.control.add_widget(btn1) btn2 = Widgets.RadioButton("IRAF", group=btn1) btn2.add_callback('activated', lambda w, val: self.switchMode('iraf')) self.w.mode_d['iraf'] = btn2 self.w.control.add_widget(btn2) fr.set_widget(w) vbox.add_widget(fr, stretch=0) fr = Widgets.Frame("Frame/Channel") lbl = Widgets.Label("") self.w.frch = lbl fr.set_widget(lbl) vbox.add_widget(fr, stretch=0) # stretch vbox.add_widget(Widgets.Label(''), stretch=1) btns = Widgets.HBox() btns.set_spacing(4) btns.set_border_width(4) btn = Widgets.Button("Close") btn.add_callback('activated', lambda w: self.close()) btns.add_widget(btn) btns.add_widget(Widgets.Label(''), stretch=1) vbox.add_widget(btns) container.add_widget(vbox, stretch=1) self.gui_up = True fmap = self.<API key>() self.update_chinfo(fmap) def update_chinfo(self, fmap): if not self.gui_up: return # Update the GUI with the new frame/channel mapping fmap.sort(lambda x, y: x[1] - y[1]) s = ["%2d: %s" % (num, name) for (name, num) in fmap] self.w.frch.set_text("\n".join(s)) def _setMode(self, modeStr, chname): modeStr = modeStr.lower() self.w.mode_d[modeStr].set_state(True) self.w.channel.set_text(chname) self.switchMode(modeStr) def setMode(self, modeStr, chname): self.imexam_chname = chname self.fv.gui_do(self._setMode, modeStr, chname) def toggleMode(self): isIRAF = self.w.mode_d['iraf'].get_state() chname = self.imexam_chname if isIRAF: self.logger.info("setting mode to Ginga") self.setMode('Ginga', chname) else: self.logger.info("setting mode to IRAF") self.setMode('IRAF', chname) def add_channel(self, viewer, chinfo): self.logger.debug("channel %s added." % (chinfo.name)) n = self.channel_to_frame(chinfo.name) if n is None: found = len(self.fb) for n, fb in self.fb.items(): if fb.chname is None: found = n fb = self.init_frame(found) fb.chname = chinfo.name fmap = self.<API key>() self.fv.gui_do(self.update_chinfo, fmap) def delete_channel(self, viewer, chinfo): self.logger.debug("delete channel %s" % (chinfo.name)) n = self.channel_to_frame(chinfo.name) if n is not None: self.fb[n].chname = None fmap = self.<API key>() self.fv.gui_do(self.update_chinfo, fmap) def switchMode(self, modeStr): modeStr = modeStr.lower() chname = self.imexam_chname chinfo = self.fv.get_channel(chname) if modeStr == 'iraf': self.ui_disable(chinfo.fitsimage) else: self.ui_enable(chinfo.fitsimage) def start(self): try: if self.addr.prot == 'unix': os.remove(self.addr.path) except: pass # start the data listener task, if appropriate ev_quit = threading.Event() self.dataTask = iis.IIS_DataListener( self.addr, controller=self, ev_quit=ev_quit, logger=self.logger) self.fv.nongui_do(self.dataTask.mainloop) def stop(self): if self.dataTask: self.dataTask.stop() self.gui_up = False def restart_cb(self, w): # restart server if self.dataTask: self.dataTask.stop() self.start() def set_addr_cb(self, w): # get and parse address addr = w.get_text() self.addr = iis.get_interface(addr=addr) addr = str(self.addr.name) self.w.addr.set_text(addr) def channel_to_frame(self, chname): for n, fb in self.fb.items(): if fb.chname == chname: return n return None def <API key>(self): l = [ (fb.chname, n+1) for n, fb in self.fb.items() ] return l def redo(self, channel, image): """Called when a new image appears in the channel.""" if not self.gui_up: return # check if this is an image we received from IRAF or # one that was loaded locally. ct = image.get('ct', None) if ct is not None: # This image was sent by IRAF--we don't need to # construct extra fb information for it return n = self.channel_to_frame(channel.name) if n is None: return self.logger.debug("new image, frame is %d" % (n)) fb = self.get_frame(n) newpath = image.get('path', 'NO_PATH') host = socket.getfqdn() newhost = image.get('host', host) # protocol has a bizarre 16-char limit on hostname newhost = newhost[:16] # this is just a placeholder so that IIS_RequestHandler will # report something in this buffer fb.buffer = array.array('B', ' ') # Update IRAF "wcs" info so that IRAF can load this image #print "filling wcs info" fb.ct = iis.coord_tran() image.set(ct=ct) # iis version 1 data fb.ct.valid = 1 fb.ct.a = 1 fb.ct.b = 0 fb.ct.c = 0 fb.ct.d = 1 fb.ct.tx = 0 fb.ct.ty = 0 fb.ct.z1 = 0 fb.ct.z2 = 1 fb.ct.zt = iis.W_UNITARY fb.ct.format = '' fb.ct.imtitle = '' # iis version 1+ data fb.ct.region = 'image' #x1, y1, x2, y2 = fitsimage.get_datarect() #wd, ht = x2-x1, y2-y1 #x1, y1, x2, y2 = x1+1, y1+1, x2+1, y2+1 #fb.ct.sx, fb.ct.sy = float(x1), float(y1) wd, ht = image.get_size() fb.ct.sx, fb.ct.sy = float(1), float(1) fb.ct.snx, fb.ct.sny = wd, ht fb.ct.dx, fb.ct.dy = 1, 1 fb.ct.dnx, fb.ct.dny = wd, ht # ref newref = "!".join([newhost, newpath]) fb.ct.ref = newref # TODO: we shouldn't have to know about this here... if (fb and fb.ct.a is not None): wcs = "%s\n%f %f %f %f %f %f %f %f %d\n" % ( fb.ct.imtitle, fb.ct.a, fb.ct.b, fb.ct.c, fb.ct.d, fb.ct.tx, fb.ct.ty, fb.ct.z1, fb.ct.z2, fb.ct.zt) else: wcs = "[NOSUCHWCS]\n" if (fb and fb.ct.sx is not None): mapping = "%s %f %f %d %d %d %d %d %d\n%s\n" % ( fb.ct.region, fb.ct.sx, fb.ct.sy, fb.ct.snx, fb.ct.sny, fb.ct.dx, fb.ct.dy, fb.ct.dnx, fb.ct.dny, fb.ct.ref) else: mapping = "" fb.wcs = wcs + mapping self.logger.debug("filled wcs info") def init_frame(self, n): """ NOTE: this is called from the IIS_RequestHandler """ self.logger.debug("initializing frame %d" % (n)) # create the frame, if needed try: fb = self.get_frame(n) except KeyError: fb = iis.framebuffer() self.fb[n] = fb fb.width = None fb.height = None fb.wcs = '' fb.image = None fb.bitmap = None fb.zoom = 1.0 fb.buffer = array.array('B') fb.ct = iis.coord_tran() #fb.chname = None return fb def get_frame(self, n): """ NOTE: this is called from the IISRequestHandler Will raise KeyError if frame is not initialized. """ return self.fb[n] def set_frame(self, n): """ NOTE: this is called from the IISRequestHandler """ self.current_frame = n def display(self, frame, width, height, reverse=False): """ NOTE: this is called from the IISRequestHandler """ fb = self.get_frame(frame) self.current_frame = frame if reverse: fb.buffer.reverse() # frames are indexed from 1 in IRAF chname = fb.chname if chname is None: chname = 'Frame%d' % (frame+1) fb.chname = chname self.logger.debug("display to %s" %(chname)) try: data = fb.buffer byteswap = False dims = (fb.height, fb.width) dtype = numpy.uint8 metadata = {} image = IRAF_AstroImage(logger=self.logger) #image.load_buffer(fb.buffer, dims, dtype, byteswap=byteswap, # metadata=metadata) data = numpy.fromstring(fb.buffer, dtype=dtype) data = data.reshape(dims) # Image comes in from IRAF flipped for screen display data = numpy.flipud(data) image.set_data(data, metadata=metadata) # Save coordinate transform info image.set(ct=fb.ct) # make up a name (is there a protocol slot for the name?) fitsname = str(time.time()) # extract path from ref oldref = fb.ct.ref items = oldref.split('!') host = items[0] path = '!'.join(items[1:]) image.set(name=fitsname, path=path, host=host) #image.update_keywords(header) except Exception as e: # Some kind of error unpacking the data errmsg = "Error creating image data for '%s': %s" % ( chname, str(e)) self.logger.error(errmsg) raise GingaPlugin.PluginError(errmsg) # Do the GUI bits as the GUI thread self.fv.gui_do(self._gui_display_image, fitsname, image, chname) def _gui_display_image(self, fitsname, image, chname): if not self.fv.has_channel(chname): chinfo = self.fv.add_channel(chname) else: chinfo = self.fv.get_channel(chname) fitsimage = chinfo.fitsimage # Set the RGB mapping appropriate for IIS/IRAF rgbmap = fitsimage.get_rgbmap() rgbmap.set_imap(self.im_iis, callback=False) rgbmap.set_cmap(self.cm_iis, callback=False) rgbmap.set_hash_size(65535, callback=False) rgbmap.set_hash_algorithm('linear', callback=True) # various settings that should apply settings = fitsimage.get_settings() settings.setDict(dict(autocuts='off', flip_x=False, flip_y=False, swap_xy=False, rot_deg=0.0), callback=True) # Set cut levels fitsimage.cut_levels(0.0, 255.0, no_reset=True) # Enqueue image to display datasrc self.fv.add_image(fitsname, image, chname=chname) self.fv.ds.raise_tab('IRAF') def get_cursor(self): self.logger.info("get_cursor() called") chinfo = self.fv.get_channel_info() # Find out which frame we are looking at #frame = self.current_frame frame = self.channel_to_frame(chinfo.name) fitsimage = chinfo.fitsimage last_x, last_y = fitsimage.get_last_data_xy() # Correct for surrounding framebuffer image = fitsimage.get_image() if isinstance(image, IRAF_AstroImage): last_x, last_y = image.get_corrected_xy(last_x, last_y) res = Bunch.Bunch(x=last_x, y=last_y, frame=frame) return res def get_keystroke(self): self.logger.info("get_keystroke() called") chinfo = self.fv.get_channel_info() fitsimage = chinfo.fitsimage # Find out which frame we are looking at #frame = self.current_frame frame = self.channel_to_frame(chinfo.name) image = fitsimage.get_image() self.start_imexamine(fitsimage, chinfo.name) self.keyevent.wait() evt = self.keyqueue.get() self.stop_imexamine(fitsimage, chinfo.name) res = Bunch.Bunch(x=evt.x, y=evt.y, key=evt.key, frame=frame) return res def set_cursor(self, x, y): self.logger.info("TODO: set_cursor() called") def ui_disable(self, fitsimage): # NOTE: can't disable main canvas ui because it won't propagate # events to layered canvases #fitsimage.ui_setActive(False) #self.canvas.ui_setActive(True) self.mode = 'iraf' def ui_enable(self, fitsimage): fitsimage.ui_setActive(True) #self.canvas.ui_setActive(False) self.mode = 'ginga' def start_imexamine(self, fitsimage, chname): self.logger.info("STARTING") # Turn off regular UI processing in the frame self.canvas.set_surface(fitsimage) # insert layer if it is not already try: obj = fitsimage.get_object_by_tag(self.layertag) except KeyError: # Add canvas layer fitsimage.add(self.canvas, tag=self.layertag) self.canvas.ui_setActive(True) self.imexam_active = True self.setMode('IRAF', chname) self.fv.gui_do(self.fv.ds.raise_tab, 'IRAF') self.logger.info("FINISHING") def stop_imexamine(self, fitsimage, chname): self.logger.info("STARTING") self.imexam_active = False self.setMode('Ginga', chname) self.logger.info("FINISHING") def window_key_press(self, canvas, keyname): if not self.imexam_active: return False self.logger.info("key pressed: %s" % (keyname)) if len(keyname) > 1: if keyname in ('shift_l', 'shift_r'): # ignore these keystrokes return False elif keyname in ('control_l', 'control_r'): # control key combination self.ctrldown = True return False elif keyname == 'space': self.toggleMode() return True keyname = self.keymap.get(keyname, '?') if self.mode != 'iraf': return False if self.ctrldown: if keyname == 'd': # User typed ^D keyname = chr(4) # Get cursor position fitsimage = canvas.getSurface() last_x, last_y = fitsimage.get_last_data_xy() # Correct for surrounding framebuffer image = fitsimage.get_image() if isinstance(image, IRAF_AstroImage): last_x, last_y = image.get_corrected_xy(last_x, last_y) # Get frame info #frame = self.current_frame chname = self.fv.get_channel_name(fitsimage) chinfo = self.fv.get_channel(chname) frame = self.channel_to_frame(chinfo.name) # add framebuffer information if it is not there already self.redo(chinfo, image) self.keyqueue.put(Bunch.Bunch(x=last_x, y=last_y, key=keyname, frame=frame)) self.keyevent.set() return True def window_key_release(self, canvas, keyname): if not self.imexam_active: return False self.logger.info("key released: %s" % (keyname)) if len(keyname) > 1: if keyname in ('control_l', 'control_r'): # control key combination self.ctrldown = False return False def cursormotion(self, canvas, event, data_x, data_y): if self.mode != 'iraf': return False chviewer = self.fv.getfocus_viewer() if event.state == 'move': self.fv.showxy(chviewer, data_x, data_y) return True return False def close(self): self.fv.stop_global_plugin(str(self)) return True def __str__(self): return 'iraf' class IRAF_AstroImage(AstroImage.AstroImage): def info_xy(self, data_x, data_y, settings): ct = self.get('ct', None) # Get the value under the data coordinates try: # We report the value across the pixel, even though the coords # change halfway across the pixel x, y = int(data_x+0.5), int(data_y+0.5) value = self.get_data_xy(x, y) # Mapping from bytescaled values back to original values value = iis.wcs_pix_transform(ct, value) except Exception as e: self.logger.error("Exception getting value at %d,%d: %s" % ( x, y, str(e))) value = None # Calculate WCS RA, if available try: # Subtract offsets of data in framebuffer and add offsets of # rect beginning in source data_x = data_x - (ct.dx-1) + (ct.sx-1) data_y = data_y - (ct.dy-1) + (ct.sy-1) #ra_deg, dec_deg = wcs_coord_transform(ct, data_x, data_y) #ra_txt, dec_txt = self.wcs.deg2fmt(ra_deg, dec_deg, 'str') ra_txt = 'BAD WCS' dec_txt = 'BAD WCS' except Exception as e: self.logger.warning("Bad coordinate conversion: %s" % ( str(e))) ra_txt = 'BAD WCS' dec_txt = 'BAD WCS' # Note: FITS coordinates are 1-based, whereas numpy FITS arrays # are 0-based ra_lbl, dec_lbl = unichr(945), unichr(948) fits_x, fits_y = data_x + 1, data_y + 1 info = Bunch.Bunch(itype='astro', data_x=data_x, data_y=data_y, fits_x=fits_x, fits_y=fits_y, x=fits_x, y=fits_y, ra_txt=ra_txt, dec_txt=dec_txt, ra_lbl=ra_lbl, dec_lbl=dec_lbl, value=value) return info def get_corrected_xy(self, data_x, data_y): ct = self.get('ct', None) if ct is not None: # Subtract offsets of data in framebuffer and add offsets of # rect beginning in source data_x = data_x - (ct.dx-1) + (ct.sx-1) data_y = data_y - (ct.dy-1) + (ct.sy-1) return data_x, data_y # this is a specialized color map for use with IRAF displays cmap_iis_iraf = ( (0.000000, 0.000000, 0.000000), # 0: black (0.004975, 0.004975, 0.004975), # 1-200: frame buffer greyscale values (0.009950, 0.009950, 0.009950), (0.014925, 0.014925, 0.014925), (0.019900, 0.019900, 0.019900), (0.024876, 0.024876, 0.024876), (0.029851, 0.029851, 0.029851), (0.034826, 0.034826, 0.034826), (0.039801, 0.039801, 0.039801), (0.044776, 0.044776, 0.044776), (0.049751, 0.049751, 0.049751), (0.054726, 0.054726, 0.054726), (0.059701, 0.059701, 0.059701), (0.064677, 0.064677, 0.064677), (0.069652, 0.069652, 0.069652), (0.074627, 0.074627, 0.074627), (0.079602, 0.079602, 0.079602), (0.084577, 0.084577, 0.084577), (0.089552, 0.089552, 0.089552), (0.094527, 0.094527, 0.094527), (0.099502, 0.099502, 0.099502), (0.104478, 0.104478, 0.104478), (0.109453, 0.109453, 0.109453), (0.114428, 0.114428, 0.114428), (0.119403, 0.119403, 0.119403), (0.124378, 0.124378, 0.124378), (0.129353, 0.129353, 0.129353), (0.134328, 0.134328, 0.134328), (0.139303, 0.139303, 0.139303), (0.144279, 0.144279, 0.144279), (0.149254, 0.149254, 0.149254), (0.154229, 0.154229, 0.154229), (0.159204, 0.159204, 0.159204), (0.164179, 0.164179, 0.164179), (0.169154, 0.169154, 0.169154), (0.174129, 0.174129, 0.174129), (0.179104, 0.179104, 0.179104), (0.184080, 0.184080, 0.184080), (0.189055, 0.189055, 0.189055), (0.194030, 0.194030, 0.194030), (0.199005, 0.199005, 0.199005), (0.203980, 0.203980, 0.203980), (0.208955, 0.208955, 0.208955), (0.213930, 0.213930, 0.213930), (0.218905, 0.218905, 0.218905), (0.223881, 0.223881, 0.223881), (0.228856, 0.228856, 0.228856), (0.233831, 0.233831, 0.233831), (0.238806, 0.238806, 0.238806), (0.243781, 0.243781, 0.243781), (0.248756, 0.248756, 0.248756), (0.253731, 0.253731, 0.253731), (0.258706, 0.258706, 0.258706), (0.263682, 0.263682, 0.263682), (0.268657, 0.268657, 0.268657), (0.273632, 0.273632, 0.273632), (0.278607, 0.278607, 0.278607), (0.283582, 0.283582, 0.283582), (0.288557, 0.288557, 0.288557), (0.293532, 0.293532, 0.293532), (0.298507, 0.298507, 0.298507), (0.303483, 0.303483, 0.303483), (0.308458, 0.308458, 0.308458), (0.313433, 0.313433, 0.313433), (0.318408, 0.318408, 0.318408), (0.323383, 0.323383, 0.323383), (0.328358, 0.328358, 0.328358), (0.333333, 0.333333, 0.333333), (0.338308, 0.338308, 0.338308), (0.343284, 0.343284, 0.343284), (0.348259, 0.348259, 0.348259), (0.353234, 0.353234, 0.353234), (0.358209, 0.358209, 0.358209), (0.363184, 0.363184, 0.363184), (0.368159, 0.368159, 0.368159), (0.373134, 0.373134, 0.373134), (0.378109, 0.378109, 0.378109), (0.383085, 0.383085, 0.383085), (0.388060, 0.388060, 0.388060), (0.393035, 0.393035, 0.393035), (0.398010, 0.398010, 0.398010), (0.402985, 0.402985, 0.402985), (0.407960, 0.407960, 0.407960), (0.412935, 0.412935, 0.412935), (0.417910, 0.417910, 0.417910), (0.422886, 0.422886, 0.422886), (0.427861, 0.427861, 0.427861), (0.432836, 0.432836, 0.432836), (0.437811, 0.437811, 0.437811), (0.442786, 0.442786, 0.442786), (0.447761, 0.447761, 0.447761), (0.452736, 0.452736, 0.452736), (0.457711, 0.457711, 0.457711), (0.462687, 0.462687, 0.462687), (0.467662, 0.467662, 0.467662), (0.472637, 0.472637, 0.472637), (0.477612, 0.477612, 0.477612), (0.482587, 0.482587, 0.482587), (0.487562, 0.487562, 0.487562), (0.492537, 0.492537, 0.492537), (0.497512, 0.497512, 0.497512), (0.502488, 0.502488, 0.502488), (0.507463, 0.507463, 0.507463), (0.512438, 0.512438, 0.512438), (0.517413, 0.517413, 0.517413), (0.522388, 0.522388, 0.522388), (0.527363, 0.527363, 0.527363), (0.532338, 0.532338, 0.532338), (0.537313, 0.537313, 0.537313), (0.542289, 0.542289, 0.542289), (0.547264, 0.547264, 0.547264), (0.552239, 0.552239, 0.552239), (0.557214, 0.557214, 0.557214), (0.562189, 0.562189, 0.562189), (0.567164, 0.567164, 0.567164), (0.572139, 0.572139, 0.572139), (0.577114, 0.577114, 0.577114), (0.582090, 0.582090, 0.582090), (0.587065, 0.587065, 0.587065), (0.592040, 0.592040, 0.592040), (0.597015, 0.597015, 0.597015), (0.601990, 0.601990, 0.601990), (0.606965, 0.606965, 0.606965), (0.611940, 0.611940, 0.611940), (0.616915, 0.616915, 0.616915), (0.621891, 0.621891, 0.621891), (0.626866, 0.626866, 0.626866), (0.631841, 0.631841, 0.631841), (0.636816, 0.636816, 0.636816), (0.641791, 0.641791, 0.641791), (0.646766, 0.646766, 0.646766), (0.651741, 0.651741, 0.651741), (0.656716, 0.656716, 0.656716), (0.661692, 0.661692, 0.661692), (0.666667, 0.666667, 0.666667), (0.671642, 0.671642, 0.671642), (0.676617, 0.676617, 0.676617), (0.681592, 0.681592, 0.681592), (0.686567, 0.686567, 0.686567), (0.691542, 0.691542, 0.691542), (0.696517, 0.696517, 0.696517), (0.701493, 0.701493, 0.701493), (0.706468, 0.706468, 0.706468), (0.711443, 0.711443, 0.711443), (0.716418, 0.716418, 0.716418), (0.721393, 0.721393, 0.721393), (0.726368, 0.726368, 0.726368), (0.731343, 0.731343, 0.731343), (0.736318, 0.736318, 0.736318), (0.741294, 0.741294, 0.741294), (0.746269, 0.746269, 0.746269), (0.751244, 0.751244, 0.751244), (0.756219, 0.756219, 0.756219), (0.761194, 0.761194, 0.761194), (0.766169, 0.766169, 0.766169), (0.771144, 0.771144, 0.771144), (0.776119, 0.776119, 0.776119), (0.781095, 0.781095, 0.781095), (0.786070, 0.786070, 0.786070), (0.791045, 0.791045, 0.791045), (0.796020, 0.796020, 0.796020), (0.800995, 0.800995, 0.800995), (0.805970, 0.805970, 0.805970), (0.810945, 0.810945, 0.810945), (0.815920, 0.815920, 0.815920), (0.820896, 0.820896, 0.820896), (0.825871, 0.825871, 0.825871), (0.830846, 0.830846, 0.830846), (0.835821, 0.835821, 0.835821), (0.840796, 0.840796, 0.840796), (0.845771, 0.845771, 0.845771), (0.850746, 0.850746, 0.850746), (0.855721, 0.855721, 0.855721), (0.860697, 0.860697, 0.860697), (0.865672, 0.865672, 0.865672), (0.870647, 0.870647, 0.870647), (0.875622, 0.875622, 0.875622), (0.880597, 0.880597, 0.880597), (0.885572, 0.885572, 0.885572), (0.890547, 0.890547, 0.890547), (0.895522, 0.895522, 0.895522), (0.900498, 0.900498, 0.900498), (0.905473, 0.905473, 0.905473), (0.910448, 0.910448, 0.910448), (0.915423, 0.915423, 0.915423), (0.920398, 0.920398, 0.920398), (0.925373, 0.925373, 0.925373), (0.930348, 0.930348, 0.930348), (0.935323, 0.935323, 0.935323), (0.940299, 0.940299, 0.940299), (0.945274, 0.945274, 0.945274), (0.950249, 0.950249, 0.950249), (0.955224, 0.955224, 0.955224), (0.960199, 0.960199, 0.960199), (0.965174, 0.965174, 0.965174), (0.970149, 0.970149, 0.970149), (0.975124, 0.975124, 0.975124), (0.980100, 0.980100, 0.980100), (0.985075, 0.985075, 0.985075), (0.990050, 0.990050, 0.990050), (0.995025, 0.995025, 0.995025), # 200: end of IRAF greyscale (1.000000, 1.000000, 1.000000), # 201: white (0.000000, 0.000000, 0.000000), # 202: black (1.000000, 1.000000, 1.000000), # 203: white (1.000000, 0.000000, 0.000000), # 204: red (0.000000, 1.000000, 0.000000), # 205: green (0.000000, 0.000000, 1.000000), # 206: blue (1.000000, 1.000000, 0.000000), # 207: yellow (0.000000, 1.000000, 1.000000), # 208: cyan (1.000000, 0.000000, 1.000000), # 209: magenta (1.000000, 0.498039, 0.313725), # 210: coral (0.690196, 0.188235, 0.376470), # 211: maroon (1.000000, 0.647058, 0.000000), # 212: orange (0.941176, 0.901960, 0.549019), # 213: khaki (0.854901, 0.439215, 0.839215), # 214: orchid (0.250980, 0.878431, 0.815686), # 215: turquoise (0.933333, 0.509803, 0.933333), # 216: violet (0.960784, 0.870588, 0.701960), # 217: wheat (1.000000, 0.000000, 0.000000), # 218-254: reserved (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (1.000000, 0.000000, 0.000000), (0.000000, 0.000000, 0.000000), # 255: black ) #END
var config = {"document":{"height":210,"width":297,"mode":"rgb"},"characterStyles":[{"name":"swatchRectTitle","attributes":{"size":8}}],"swatchRect":{"textPosition":0.125},"colors":[{"group":"<API key>","name":"<API key>","rgb":[49,130,189]},{"group":"<API key>","name":"<API key>","rgb":[107,174,214]},{"group":"<API key>","name":"<API key>","rgb":[158,202,225]},{"group":"<API key>","name":"<API key>","rgb":[198,219,239]},{"group":"<API key>","name":"<API key>","rgb":[230,85,13]},{"group":"<API key>","name":"<API key>","rgb":[253,141,60]}]}; // Polyfills methods that aren't available in Illustrator. polyfill(); // Document configuration. var docColorSpace = 'cmyk' === config.document.mode ? DocumentColorSpace.CMYK : DocumentColorSpace.RGB; var docHeight = mmToPt(config.document.height); var docWidth = mmToPt(config.document.width); // Swatch rectangle configuration. var swatchRectWidth = docWidth / getColorGroups(config.colors).length; var swatchRectHeight = docHeight / getMaxShades(config.colors); // Creates a document template. var docPreset = new DocumentPreset; docPreset.colorMode = docColorSpace; docPreset.height = docHeight; docPreset.width = docWidth; docPreset.units = RulerUnits.Millimeters; // Creates a new document. var doc = app.documents.addDocument(docColorSpace, docPreset); // Creates character styles. var charStyles = {}; config.characterStyles.forEach(function (style) { var styleAttributes = style.attributes; var characterStyle = doc.characterStyles.add(style.name); var characterAttributes = characterStyle.characterAttributes; Object.keys(styleAttributes).forEach(function (attribute) { characterAttributes[attribute] = styleAttributes[attribute]; }); charStyles[style.name] = characterStyle; }); <API key>(); removeAllSwatches(); // Creates and adds swatch groups and swatches. build(config.colors, config.document.mode); /** * Creates and adds swatch groups and swatches. * * @param {Array} colors * @param {String} mode */ function build(colors, mode) { var colorGroups = getColorGroups(colors); colorGroups.forEach(function (colorGroup, colorGroupIndex) { // Creates and adds swatch group. var swatchGroup = addSwatchGroup(colorGroup); // Gets colors that belong to group. var groupColors = colors.filter(function (o) { return o.group === colorGroup; }); groupColors.forEach(function (groupColor, groupColorIndex) { // Creates RGB color. var rgb = new RGBColor(); rgb.red = groupColor.rgb[0]; rgb.green = groupColor.rgb[1]; rgb.blue = groupColor.rgb[2]; var swatchColor = 'cmyk' === mode ? colorToCMYK(rgb) : rgb; // Creates and adds swatch to document. var swatch = addSwatch(groupColor.name, swatchColor); // Adds swatch to swatch group. swatchGroup.addSwatch(swatch); // Draws rectangle on artboard. drawSwatchRect(docHeight - groupColorIndex * swatchRectHeight, colorGroupIndex * swatchRectWidth, swatchRectWidth, swatchRectHeight, groupColor.name, swatchColor); }); }); } /** * Adds swatch group. * * @param {String} name * @returns {SwatchGroup} */ function addSwatchGroup(name) { var swatchGroup = doc.swatchGroups.add(); swatchGroup.name = name; return swatchGroup; } /** * Adds swatch. * * @param {String} name * @param {Color} color * @returns {Swatch} */ function addSwatch(name, color) { var swatch = doc.swatches.add(); swatch.color = color; swatch.name = name; return swatch; } /** * Removes all swatches. */ function removeAllSwatches() { for (var i = 0; i < doc.swatches.length; i++) { doc.swatches[i].remove(); } } /** * Removes all swatch groups. */ function <API key>() { for (var i = 0; i < doc.swatchGroups.length; i++) { doc.swatchGroups[i].remove(); } } /** * Draws rectangle on artboard. * * @param {Number} top * @param {Number} left * @param {Number} width * @param {Number} height * @param {String} name * @param {Color} color * @returns {PathItem} */ function drawSwatchRect(top, left, width, height, name, color) { var layer = doc.layers[0]; var rect = layer.pathItems.rectangle(top, left, width, height); rect.filled = true; rect.fillColor = color; rect.stroked = false; var textBounds = layer.pathItems.rectangle(top - height * config.swatchRect.textPosition, left + width * config.swatchRect.textPosition, width * (1 - config.swatchRect.textPosition * 2), height * (1 - config.swatchRect.textPosition * 2)); var text = layer.textFrames.areaText(textBounds); text.contents = name + '\n' + colorToString(color); charStyles['swatchRectTitle'].applyTo(text.textRange); return rect; } /** * Returns an array of unique group names. * * @param {Array} colors * @returns {Array) */ function getColorGroups(colors) { var colorGroups = []; colors.forEach(function (color) { if (colorGroups.indexOf(color.group) < 0) { colorGroups.push(color.group); } }); return colorGroups; } /** * Returns maximum number of shades. * * @param {Array} colors * @returns {Number} */ function getMaxShades(colors) { var max = 0; var colorGroups = getColorGroups(colors); colorGroups.forEach(function (colorGroup, colorGroupIndex) { // Gets colors that belong to group. var groupColors = colors.filter(function (o) { return o.group === colorGroup; }); var len = groupColors.length; if (len > max) { max = len; } }); return max; } function colorToCMYK(color) { var cmykColor = new CMYKColor(); var colors; switch (color.typename) { case 'CMYKColor': cmykColor = color; break; case 'RGBColor': colors = app.convertSampleColor(ImageColorSpace.RGB, [color.red, color.green, color.blue], ImageColorSpace.CMYK, ColorConvertPurpose.dummypurpose); cmykColor.cyan = colors[0]; cmykColor.magenta = colors[1]; cmykColor.yellow = colors[2]; cmykColor.black = colors[3]; break; case 'LabColor': colors = app.convertSampleColor(ImageColorSpace.LAB, [color.l, color.a, color.b], ImageColorSpace.CMYK, ColorConvertPurpose.dummypurpose); cmykColor.cyan = colors[0]; cmykColor.magenta = colors[1]; cmykColor.yellow = colors[2]; cmykColor.black = colors[3]; break; case 'GrayColor': colors = app.convertSampleColor(ImageColorSpace.GrayScale, [color.gray], ImageColorSpace.CMYK, ColorConvertPurpose.dummypurpose); cmykColor.cyan = colors[0]; cmykColor.magenta = colors[1]; cmykColor.yellow = colors[2]; cmykColor.black = colors[3]; break; case 'SpotColor': return colorToCMYK(color.spot.color); } return cmykColor; }; /** * * @param {Color} color * @returns {String} */ function colorToString(color) { if ('CMYKColor' === color.typename) { return [ Math.round(color.cyan) + '%', Math.round(color.magenta) + '%', Math.round(color.yellow) + '%', Math.round(color.black) + '%' ].join(', '); } else if ('RGBColor' === color.typename) { return [ Math.round(color.red), Math.round(color.green), Math.round(color.blue) ].join(', '); } return ''; } /** * * @param {Number} mm * @returns {Number} */ function mmToPt(mm) { return mm * 2.834645; } /** * * @param {Number} pt * @returns {Number} */ function ptToMm(pt) { return pt / 2.834645; } /** * Polyfills methods that aren't available in Illustrator. */ function polyfill() { // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter#Polyfill if (!Array.prototype.filter) { Array.prototype.filter = function (fun /*, thisArg*/ ) { 'use strict'; if (this === void 0 || this === null) { throw new TypeError(); } var t = Object(this); var len = t.length >>> 0; if (typeof fun !== 'function') { throw new TypeError(); } var res = []; var thisArg = arguments.length >= 2 ? arguments[1] : void 0; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; // NOTE: Technically this should Object.defineProperty at // the next index, as push can be affected by // properties on Object.prototype and Array.prototype. // But that method's new, and collisions should be // rare, so use the more-compatible alternative. if (fun.call(thisArg, val, i, t)) { res.push(val); } } } return res; }; } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Polyfill if (!Array.prototype.forEach) { Array.prototype.forEach = function (callback /*, thisArg*/ ) { var T, k; if (this == null) { throw new TypeError('this is null or not defined'); } // 1. Let O be the result of calling toObject() passing the // |this| value as the argument. var O = Object(this); // 2. Let lenValue be the result of calling the Get() internal // method of O with the argument "length". // 3. Let len be toUint32(lenValue). var len = O.length >>> 0; // 4. If isCallable(callback) is false, throw a TypeError exception. // See: http://es5.github.com/#x9.11 if (typeof callback !== 'function') { throw new TypeError(callback + ' is not a function'); } // 5. If thisArg was supplied, let T be thisArg; else let // T be undefined. if (arguments.length > 1) { T = arguments[1]; } // 6. Let k be 0 k = 0; // 7. Repeat, while k < len while (k < len) { var kValue; // a. Let Pk be ToString(k). // This is implicit for LHS operands of the in operator // b. Let kPresent be the result of calling the HasProperty // internal method of O with argument Pk. // This step can be combined with c // c. If kPresent is true, then if (k in O) { // i. Let kValue be the result of calling the Get internal // method of O with argument Pk. kValue = O[k]; // ii. Call the Call internal method of callback with T as // the this value and argument list containing kValue, k, and O. callback.call(T, kValue, k, O); } // d. Increase k by 1. k++; } // 8. return undefined }; } // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Polyfill if (!Array.prototype.indexOf) { Array.prototype.indexOf = function (searchElement, fromIndex) { var k; // 1. Let o be the result of calling ToObject passing // the this value as the argument. if (this == null) { throw new TypeError('"this" is null or not defined'); } var o = Object(this); // 2. Let lenValue be the result of calling the Get // internal method of o with the argument "length". // 3. Let len be ToUint32(lenValue). var len = o.length >>> 0; // 4. If len is 0, return -1. if (len === 0) { return -1; } // 5. If argument fromIndex was passed let n be // ToInteger(fromIndex); else let n be 0. var n = fromIndex | 0; // 6. If n >= len, return -1. if (n >= len) { return -1; } // 7. If n >= 0, then Let k be n. // 8. Else, n<0, Let k be len - abs(n). // If k is less than 0, then let k be 0. k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); // 9. Repeat, while k < len while (k < len) { // a. Let Pk be ToString(k). // This is implicit for LHS operands of the in operator // b. Let kPresent be the result of calling the // HasProperty internal method of o with argument Pk. // This step can be combined with c // c. If kPresent is true, then // i. Let elementK be the result of calling the Get // internal method of o with the argument ToString(k). // ii. Let same be the result of applying the // Strict Equality Comparison Algorithm to // searchElement and elementK. // iii. If same is true, return k. if (k in o && o[k] === searchElement) { return k; } k++; } return -1; }; } // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Polyfill if (!Object.keys) { Object.keys = (function () { 'use strict'; var hasOwnProperty = Object.prototype.hasOwnProperty, hasDontEnumBug = !({ toString: null }).<API key>('toString'), dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', '<API key>', 'constructor' ], dontEnumsLength = dontEnums.length; return function (obj) { if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) { throw new TypeError('Object.keys called on non-object'); } var result = [], prop, i; for (prop in obj) { if (hasOwnProperty.call(obj, prop)) { result.push(prop); } } if (hasDontEnumBug) { for (i = 0; i < dontEnumsLength; i++) { if (hasOwnProperty.call(obj, dontEnums[i])) { result.push(dontEnums[i]); } } } return result; }; }()); } }
import pyaf.Bench.TS_datasets as tsds import tests.artificial.<API key> as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 12, transform = "Integration", sigma = 0.0, exog_count = 0, ar_order = 12);
import asyncio import gc import os import signal import sys import threading import weakref from datetime import timedelta from time import sleep import psutil import pytest from tornado import gen from tornado.locks import Event from distributed.compatibility import WINDOWS from distributed.metrics import time from distributed.process import AsyncProcess from distributed.utils import mp_context from distributed.utils_test import gen_test, nodebug, pristine_loop def feed(in_q, out_q): obj = in_q.get(timeout=5) out_q.put(obj) def exit(q): sys.exit(q.get()) def exit_now(rc=0): sys.exit(rc) def exit_with_signal(signum): signal.signal(signal.SIGINT, signal.SIG_DFL) while True: os.kill(os.getpid(), signum) sleep(0.01) def wait(): while True: sleep(0.01) def threads_info(q): q.put(len(threading.enumerate())) q.put(threading.current_thread().name) @nodebug @gen_test() async def test_simple(): to_child = mp_context.Queue() from_child = mp_context.Queue() proc = AsyncProcess(target=feed, args=(to_child, from_child)) assert not proc.is_alive() assert proc.pid is None assert proc.exitcode is None assert not proc.daemon proc.daemon = True assert proc.daemon wr1 = weakref.ref(proc) wr2 = weakref.ref(proc._process) # join() before start() with pytest.raises(AssertionError): await proc.join() await proc.start() assert proc.is_alive() assert proc.pid is not None assert proc.exitcode is None t1 = time() await proc.join(timeout=0.02) dt = time() - t1 assert 0.2 >= dt >= 0.01 assert proc.is_alive() assert proc.pid is not None assert proc.exitcode is None # setting daemon attribute after start() with pytest.raises(AssertionError): proc.daemon = False to_child.put(5) assert from_child.get() == 5 # child should be stopping now t1 = time() await proc.join(timeout=30) dt = time() - t1 assert dt <= 1.0 assert not proc.is_alive() assert proc.pid is not None assert proc.exitcode == 0 # join() again t1 = time() await proc.join() dt = time() - t1 assert dt <= 0.6 del proc gc.collect() start = time() while wr1() is not None and time() < start + 1: # Perhaps the GIL switched before _watch_process() exit, # help it a little sleep(0.001) gc.collect() if wr1() is not None: # Help diagnosing from types import FrameType p = wr1() if p is not None: rc = sys.getrefcount(p) refs = gc.get_referrers(p) del p print("refs to proc:", rc, refs) frames = [r for r in refs if isinstance(r, FrameType)] for i, f in enumerate(frames): print( "frames #%d:" % i, f.f_code.co_name, f.f_code.co_filename, sorted(f.f_locals), ) pytest.fail("AsyncProcess should have been destroyed") t1 = time() while wr2() is not None: await asyncio.sleep(0.01) gc.collect() dt = time() - t1 assert dt < 2.0 @gen_test() async def test_exitcode(): q = mp_context.Queue() proc = AsyncProcess(target=exit, kwargs={"q": q}) proc.daemon = True assert not proc.is_alive() assert proc.exitcode is None await proc.start() assert proc.is_alive() assert proc.exitcode is None q.put(5) await proc.join(timeout=30) assert not proc.is_alive() assert proc.exitcode == 5 @pytest.mark.skipif(WINDOWS, reason="POSIX only") @gen_test() async def test_signal(): proc = AsyncProcess(target=exit_with_signal, args=(signal.SIGINT,)) proc.daemon = True assert not proc.is_alive() assert proc.exitcode is None await proc.start() await proc.join(timeout=30) assert not proc.is_alive() assert proc.exitcode in (-signal.SIGINT, 255) proc = AsyncProcess(target=wait) await proc.start() os.kill(proc.pid, signal.SIGTERM) await proc.join(timeout=30) assert not proc.is_alive() assert proc.exitcode in (-signal.SIGTERM, 255) @gen_test() async def test_terminate(): proc = AsyncProcess(target=wait) proc.daemon = True await proc.start() await proc.terminate() await proc.join(timeout=30) assert not proc.is_alive() assert proc.exitcode in (-signal.SIGTERM, 255) @gen_test() async def test_close(): proc = AsyncProcess(target=exit_now) proc.close() with pytest.raises(ValueError): await proc.start() proc = AsyncProcess(target=exit_now) await proc.start() proc.close() with pytest.raises(ValueError): await proc.terminate() proc = AsyncProcess(target=exit_now) await proc.start() await proc.join() proc.close() with pytest.raises(ValueError): await proc.join() proc.close() @gen_test() async def test_exit_callback(): to_child = mp_context.Queue() from_child = mp_context.Queue() evt = Event() # FIXME: this breaks if changed to async def... @gen.coroutine def on_stop(_proc): assert _proc is proc yield gen.moment evt.set() # Normal process exit proc = AsyncProcess(target=feed, args=(to_child, from_child)) evt.clear() proc.set_exit_callback(on_stop) proc.daemon = True await proc.start() await asyncio.sleep(0.05) assert proc.is_alive() assert not evt.is_set() to_child.put(None) await evt.wait(timedelta(seconds=5)) assert evt.is_set() assert not proc.is_alive() # Process terminated proc = AsyncProcess(target=wait) evt.clear() proc.set_exit_callback(on_stop) proc.daemon = True await proc.start() await asyncio.sleep(0.05) assert proc.is_alive() assert not evt.is_set() await proc.terminate() await evt.wait(timedelta(seconds=5)) assert evt.is_set() @gen_test() async def <API key>(): """ The main thread in the child should be called "MainThread". """ q = mp_context.Queue() proc = AsyncProcess(target=threads_info, args=(q,)) await proc.start() await proc.join() n_threads = q.get() main_name = q.get() assert n_threads <= 3 assert main_name == "MainThread" q.close() q._reader.close() q._writer.close() @pytest.mark.skipif(WINDOWS, reason="num_fds not supported on windows") @gen_test() async def test_num_fds(): # Warm up proc = AsyncProcess(target=exit_now) proc.daemon = True await proc.start() await proc.join() p = psutil.Process() before = p.num_fds() proc = AsyncProcess(target=exit_now) proc.daemon = True await proc.start() await proc.join() assert not proc.is_alive() assert proc.exitcode == 0 while p.num_fds() > before: await asyncio.sleep(0.01) @gen_test() async def <API key>(): proc = AsyncProcess(target=sleep, args=(0,)) await proc.start() await asyncio.sleep(0.1) await proc.terminate() def _worker_process(worker_ready, child_pipe): # child_pipe is the write-side of the children_alive pipe held by the # test process. When this _worker_process exits, this file descriptor should # have no references remaining anywhere and be closed by the kernel. The # test will therefore be able to tell that this process has exited by # reading children_alive. # Signal to parent process that this process has started and made it this # far. This should cause the parent to exit rapidly after this statement. worker_ready.set() # The parent exiting should cause this process to os._exit from a monitor # thread. This sleep should never return. shorter_timeout = 2.5 # timeout shorter than that in the spawning test. sleep(shorter_timeout) # Unreachable if functioning correctly. child_pipe.send("child should have exited by now") def _parent_process(child_pipe): """Simulate starting an AsyncProcess and then dying. The child_alive pipe is held open for as long as the child is alive, and can be used to determine if it exited correctly.""" async def <API key>(): worker_ready = mp_context.Event() worker = AsyncProcess(target=_worker_process, args=(worker_ready, child_pipe)) await worker.start() # Wait for the child process to have started. worker_ready.wait() # Exit immediately, without doing any process teardown (including atexit # and 'finally:' blocks) as if by SIGKILL. This should cause # worker_process to also exit. os._exit(255) with pristine_loop() as loop: try: loop.run_sync(<API key>, timeout=10) finally: loop.stop() raise RuntimeError("this should be unreachable due to os._exit") def <API key>(): # When child_pipe is closed, the children_alive pipe unblocks. children_alive, child_pipe = mp_context.Pipe(duplex=False) try: parent = mp_context.Process(target=_parent_process, args=(child_pipe,)) parent.start() # Close our reference to child_pipe so that the child has the only one. child_pipe.close() # Wait for the parent to exit. By the time join returns, the child # process is orphaned, and should be in the process of exiting by # itself. parent.join() # By the time we reach here,the parent has exited. The parent only exits # when the child is ready to enter the sleep, so all of the slow things # (process startup, etc) should have happened by now, even on a busy # system. A short timeout should therefore be appropriate. short_timeout = 5.0 # Poll is used to allow other tests to proceed after this one in case of # test failure. try: readable = children_alive.poll(short_timeout) except BrokenPipeError: assert WINDOWS, "should only raise on windows" # Broken pipe implies closed, which is readable. readable = True # If this assert fires, then something went wrong. Either the child # should write into the pipe, or it should exit and the pipe should be # closed (which makes it become readable). assert readable try: # This won't block due to the above 'assert readable'. result = children_alive.recv() except EOFError: pass # Test passes. except BrokenPipeError: assert WINDOWS, "should only raise on windows" # Test passes. else: # Oops, children_alive read something. It should be closed. If # something was read, it's a message from the child telling us they # are still alive! raise RuntimeError(f"unreachable: {result}") finally: # Cleanup. children_alive.close()
#include "main/macros.h" static INLINE GLuint minify( GLuint d ) { return MAX2(1, d>>1); } extern void <API key>(struct intel_context *intel, struct intel_mipmap_tree *mt, uint32_t tiling, int nr_images); void <API key>(gl_format format, unsigned int *w, unsigned int *h);
<?php return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=global_lestari', 'username' => 'root', 'password' => '', 'charset' => 'utf8', ];
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/THNN.h" #else TH_API void THNN_(Abs_updateOutput)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output); // [OUT] Abs output TH_API void THNN_(Abs_updateGradInput)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradInput); // [OUT] gradient w.r.t. input TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *target, // tensor with target values THTensor *output, // [OUT] a one-element tensor with loss bool sizeAverage); // if true, the loss will be divided by batch size TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *target, // tensor with target values THTensor *gradInput, // [OUT] gradient w.r.t. input bool sizeAverage); // if true, the gradient will be normalized by batch size TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor (1D/2D) THIndexTensor *target, // tensor containing indexes of target classes THTensor *output, // [OUT] a one-element tensor with loss bool sizeAverage, // if true, the loss will be normalized by batch size and class weights THTensor *weights, // [OPTIONAL] class weights THTensor *total_weight); // [BUFFER] TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor (1D/2D) THIndexTensor *target, // tensor containing indexes of target classes THTensor *gradInput, // [OUT] gradient w.r.t. input bool sizeAverage, // if true, the loss will be normalized by batch size and class weights THTensor *weights, // [OPTIONAL] class weights THTensor *total_weight); // [BUFFER] TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor (4D) THIndexTensor *target, // tensor containing indexes of target classes (3D) THTensor *output, // [OUT] a one-element tensor with loss bool sizeAverage, // if true, the loss will be normalized by batch size and class weights THTensor *weights, // [OPTIONAL] class weights THTensor *total_weight); // [BUFFER] TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor (4D) THIndexTensor *target, // tensor containing indexes of target classes (3D) THTensor *gradInput, // [OUT] gradient w.r.t. input bool sizeAverage, // if true, the loss will be normalized by batch size and class weights THTensor *weights, // [OPTIONAL] class weights THTensor *total_weight); // [BUFFER] TH_API void THNN_(ELU_updateOutput)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output, // [OUT] ELU output real alpha, // an ELU parameter (as in paper) bool inplace); // if true, modifies gradOutput and sets gradInput onto it (no additional memory is allocated) TH_API void THNN_(ELU_updateGradInput)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradInput, // [OUT] gradient w.r.t. input THTensor *output, // output from a forward pass real alpha, // an ELU parameter (as in paper) bool inplace); // if true, modifies gradOutput and sets gradInput onto it (no additional memory is allocated) TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *target, // target tensor THTensor *output, // [OUT] a one-element tensor containing the loss bool sizeAverage); // if true, the loss will be normalized **by total number of elements** TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *target, // target tensor THTensor *gradInput, // [OUT] gradient w.r.t. input bool sizeAverage); // if true, the loss will be normalized **by total number of elements** // HardShink outputs 0 on interval of (-lambda; lambda) or original value otherwise. TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output, // [OUT] output tensor real lambda); // HardShrink parameter TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. module's output THTensor *gradInput, // [OUT] gradient w.r.t. input real lambda); // HardShrink parameter // HardTanh clamps the values to the interval [min_val; max_val]. TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output, // [OUT] output tensor real min_val, // lower threshold real max_val); // upper threshold TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. module's output THTensor *gradInput, // [OUT] gradient w.r.t. the input real min_val, // lower threshold real max_val); // upper threshold TH_API void THNN_(L1Cost_updateOutput)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output); // [OUT] output tensor TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t module's output THTensor *gradInput); // [OUT] gradient w.r.t the input TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // [MODIFIED] input tensor THTensor *output, // [OUT] output tensor real negval, // negative part slope bool inplace); // if true, modifies the input tensor and sets the output tensor on it (no additional memory is allocated) TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // [MODIFIED] gradient w.r.t. module's output THTensor *gradInput, // [OUT] gradient w.r.t. the input real negval, // negative part slope bool inplace); // if true, modifies gradOutput and sets gradInput onto it (no additional memory is allocated) TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output, // output tensor THTensor *buffer); // [BUFFER] TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input THTensor *gradOutput, // gradient w.r.t. module's output THTensor *gradInput, // [OUT] gradient w.r.t. input THTensor *buffer); // [BUFFER] TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *output); // [OUT] output tensor TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. module's output THTensor *gradInput, // [OUT] gradient w.r.t. input THTensor *output); // module's output TH_API void THNN_(<API key>)( THNNState *state, THIndexTensor *input, THTensor *gradOutput, THTensor *gradWeight, THIntegerTensor *count, THTensor *sorted, THTensor *indices, bool scaleGradByFreq, int paddingValue, real scale); TH_API void THNN_(LookupTable_renorm)( THNNState *state, // library's state THIndexTensor *idx, // vector that contains row indices (modified in function) THTensor *weight, // 2D tensor whose rows will be renormalized real maxNorm, // maximum norm real normType); // the norm type (e.g., normType=2, then it's 2-norm) TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *target, // target tensor (should contain only 1s and -1s) THTensor *output, // [OUT] a one-element tensor containing the loss bool sizeAverage, // if true, the loss is normalized by **total number of elements** real margin); // a margin that is required for the loss to be 0 TH_API void THNN_(<API key>)( THNNState *state, // library's state THTensor *input, // input tensor THTensor *target, // target tensor (should contin only 1s and -1s) THTensor *gradInput, // [OUT] gradient w.r.t. module's input bool sizeAverage, // if true, the gradient is normalized by **total number of elements** real margin); // a margin that is required for the loss to be 0 TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *output, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *gradInput, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *output, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *gradInput, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *output, THTensor *isTarget, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *gradInput, THTensor *isTarget, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *output, bool sizeAverage, int p, THTensor* weights, real margin); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *gradInput, bool sizeAverage, int p, THTensor *weights, real margin); TH_API void THNN_(PReLU_updateOutput)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THIndex_t nOutputPlane); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THIndex_t nOutputPlane); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *gradWeight, THTensor *gradWeightBuf, THTensor *gradWeightBuf2, THIndex_t nOutputPlane, real scale); TH_API void THNN_(RReLU_updateOutput)( THNNState *state, THTensor *input, THTensor *output, THTensor *noise, real lower, real upper, bool train, bool inplace, THGenerator *generator); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *noise, real lower, real upper, bool train, bool inplace); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *output, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *target, THTensor *gradInput, bool sizeAverage); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, real beta, real threshold); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *output, real beta, real threshold); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, real lambda); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, real lambda); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *weight, THTensor *bias, real weightDecay, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *gradWeight, THTensor *gradBias, THTensor *lastInput); TH_API void THNN_(<API key>)( THNNState *state, THTensor *weight, THTensor *bias, THTensor *gradWeight, THTensor *gradBias, THTensor *lastInput, real learningRate); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *weight, THTensor *bias, real weightDecay, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *gradWeight, THTensor *gradBias, THTensor *lastInput); TH_API void THNN_(<API key>)( THNNState *state, THTensor *weight, THTensor *bias, THTensor *gradWeight, THTensor *gradBias, THTensor *lastInput, real learningRate); TH_API void THNN_(Sqrt_updateOutput)( THNNState *state, THTensor *input, THTensor *output, real eps); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *output); TH_API void THNN_(Square_updateOutput)( THNNState *state, THTensor *input, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput); TH_API void THNN_(Tanh_updateOutput)( THNNState *state, THTensor *input, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *output); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, real threshold, real val, bool inplace); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, real threshold, bool inplace); TH_API void THNN_(ReLU6_updateOutput)( THNNState *state, THTensor *input, THTensor *output, bool inplace); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, bool inplace); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, int kW, int dW, int inputFrameSize, int outputFrameSize); TH_API void THNN_(<API key>)( THNNState* state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, int kW, int dW); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, int kW, int dW, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *indices, int kW, int dW); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *indices, int kW, int dW); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, int kW, int dW, int inputFrameSize); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, int kW, int dW); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, int kW, int dW, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *running_mean, THTensor *running_var, THTensor *save_mean, THTensor *save_std, bool train, double momentum, double eps); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *gradWeight, THTensor *gradBias, THTensor *weight, THTensor *running_mean, THTensor *running_var, THTensor *save_mean, THTensor *save_std, bool train, double scale, double eps); TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // input tensor THTensor *output, // [OUT] convolution output THTensor *weight, // 3D weight tensor (connTable:size(1) x kH x kW) THTensor *bias, // 1D bias tensor (nOutputPlane) THTensor *connTable, // connection table int nInputPlane, // number of input planes int nOutputPlane, // number of output planes int dW, int dH); // stride TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradInput, // [OUT] gradient w.r.t. input THTensor *weight, // 3D weight tensor (connTable:size(1) x kH x kW) THTensor *bias, // 1D bias tensor (nOutputPlane) THTensor *connTable, // connection table int nInputPlane, // number of input planes int nOutputPlane, // number of output planes int dW, int dH); // stride TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradWeight, // 3D gradWeight tensor (connTable:size(1) x kH x kW) THTensor *gradBias, // 1D gradBias tensor (nOutputPlane) THTensor *connTable, // connection table int nInputPlane, // number of input planes int nOutputPlane, // number of output planes int dW, int dH, // stride real scale); // scaling factor TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *finput, THTensor *fgradInput, int kW, int kH, int dW, int dH, int padW, int padH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *finput, THTensor *fgradInput, int kW, int kH, int dW, int dH, int padW, int padH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *finput, THTensor *fgradInput, int kW, int kH, int dW, int dH, int padW, int padH, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *finput, THTensor *fgradInput, int kW, int kH, int dW, int dH, int padW, int padH, long inputWidth, long inputHeight, long outputWidth, long outputHeight); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *finput, THTensor *fgradInput, int kW, int kH, int dW, int dH, int padW, int padH, long inputWidth, long inputHeight, long outputWidth, long outputHeight); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *finput, THTensor *fgradInput, int kW, int kH, int dW, int dH, int padW, int padH, long inputWidth, long inputHeight, long outputWidth, long outputHeight, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *indices, int owidth, int oheight); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *indices); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, int kW, int kH, int dW, int dH, int padW, int padH, bool ceil_mode, bool count_include_pad); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, int kW, int kH, int dW, int dH, int padW, int padH, bool ceil_mode, bool count_include_pad); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, int outputW, int outputH, int poolSizeW, int poolSizeH, THTensor *indices, THTensor *randomSamples); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, int outputW, int outputH, int poolSizeW, int poolSizeH, THTensor *indices); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *columns, THTensor *ones, int kW, int kH, int dW, int dH, int padW, int padH, int adjW, int adjH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *gradColumns, int kW, int kH, int dW, int dH, int padW, int padH, int adjW, int adjH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *columns, THTensor *ones, int kW, int kH, int dW, int dH, int padW, int padH, int adjW, int adjH, real scale); TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // input tensor THTensor *output, // [OUT] convolution output THTensor *weight, // 3D weight tensor (connTable:size(1) x kH x kW) THTensor *bias, // 1D bias tensor (nOutputPlane) THTensor *connTable, // connection table int nInputPlane, // number of input planes int nOutputPlane, // number of output planes int dW, int dH); // stride TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradInput, // [OUT] gradient w.r.t. input THTensor *weight, // 3D weight tensor (connTable:size(1) x kH x kW) THTensor *bias, // 1D bias tensor (nOutputPlane) THTensor *connTable, // connection table int nInputPlane, // number of input planes int nOutputPlane, // number of output planes int dW, int dH); // stride TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // input tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradWeight, // 3D gradWeight tensor (connTable:size(1) x kH x kW) THTensor *gradBias, // 1D gradBias tensor (nOutputPlane) THTensor *connTable, // connection table int nInputPlane, // number of input planes int nOutputPlane, // number of output planes int dW, int dH, // stride real scale); // scaling factor TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *columns, THTensor *ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *gradColumns, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *columns, THTensor *ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *indices, int kW, int kH, int dW, int dH, int padW, int padH, bool ceil_mode); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *indices, int kW, int kH, int dW, int dH, int padW, int padH, bool ceil_mode); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *indices, int owidth, int oheight); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *indices, int owidth, int oheight); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, int kW, int kH, int dW, int dH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, int kW, int kH, int dW, int dH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, int kW, int kH, int dW, int dH, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, int scale_factor); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, int scale_factor); TH_API void THNN_(unfolded_acc)( THTensor *finput, THTensor *input, int kW, int kH, int dW, int dH, int padW, int padH, int nInputPlane, int inputWidth, int inputHeight, int outputWidth, int outputHeight); TH_API void THNN_(unfolded_copy)( THTensor *finput, THTensor *input, int kW, int kH, int dW, int dH, int padW, int padH, int nInputPlane, int inputWidth, int inputHeight, int outputWidth, int outputHeight); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, int kT, int kW, int kH, int dT, int dW, int dH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, int kT, int kW, int kH, int dT, int dW, int dH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *finput, THTensor *fgradInput, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *finput, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *finput, THTensor *fgradInput, int dT, int dW, int dH, int pT, int pW, int pH, real scale); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *finput, int kT, int kW, int kH, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *weight, THTensor *finput, THTensor *fgradInput, int kT, int kW, int kH, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradWeight, THTensor *gradBias, THTensor *finput, real scale); TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // 4D or 5D (batch) tensor THTensor *output, // [OUT] volumetric convolution output THTensor *weight, // weight tensor (nInputPlane x nOutputPlane x kT x kH x kW) THTensor *bias, // gradBias tensor (nOutputPlane) THTensor *finput, // [OUT] internal columns buffer THTensor *fgradInput, // [OUT] internal ones buffer int dT, int dW, int dH, // stride of the convolution int pT, int pW, int pH, // padding int aT, int aW, int aH); // extra output adjustment TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // 4D or 5D (batch) tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradInput, // [OUT] gradient w.r.t. input THTensor *weight, // weight tensor (nInputPlane x nOutputPlane x kT x kH x kW) THTensor *finput, // internal columns buffer THTensor *fgradInput, // internal ones buffer int dT, int dW, int dH, // stride int pT, int pW, int pH, // padding int aT, int aW, int aH); // extra output adjustment TH_API void THNN_(<API key>)( THNNState *state, // library state THTensor *input, // 4D or 5D (batch) tensor THTensor *gradOutput, // gradient w.r.t. output THTensor *gradWeight, // gradWeight tensor (nInputPlane x nOutputPlane x kT x kH x kW) THTensor *gradBias, // gradBias tensor (nOutputPlane) THTensor *finput, // internal columns buffer THTensor *fgradInput, // internal ones buffer int dT, int dW, int dH, // stride int pT, int pW, int pH, // padding int aT, int aW, int aH, // extra output adjustment real scale); // scaling factor TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *indices, int kT, int kW, int kH, int dT, int dW, int dH, int pT, int pW, int pH, bool ceilMode); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *indices, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *output, THTensor *indices, int oT, int oW, int oH, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, THTensor *indices, int oT, int oW, int oH, int dT, int dW, int dH, int pT, int pW, int pH); TH_API void THNN_(<API key>)(THNNState *state, THTensor *input, THTensor *output, int pad_l, int pad_r, int pad_t, int pad_b); TH_API void THNN_(<API key>)(THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, int pad_l, int pad_r, int pad_t, int pad_b); TH_API void THNN_(<API key>)(THNNState *state, THTensor *input, THTensor *output, int pad_l, int pad_r, int pad_t, int pad_b); TH_API void THNN_(<API key>)(THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *gradInput, int pad_l, int pad_r, int pad_t, int pad_b); #endif
require 'matrix' ruby_version_is "1.9.3" do describe "Matrix::LUPDecomposition#l" do before :each do @a = Matrix[[7, 8, 9], [14, 46, 51], [28, 82, 163]] @lu = Matrix::LUPDecomposition.new(@a) @l = @lu.l end it "returns the first element of to_a" do @l.should == @lu.to_a[0] end it "returns a lower triangular matrix" do @l.lower_triangular?.should be_true end end end
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_31) on Sun Mar 22 23:36:28 UTC 2015 --> <title>io.grpc.auth (grpc-auth 0.1.0-SNAPSHOT API)</title> <meta name="date" content="2015-03-22"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="io.grpc.auth (grpc-auth 0.1.0-SNAPSHOT API)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../io/grpc/auth/package-summary.html">Package</a></li> <li>Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Package</li> <li>Next&nbsp;Package</li> </ul> <ul class="navList"> <li><a href="../../../index.html?io/grpc/auth/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h1 title="Package" class="title">Package&nbsp;io.grpc.auth</h1> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> <caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Class</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="../../../io/grpc/auth/<API key>.html" title="class in io.grpc.auth"><API key></a></td> <td class="colLast"> <div class="block">Client interceptor that authenticates all calls by binding header data provided by a credential.</div> </td> </tr> </tbody> </table> </li> </ul> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../io/grpc/auth/package-summary.html">Package</a></li> <li>Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev&nbsp;Package</li> <li>Next&nbsp;Package</li> </ul> <ul class="navList"> <li><a href="../../../index.html?io/grpc/auth/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
FILE(REMOVE_RECURSE "CMakeFiles/testEssentialMatrix.run" ) # Per-language clean rules from dependency scanning. FOREACH(lang) INCLUDE(CMakeFiles/testEssentialMatrix.run.dir/cmake_clean_${lang}.cmake OPTIONAL) ENDFOREACH(lang)
"""An exporter that converts scenes / animations to shareable HTML files. """ from klampt import * from klampt.model import trajectory from klampt import robotsim import json import pkg_resources _title_id = '__TITLE__' _scene_id = '__SCENE_JSON__' _path_id = '__PATH_JSON__' _rpc_id = '__RPC_JSON__' _compressed_id = '__COMPRESSED__' _dt_id = '__TIMESTEP__' _frontend_load_id = '<API key>' def <API key>(obj,digits): if isinstance(obj,float): return round(obj,digits) elif isinstance(obj,list): for i in range(len(obj)): obj[i] = <API key>(obj[i],digits) elif isinstance(obj,tuple): return [<API key>(val,digits) for val in obj] elif isinstance(obj,dict): for i,v in obj.items(): obj[i] = <API key>(v,digits) return obj class HTMLSharePath: """An exporter that converts scenes / animations to shareable HTML files. Examples:: sharer = HTMLSharePath("mypath.html",name="My spiffy path") sharer.start(sim) #can accept a sim or a world while [simulation is running]: #do whatever control you wish to do here sim.simulate(...) sharer.animate() sharer.end() #this saves to the filename given in the constructor """ def __init__(self,filename=None,name="Klamp't Three.js app",boilerplate='auto',libraries='static'): """ Args: filename (str, optional): the HTML file to generate. If None, then the end() method returns the HTML string. name (str): the title of the HTML page boilerplate (str): the location of the boilerplate HTML file. If 'auto', it's automatically found in the ``klampt/data`` folder. libraries (str): either 'static' or 'dynamic'. In the latter case, the html file loads the libraries from the Klamp't website dynamically. This reduces the size of the HTML file by about 600kb, but the viewer needs an internet connection """ self.name = name if boilerplate == 'auto': boilerplate = pkg_resources.resource_filename('klampt','data/<API key>.html') f = open(boilerplate,'r') self.boilerplate_file = ''.join(f.readlines()) f.close() if libraries == 'static': self.<API key> = pkg_resources.resource_filename('klampt','data/<API key>.js') else: if libraries != 'dynamic': raise ValueError("The libraries argument must either be 'static' or 'dynamic'") self.<API key> = pkg_resources.resource_filename('klampt','data/<API key>.js') if any(v not in self.boilerplate_file for v in [_scene_id,_path_id,_rpc_id,_compressed_id,_dt_id,_frontend_load_id]): raise RuntimeError("Boilerplate file does not contain the right tags") self.fn = filename self.scene = 'null' self.transforms = {} self.rpc = [] self.dt = 0 self.last_t = 0 def start(self,world): """Begins the path saving with the given WorldModel or Simulator""" if isinstance(world,Simulator): self.sim = world self.world = world.world self.last_t = world.getTime() else: self.sim = None self.world = world if self.world is not None: self.scene = robotsim.ThreeJSGetScene(self.world) def animate(self,time=None,rpc=None): """Updates the path from the world. If the world wasn't a simulator, the time argument needs to be provided. If you want to include extra things, provide them in the rpc argument (as a list of KlamptFrontend rpc calls) """ if self.sim is not None and time is None: time = self.sim.getTime() self.sim.updateWorld() if time is None: raise ValueError("Time needs to be provided") dt = time - self.last_t if self.dt == 0: self.dt = dt if self.dt == 0: return if abs(dt - self.dt) <= 1e-6: dt = self.dt numadd = 0 while dt >= self.dt: numadd += 1 if self.world is not None: transforms = json.loads(robotsim.<API key>(self.world)) else: transforms = {'object':[]} for update in transforms['object']: n = update['name'] mat = <API key>(update['matrix'],4) matpath = self.transforms.setdefault(n,[]) assert len(matpath) == len(self.rpc) lastmat = None for m in matpath[::-1]: if m != None: lastmat = m break if lastmat != mat: matpath.append(mat) else: matpath.append(None) if numadd == 1: if rpc is not None: assert isinstance(rpc,(list,tuple)),"rpc argument must be a list or a tuple" self.rpc.append(rpc) else: self.rpc.append(None) else: self.rpc.append(None) dt -= self.dt self.last_t += self.dt if numadd > 1: print("HTMLSharePath: Note, uneven time spacing, duplicating frame",numadd,"times") def end(self,rpc=None): if len(self.rpc)==0: self.rpc = [rpc] elif rpc is not None: self.rpc[-1] += rpc data = self.boilerplate_file.replace(_title_id,self.name) data = data.replace(_scene_id,self.scene) data = data.replace(_path_id,json.dumps(self.transforms)) data = data.replace(_rpc_id,json.dumps(self.rpc)) data = data.replace(_compressed_id,'true') data = data.replace(_dt_id,str(self.dt)) f = open(self.<API key>,'r') load_script = ''.join(f.readlines()) f.close() data = data.replace(_frontend_load_id,load_script) if self.fn is None: return data else: print("Path with",len(self.rpc),"frames saved to",self.fn) f = open(self.fn,'w') f.write(data) f.close() if __name__ == '__main__': import sys import os from klampt import trajectory world = WorldModel() if len(sys.argv) == 1: world.readFile("../../data/athlete_plane.xml") q = world.robot(0).getConfig() q[2] = 2 world.robot(0).setConfig(q) sim = Simulator(world) share = HTMLSharePath(name="Klamp't simulation path") share.start(sim) for i in range(100): sim.simulate(0.02) share.animate() share.end() else: assert len(sys.argv) == 3,"Usage: sharepath.py world.xml robot_path" world.readFile(sys.argv[1]) traj = trajectory.RobotTrajectory(world.robot(0)) traj.load(sys.argv[2]) world.robot(0).setConfig(traj.milestones[0]) dt = 0.02 excess = 1.0 share = HTMLSharePath(name="Klamp't path "+os.path.split(sys.argv[2])[1]) share.start(world) share.dt = dt t = traj.times[0] while t < traj.times[-1] + excess: world.robot(0).setConfig(traj.eval(t)) share.animate(t) t += dt share.end()
#include "mitkPlaneGeometry.h" #include "<API key>.h" #include "<API key>.h" #include "mitkLine.h" #include "mitkGeometry3D.h" #include "<API key>.h" #include "<API key>.h" #include "<API key>.h" #include "mitkBaseGeometry.h" #include <mitkTestingMacros.h> #include <mitkTestFixture.h> #include <vnl/vnl_quaternion.h> #include <vnl/vnl_quaternion.txx> #include <fstream> #include <iomanip> static const mitk::ScalarType testEps = 1E-9; // the epsilon used in this test == at least float precision. class <API key> : public mitk::TestFixture { CPPUNIT_TEST_SUITE(<API key>); MITK_TEST(<API key>); MITK_TEST(<API key>); MITK_TEST(<API key>); MITK_TEST(TestInheritance); MITK_TEST(TestSetExtendInMM); MITK_TEST(TestRotate); MITK_TEST(TestClone); MITK_TEST(TestPlaneComparison); MITK_TEST(<API key>); MITK_TEST(<API key>); MITK_TEST(<API key>); MITK_TEST(<API key>); // Currently commented out, see See bug 15990 // MITK_TEST(<API key>); MITK_TEST(<API key>); MITK_TEST(TestCase1210); <API key>(); private: // private test members that are initialized by setUp() mitk::PlaneGeometry::Pointer planegeometry; mitk::Point3D origin; mitk::Vector3D right, bottom, normal; mitk::ScalarType width, height; mitk::ScalarType widthInMM, heightInMM, thicknessInMM; public: void setUp() override { planegeometry = mitk::PlaneGeometry::New(); width = 100; widthInMM = width; height = 200; heightInMM = height; thicknessInMM = 1.0; mitk::FillVector3D(origin, 4.5, 7.3, 11.2); mitk::FillVector3D(right, widthInMM, 0, 0); mitk::FillVector3D(bottom, 0, heightInMM, 0); mitk::FillVector3D(normal, 0, 0, thicknessInMM); planegeometry-><API key>(right.GetVnlVector(), bottom.GetVnlVector()); planegeometry->SetOrigin(origin); } void tearDown() override { } // This test verifies inheritance behaviour, this test will fail if the behaviour changes in the future void TestInheritance() { mitk::PlaneGeometry::Pointer plane = mitk::PlaneGeometry::New(); mitk::Geometry3D::Pointer g3d = dynamic_cast < mitk::Geometry3D* > ( plane.GetPointer() ); <API key>("Planegeometry should not be castable to Geometry 3D", g3d.IsNull()); mitk::BaseGeometry::Pointer base = dynamic_cast < mitk::BaseGeometry* > ( plane.GetPointer() ); <API key>("Planegeometry should be castable to BaseGeometry", base.IsNotNull()); base = nullptr; g3d = mitk::Geometry3D::New(); base = dynamic_cast < mitk::BaseGeometry* > ( g3d.GetPointer() ); <API key>("Geometry3D should be castable to BaseGeometry", base.IsNotNull()); g3d=nullptr; mitk::SlicedGeometry3D::Pointer sliced = mitk::SlicedGeometry3D::New(); g3d = dynamic_cast < mitk::Geometry3D* > ( sliced.GetPointer() ); <API key>("SlicedGeometry3D should not be castable to Geometry3D", g3d.IsNull()); plane=nullptr; mitk::<API key>::Pointer thin = mitk::<API key>::New(); plane = dynamic_cast < mitk::PlaneGeometry* > ( thin.GetPointer() ); <API key>("<API key> should be castable to PlaneGeometry", plane.IsNotNull()); plane = mitk::PlaneGeometry::New(); mitk::<API key>::Pointer atg = dynamic_cast < mitk::<API key>* > ( plane.GetPointer() ); <API key>("PlaneGeometry should not be castable to <API key>", atg.IsNull()); } void <API key>() { planegeometry = mitk::PlaneGeometry::New(); width = 100; widthInMM = 5; height = 200; heightInMM = 3; thicknessInMM = 1.0; mitk::FillVector3D(right, widthInMM, 0, 0); mitk::FillVector3D(bottom, 0, heightInMM, 0); // This one negative sign results in lefthanded coordinate orientation and det(matrix) < 0. mitk::FillVector3D(normal, 0, 0, -thicknessInMM); mitk::AffineTransform3D::Pointer transform = mitk::AffineTransform3D::New(); mitk::AffineTransform3D::MatrixType matrix; mitk::AffineTransform3D::MatrixType::InternalMatrixType& vnl_matrix = matrix.GetVnlMatrix(); vnl_matrix.set_column(0, right); vnl_matrix.set_column(1, bottom); vnl_matrix.set_column(2, normal); // making sure that we didn't screw up this special test case or else fail deadly: assert( vnl_determinant(vnl_matrix) < 0.0 ); transform->SetIdentity(); transform->SetMatrix(matrix); planegeometry-><API key>( width, height, transform ); // Crux of the matter. <API key>("Testing if IndexToWorldMatrix is correct after <API key>( width, height, transform ) ", mitk::<API key>( planegeometry-><API key>()->GetMatrix(), matrix ) ); mitk::Point3D p_index; p_index[0] = 10.; p_index[1] = 10.; p_index[2] = 0.; mitk::Point3D p_world; mitk::Point3D p_expectedResult; p_expectedResult[0] = 50.; p_expectedResult[1] = 30.; p_expectedResult[2] = 0.; ((mitk::BaseGeometry::Pointer) planegeometry)->IndexToWorld(p_index, p_world); // Crux of the matter. <API key>( "Testing if IndexToWorld(a,b) function works correctly with lefthanded matrix ", mitk::Equal(p_world, p_expectedResult, testEps ) ); } // See bug 1210 // Test does not use standard Parameters void TestCase1210() { mitk::PlaneGeometry::Pointer planegeometry = mitk::PlaneGeometry::New(); mitk::Point3D origin; mitk::Vector3D right, down, spacing; mitk::FillVector3D(origin, 4.5, 7.3, 11.2); mitk::FillVector3D(right, 1.015625, 1.015625, 1.1999969482421875 ); mitk::FillVector3D(down, 1.<API key>, 0, 0 ); mitk::FillVector3D(spacing, 0, 1.<API key>, 9.<API key> ); std::cout << "Testing <API key>(rightVector, downVector, spacing = NULL): "<<std::endl; <API key>(planegeometry-><API key>(right, down, &spacing)); /* std::cout << "Testing width, height and thickness (in units): "; if((mitk::Equal(planegeometry->GetExtent(0),width)==false) || (mitk::Equal(planegeometry->GetExtent(1),height)==false) || (mitk::Equal(planegeometry->GetExtent(2),1)==false) ) { std::cout<<"[FAILED]"<<std::endl; return EXIT_FAILURE; } std::cout<<"[PASSED]"<<std::endl; std::cout << "Testing width, height and thickness (in mm): "; if((mitk::Equal(planegeometry->GetExtentInMM(0),widthInMM)==false) || (mitk::Equal(planegeometry->GetExtentInMM(1),heightInMM)==false) || (mitk::Equal(planegeometry->GetExtentInMM(2),thicknessInMM)==false) ) { std::cout<<"[FAILED]"<<std::endl; return EXIT_FAILURE; } */ } // Test does not use standard Parameters void <API key>() { //init plane with its parameter mitk::PlaneGeometry::Pointer myPlaneGeometry = mitk::PlaneGeometry::New(); mitk::Point3D origin; origin[0] = 0.0; origin[1] = 2.0; origin[2] = 0.0; mitk::Vector3D normal; normal[0] = 0.0; normal[1] = 1.0; normal[2] = 0.0; myPlaneGeometry->InitializePlane(origin,normal); //generate points and line for intersection testing //point distance of given line > 1 mitk::Point3D pointP1; pointP1[0] = 2.0; pointP1[1] = 1.0; pointP1[2] = 0.0; mitk::Point3D pointP2; pointP2[0] = 2.0; pointP2[1] = 4.0; pointP2[2] = 0.0; mitk::Vector3D lineDirection; lineDirection[0] = pointP2[0] - pointP1[0]; lineDirection[1] = pointP2[1] - pointP1[1]; lineDirection[2] = pointP2[2] - pointP1[2]; mitk::Line3D xingline( pointP1, lineDirection ); mitk::Point3D calcXingPoint; myPlaneGeometry->IntersectionPoint(xingline, calcXingPoint); //point distance of given line < 1 mitk::Point3D pointP3; pointP3[0] = 2.0; pointP3[1] = 2.2; pointP3[2] = 0.0; mitk::Point3D pointP4; pointP4[0] = 2.0; pointP4[1] = 1.7; pointP4[2] = 0.0; mitk::Vector3D lineDirection2; lineDirection2[0] = pointP4[0] - pointP3[0]; lineDirection2[1] = pointP4[1] - pointP3[1]; lineDirection2[2] = pointP4[2] - pointP3[2]; mitk::Line3D xingline2( pointP3, lineDirection2 ); mitk::Point3D calcXingPoint2; myPlaneGeometry->IntersectionPoint( xingline2, calcXingPoint2 ); //intersection points must be the same <API key>("Failed to calculate Intersection Point", calcXingPoint == calcXingPoint2); } /** * @brief This method tests method <API key>. * * See also bug #3409. */ // Test does not use standard Parameters void <API key>() { mitk::PlaneGeometry::Pointer myPlaneGeometry = mitk::PlaneGeometry::New(); //create normal mitk::Vector3D normal; normal[0] = 0.0; normal[1] = 0.0; normal[2] = 1.0; //create origin mitk::Point3D origin; origin[0] = -27.582859; origin[1] = 50; origin[2] = 200.27742; //initialize plane geometry myPlaneGeometry->InitializePlane(origin,normal); //output to descripe the test std::cout << "Testing PlaneGeometry according to bug #3409" << std::endl; std::cout << "Our normal is: " << normal << std::endl; std::cout << "So ALL projected points should have exactly the same z-value!" << std::endl; //create a number of points mitk::Point3D myPoints[5]; myPoints[0][0] = -27.582859; myPoints[0][1] = 50.00; myPoints[0][2] = 200.27742; myPoints[1][0] = -26.58662; myPoints[1][1] = 50.00; myPoints[1][2] = 200.19026; myPoints[2][0] = -26.58662; myPoints[2][1] = 50.00; myPoints[2][2] = 200.33124; myPoints[3][0] = 104.58662; myPoints[3][1] = 452.12313; myPoints[3][2] = 866.41236; myPoints[4][0] = -207.58662; myPoints[4][1] = 312.00; myPoints[4][2] = -300.12346; //project points onto plane mitk::Point3D myProjectedPoints[5]; for ( unsigned int i = 0; i < 5; ++i ) { myProjectedPoints[i] = myPlaneGeometry-><API key>( myPoints[i] ); } //compare z-values with z-value of plane (should be equal) bool allPointsOnPlane = true; for (auto & myProjectedPoint : myProjectedPoints) { if ( fabs(myProjectedPoint[2] - origin[2]) > mitk::sqrteps ) { allPointsOnPlane = false; } } <API key>("All points lie not on the same plane", allPointsOnPlane); } void <API key>() { mitk::PlaneGeometry::Pointer geometry2D = createPlaneGeometry(); try { mitk::PlaneGeometry::Pointer clone = geometry2D->Clone(); itk::Matrix<mitk::ScalarType,3,3> matrix = clone-><API key>()->GetMatrix(); <API key>("Test if matrix element exists...", matrix[0][0] == 31); double origin = geometry2D->GetOrigin()[0]; <API key>("First Point of origin as expected...", mitk::Equal(origin, 8)); double spacing = geometry2D->GetSpacing()[0]; <API key>("First Point of spacing as expected...", mitk::Equal(spacing, 31)); } catch (...) { CPPUNIT_FAIL("Error during access on a member of cloned geometry"); } // direction [row] [coloum] MITK_TEST_OUTPUT( << "Casting a rotated 2D ITK Image to a MITK Image and check if Geometry is still same" ); } void <API key>() { mitk::Vector3D mySpacing; mySpacing[0] = 31; mySpacing[1] = 0.1; mySpacing[2] = 5.4; mitk::Point3D myOrigin; myOrigin[0] = 8; myOrigin[1] = 9; myOrigin[2] = 10; mitk::AffineTransform3D::Pointer myTransform = mitk::AffineTransform3D::New(); itk::Matrix<mitk::ScalarType, 3,3> transMatrix; transMatrix.Fill(0); transMatrix[0][0] = 1; transMatrix[1][1] = 2; transMatrix[2][2] = 4; myTransform->SetMatrix(transMatrix); mitk::PlaneGeometry::Pointer geometry2D1 = mitk::PlaneGeometry::New(); geometry2D1-><API key>(myTransform); geometry2D1->SetSpacing(mySpacing); geometry2D1->SetOrigin(myOrigin); mitk::PlaneGeometry::Pointer geometry2D2 = mitk::PlaneGeometry::New(); geometry2D2->SetSpacing(mySpacing); geometry2D2->SetOrigin(myOrigin); geometry2D2-><API key>(myTransform); mitk::PlaneGeometry::Pointer geometry2D3 = mitk::PlaneGeometry::New(); geometry2D3-><API key>(myTransform); geometry2D3->SetSpacing(mySpacing); geometry2D3->SetOrigin(myOrigin); geometry2D3-><API key>(myTransform); <API key>("Origin of Geometry 1 matches that of Geometry 2.", mitk::Equal(geometry2D1->GetOrigin(), geometry2D2->GetOrigin())); <API key>("Origin of Geometry 1 match those of Geometry 3.", mitk::Equal(geometry2D1->GetOrigin(), geometry2D3->GetOrigin())); <API key>("Origin of Geometry 2 match those of Geometry 3.", mitk::Equal(geometry2D2->GetOrigin(), geometry2D3->GetOrigin())); <API key>("Spacing of Geometry 1 match those of Geometry 2.", mitk::Equal(geometry2D1->GetSpacing(), geometry2D2->GetSpacing())); <API key>("Spacing of Geometry 1 match those of Geometry 3.", mitk::Equal(geometry2D1->GetSpacing(), geometry2D3->GetSpacing())); <API key>("Spacing of Geometry 2 match those of Geometry 3.", mitk::Equal(geometry2D2->GetSpacing(), geometry2D3->GetSpacing())); <API key>("Transformation of Geometry 1 match those of Geometry 2.", compareMatrix(geometry2D1-><API key>()->GetMatrix(), geometry2D2-><API key>()->GetMatrix())); <API key>("Transformation of Geometry 1 match those of Geometry 3.", compareMatrix(geometry2D1-><API key>()->GetMatrix(), geometry2D3-><API key>()->GetMatrix())); <API key>("Transformation of Geometry 2 match those of Geometry 3.", compareMatrix(geometry2D2-><API key>()->GetMatrix(), geometry2D3-><API key>()->GetMatrix())); } void <API key>() { <API key>("Testing correct Standard Plane initialization with default Spacing: width", mitk::Equal(planegeometry->GetExtent(0),width, testEps)); <API key>("Testing correct Standard Plane initialization with default Spacing: height", mitk::Equal(planegeometry->GetExtent(1),height, testEps)); <API key>("Testing correct Standard Plane initialization with default Spacing: depth", mitk::Equal(planegeometry->GetExtent(2),1, testEps)); <API key>("Testing correct Standard Plane initialization with default Spacing: width in mm", mitk::Equal(planegeometry->GetExtentInMM(0),widthInMM, testEps) ); <API key>("Testing correct Standard Plane initialization with default Spacing: heght in mm", mitk::Equal(planegeometry->GetExtentInMM(1),heightInMM, testEps) ); <API key>("Testing correct Standard Plane initialization with default Spacing: depth in mm", mitk::Equal(planegeometry->GetExtentInMM(2),thicknessInMM, testEps) ); <API key>("Testing correct Standard Plane initialization with default Spacing: AxisVectorRight", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps) ); <API key>("Testing correct Standard Plane initialization with default Spacing: AxisVectorBottom", mitk::Equal(planegeometry->GetAxisVector(1), bottom, testEps) ); <API key>("Testing correct Standard Plane initialization with default Spacing: AxisVectorNormal", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps) ); mitk::Vector3D spacing; thicknessInMM = 1.5; normal.Normalize(); normal *= thicknessInMM; mitk::FillVector3D(spacing, 1.0, 1.0, thicknessInMM); planegeometry-><API key>(right.GetVnlVector(), bottom.GetVnlVector(), &spacing); <API key>("Testing correct Standard Plane initialization with custom Spacing: width", mitk::Equal(planegeometry->GetExtent(0),width, testEps)); <API key>("Testing correct Standard Plane initialization with custom Spacing: height", mitk::Equal(planegeometry->GetExtent(1),height, testEps)); <API key>("Testing correct Standard Plane initialization with custom Spacing: depth", mitk::Equal(planegeometry->GetExtent(2),1, testEps)); <API key>("Testing correct Standard Plane initialization with custom Spacing: width in mm", mitk::Equal(planegeometry->GetExtentInMM(0),widthInMM, testEps) ); <API key>("Testing correct Standard Plane initialization with custom Spacing: height in mm", mitk::Equal(planegeometry->GetExtentInMM(1),heightInMM, testEps) ); <API key>("Testing correct Standard Plane initialization with custom Spacing: depth in mm", mitk::Equal(planegeometry->GetExtentInMM(2),thicknessInMM, testEps) ); <API key>("Testing correct Standard Plane initialization with custom Spacing: AxisVectorRight", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps) ); <API key>("Testing correct Standard Plane initialization with custom Spacing: AxisVectorBottom", mitk::Equal(planegeometry->GetAxisVector(1), bottom, testEps) ); <API key>("Testing correct Standard Plane initialization with custom Spacing: AxisVectorNormal", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps) ); ; } void TestSetExtendInMM() { normal.Normalize(); normal *= thicknessInMM; planegeometry->SetExtentInMM(2, thicknessInMM); <API key>("Testing SetExtentInMM(2, ...), querying by GetExtentInMM(2): ", mitk::Equal(planegeometry->GetExtentInMM(2),thicknessInMM, testEps)); <API key>("Testing SetExtentInMM(2, ...), querying by GetAxisVector(2) and comparing to normal: ", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps)); planegeometry->SetOrigin(origin); <API key>("Testing SetOrigin", mitk::Equal(planegeometry->GetOrigin(), origin, testEps)); <API key>("Testing GetAxisVector() after SetOrigin: Right", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps) ); <API key>("Testing GetAxisVector() after SetOrigin: Bottom", mitk::Equal(planegeometry->GetAxisVector(1), bottom, testEps) ); <API key>("Testing GetAxisVector() after SetOrigin: Normal", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps) ); mappingTests2D(planegeometry, width, height, widthInMM, heightInMM, origin, right, bottom); } void TestRotate() { // Changing the <API key> to a rotated version by <API key>() (keep origin): mitk::AffineTransform3D::Pointer transform = mitk::AffineTransform3D::New(); mitk::AffineTransform3D::MatrixType::InternalMatrixType vnlmatrix; vnlmatrix = planegeometry-><API key>()->GetMatrix().GetVnlMatrix(); mitk::VnlVector axis(3); mitk::FillVector3D(axis, 1.0, 1.0, 1.0); axis.normalize(); vnl_quaternion<mitk::ScalarType> rotation(axis, 0.223); vnlmatrix = rotation.<API key>()*vnlmatrix; mitk::Matrix3D matrix; matrix = vnlmatrix; transform->SetMatrix(matrix); transform->SetOffset(planegeometry-><API key>()->GetOffset()); right.SetVnlVector( rotation.<API key>()*right.GetVnlVector() ); bottom.SetVnlVector(rotation.<API key>()*bottom.GetVnlVector()); normal.SetVnlVector(rotation.<API key>()*normal.GetVnlVector()); planegeometry-><API key>(transform); //The origin changed,because m_Origin=<API key>->GetOffset()+GetAxisVector(2)*0.5 //and the AxisVector changes due to the rotation. In other words: the rotation was done around //the corner of the box, not around the planes origin. Now change it to a rotation around //the origin, simply by re-setting the origin to the original one: planegeometry->SetOrigin(origin); <API key>("Testing whether <API key> kept origin: ", mitk::Equal(planegeometry->GetOrigin(), origin, testEps) ); mitk::Point2D point; point[0] = 4; point[1] = 3; mitk::Point2D dummy; planegeometry->WorldToIndex(point, dummy); planegeometry->IndexToWorld(dummy, dummy); <API key>("Testing consistency of index and world coordinates.", dummy == point); <API key>("Testing width of rotated version: ", mitk::Equal(planegeometry->GetExtentInMM(0),widthInMM, testEps)); <API key>("Testing height of rotated version: ", mitk::Equal(planegeometry->GetExtentInMM(1),heightInMM, testEps)); <API key>("Testing thickness of rotated version: ", mitk::Equal(planegeometry->GetExtentInMM(2),thicknessInMM, testEps)); <API key>("Testing GetAxisVector() of rotated version: right ", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps)); <API key>("Testing GetAxisVector() of rotated version: bottom", mitk::Equal(planegeometry->GetAxisVector(1), bottom, testEps)); <API key>("Testing GetAxisVector() of rotated version: normal", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps)); <API key>("Testing GetAxisVector(direction).GetNorm() != planegeometry->GetExtentInMM(direction) of rotated version: ", mitk::Equal(planegeometry->GetAxisVector(0).GetNorm(),planegeometry->GetExtentInMM(0), testEps)); <API key>("Testing GetAxisVector(direction).GetNorm() != planegeometry->GetExtentInMM(direction) of rotated version: ", mitk::Equal(planegeometry->GetAxisVector(1).GetNorm(),planegeometry->GetExtentInMM(1), testEps)); <API key>("Testing GetAxisVector(direction).GetNorm() != planegeometry->GetExtentInMM(direction) of rotated version: ", mitk::Equal(planegeometry->GetAxisVector(2).GetNorm(),planegeometry->GetExtentInMM(2), testEps)); mappingTests2D(planegeometry, width, height, widthInMM, heightInMM, origin, right, bottom); width *= 2; height *= 3; planegeometry->SetSizeInUnits(width, height); <API key>("Testing SetSizeInUnits() of rotated version: ", mitk::Equal(planegeometry->GetExtent(0),width, testEps)); <API key>("Testing SetSizeInUnits() of rotated version: ", mitk::Equal(planegeometry->GetExtent(1),height, testEps)); <API key>("Testing SetSizeInUnits() of rotated version: " , mitk::Equal(planegeometry->GetExtent(2),1, testEps)); <API key>("Testing width (in mm) of version with changed size in units: ", mitk::Equal(planegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing height (in mm) of version with changed size in units: ", mitk::Equal(planegeometry->GetExtentInMM(1), heightInMM, testEps)); <API key>("Testing thickness (in mm) of version with changed size in units: ", mitk::Equal(planegeometry->GetExtentInMM(2), thicknessInMM, testEps)); <API key>("Testing GetAxisVector() of version with changed size in units: right ", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps)); <API key>("Testing GetAxisVector() of version with changed size in units: bottom", mitk::Equal(planegeometry->GetAxisVector(1), bottom, testEps)); <API key>("Testing GetAxisVector() of version with changed size in units: normal", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps)); <API key>("Testing GetAxisVector(direction).GetNorm() != planegeometry->GetExtentInMM(direction) of rotated version: ", mitk::Equal(planegeometry->GetAxisVector(0).GetNorm(),planegeometry->GetExtentInMM(0), testEps)); <API key>("Testing GetAxisVector(direction).GetNorm() != planegeometry->GetExtentInMM(direction) of rotated version: ", mitk::Equal(planegeometry->GetAxisVector(1).GetNorm(),planegeometry->GetExtentInMM(1), testEps)); <API key>("Testing GetAxisVector(direction).GetNorm() != planegeometry->GetExtentInMM(direction) of rotated version: ", mitk::Equal(planegeometry->GetAxisVector(2).GetNorm(),planegeometry->GetExtentInMM(2), testEps)); mappingTests2D(planegeometry, width, height, widthInMM, heightInMM, origin, right, bottom); } void TestClone() { mitk::PlaneGeometry::Pointer clonedplanegeometry = dynamic_cast<mitk::PlaneGeometry*>(planegeometry->Clone().GetPointer()); // Cave: Statement below is negated! <API key>("Testing Clone(): ", ! ((clonedplanegeometry.IsNull()) || (clonedplanegeometry->GetReferenceCount()!=1))); <API key>("Testing origin of cloned version: ", mitk::Equal(clonedplanegeometry->GetOrigin(), origin, testEps)); <API key>("Testing width (in units) of cloned version: ", mitk::Equal(clonedplanegeometry->GetExtent(0),width, testEps)); <API key>("Testing height (in units) of cloned version: ", mitk::Equal(clonedplanegeometry->GetExtent(1),height, testEps)); <API key>("Testing extent (in units) of cloned version: ", mitk::Equal(clonedplanegeometry->GetExtent(2),1, testEps)); <API key>("Testing width (in mm) of cloned version: ", mitk::Equal(clonedplanegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing height (in mm) of cloned version: ", mitk::Equal(clonedplanegeometry->GetExtentInMM(1), heightInMM, testEps)); <API key>("Testing thickness (in mm) of cloned version: ", mitk::Equal(clonedplanegeometry->GetExtentInMM(2), thicknessInMM, testEps)); <API key>("Testing GetAxisVector() of cloned version: right", mitk::Equal(clonedplanegeometry->GetAxisVector(0), right, testEps)); <API key>("Testing GetAxisVector() of cloned version: bottom", mitk::Equal(clonedplanegeometry->GetAxisVector(1), bottom, testEps)); <API key>("Testing GetAxisVector() of cloned version: normal", mitk::Equal(clonedplanegeometry->GetAxisVector(2), normal, testEps)); mappingTests2D(clonedplanegeometry, width, height, widthInMM, heightInMM, origin, right, bottom); } void <API key>() { mitk::Point3D cornerpoint0 = planegeometry->GetCornerPoint(0); mitk::PlaneGeometry::Pointer clonedplanegeometry = dynamic_cast<mitk::PlaneGeometry*>(planegeometry->Clone().GetPointer()); // Testing <API key>(clonedplanegeometry, planeorientation = Sagittal, zPosition = 0, frontside=true): planegeometry-><API key>(clonedplanegeometry, mitk::PlaneGeometry::Sagittal); mitk::Vector3D newright, newbottom, newnormal; mitk::ScalarType newthicknessInMM; newright = bottom; newthicknessInMM = widthInMM/width*1.0; // extent in normal direction is 1; newnormal = right; newnormal.Normalize(); newnormal *= newthicknessInMM; newbottom = normal; newbottom.Normalize(); newbottom *= thicknessInMM; <API key>("Testing GetCornerPoint(0) of sagitally initialized version:", mitk::Equal(planegeometry->GetCornerPoint(0), cornerpoint0, testEps)); //ok, corner was fine, so we can dare to believe the origin is ok. origin = planegeometry->GetOrigin(); <API key>("Testing width, height and thickness (in units) of sagitally initialized version: ", mitk::Equal(planegeometry->GetExtent(0), height, testEps)); <API key>("Testing width, height and thickness (in units) of sagitally initialized version: ", mitk::Equal(planegeometry->GetExtent(1), 1, testEps)); <API key>("Testing width, height and thickness (in units) of sagitally initialized version: ", mitk::Equal(planegeometry->GetExtent(2), 1, testEps)); <API key>("Testing width, height and thickness (in mm) of sagitally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(0), heightInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of sagitally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(1), thicknessInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of sagitally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(2), newthicknessInMM, testEps)); <API key>("Testing GetAxisVector() of sagitally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(0), newright, testEps)); <API key>("Testing GetAxisVector() of sagitally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(1), newbottom, testEps)); <API key>("Testing GetAxisVector() of sagitally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(2), newnormal, testEps)); mappingTests2D(planegeometry, height, 1, heightInMM, thicknessInMM, origin, newright, newbottom); // set origin back to the one of the axial slice: origin = clonedplanegeometry->GetOrigin(); // Testing backside initialization: <API key>(clonedplanegeometry, planeorientation = Axial, zPosition = 0, frontside=false, rotated=true): planegeometry-><API key>(clonedplanegeometry, mitk::PlaneGeometry::Axial, 0, false, true); mitk::Point3D backsideorigin; backsideorigin=origin+clonedplanegeometry->GetAxisVector(1);//+clonedplanegeometry->GetAxisVector(2); <API key>("Testing origin of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetOrigin(), backsideorigin, testEps)); mitk::Point3D <API key>; <API key> = cornerpoint0+clonedplanegeometry->GetAxisVector(1);//+clonedplanegeometry->GetAxisVector(2); <API key>("Testing GetCornerPoint(0) of sagitally initialized version: ", mitk::Equal(planegeometry->GetCornerPoint(0), <API key>, testEps)); <API key>("Testing width, height and thickness (in units) of backsidedly, axially initialized version (should be same as in mm due to unit spacing, except for thickness, which is always 1): ", mitk::Equal(planegeometry->GetExtent(0), width, testEps)); <API key>("Testing width, height and thickness (in units) of backsidedly, axially initialized version (should be same as in mm due to unit spacing, except for thickness, which is always 1): ", mitk::Equal(planegeometry->GetExtent(1), height, testEps)); <API key>("Testing width, height and thickness (in units) of backsidedly, axially initialized version (should be same as in mm due to unit spacing, except for thickness, which is always 1): ", mitk::Equal(planegeometry->GetExtent(2), 1, testEps)); <API key>("Testing width, height and thickness (in mm) of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(1), heightInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(2), thicknessInMM, testEps)); <API key>("Testing GetAxisVector() of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps)); <API key>("Testing GetAxisVector() of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetAxisVector(1), -bottom, testEps)); <API key>("Testing GetAxisVector() of backsidedly, axially initialized version: ", mitk::Equal(planegeometry->GetAxisVector(2), -normal, testEps)); mappingTests2D(planegeometry, width, height, widthInMM, heightInMM, backsideorigin, right, -bottom); } void <API key>() { mitk::Point3D cornerpoint0 = planegeometry->GetCornerPoint(0); mitk::PlaneGeometry::Pointer clonedplanegeometry = dynamic_cast<mitk::PlaneGeometry*>(planegeometry->Clone().GetPointer()); mitk::Vector3D newright, newbottom, newnormal; mitk::ScalarType newthicknessInMM; // Testing <API key>(clonedplanegeometry, planeorientation = Frontal, zPosition = 0, frontside=true) planegeometry-><API key>(clonedplanegeometry, mitk::PlaneGeometry::Frontal); newright = right; newbottom = normal; newbottom.Normalize(); newbottom *= thicknessInMM; newthicknessInMM = heightInMM/height*1.0/*extent in normal direction is 1*/; newnormal = -bottom; newnormal.Normalize(); newnormal *= newthicknessInMM; <API key>("Testing GetCornerPoint(0) of frontally initialized version: ", mitk::Equal(planegeometry->GetCornerPoint(0), cornerpoint0, testEps)); //ok, corner was fine, so we can dare to believe the origin is ok. origin = planegeometry->GetOrigin(); <API key>("Testing width (in units) of frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(0), width, testEps)); <API key>("Testing height (in units) of frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(1), 1, testEps)); <API key>("Testing thickness (in units) of frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(2), 1, testEps)); <API key>("Testing width (in mm) of frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing height (in mm) of frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(1), thicknessInMM, testEps)); <API key>("Testing thickness (in mm) of frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(2), newthicknessInMM, testEps)); <API key>("Testing GetAxisVector() of frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(0), newright, testEps)); <API key>("Testing GetAxisVector() of frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(1), newbottom, testEps)); <API key>("Testing GetAxisVector() of frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(2), newnormal, testEps)); mappingTests2D(planegeometry, width, 1, widthInMM, thicknessInMM, origin, newright, newbottom); //Changing plane to in-plane unit spacing using SetSizeInUnits: planegeometry->SetSizeInUnits(planegeometry->GetExtentInMM(0), planegeometry->GetExtentInMM(1)); <API key>( "Testing origin of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetOrigin(), origin, testEps)); <API key>("Testing width, height and thickness (in units) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(0), widthInMM, testEps)); <API key>("Testing width, height and thickness (in units) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(1), thicknessInMM, testEps)); <API key>("Testing width, height and thickness (in units) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(2), 1, testEps)); <API key>("Testing width, height and thickness (in mm) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(1), thicknessInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(2), newthicknessInMM, testEps)); <API key>("Testing GetAxisVector() of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(0), newright, testEps)); <API key>("Testing GetAxisVector() of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(1), newbottom, testEps)); <API key>("Testing GetAxisVector() of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(2), newnormal, testEps)); mappingTests2D(planegeometry, widthInMM, thicknessInMM, widthInMM, thicknessInMM, origin, newright, newbottom); // Changing plane to unit spacing also in normal direction using SetExtentInMM(2, 1.0): planegeometry->SetExtentInMM(2, 1.0); newnormal.Normalize(); <API key>("Testing origin of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetOrigin(), origin, testEps)); <API key>("Testing width, height and thickness (in units) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(0), widthInMM, testEps)); <API key>("Testing width, height and thickness (in units) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(1), thicknessInMM, testEps)); <API key>("Testing width, height and thickness (in units) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtent(2), 1, testEps)); <API key>("Testing width, height and thickness (in mm) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(1), thicknessInMM, testEps)); <API key>("Testing width, height and thickness (in mm) of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(2), 1.0, testEps)); <API key>("Testing GetAxisVector() of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(0), newright, testEps)); <API key>("Testing GetAxisVector() of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(1), newbottom, testEps)); <API key>("Testing GetAxisVector() of unit spaced, frontally initialized version: ", mitk::Equal(planegeometry->GetAxisVector(2), newnormal, testEps)); mappingTests2D(planegeometry, widthInMM, thicknessInMM, widthInMM, thicknessInMM, origin, newright, newbottom); } void <API key>() { mitk::Point3D cornerpoint0 = planegeometry->GetCornerPoint(0); // Clone, move, rotate and test for 'IsParallel' and 'IsOnPlane' mitk::PlaneGeometry::Pointer clonedplanegeometry = dynamic_cast<mitk::PlaneGeometry*>(planegeometry->Clone().GetPointer()); <API key>("Testing Clone(): ", ! ((clonedplanegeometry.IsNull()) || (clonedplanegeometry->GetReferenceCount()!=1)) ); std::cout << "Testing <API key>(clonedplanegeometry, planeorientation = Axial, zPosition = 0, frontside=true): " <<std::endl; planegeometry-><API key>(clonedplanegeometry); <API key>("Testing origin of axially initialized version: ", mitk::Equal(planegeometry->GetOrigin(), origin)); <API key>("Testing GetCornerPoint(0) of axially initialized version: ", mitk::Equal(planegeometry->GetCornerPoint(0), cornerpoint0)); <API key>("Testing width (in units) of axially initialized version (should be same as in mm due to unit spacing, except for thickness, which is always 1): ", mitk::Equal(planegeometry->GetExtent(0), width, testEps)); <API key>("Testing height (in units) of axially initialized version (should be same as in mm due to unit spacing, except for thickness, which is always 1): ", mitk::Equal(planegeometry->GetExtent(1), height, testEps)); <API key>("Testing thickness (in units) of axially initialized version (should be same as in mm due to unit spacing, except for thickness, which is always 1): ", mitk::Equal(planegeometry->GetExtent(2), 1, testEps)); <API key>("Testing width (in mm) of axially initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(0), widthInMM, testEps)); <API key>("Testing height (in mm) of axially initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(1), heightInMM, testEps)); <API key>("Testing thickness (in mm) of axially initialized version: ", mitk::Equal(planegeometry->GetExtentInMM(2), thicknessInMM, testEps)); <API key>("Testing GetAxisVector() of axially initialized version: ", mitk::Equal(planegeometry->GetAxisVector(0), right, testEps)); <API key>("Testing GetAxisVector() of axially initialized version: ", mitk::Equal(planegeometry->GetAxisVector(1), bottom, testEps)); <API key>("Testing GetAxisVector() of axially initialized version: ", mitk::Equal(planegeometry->GetAxisVector(2), normal, testEps)); mappingTests2D(planegeometry, width, height, widthInMM, heightInMM, origin, right, bottom); } void TestPlaneComparison() { // Clone, move, rotate and test for 'IsParallel' and 'IsOnPlane' mitk::PlaneGeometry::Pointer <API key> = dynamic_cast<mitk::PlaneGeometry*>(planegeometry->Clone().GetPointer()); <API key>("Testing Clone(): ", ! ((<API key>.IsNull()) || (<API key>->GetReferenceCount()!=1)) ); <API key>("Testing wheter original and clone are at the same position", <API key>->IsOnPlane(planegeometry.GetPointer())); <API key>(" Asserting that origin is on the plane cloned plane:", <API key>->IsOnPlane(origin)); mitk::VnlVector newaxis(3); mitk::FillVector3D(newaxis, 1.0, 1.0, 1.0); newaxis.normalize(); vnl_quaternion<mitk::ScalarType> rotation2(newaxis, 0.0); mitk::Vector3D clonednormal = <API key>->GetNormal(); mitk::Point3D clonedorigin = <API key>->GetOrigin(); auto planerot = new mitk::RotationOperation( mitk::OpROTATE, origin, <API key>->GetAxisVector( 0 ), 180.0 ); <API key>->ExecuteOperation( planerot ); <API key>(" Asserting that a flipped plane is still on the original plane: ", <API key>->IsOnPlane(planegeometry.GetPointer())); clonedorigin += clonednormal; <API key>->SetOrigin( clonedorigin ); <API key>("Testing if the translated (cloned, flipped) plane is parallel to its origin plane: ", <API key>->IsParallel(planegeometry)); delete planerot; planerot = new mitk::RotationOperation( mitk::OpROTATE, origin, <API key>->GetAxisVector( 0 ), 0.5 ); <API key>->ExecuteOperation( planerot ); <API key>("Testing if a non-paralell plane gets recognized as not paralell [rotation +0.5 degree] : ", ! <API key>->IsParallel(planegeometry)); delete planerot; planerot = new mitk::RotationOperation( mitk::OpROTATE, origin, <API key>->GetAxisVector( 0 ), -1.0 ); <API key>->ExecuteOperation( planerot ); <API key>("Testing if a non-paralell plane gets recognized as not paralell [rotation -0.5 degree] : ", ! <API key>->IsParallel(planegeometry)); delete planerot; planerot = new mitk::RotationOperation( mitk::OpROTATE, origin, <API key>->GetAxisVector( 0 ), 360.5 ); <API key>->ExecuteOperation( planerot ); <API key>("Testing if a non-paralell plane gets recognized as paralell [rotation 360 degree] : ", <API key>->IsParallel(planegeometry)); } private: // helper Methods for the Tests mitk::PlaneGeometry::Pointer createPlaneGeometry() { mitk::Vector3D mySpacing; mySpacing[0] = 31; mySpacing[1] = 0.1; mySpacing[2] = 5.4; mitk::Point3D myOrigin; myOrigin[0] = 8; myOrigin[1] = 9; myOrigin[2] = 10; mitk::AffineTransform3D::Pointer myTransform = mitk::AffineTransform3D::New(); itk::Matrix<mitk::ScalarType, 3,3> transMatrix; transMatrix.Fill(0); transMatrix[0][0] = 1; transMatrix[1][1] = 2; transMatrix[2][2] = 4; myTransform->SetMatrix(transMatrix); mitk::PlaneGeometry::Pointer geometry2D = mitk::PlaneGeometry::New(); geometry2D-><API key>(myTransform); geometry2D->SetSpacing(mySpacing); geometry2D->SetOrigin(myOrigin); return geometry2D; } bool compareMatrix(itk::Matrix<mitk::ScalarType, 3,3> left, itk::Matrix<mitk::ScalarType, 3,3> right) { bool equal = true; for (int i = 0; i < 3; ++i) for (int j = 0; j < 3; ++j) equal &= mitk::Equal(left[i][j], right[i][j]); return equal; } /** * This function tests for correct mapping and is called several times from other tests **/ void mappingTests2D(const mitk::PlaneGeometry* planegeometry, const mitk::ScalarType& width, const mitk::ScalarType& height, const mitk::ScalarType& widthInMM, const mitk::ScalarType& heightInMM, const mitk::Point3D& origin, const mitk::Vector3D& right, const mitk::Vector3D& bottom) { std::cout << "Testing mapping Map(pt2d_mm(x=widthInMM/2.3,y=heightInMM/2.5), pt3d_mm) and compare with expected: "; mitk::Point2D pt2d_mm; mitk::Point3D pt3d_mm, expected_pt3d_mm; pt2d_mm[0] = widthInMM/2.3; pt2d_mm[1] = heightInMM/2.5; expected_pt3d_mm = origin+right*(pt2d_mm[0]/right.GetNorm())+bottom*(pt2d_mm[1]/bottom.GetNorm()); planegeometry->Map(pt2d_mm, pt3d_mm); <API key>("Testing mapping Map(pt2d_mm(x=widthInMM/2.3,y=heightInMM/2.5), pt3d_mm) and compare with expected", mitk::Equal(pt3d_mm, expected_pt3d_mm, testEps)); std::cout << "Testing mapping Map(pt3d_mm, pt2d_mm) and compare with expected: "; mitk::Point2D testpt2d_mm; planegeometry->Map(pt3d_mm, testpt2d_mm); std::cout << std::setprecision(12) << "Expected pt2d_mm " << pt2d_mm << std::endl; std::cout << std::setprecision(12) << "Result testpt2d_mm " << testpt2d_mm << std::endl; std::cout << std::setprecision(12) << "10*mitk::eps " << 10*mitk::eps << std::endl; //This eps is temporarily set to 10*mitk::eps. See bug #15037 for details. <API key>("Testing mapping Map(pt3d_mm, pt2d_mm) and compare with expected", mitk::Equal(pt2d_mm, testpt2d_mm, 10*mitk::eps)); std::cout << "Testing IndexToWorld(pt2d_units, pt2d_mm) and compare with expected: "; mitk::Point2D pt2d_units; pt2d_units[0] = width/2.0; pt2d_units[1] = height/2.0; pt2d_mm[0] = widthInMM/2.0; pt2d_mm[1] = heightInMM/2.0; planegeometry->IndexToWorld(pt2d_units, testpt2d_mm); std::cout << std::setprecision(12) << "Expected pt2d_mm " << pt2d_mm << std::endl; std::cout << std::setprecision(12) << "Result testpt2d_mm " << testpt2d_mm << std::endl; std::cout << std::setprecision(12) << "10*mitk::eps " << 10*mitk::eps << std::endl; //This eps is temporarily set to 10*mitk::eps. See bug #15037 for details. <API key>("Testing IndexToWorld(pt2d_units, pt2d_mm) and compare with expected: ", mitk::Equal(pt2d_mm, testpt2d_mm, 10*mitk::eps)); std::cout << "Testing WorldToIndex(pt2d_mm, pt2d_units) and compare with expected: "; mitk::Point2D testpt2d_units; planegeometry->WorldToIndex(pt2d_mm, testpt2d_units); std::cout << std::setprecision(12) << "Expected pt2d_units " << pt2d_units << std::endl; std::cout << std::setprecision(12) << "Result testpt2d_units " << testpt2d_units << std::endl; std::cout << std::setprecision(12) << "10*mitk::eps " << 10*mitk::eps << std::endl; //This eps is temporarily set to 10*mitk::eps. See bug #15037 for details. <API key>("Testing WorldToIndex(pt2d_mm, pt2d_units) and compare with expected:", mitk::Equal(pt2d_units, testpt2d_units, 10*mitk::eps)); } }; <API key>(mitkPlaneGeometry)
#ifndef <API key> #define <API key> class THnSparse; class TH2F; class TProfile; class TLorentzVector; class AliEMCALTrack; class AliMagF; class AliESDEvent; class AliAODEvent; class AliAODMCParticle; class AliAODMCHeader; class AliGenEventHeader; class AliVEvent; class AliEMCALGeometry; class AliAnalysisFilter; class AliESDtrackCuts; class AliESDtrack; class AliHFEcontainer; class AliHFEcuts; class AliHFEpid; class AliHFEpidQAmanager; class AliCFManager; class AliPIDResponse; class AliMultSelection; class AliEventPoolManager; class AliAODv0KineCuts; class AliESDv0KineCuts; class AliVertexingHFUtils; //class <API key>; #include "AliAODv0KineCuts.h" #include "AliMCEventHandler.h" #include "AliMCEvent.h" #include "AliMCParticle.h" #include "AliStack.h" #include "AliAnalysisTaskSE.h" #include "AliEventCuts.h" #include "TDatabasePDG.h" #include <vector> class <API key> : public AliAnalysisTaskSE { public: <API key>(); <API key>(const char *name); ~<API key>(); virtual void <API key>(); virtual void UserExec(Option_t *option); virtual void Terminate(Option_t *); /* for (Int_t i=1; i<300; i++) { */ /* printf("%i, %s, %10.2f, %s, %10.2f", i, fSPDConfigHist.GetXaxis()->GetBinLabel(i), fSPDConfigHist.GetBinContent(i), SPDConfigHist.GetXaxis()->GetBinLabel(i) , SPDConfigHist.GetBinContent(i)); */
{-# LANGUAGE <API key>, NoImplicitPrelude, RebindableSyntax #-} {-# LANGUAGE ScopedTypeVariables, ViewPatterns #-} module Numeric.Field.Fraction ( Fraction , numerator , denominator , Ratio , (%) , lcm ) where import Data.Proxy import Numeric.Additive.Class import Numeric.Additive.Group import Numeric.Algebra.Class import Numeric.Algebra.Commutative import Numeric.Algebra.Division import Numeric.Algebra.Unital import Numeric.Decidable.Units import Numeric.Decidable.Zero import Numeric.Domain.Euclidean import Numeric.Natural import Numeric.Rig.Characteristic import Numeric.Rig.Class import Numeric.Ring.Class import Numeric.Semiring.Integral import Prelude hiding (Integral (..), Num (..), gcd, lcm) -- | Fraction field @k(D)@ of 'Euclidean' domain @D@. data Fraction d = Fraction !d !d -- Invariants: r == Fraction p q -- ==> leadingUnit q == one && q /= 0 -- && isUnit (gcd p q) -- | Convenient synonym for 'Fraction'. type Ratio = Fraction lcm :: Euclidean r => r -> r -> r lcm p q = p * q `quot` gcd p q instance (Eq d, Show d, Unital d) => Show (Fraction d) where showsPrec d (Fraction p q) | q == one = showsPrec d p | otherwise = showParen (d > 5) $ showsPrec 6 p . showString " / " . showsPrec 6 q infixl 7 % (%) :: Euclidean d => d -> d -> Fraction d a % b = let (ua, a') = splitUnit a (ub, b') = splitUnit b Just ub' = recipUnit ub r = gcd a' b' in Fraction (ua * ub' * a' `quot` r) (b' `quot` r) numerator :: Fraction t -> t numerator (Fraction q _) = q {-# INLINE numerator #-} denominator :: Fraction t -> t denominator (Fraction _ p) = p {-# INLINE denominator #-} instance Euclidean d => IntegralSemiring (Fraction d) instance (Eq d, Multiplicative d) => Eq (Fraction d) where Fraction p q == Fraction s t = p*t == q*s {-# INLINE (==) #-} instance (Ord d, Multiplicative d) => Ord (Fraction d) where compare (Fraction p q) (Fraction p' q') = compare (p*q') (p'*q) {-# INLINE compare #-} instance Euclidean d => Division (Fraction d) where recip (Fraction p q) | isZero p = error "Ratio has zero denominator!" | otherwise = let (recipUnit -> Just u, p') = splitUnit p in Fraction (q * u) p' Fraction p q / Fraction s t = (p*t) % (q*s) {-# INLINE recip #-} {-# INLINE (/) #-} instance (Commutative d, Euclidean d) => Commutative (Fraction d) instance Euclidean d => DecidableZero (Fraction d) where isZero (Fraction p _) = isZero p {-# INLINE isZero #-} instance Euclidean d => DecidableUnits (Fraction d) where isUnit (Fraction p _) = not $ isZero p {-# INLINE isUnit #-} recipUnit (Fraction p q) | isZero p = Nothing | otherwise = Just (Fraction q p) {-# INLINE recipUnit #-} instance Euclidean d => Ring (Fraction d) instance Euclidean d => Abelian (Fraction d) instance Euclidean d => Semiring (Fraction d) instance Euclidean d => Group (Fraction d) where negate (Fraction p q) = Fraction (negate p) q Fraction p q - Fraction p' q' = (p*q'-p'*q) % (q*q') instance Euclidean d => Monoidal (Fraction d) where zero = Fraction zero one {-# INLINE zero #-} instance Euclidean d => LeftModule Integer (Fraction d) where n .* Fraction p r = (n .* p) % r {-# INLINE (.*) #-} instance Euclidean d => RightModule Integer (Fraction d) where Fraction p r *. n = (p *. n) % r {-# INLINE (*.) #-} instance Euclidean d => LeftModule Natural (Fraction d) where n .* Fraction p r = (n .* p) % r {-# INLINE (.*) #-} instance Euclidean d => RightModule Natural (Fraction d) where Fraction p r *. n = (p *. n) % r {-# INLINE (*.) #-} instance Euclidean d => Additive (Fraction d) where Fraction p q + Fraction s t = let u = gcd q t in Fraction (p * t `quot` u + s*q`quot`u) (q*t`quot`u) {-# INLINE (+) #-} instance Euclidean d => Unital (Fraction d) where one = Fraction one one {-# INLINE one #-} instance Euclidean d => Multiplicative (Fraction d) where Fraction p q * Fraction s t = (p*s) % (q*t) instance Euclidean d => Rig (Fraction d) instance (Characteristic d, Euclidean d) => Characteristic (Fraction d) where char _ = char (Proxy :: Proxy d)
<!DOCTYPE HTML> <head> <meta charset="utf-8"> <title>ContentObject encoding/decoding test</title> <script src="../../build/ndn.js"></script> <script> function testEncoding () { var content = "NDN on Node"; var h = new ndn.NDN(); var n = new ndn.Name('/a/b/c.txt'); var co1 = new ndn.ContentObject(new ndn.Name(n), content); co1.sign(h.getDefaultKey(), {'contentType': ndn.ContentType.KEY}); console.log("Signature is \n" + ndn.DataUtils.toHex(co1.signature.signature)); var p2 = co1.encodeToBinary(); var co2 = ndn.ContentObject.parse(p2); console.log('Decoded name: ' + co2.name.to_uri()); console.log('Decoded content: ' + ndn.DataUtils.toString(co2.content)); console.log('Decoded content type: ' + co2.signedInfo.type) //console.log('Content verification passed: ' + co2.verify(h.getDefaultKey())); } </script> </head> <body onload="testEncoding()"> <div id="result" style="font-family: Monaco"> Check JavaScript console now. </div> </body> </html>
<?php namespace Hoa\Core\Event { interface Source { } class Bucket { /** * Source object. * * @var \Hoa\Core\Event\Source object */ protected $_source = null; /** * Data. * * @var \Hoa\Core\Event\Bucket mixed */ protected $_data = null; /** * Set data. * * @access public * @param mixed $data Data. * @return void */ public function __construct ( $data = null ) { $this->setData($data); return; } /** * Send this object on the event channel. * * @access public * @param string $eventId Event ID. * @param \Hoa\Core\Event\Source $source Source. * @return void * @throws \Hoa\Core\Exception */ public function send ( $eventId, Source $source) { return Event::notify($eventId, $source, $this); } /** * Set source. * * @access public * @param \Hoa\Core\Event\Source $source Source. * @return \Hoa\Core\Event\Source */ public function setSource ( Source $source ) { $old = $this->_source; $this->_source = $source; return $old; } /** * Get source. * * @access public * @return \Hoa\Core\Event\Source */ public function getSource ( ) { return $this->_source; } /** * Set data. * * @access public * @param mixed $data Data. * @return mixed */ public function setData ( $data ) { $old = $this->_data; $this->_data = $data; return $old; } /** * Get data. * * @access public * @return mixed */ public function getData ( ) { return $this->_data; } } class Event { /** * Static register of all observable objects, i.e. \Hoa\Core\Event\Source * object, i.e. object that can send event. * * @var \Hoa\Core\Event array */ private static $_register = array(); /** * Callables, i.e. observer objects. * * @var \Hoa\Core\Event array */ protected $_callable = array(); /** * Privatize the constructor. * * @access private * @return void */ private function __construct ( ) { return; } /** * Manage multiton of events, with the principle of asynchronous * attachements. * * @access public * @param string $eventId Event ID. * @return \Hoa\Core\Event */ public static function getEvent ( $eventId ) { if(!isset(self::$_register[$eventId][0])) self::$_register[$eventId] = array( 0 => new self(), 1 => null ); return self::$_register[$eventId][0]; } /** * Declare a new object in the observable collection. * Note: Hoa's libraries use hoa://Event/AnID for their observable objects; * * @access public * @param string $eventId Event ID. * @param \Hoa\Core\Event\Source $source Observable object. * @return void * @throws \Hoa\Core\Exception */ public static function register ( $eventId, $source ) { if(true === self::eventExists($eventId)) throw new \Hoa\Core\Exception( 'Cannot redeclare an event with the same ID, i.e. the event ' . 'ID %s already exists.', 0, $eventId); if(is_object($source) && !($source instanceof Source)) throw new \Hoa\Core\Exception( 'The source must implement \Hoa\Core\Event\Source ' . 'interface; given %s.', 1, get_class($source)); else { $reflection = new \ReflectionClass($source); if(false === $reflection->implementsInterface('\Hoa\Core\Event\Source')) throw new \Hoa\Core\Exception( 'The source must implement \Hoa\Core\Event\Source ' . 'interface; given %s.', 2, $source); } if(!isset(self::$_register[$eventId][0])) self::$_register[$eventId][0] = new self(); self::$_register[$eventId][1] = $source; return; } /** * Undeclare an object in the observable collection. * * @access public * @param string $eventId Event ID. * @param bool $hard If false, just delete the source, else, * delete source and attached callables. * @return void */ public static function unregister ( $eventId, $hard = false ) { if(false !== $hard) unset(self::$_register[$eventId]); else self::$_register[$eventId][1] = null; return; } /** * Attach an object to an event. * It can be a callable or an accepted callable form (please, see the * \Hoa\Core\Consistency\Xcallable class). * * @access public * @param mixed $callable Callable. * @return \Hoa\Core\Event */ public function attach ( $callable ) { $callable = xcallable($callable); $this->_callable[$callable->getHash()] = $callable; return $this; } /** * Detach an object to an event. * Please see $this->attach() method. * * @access public * @param mixed $callable Callable. * @return \Hoa\Core\Event */ public function detach ( $callable ) { unset($this->_callable[xcallable($callable)->getHash()]); return $this; } /** * Check if at least one callable is attached to an event. * * @access public * @return bool */ public function isListened ( ) { return !empty($this->_callable); } /** * Notify, i.e. send data to observers. * * @access public * @param string Event ID. * @param \Hoa\Core\Event\Source $source Source. * @param \Hoa\Core\Event\Bucket $data Data. * @return void * @throws \Hoa\Core\Exception */ public static function notify ( $eventId, Source $source, Bucket $data ) { if(false === self::eventExists($eventId)) throw new \Hoa\Core\Exception( 'Event ID %s does not exist, cannot send notification.', 3, $eventId); $sourceRef = self::$_register[$eventId][1]; if(!($source instanceof $sourceRef)) throw new \Hoa\Core\Exception( 'Source cannot create a notification because it\'s the ' . 'source or source\'s child (source reference: %s, given %s.', 4, array( is_object($sourceRef) ? get_class($sourceRef) : $sourceRef, get_class($source) )); $data->setSource($source); $event = self::getEvent($eventId); foreach($event->_callable as $callable) $callable($data); return; } /** * Check whether an event exists. * * @access public * @param string $eventId Event ID. * @return bool */ public static function eventExists ( $eventId ) { return array_key_exists($eventId, self::$_register) && self::$_register[$eventId][1] !== null; } } interface Listenable extends Source { /** * Attach a callable to a listenable component. * * @access public * @param string $listenerId Listener ID. * @param mixed $callable Callable. * @return \Hoa\Core\Event\Listenable * @throw \Hoa\Core\Exception */ public function on ( $listenerId, $callable ); } class Listener { /** * Source of listener (for Bucket). * * @var \Hoa\Core\Event\Listenable object */ protected $_source = null; /** * All listener IDs and associated listeners. * * @var \Hoa\Core\Event\Listener array */ protected $_listen = null; /** * Build a listener. * * @access public * @param \Hoa\Core\Event\Listenable $source Source (for Bucket). * @param array $ids Accepted ID. * @return void */ public function __construct ( Listenable $source, Array $ids ) { $this->_source = $source; $this->addIds($ids); return; } /** * Add acceptable ID (or reset). * * @access public * @param array $ids Accepted ID. * @return void */ public function addIds ( Array $ids ) { foreach($ids as $id) $this->_listen[$id] = array(); return; } /** * Attach a callable to a listenable component. * * @access public * @param string $listenerId Listener ID. * @param mixed $callable Callable. * @return \Hoa\Core\Event\Listener * @throw \Hoa\Core\Exception */ public function attach ( $listenerId, $callable ) { if(false === $this->listenerExists($listenerId)) throw new \Hoa\Core\Exception( 'Cannot listen %s because it is not defined.', 0, $listenerId); $callable = xcallable($callable); $this->_listen[$listenerId][$callable->getHash()] = $callable; return $this; } /** * Detach a callable from a listenable component. * * @access public * @param string $listenerId Listener ID. * @param mixed $callable Callable. * @return \Hoa\Core\Event\Listener */ public function detach ( $listenerId, $callable ) { unset($this->_callable[$listenerId][xcallable($callable)->getHash()]); return $this; } /** * Detach all callables from a listenable component. * * @access public * @param string $listenerId Listener ID. * @return \Hoa\Core\Event\Listener */ public function detachAll ( $listenerId ) { unset($this->_callable[$listenerId]); return $this; } /** * Check if a listener exists. * * @access public * @param string $listenerId Listener ID. * @return bool */ public function listenerExists ( $listenerId ) { return array_key_exists($listenerId, $this->_listen); } /** * Send/fire a bucket to a listener. * * @access public * @param string $listenerId Listener ID. * @param \Hoa\Core\Event\Bucket $data Data. * @return array * @throw \Hoa\Core\Exception */ public function fire ( $listenerId, Bucket $data ) { if(false === $this->listenerExists($listenerId)) throw new \Hoa\Core\Exception( 'Cannot fire on %s because it is not defined.', 1); $data->setSource($this->_source); $out = array(); foreach($this->_listen[$listenerId] as $callable) $out[] = $callable($data); return $out; } } } namespace { /** * Alias. */ class_alias('Hoa\Core\Event\Event', 'Hoa\Core\Event'); }
<!DOCTYPE html> <html xmlns="http: <head> <meta charset="utf-8" /> <title>Non-parametric 1 sample cluster statistic on single trial power &#8212; MNE 0.18.2 documentation</title> <link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="../../_static/gallery.css" /> <link rel="stylesheet" type="text/css" href="../../_static/bootstrap_divs.css" /> <link rel="stylesheet" href="../../_static/reset-syntax.css" type="text/css" /> <script type="text/javascript" id="<API key>" data-url_root="../../" src="../../_static/<API key>.js"></script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <script type="text/javascript" src="../../_static/language_data.js"></script> <script type="text/javascript" src="../../_static/bootstrap_divs.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=<API key>"></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" /> <script type="text/javascript" src="../../_static/copybutton.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-37225609-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https: var s = document.<API key>('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <link rel="stylesheet" href="../../_static/style.css " type="text/css" /> <link rel="stylesheet" href="../../_static/font-awesome.css" type="text/css" /> <link rel="stylesheet" href="../../_static/flag-icon.css" type="text/css" /> <script type="text/javascript"> !function(d,s,id){var js,fjs=d.<API key>(s)[0];if(!d.getElementById(id)){js=d.createElement(s); js.id=id;js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); </script> <script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.<API key>('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> <meta name="<API key>" content="yes"> <script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js "></script> <script type="text/javascript" src="../../_static/js/jquery-fix.js "></script> <script type="text/javascript" src="../../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script> <script type="text/javascript" src="../../_static/bootstrap-sphinx.js "></script> <link rel="canonical" href="https://mne.tools/stable/index.html" /> </head><body> <div id="navbar" class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <!-- .btn-navbar is used as the toggle for collapsed navbar content --> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../../index.html"><span><img src="../../_static/mne_logo_small.png"></span> </a> <span class="navbar-text navbar-version pull-left"><b>0.18.2</b></span> </div> <div class="collapse navbar-collapse nav-collapse"> <ul class="nav navbar-nav"> <li><a href="../../getting_started.html">Install</a></li> <li><a href="../../documentation.html">Documentation</a></li> <li><a href="../../python_reference.html">API</a></li> <li><a href="../../glossary.html">Glossary</a></li> <li><a href="../../auto_examples/index.html">Examples</a></li> <li><a href="../../contributing.html">Contribute</a></li> <li class="dropdown globaltoc-container"> <a role="button" id="dLabelGlobalToc" data-toggle="dropdown" data-target=" href="../../index.html">Site <b class="caret"></b></a> <ul class="dropdown-menu globaltoc" role="menu" aria-labelledby="dLabelGlobalToc"></ul> </li> <li class="hidden-sm"></li> </ul> <div class="navbar-form navbar-right navbar-btn dropdown btn-group-sm" style="margin-left: 20px; margin-top: 5px; margin-bottom: 5px"> <button type="button" class="btn btn-primary navbar-btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown"> v0.18.2 <span class="caret"></span> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> <li><a href="https://mne-tools.github.io/dev/index.html">Development</a></li> <li><a href="https://mne-tools.github.io/stable/index.html">v0.18 (stable)</a></li> <li><a href="https://mne-tools.github.io/0.17/index.html">v0.17</a></li> <li><a href="https://mne-tools.github.io/0.16/index.html">v0.16</a></li> <li><a href="https://mne-tools.github.io/0.15/index.html">v0.15</a></li> <li><a href="https://mne-tools.github.io/0.14/index.html">v0.14</a></li> <li><a href="https://mne-tools.github.io/0.13/index.html">v0.13</a></li> <li><a href="https://mne-tools.github.io/0.12/index.html">v0.12</a></li> <li><a href="https://mne-tools.github.io/0.11/index.html">v0.11</a></li> </ul> </div> <form class="navbar-form navbar-right" action="../../search.html" method="get"> <div class="form-group"> <input type="text" name="q" class="form-control" placeholder="Search" /> </div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> </div> <div class="container"> <div class="row"> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="<API key>"> <p class="logo"><a href="../../index.html"> <img class="logo" src="../../_static/mne_logo_small.png" alt="Logo"/> </a></p><ul> <li><a class="reference internal" href="#">Non-parametric 1 sample cluster statistic on single trial power</a><ul> <li><a class="reference internal" href="#set-parameters">Set parameters</a></li> <li><a class="reference internal" href="#compute-statistic">Compute statistic</a></li> <li><a class="reference internal" href="#<API key>">View time-frequency plots</a></li> </ul> </li> </ul> <form action="../../search.html" method="get"> <div class="form-group"> <input type="text" name="q" class="form-control" placeholder="Search" /> </div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="body col-md-12 content" role="main"> <div class="<API key> admonition note"> <p class="admonition-title">Note</p> <p>Click <a class="reference internal" href="#<API key><API key>"><span class="std std-ref">here</span></a> to download the full example code</p> </div> <div class="<API key> section" id="<API key>"> <span id="<API key>frequency-py"></span><h1>Non-parametric 1 sample cluster statistic on single trial power<a class="headerlink" href=" <p>This script shows how to estimate significant clusters in time-frequency power estimates. It uses a non-parametric statistical procedure based on permutations and cluster level statistics.</p> <p>The procedure consists in:</p> <blockquote> <div><ul class="simple"> <li><p>extracting epochs</p></li> <li><p>compute single trial power estimates</p></li> <li><p>baseline line correct the power estimates (power ratios)</p></li> <li><p>compute stats to see if ratio deviates from 1.</p></li> </ul> </div></blockquote> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Authors: Alexandre Gramfort &lt;alexandre.gramfort@telecom-paristech.fr&gt;</span> <span class="c1">#</span> <span class="c1"> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span> <span class="kn">import</span> <span class="nn">mne</span> <span class="kn">from</span> <span class="nn">mne.time_frequency</span> <span class="k">import</span> <a href="../../generated/mne.time_frequency.tfr_morlet.html#mne.time_frequency.tfr_morlet" title="View documentation for mne.time_frequency.tfr_morlet"><span class="n">tfr_morlet</span></a> <span class="kn">from</span> <span class="nn">mne.stats</span> <span class="k">import</span> <a href="../../generated/mne.stats.<API key>.html#mne.stats.<API key>" title="View documentation for mne.stats.<API key>"><span class="n"><API key></span></a> <span class="kn">from</span> <span class="nn">mne.datasets</span> <span class="k">import</span> <span class="n">sample</span> <span class="nb">print</span><span class="p">(</span><span class="vm">__doc__</span><span class="p">)</span> </pre></div> </div> <p class="sphx-glr-script-out">Out:</p> <div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span> </pre></div> </div> <div class="section" id="set-parameters"> <h2>Set parameters<a class="headerlink" href=" <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">data_path</span> <span class="o">=</span> <a href="../../generated/mne.datasets.sample.data_path.html#mne.datasets.sample.data_path" title="View documentation for mne.datasets.sample.data_path"><span class="n">sample</span><span class="o">.</span><span class="n">data_path</span></a><span class="p">()</span> <span class="n">raw_fname</span> <span class="o">=</span> <span class="n">data_path</span> <span class="o">+</span> <span class="s1">&#39;/MEG/sample/sample_audvis_raw.fif&#39;</span> <span class="n">tmin</span><span class="p">,</span> <span class="n">tmax</span><span class="p">,</span> <span class="n">event_id</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.3</span><span class="p">,</span> <span class="mf">0.6</span><span class="p">,</span> <span class="mi">1</span> <span class="c1"># Setup for reading the raw data</span> <span class="n">raw</span> <span class="o">=</span> <a href="../../generated/mne.io.read_raw_fif.html#mne.io.read_raw_fif" title="View documentation for mne.io.read_raw_fif"><span class="n">mne</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">read_raw_fif</span></a><span class="p">(</span><span class="n">raw_fname</span><span class="p">)</span> <span class="n">events</span> <span class="o">=</span> <a href="../../generated/mne.find_events.html#mne.find_events" title="View documentation for mne.find_events"><span class="n">mne</span><span class="o">.</span><span class="n">find_events</span></a><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">stim_channel</span><span class="o">=</span><span class="s1">&#39;STI 014&#39;</span><span class="p">)</span> <span class="n">include</span> <span class="o">=</span> <span class="p">[]</span> <span class="n">raw</span><span class="o">.</span><span class="n">info</span><span class="p">[</span><span class="s1">&#39;bads&#39;</span><span class="p">]</span> <span class="o">+=</span> <span class="p">[</span><span class="s1">&#39;MEG 2443&#39;</span><span class="p">,</span> <span class="s1">&#39;EEG 053&#39;</span><span class="p">]</span> <span class="c1"># bads + 2 more</span> <span class="c1"># picks MEG gradiometers</span> <span class="n">picks</span> <span class="o">=</span> <a href="../../generated/mne.pick_types.html#mne.pick_types" title="View documentation for mne.pick_types"><span class="n">mne</span><span class="o">.</span><span class="n">pick_types</span></a><span class="p">(</span><span class="n">raw</span><span class="o">.</span><span class="n">info</span><span class="p">,</span> <span class="n">meg</span><span class="o">=</span><span class="s1">&#39;grad&#39;</span><span class="p">,</span> <span class="n">eeg</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">eog</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">stim</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">include</span><span class="o">=</span><span class="n">include</span><span class="p">,</span> <span class="n">exclude</span><span class="o">=</span><span class="s1">&#39;bads&#39;</span><span class="p">)</span> <span class="c1"># Load condition 1</span> <span class="n">event_id</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">epochs</span> <span class="o">=</span> <a href="../../generated/mne.Epochs.html#mne.Epochs" title="View documentation for mne.Epochs"><span class="n">mne</span><span class="o">.</span><span class="n">Epochs</span></a><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">events</span><span class="p">,</span> <span class="n">event_id</span><span class="p">,</span> <span class="n">tmin</span><span class="p">,</span> <span class="n">tmax</span><span class="p">,</span> <span class="n">picks</span><span class="o">=</span><span class="n">picks</span><span class="p">,</span> <span class="n">baseline</span><span class="o">=</span><span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">preload</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">reject</span><span class="o">=</span><span class="nb">dict</span><span class="p">(</span><span class="n">grad</span><span class="o">=</span><span class="mf">4000e-13</span><span class="p">,</span> <span class="n">eog</span><span class="o">=</span><span class="mf">150e-6</span><span class="p">))</span> <span class="c1"># Take only one channel</span> <span class="n">ch_name</span> <span class="o">=</span> <span class="s1">&#39;MEG 1332&#39;</span> <span class="n">epochs</span><span class="o">.</span><span class="n">pick_channels</span><span class="p">([</span><span class="n">ch_name</span><span class="p">])</span> <span class="n">evoked</span> <span class="o">=</span> <span class="n">epochs</span><span class="o">.</span><span class="n">average</span><span class="p">()</span> <span class="c1"># Factor to down-sample the temporal dimension of the TFR computed by</span> <span class="c1"># tfr_morlet. Decimation occurs after frequency decomposition and can</span> <span class="c1"># be used to reduce memory usage (and possibly computational time of downstream</span> <span class="c1"># operations such as nonparametric statistics) if you don&#39;t need high</span> <span class="c1"># spectrotemporal resolution.</span> <span class="n">decim</span> <span class="o">=</span> <span class="mi">5</span> <span class="n">freqs</span> <span class="o">=</span> <a href="https://www.numpy.org/devdocs/reference/generated/numpy.arange.html#numpy.arange" title="View documentation for numpy.arange"><span class="n">np</span><span class="o">.</span><span class="n">arange</span></a><span class="p">(</span><span class="mi">8</span><span class="p">,</span> <span class="mi">40</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="c1"># define frequencies of interest</span> <span class="n">sfreq</span> <span class="o">=</span> <span class="n">raw</span><span class="o">.</span><span class="n">info</span><span class="p">[</span><span class="s1">&#39;sfreq&#39;</span><span class="p">]</span> <span class="c1"># sampling in Hz</span> <span class="n">tfr_epochs</span> <span class="o">=</span> <a href="../../generated/mne.time_frequency.tfr_morlet.html#mne.time_frequency.tfr_morlet" title="View documentation for mne.time_frequency.tfr_morlet"><span class="n">tfr_morlet</span></a><span class="p">(</span><span class="n">epochs</span><span class="p">,</span> <span class="n">freqs</span><span class="p">,</span> <span class="n">n_cycles</span><span class="o">=</span><span class="mf">4.</span><span class="p">,</span> <span class="n">decim</span><span class="o">=</span><span class="n">decim</span><span class="p">,</span> <span class="n">average</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">return_itc</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">n_jobs</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="c1"># Baseline power</span> <span class="n">tfr_epochs</span><span class="o">.</span><span class="n">apply_baseline</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s1">&#39;logratio&#39;</span><span class="p">,</span> <span class="n">baseline</span><span class="o">=</span><span class="p">(</span><span class="o">-.</span><span class="mi">100</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span> <span class="c1"># Crop in time to keep only what is between 0 and 400 ms</span> <span class="n">evoked</span><span class="o">.</span><span class="n">crop</span><span class="p">(</span><span class="mf">0.</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">)</span> <span class="n">tfr_epochs</span><span class="o">.</span><span class="n">crop</span><span class="p">(</span><span class="mf">0.</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">)</span> <span class="n">epochs_power</span> <span class="o">=</span> <span class="n">tfr_epochs</span><span class="o">.</span><span class="n">data</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">,</span> <span class="p">:,</span> <span class="p">:]</span> <span class="c1"># take the 1 channel</span> </pre></div> </div> <p class="sphx-glr-script-out">Out:</p> <div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>Opening raw data file /home/circleci/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif... Read a total of 3 projection items: PCA-v1 (1 x 102) idle PCA-v2 (1 x 102) idle PCA-v3 (1 x 102) idle Range : 25800 ... 192599 = 42.956 ... 320.670 secs Ready. Current compensation grade : 0 320 events found Event IDs: [ 1 2 3 4 5 32] 72 matching events found Applying baseline correction (mode: mean) Not setting metadata 3 projection items activated Loading data for 72 events and 541 original time points ... Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] Rejecting epoch based on EOG : [&#39;EOG 061&#39;] 18 bad epochs dropped Not setting metadata Applying baseline correction (mode: logratio) </pre></div> </div> </div> <div class="section" id="compute-statistic"> <h2>Compute statistic<a class="headerlink" href=" <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">threshold</span> <span class="o">=</span> <span class="mf">2.5</span> <span class="n">n_permutations</span> <span class="o">=</span> <span class="mi">100</span> <span class="c1"># Warning: 100 is too small for real-world analysis.</span> <span class="n">T_obs</span><span class="p">,</span> <span class="n">clusters</span><span class="p">,</span> <span class="n">cluster_p_values</span><span class="p">,</span> <span class="n">H0</span> <span class="o">=</span> \ <a href="../../generated/mne.stats.<API key>.html#mne.stats.<API key>" title="View documentation for mne.stats.<API key>"><span class="n"><API key></span></a><span class="p">(</span><span class="n">epochs_power</span><span class="p">,</span> <span class="n">n_permutations</span><span class="o">=</span><span class="n">n_permutations</span><span class="p">,</span> <span class="n">threshold</span><span class="o">=</span><span class="n">threshold</span><span class="p">,</span> <span class="n">tail</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span> </pre></div> </div> <p class="sphx-glr-script-out">Out:</p> <div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>stat_fun(H1): min=-3.514155 max=7.583506 Running initial clustering Found 9 clusters Permuting 99 times... Computing cluster p-values Done. </pre></div> </div> </div> <div class="section" id="<API key>"> <h2>View time-frequency plots<a class="headerlink" href=" <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">evoked_data</span> <span class="o">=</span> <span class="n">evoked</span><span class="o">.</span><span class="n">data</span> <span class="n">times</span> <span class="o">=</span> <span class="mf">1e3</span> <span class="o">*</span> <span class="n">evoked</span><span class="o">.</span><span class="n">times</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.figure.html#matplotlib.pyplot.figure" title="View documentation for matplotlib.pyplot.figure"><span class="n">plt</span><span class="o">.</span><span class="n">figure</span></a><span class="p">()</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots_adjust.html#matplotlib.pyplot.subplots_adjust" title="View documentation for matplotlib.pyplot.subplots_adjust"><span class="n">plt</span><span class="o">.</span><span class="n">subplots_adjust</span></a><span class="p">(</span><span class="mf">0.12</span><span class="p">,</span> <span class="mf">0.08</span><span class="p">,</span> <span class="mf">0.96</span><span class="p">,</span> <span class="mf">0.94</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">,</span> <span class="mf">0.43</span><span class="p">)</span> <span class="c1"># Create new stats image with only significant clusters</span> <span class="n">T_obs_plot</span> <span class="o">=</span> <a href="https://www.numpy.org/devdocs/reference/constants.html <span class="k">for</span> <span class="n">c</span><span class="p">,</span> <span class="n">p_val</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">clusters</span><span class="p">,</span> <span class="n">cluster_p_values</span><span class="p">):</span> <span class="k">if</span> <span class="n">p_val</span> <span class="o">&lt;=</span> <span class="mf">0.05</span><span class="p">:</span> <span class="n">T_obs_plot</span><span class="p">[</span><span class="n">c</span><span class="p">]</span> <span class="o">=</span> <span class="n">T_obs</span><span class="p">[</span><span class="n">c</span><span class="p">]</span> <span class="n">vmax</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">max</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">abs</span><span class="p">(</span><span class="n">T_obs</span><span class="p">))</span> <span class="n">vmin</span> <span class="o">=</span> <span class="o">-</span><span class="n">vmax</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplot.html#matplotlib.pyplot.subplot" title="View documentation for matplotlib.pyplot.subplot"><span class="n">plt</span><span class="o">.</span><span class="n">subplot</span></a><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html#matplotlib.pyplot.imshow" title="View documentation for matplotlib.pyplot.imshow"><span class="n">plt</span><span class="o">.</span><span class="n">imshow</span></a><span class="p">(</span><span class="n">T_obs</span><span class="p">,</span> <span class="n">cmap</span><span class="o">=</span><span class="n">plt</span><span class="o">.</span><span class="n">cm</span><span class="o">.</span><span class="n">gray</span><span class="p">,</span> <span class="n">extent</span><span class="o">=</span><span class="p">[</span><span class="n">times</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">times</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">freqs</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">freqs</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]],</span> <span class="n">aspect</span><span class="o">=</span><span class="s1">&#39;auto&#39;</span><span class="p">,</span> <span class="n">origin</span><span class="o">=</span><span class="s1">&#39;lower&#39;</span><span class="p">,</span> <span class="n">vmin</span><span class="o">=</span><span class="n">vmin</span><span class="p">,</span> <span class="n">vmax</span><span class="o">=</span><span class="n">vmax</span><span class="p">)</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html#matplotlib.pyplot.imshow" title="View documentation for matplotlib.pyplot.imshow"><span class="n">plt</span><span class="o">.</span><span class="n">imshow</span></a><span class="p">(</span><span class="n">T_obs_plot</span><span class="p">,</span> <span class="n">cmap</span><span class="o">=</span><span class="n">plt</span><span class="o">.</span><span class="n">cm</span><span class="o">.</span><span class="n">RdBu_r</span><span class="p">,</span> <span class="n">extent</span><span class="o">=</span><span class="p">[</span><span class="n">times</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">times</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="n">freqs</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">freqs</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]],</span> <span class="n">aspect</span><span class="o">=</span><span class="s1">&#39;auto&#39;</span><span class="p">,</span> <span class="n">origin</span><span class="o">=</span><span class="s1">&#39;lower&#39;</span><span class="p">,</span> <span class="n">vmin</span><span class="o">=</span><span class="n">vmin</span><span class="p">,</span> <span class="n">vmax</span><span class="o">=</span><span class="n">vmax</span><span class="p">)</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.colorbar.html#matplotlib.pyplot.colorbar" title="View documentation for matplotlib.pyplot.colorbar"><span class="n">plt</span><span class="o">.</span><span class="n">colorbar</span></a><span class="p">()</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.xlabel.html#matplotlib.pyplot.xlabel" title="View documentation for matplotlib.pyplot.xlabel"><span class="n">plt</span><span class="o">.</span><span class="n">xlabel</span></a><span class="p">(</span><span class="s1">&#39;Time (ms)&#39;</span><span class="p">)</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.ylabel.html#matplotlib.pyplot.ylabel" title="View documentation for matplotlib.pyplot.ylabel"><span class="n">plt</span><span class="o">.</span><span class="n">ylabel</span></a><span class="p">(</span><span class="s1">&#39;Frequency (Hz)&#39;</span><span class="p">)</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.title.html#matplotlib.pyplot.title" title="View documentation for matplotlib.pyplot.title"><span class="n">plt</span><span class="o">.</span><span class="n">title</span></a><span class="p">(</span><span class="s1">&#39;Induced power (</span><span class="si">%s</span><span class="s1">)&#39;</span> <span class="o">%</span> <span class="n">ch_name</span><span class="p">)</span> <span class="n">ax2</span> <span class="o">=</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplot.html#matplotlib.pyplot.subplot" title="View documentation for matplotlib.pyplot.subplot"><span class="n">plt</span><span class="o">.</span><span class="n">subplot</span></a><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="n">evoked</span><span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">axes</span><span class="o">=</span><span class="p">[</span><span class="n">ax2</span><span class="p">],</span> <span class="n">time_unit</span><span class="o">=</span><span class="s1">&#39;s&#39;</span><span class="p">)</span> <a href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.show.html#matplotlib.pyplot.show" title="View documentation for matplotlib.pyplot.show"><span class="n">plt</span><span class="o">.</span><span class="n">show</span></a><span class="p">()</span> </pre></div> </div> <img alt="../../_images/<API key>.png" class="sphx-glr-single-img" src="../../_images/<API key>.png" /> <p class="sphx-glr-script-out">Out:</p> <div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>Need more than one channel to make topography for grad. Disabling interactivity. </pre></div> </div> <p class="sphx-glr-timing"><strong>Total running time of the script:</strong> ( 0 minutes 2.388 seconds)</p> <p><strong>Estimated memory usage:</strong> 8 MB</p> <div class="sphx-glr-footer class <API key> docutils container" id="<API key><API key>"> <div class="sphx-glr-download docutils container"> <p><a class="reference download internal" download="" href="../../_downloads/<API key>/<API key>.py"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Python</span> <span class="pre">source</span> <span class="pre">code:</span> <span class="pre"><API key>.py</span></code></a></p> </div> <div class="sphx-glr-download docutils container"> <p><a class="reference download internal" download="" href="../../_downloads/<API key>/<API key>.ipynb"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Jupyter</span> <span class="pre">notebook:</span> <span class="pre"><API key>.ipynb</span></code></a></p> </div> </div> <p class="sphx-glr-signature"><a class="reference external" href="https://sphinx-gallery.github.io">Gallery generated by Sphinx-Gallery</a></p> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container institutions"> <a href="https: <a href="https://martinos.org/"><img class="institution_lg" src="../../_static/institution_logos/Martinos.png" title="Athinoula A. Martinos Center for Biomedical Imaging" alt="Athinoula A. Martinos Center for Biomedical Imaging"/></a> <a href="https://hms.harvard.edu/"><img class="institution_lg" src="../../_static/institution_logos/Harvard.png" title="Harvard Medical School" alt="Harvard Medical School"/></a> <a href="https://web.mit.edu/"><img class="institution_sm" src="../../_static/institution_logos/MIT.svg" title="Massachusetts Institute of Technology" alt="Massachusetts Institute of Technology"/></a> <a href="https: <a href="http: <a href="https://sci.aalto.fi/"><img class="institution_md" src="../../_static/institution_logos/Aalto.svg" title="Aalto-yliopiston perustieteiden korkeakoulu" alt="Aalto-yliopiston perustieteiden korkeakoulu"/></a> <a href="https: <a href="https: <a href="https: <a href="https: <a href="https: <a href="https: <a href="https: <a href="https://bids.berkeley.edu/"><img class="institution_md" src="../../_static/institution_logos/BIDS.png" title="Berkeley Institute for Data Science" alt="Berkeley Institute for Data Science"/></a> <a href="https: <a href="https: <a href="https: </div> <div class="container"> <ul class="list-inline"> <li><a href="https://github.com/mne-tools/mne-python">GitHub</a></li> <li>·</li> <li><a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis">Mailing list</a></li> <li>·</li> <li><a href="https://gitter.im/mne-tools/mne-python">Gitter</a></li> <li>·</li> <li><a href="whats_new.html">What's new</a></li> <li>·</li> <li><a href="faq.html#cite">Cite MNE</a></li> <li class="pull-right"><a href="#">Back to top</a></li> </ul> <p>&copy; Copyright 2012-2019, MNE Developers. Last updated on 2019-07-11.</p> </div> </footer> <script src="https://mne.tools/versionwarning.js"></script> </body> </html>
{-# LANGUAGE FlexibleContexts #-} module Language.Typo.Token ( typoDef -- :: LanguageDef s , typo -- :: GenTokenParser String u Identity , lexeme -- :: Parsec String u a -> Parsec String u a , parens -- :: Parsec String u a -> Parsec String u a , identifier -- :: Parsec String u String , operator -- :: Parsec String u String , natural -- :: Parsec String u Integer , whiteSpace -- :: Parsec String u () ) where import Control.Monad.Identity import Text.Parsec ( oneOf ) import Text.Parsec.Prim import Text.Parsec.Language ( emptyDef ) import Text.Parsec.Token ( GenTokenParser, LanguageDef, makeTokenParser ) import qualified Text.Parsec.Token as P typoDef :: LanguageDef s typoDef = emptyDef { P.commentLine = ";", P.opStart = P.opLetter typoDef, P.opLetter = oneOf ":!$%&*+./<=>?@\\^|-~", P.reservedNames = [ "define", "let", "if" -- language keywords , "and", "or", "imp", "cond" -- (prelude) boolean operators , "add", "sub", "mul", "div", "rem" -- (prelude) arithmetic operators , "eq", "lt" -- (prelude) comparison operators , "result", "res", "undefined" -- program keywords ] } typo :: GenTokenParser String u Identity typo = makeTokenParser typoDef lexeme, parens :: Parsec String u a -> Parsec String u a lexeme = P.lexeme typo parens = P.parens typo identifier, operator :: Parsec String u String identifier = P.identifier typo operator = P.operator typo natural :: Parsec String u Integer natural = P.natural typo whiteSpace :: Parsec String u () whiteSpace = P.whiteSpace typo
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Validation Message Test</title> <style> @import "../../../themes/claro/document.css"; @import "../../css/dijitTests.css"; @import "../../../../util/doh/robot/robot.css"; </style> <link id="themeStyles" rel="stylesheet" href="../../../themes/dijit.css"/> <!-- required: dojo.js --> <script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dui.form.NumberTextBox"); dojo.require("dui.Tooltip"); dojo.require("dui.robot"); dojo.ready(function(){ // track tooltip currently being displayed (if any) var tooltip; dojo.connect(dui.Tooltip, "show", function(msg){ tooltip = msg; }); dojo.connect(dui.Tooltip, "hide", function(msg){ tooltip = ""; }); function testOn(evt, widget, deferred, callback, delay){ var handler = widget.connect(widget.focusNode, "on"+evt, function(){ widget.disconnect(handler); setTimeout(deferred.getTestCallback(callback), delay||33); }); } doh.register("parse", function parse(){ dojo.parser.parse(); }); dojo.forEach([false, true], function(rangeBound){ dojo.forEach([false, true], function(required){ dojo.forEach(["", "p"], function(promptMessage){ dojo.forEach(["", "i"], function(invalidMessage){ dojo.forEach(["", "m"], function(missingMessage){ var name = "t" + (rangeBound?1:0) + (required?1:0) + (promptMessage?1:0) + (invalidMessage?1:0) + (missingMessage?1:0); var textbox; doh.register(name, [ { name: name + " first focus, empty value", timeout: 5000, setUp:function(){ textbox = dui.byId(name); textbox.focusNode.scrollIntoView(); }, runTest: function(){ var d = new doh.Deferred(); testOn('mouseup', textbox, d, function(){ doh.is(!required, textbox.isValid(false), "isValid"); doh.is(required ? "Incomplete" : "", textbox.state, "state"); doh.is(promptMessage, tooltip, "tooltip"); }); doh.robot.mouseMoveAt(textbox.focusNode, 0, 1); doh.robot.mouseClick({left: true}, 0); return d; } }, { name: name + " first valid character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(true), "isValid"); doh.is(rangeBound ? "Incomplete" : "", textbox.state, "state"); doh.is(rangeBound? promptMessage : "", tooltip, "tooltip"); }); doh.robot.typeKeys("1", 0, 0); return d; } }, { name: name + " second valid character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.typeKeys("2", 0, 0); return d; } }, { name: name + " first invalid character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(false, textbox.isValid(true), "isValid"); doh.is("Error", textbox.state, "state"); doh.is(invalidMessage||promptMessage, tooltip, "tooltip"); }); doh.robot.typeKeys("a", 0, 0); return d; } }, { name: name + " delete invalid character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " period", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ // number.parse("12.", {fractional:[true,false], pattern:" doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.typeKeys(".", 0, 0); return d; } }, { name: name + " invalid pre-fractional character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(false, textbox.isValid(true), "isValid"); doh.is("Error", textbox.state, "state"); doh.is(invalidMessage||promptMessage, tooltip, "tooltip"); }); doh.robot.typeKeys("a", 0, 0); return d; } }, { name: name + " delete invalid pre-fractional character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " valid fractional digit", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.typeKeys("1", 0, 0); return d; } }, { name: name + " invalid fractional character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(false, textbox.isValid(true), "isValid"); doh.is("Error", textbox.state, "state"); doh.is(invalidMessage||promptMessage, tooltip, "tooltip"); }); doh.robot.typeKeys("a", 0, 0); return d; } }, { name: name + " delete invalid fractional character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete valid fractional digit", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete period", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete right-most valid character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(true), "isValid"); doh.is(rangeBound ? "Incomplete" : "", textbox.state, "state"); doh.is(rangeBound? promptMessage : "", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete remaining valid character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!required, textbox.isValid(false), "isValid"); doh.is(required ? "Incomplete" : "", textbox.state, "state"); doh.is(promptMessage, tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " tab from empty", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('blur', textbox, d, function(){ doh.is(!required, textbox.isValid(false), "isValid"); doh.is(required ? "Error" : "", textbox.state, "state"); doh.is("", tooltip, "no tooltip"); doh.is(required? (missingMessage||invalidMessage||promptMessage) : promptMessage, textbox.message, "message"); }); doh.robot.keyPress(dojo.keys.TAB, 0); return d; } }, { name: name + " tab back to empty", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('focus', textbox, d, function(){ doh.is(!required, textbox.isValid(false), "isValid"); doh.is(required ? "Error" : "", textbox.state, "state"); doh.is(required? (missingMessage||invalidMessage||promptMessage) : promptMessage, tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.TAB, 0, { shift:true }); return d; } }, { name: name + " first valid character after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(false), "isValid"); doh.is(rangeBound ? "Incomplete" : "", textbox.state, "state"); doh.is(rangeBound? promptMessage : "", tooltip, "tooltip"); }); doh.robot.typeKeys("1", 0, 0); return d; } }, { name: name + " 2nd valid character after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.typeKeys("2", 0, 0); return d; } }, { name: name + " out of range after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(false), "isValid"); doh.is(rangeBound ? "Error" : "", textbox.state, "state"); doh.is(rangeBound? textbox.rangeMessage : "", tooltip, "tooltip"); }); doh.robot.typeKeys("3", 0, 0); return d; } }, { name: name + " tab from out of range", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('blur', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(false), "isValid"); doh.is(rangeBound ? "Error" : "", textbox.state, "state"); doh.is("", tooltip, "no tooltip"); doh.is(rangeBound? textbox.rangeMessage : "", textbox.message, "message"); }); doh.robot.keyPress(dojo.keys.TAB, 0); return d; } }, { name: name + " tab back to out of range", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('focus', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(false), "isValid"); doh.is(rangeBound ? "Error" : "", textbox.state, "state"); doh.is(rangeBound? textbox.rangeMessage : "", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.TAB, 0, { shift:true }); return d; } }, { name: name + " position input caret to end", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!rangeBound, textbox.isValid(true), "isValid"); doh.is(rangeBound ? "Error" : "", textbox.state, "state"); doh.is(rangeBound? textbox.rangeMessage : "", tooltip, "tooltip"); }); if(dojo.isMac){ doh.robot.keyPress(dojo.keys.RIGHT_ARROW, 0, {meta:true}); doh.robot.keyPress(dojo.keys.RIGHT_ARROW, 0); // trigger keyup }else{ doh.robot.keyPress(dojo.keys.END, 0); } return d; } }, { name: name + " delete out of range character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " period after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.typeKeys(".", 0, 0); return d; } }, { name: name + " invalid pre-fractional character after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(false, textbox.isValid(true), "isValid"); doh.is("Error", textbox.state, "state"); doh.is(invalidMessage||promptMessage, tooltip, "tooltip"); }); doh.robot.typeKeys("a", 0, 0); return d; } }, { name: name + " delete invalid pre-fractional character after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " valid fractional digit after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.typeKeys("1", 0, 0); return d; } }, { name: name + " invalid fractional character after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(false, textbox.isValid(true), "isValid"); doh.is("Error", textbox.state, "state"); doh.is(invalidMessage||promptMessage, tooltip, "tooltip"); }); doh.robot.typeKeys("a", 0, 0); return d; } }, { name: name + " delete invalid fractional character after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete valid fractional digit after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete period after refocus", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(true, textbox.isValid(true), "isValid"); doh.is("", textbox.state, "state"); doh.is("", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete last in-range character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(rangeBound ? "Incomplete" : "", textbox.state, "state"); doh.is(rangeBound? promptMessage : "", tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " delete remaining character", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('keyup', textbox, d, function(){ doh.is(!required, textbox.isValid(true), "isValid"); doh.is(required ? "Incomplete" : "", textbox.state, "state"); doh.is(promptMessage, tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.BACKSPACE, 0); return d; } }, { name: name + " tab from empty 2", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('blur', textbox, d, function(){ doh.is(!required, textbox.isValid(false), "isValid"); doh.is(required ? "Error" : "", textbox.state, "state"); doh.is("", tooltip, "no tooltip"); doh.is(required? (missingMessage||invalidMessage||promptMessage) : promptMessage, textbox.message, "message"); }); doh.robot.keyPress(dojo.keys.TAB, 0); return d; } }, { name: name + " tab back to empty 2", timeout: 2000, runTest: function(){ var d = new doh.Deferred(); testOn('focus', textbox, d, function(){ doh.is(!required, textbox.isValid(false), "isValid"); doh.is(required ? "Error" : "", textbox.state, "state"); doh.is(required? (missingMessage||invalidMessage||promptMessage) : promptMessage, tooltip, "tooltip"); }); doh.robot.keyPress(dojo.keys.TAB, 0, { shift:true }); return d; } }]); }); }); }); }); }); doh.run(); }); </script> </head> <body> <label for="t00000">not required, no min/max, no prompt message, no invalid message, no missing message</label><br> <input id="t00000" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00000"/><br> <label for="t00001">not required, no min/max, no prompt message, no invalid message, missing message</label><br> <input id="t00001" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00001"/><br> <label for="t00010">not required, no min/max, no prompt message, invalid message, no missing message</label><br> <input id="t00010" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00010"/><br> <label for="t00011">not required, no min/max, no prompt message, invalid message, missing message</label><br> <input id="t00011" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00011"/><br> <label for="t00100">not required, no min/max, prompt message, no invalid message, no missing message</label><br> <input id="t00100" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"p", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00100"/><br> <label for="t00101">not required, no min/max, prompt message, no invalid message, missing message</label><br> <input id="t00101" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"p", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00101"/><br> <label for="t00110">not required, no min/max, prompt message, invalid message, no missing message</label><br> <input id="t00110" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"p", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00110"/><br> <label for="t00111">not required, no min/max, prompt message, invalid message, missing message</label><br> <input id="t00111" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:false, promptMessage:"p", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t00111"/><br> <label for="t01000">required, no min/max, no prompt message, no invalid message, no missing message</label><br> <input id="t01000" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01000"/><br> <label for="t01001">required, no min/max, no prompt message, no invalid message, missing message</label><br> <input id="t01001" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01001"/><br> <label for="t01010">required, no min/max, no prompt message, invalid message, no missing message</label><br> <input id="t01010" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01010"/><br> <label for="t01011">required, no min/max, no prompt message, invalid message, missing message</label><br> <input id="t01011" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01011"/><br> <label for="t01100">required, no min/max, prompt message, no invalid message, no missing message</label><br> <input id="t01100" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"p", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01100"/><br> <label for="t01101">required, no min/max, prompt message, no invalid message, missing message</label><br> <input id="t01101" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"p", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01101"/><br> <label for="t01110">required, no min/max, prompt message, invalid message, no missing message</label><br> <input id="t01110" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"p", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01110"/><br> <label for="t01111">required, no min/max, prompt message, invalid message, missing message</label><br> <input id="t01111" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false] }, required:true, promptMessage:"p", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t01111"/><br> <label for="t10000">not required, min=10, max=100, no prompt message, no invalid message, no missing message</label><br> <input id="t10000" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10000"/><br> <label for="t10001">not required, min=10, max=100, no prompt message, no invalid message, missing message</label><br> <input id="t10001" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10001"/><br> <label for="t10010">not required, min=10, max=100, no prompt message, invalid message, no missing message</label><br> <input id="t10010" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10010"/><br> <label for="t10011">not required, min=10, max=100, no prompt message, invalid message, missing message</label><br> <input id="t10011" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10011"/><br> <label for="t10100">not required, min=10, max=100, prompt message, no invalid message, no missing message</label><br> <input id="t10100" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"p", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10100"/><br> <label for="t10101">not required, min=10, max=100, prompt message, no invalid message, missing message</label><br> <input id="t10101" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"p", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10101"/><br> <label for="t10110">not required, min=10, max=100, prompt message, invalid message, no missing message</label><br> <input id="t10110" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"p", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10110"/><br> <label for="t10111">not required, min=10, max=100, prompt message, invalid message, missing message</label><br> <input id="t10111" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:false, promptMessage:"p", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t10111"/><br> <label for="t11000">required, min=10, max=100, no prompt message, no invalid message, no missing message</label><br> <input id="t11000" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11000"/><br> <label for="t11001">required, min=10, max=100, no prompt message, no invalid message, missing message</label><br> <input id="t11001" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11001"/><br> <label for="t11010">required, min=10, max=100, no prompt message, invalid message, no missing message</label><br> <input id="t11010" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11010"/><br> <label for="t11011">required, min=10, max=100, no prompt message, invalid message, missing message</label><br> <input id="t11011" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11011"/><br> <label for="t11100">required, min=10, max=100, prompt message, no invalid message, no missing message</label><br> <input id="t11100" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"p", invalidMessage:"", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11100"/><br> <label for="t11101">required, min=10, max=100, prompt message, no invalid message, missing message</label><br> <input id="t11101" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"p", invalidMessage:"", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11101"/><br> <label for="t11110">required, min=10, max=100, prompt message, invalid message, no missing message</label><br> <input id="t11110" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"p", invalidMessage:"i", missingMessage:"", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11110"/><br> <label for="t11111">required, min=10, max=100, prompt message, invalid message, missing message</label><br> <input id="t11111" data-dojo-type="dui/form/NumberTextBox" data-dojo-props='constraints:{ fractional:[true,false], min:10, max:100 }, required:true, promptMessage:"p", invalidMessage:"i", missingMessage:"m", rangeMessage:"r"'/> <input style="border:0;" size="6" value="t11111"/><br> </body> </html>
<API key> ====================== Webcam image grabber based on haskell v4l2-examples A simple command line utility, grabs a video frame from a webcam peroidically, saves to a png file, e.g. for monitoring purposes. # <API key> --help The <API key> program <API key> [OPTIONS] Grabs a video frame and saves it to a png file every delayseconds seconds Common flags: -v --videodevice=ITEM /dev/video0 -o --outpng=ITEM frame.png -d --delayseconds=INT 5 :: delay (in seconds) before grabbing next frame --verbose run in a verbose mode -? --help Display help message -V --version Print version information
import os import random import datetime from django.db import models from django.conf import settings from django.utils.http import int_to_base36 from django.utils.hashcompat import sha_constructor from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User,Group from django.core.mail import send_mail from django.template.loader import render_to_string from django.contrib.sites.models import Site from registration.models import SHA1_RE class InvitationManager(models.Manager): def get_key(self, invitation_key): """ Return InvitationKey, or None if it doesn't (or shouldn't) exist. """ try: key = self.get(key=invitation_key) except self.model.DoesNotExist: return None return key def is_key_valid(self, invitation_key): """ Check if an ``InvitationKey`` is valid or not, returning a boolean, ``True`` if the key is valid. """ invitation_key = self.get_key(invitation_key) return invitation_key and not invitation_key.key_expired() def create_key(self,user): """ The key for the ``Invitation`` will be a SHA1 hash, generated from a combination of the ``User``'s username and a random salt. """ salt = sha_constructor(str(random.random())).hexdigest()[:5] key = sha_constructor("%s%s%s" % (datetime.datetime.now(), salt, user.username)).hexdigest() return key def create_invitation(self, user, receiver): """ Create an ``Invitation`` and returns it. """ key = self.key(user) if isinstance(receiver,User) == False: return Invitation(sender=user,receiver_email=receiver,key=key) return Invitation(sender=user,receiver=receiver,key=key) def delete_expired_keys(self): for key in self.all(): if key.key_expired(): key.delete() class Invitation(models.Model): key = models.CharField(_('invitation key'), max_length=40) date_invited = models.DateTimeField(_('date invited'),auto_now_add=True) sender = models.ForeignKey(User, related_name='invitations_sent') receiver = models.ForeignKey(User, null=True, blank=True, related_name='invitations_used') receiver_email = models.EmailField(_("Email"),null=True, blank=True) objects = InvitationManager() def __unicode__(self): return u"Invitation from %s on %s" % (self.sender.username, self.date_invited) def get_receiver_email(self): return self.receiver.email if self.receiver else self.receiver_email def key_expired(self): """ Determine whether this ``InvitationKey`` has expired, returning a boolean -- ``True`` if the key has expired. The date the key has been created is incremented by the number of days specified in the setting ``<API key>`` (which should be the number of days after invite during which a user is allowed to create their account); if the result is less than or equal to the current date, the key has expired and this method returns ``True``. """ #expiration_date = datetime.timedelta(days=settings.<API key>) #expiration_date = datetime.timedelta(days=30) #return self.date_invited + expiration_date <= datetime.datetime.now() return False key_expired.boolean = True def mark_used(self, registrant): """ Note that this key has been used to register a new user. """ self.registrant = registrant self.save() def render_templates(self,app_name, kwargs={}): current_site = Site.objects.get_current() z = kwargs.copy() z.update({'site': current_site, 'invitation':self}) subject = render_to_string('invitation/'+str(app_name)+'<API key>.txt', z) # Email subject *must not* contain newlines subject = ''.join(subject.splitlines()) message = render_to_string('invitation/'+str(app_name)+'_invitation_email.txt', z) return (subject,message) def send_mail(self, app_name, kwargs={}): """ Send an invitation email to ``self.receiver``. """ subject,message = self.render_templates(app_name,kwargs) send_mail(subject, message, self.sender.email, [self.get_receiver_email(),])
package dataToGraph; import java.io.*; import java.nio.file.Path; import java.nio.file.Paths; import javax.swing.*; /** * The GUI used to create a dataToGraph project * * * @author Kim Spasaro */ public class GUIRemoveGraphType extends javax.swing.JFrame { public int graphType; public File inFile; public String title; public String abs; public String dateFormat; public Path projFile; // path of project file, to be created public Path projPath; // path of project directory, to be created public String outString; public String search = "blah blah blah"; private static final String selectDate = "Select"; // for closing the gui public static final int APPROVE_OPTION = 1; public static final int CANCEL_OPTION = 0; public static final int DEFAULT = -1; public int closeOp = DEFAULT; /** * Creates new RickshawGUI */ public GUIRemoveGraphType() { initComponents(); } // Accessors /** * Gets selected input CSV file * @return inFile CSV file to graph */ public File getInFile() { return inFile; } /** * Gets selected graph title * @return title The graph title */ public String getTitle() { return title; } /** * Gets selected abstract * @return title The graph abstract */ public String getAbs() { return abs; } /** * Gets selected date format * @return dateFormat The format of date values in the CSV file */ public String getDate() { return dateFormat; } /** * Gets selected date format * @return dateFormat The format of date values in the CSV file */ public String getSearch() { return "blah blah blah"; } /** * Gets project output path, named after selected output file name * @return outPath The path to create the project */ public Path getProjPath() { return projPath; } /** * Gets project output path, named after selected output file name * @return outPath The path to create the project */ public Path getProjFile() { return projFile; } /** * Gets selected close operation * @return closeOp Either save or cancel */ public int getCloseOp(){ return closeOp; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { System.out.println("Initializing gui"); graphProps = new javax.swing.JPanel(); titleLabel = new javax.swing.JLabel(); titleField = new javax.swing.JTextField(); scrollPane = new javax.swing.JScrollPane(); abstractLabel = new javax.swing.JLabel(); abstractTextArea = new javax.swing.JTextArea(); dateLabel = new javax.swing.JLabel(); dateCombo = new javax.swing.JComboBox<String>(); fileProps = new javax.swing.JPanel(); inputLabel = new javax.swing.JLabel(); inputField = new javax.swing.JTextField(); outputLabel = new javax.swing.JLabel(); outputField = new javax.swing.JTextField(); okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); <API key>(javax.swing.WindowConstants.EXIT_ON_CLOSE); graphProps.setBorder(javax.swing.BorderFactory.createTitledBorder("Graph Properties")); // Title titleLabel.setText("Title"); titleField.setText("Title"); titleField.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { <API key>(evt, titleField); } }); // Abstract abstractLabel.setText("Abstract"); abstractTextArea.setColumns(20); abstractTextArea.setRows(5); abstractTextArea.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(150, 150, 150), 1, true)); scrollPane.setViewportView(abstractTextArea); // Date format dateLabel.setText("Date Format"); dateCombo.setMaximumRowCount(20); dateCombo.setModel(new javax.swing.<API key><String>(new String[] { selectDate, "dd-MMMM-yy", "dd/MMMM/yy", "dd-MMMM-yyyy", "dd/MMMM/yyyy", "MMM-yy", "MMM/yy", "MMM-yyyy", "MMM/yyyy", "MM-yy", "MM/yy", "MM-yyyy", "MM/yyyy", "mmyy", "mmyyyy", "yy", "yyyy" })); // Input and output fields fileProps.setBorder(javax.swing.BorderFactory.createTitledBorder("File Properties")); inputLabel.setText("Choose File"); inputField.setText("CSV File"); inputField.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { <API key>(evt); } }); outputLabel.setText("Save As"); outputField.setText("Project Name"); outputField.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { <API key>(evt, outputField); } }); // OK and cancel buttons okButton.setText("OK"); okButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { <API key>(evt); } }); cancelButton.setText("Cancel"); cancelButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { <API key>(evt); } }); // Gross layout stuff System.out.println("Building gui"); javax.swing.GroupLayout graphPropsLayout = new javax.swing.GroupLayout(graphProps); graphProps.setLayout(graphPropsLayout); graphPropsLayout.setHorizontalGroup( graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(graphPropsLayout.<API key>() .addContainerGap() .addGroup(graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(abstractLabel) .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(graphPropsLayout.<API key>() .addComponent(titleField, javax.swing.GroupLayout.PREFERRED_SIZE, 341, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(31, 31, 31) .addGroup(graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(graphPropsLayout.<API key>() .addComponent(dateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dateCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(graphPropsLayout.<API key>() .addComponent(dateLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dateCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(scrollPane)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); graphPropsLayout.setVerticalGroup( graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(graphPropsLayout.<API key>() .addContainerGap() .addGroup(graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(titleField, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(dateLabel) .addComponent(dateCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(dateCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(dateLabel)) .addGroup(graphPropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(graphPropsLayout.<API key>() .addComponent(scrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(graphPropsLayout.<API key>() .addComponent(abstractLabel))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout filePropsLayout = new javax.swing.GroupLayout(fileProps); fileProps.setLayout(filePropsLayout); filePropsLayout.setHorizontalGroup( filePropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(filePropsLayout.<API key>() .addContainerGap() .addComponent(inputLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(inputField, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(55, 55, 55) .addComponent(outputLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(outputField, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); filePropsLayout.setVerticalGroup( filePropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(filePropsLayout.<API key>() .addGap(18, 18, 18) .addGroup(filePropsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(inputLabel) .addComponent(inputField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(outputLabel) .addComponent(outputField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.<API key>() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(graphProps, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(fileProps, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.<API key>() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.<API key>() .addContainerGap() .addComponent(graphProps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(fileProps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(okButton) .addComponent(cancelButton)) .addContainerGap()) ); pack(); }// </editor-fold> // Pop-up window for selecting input file private class FileSelector extends javax.swing.JFrame { // create a FileSelector private FileSelector() { init(); } // to store close operation private int closeOpp = CANCEL_OPTION; // accessor private File getSelectedFile(){ return fileChooser.getSelectedFile(); } // initialize the fileselector private void init() { System.out.println("Initializing filechooser"); filePanel = new javax.swing.JPanel(); fileChooser = new javax.swing.JFileChooser(); build(); closeOpp = fileChooser.showOpenDialog(FileSelector.this); // if the user clicks Open if (closeOpp == JFileChooser.APPROVE_OPTION){ inFile = fileChooser.getSelectedFile(); inputField.setText(inFile.toString()); filePanel.getParent().setVisible(false); } // if the user clicks Cancel else { System.out.println("No input file chosen"); inputField.selectAll(); } } // gross layout stuff private void build() { System.out.println("Building filechooser"); <API key>(javax.swing.WindowConstants.EXIT_ON_CLOSE); filePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Select File")); javax.swing.GroupLayout filePanelLayout = new javax.swing.GroupLayout(filePanel); filePanel.setLayout(filePanelLayout); filePanelLayout.setHorizontalGroup( filePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(filePanelLayout.<API key>() .addContainerGap() .addComponent(fileChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); filePanelLayout.setVerticalGroup( filePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(filePanelLayout.<API key>() .addContainerGap() .addComponent(fileChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.<API key>() .addContainerGap() .addComponent(filePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.<API key>() .addContainerGap() .addComponent(filePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); } } // </editor-fold> // Event Handlers /** * Highlight text when text field is clicked * @return void */ private void <API key>(java.awt.event.MouseEvent evt, JTextField field) { field.selectAll(); } /** * Create FileChooser pop-up when input field is selected * @return void */ private void <API key>(java.awt.event.MouseEvent evt) { FileSelector fileChooser = new FileSelector(); } /** * Collect fields and close main window when user OKs * @return void */ private void <API key>(java.awt.event.MouseEvent evt) { // make sure user remembered to select the date format before collecting input if (dateCombo.getSelectedItem() == selectDate) dateWarning(); else{ closeOp = APPROVE_OPTION; this.setVisible(false); collect(); } } /** * Close main window when user cancels * @return void */ private void <API key>(java.awt.event.MouseEvent evt) { closeOp = CANCEL_OPTION; System.exit(0); } public void close(){ System.exit(0); } // Input Collection /** * Collect user input * @return void */ public void collect () { synchronized(this) { title = titleField.getText(); abs = abstractTextArea.getText(); dateFormat = (String) dateCombo.getSelectedItem(); inFile = new File (inputField.getText()); String outName = outputField.getText(); // Create output file in same directory as input f String outString = inFile.getParent() + File.separator + outName; projPath = Paths.get(outString); projFile = Paths.get(outString + "/" + outName + ".html"); // Print to terminal System.out.println("Input File: " + inFile); System.out.println("Title: " + title); System.out.println("Abstract: " + abs); System.out.println("Date Format: " + dateFormat); System.out.println("Project Path: " + projPath); System.out.println("Project File: " + projFile); notify(); } } // Dialogs /** * Indicate date format needs to be selected * @return void */ public void dateWarning() { JOptionPane.showMessageDialog(null, "Please select a date format."); } /** * Indicate file creation successful * @return void */ public void ending() { JOptionPane.showMessageDialog(null, "Your file has been created at " + projPath.toString() + ".html"); } public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.<API key>()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (<API key> ex) { java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (<API key> ex) { java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (<API key> ex) { java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.<API key> ex) { java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new GUI().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JLabel abstractLabel; private javax.swing.JTextArea abstractTextArea; private javax.swing.JComboBox<String> dateCombo; private javax.swing.JLabel dateLabel; private javax.swing.JPanel fileProps; private javax.swing.JPanel graphProps; private javax.swing.JTextField inputField; private javax.swing.JLabel inputLabel; private javax.swing.JButton cancelButton; private javax.swing.JButton okButton; private javax.swing.JTextField outputField; private javax.swing.JLabel outputLabel; private javax.swing.JScrollPane scrollPane; private javax.swing.JTextField titleField; private javax.swing.JLabel titleLabel; // Variables declaration - do not modify private javax.swing.JFileChooser fileChooser; private javax.swing.JPanel filePanel; // End of variables declaration }
package leveldb4j.db.options; import leveldb4j.ext.annotations.Default; public class WriteOptions { @Default(type = Default.Type.BOOLEAN, value = "true") static boolean SYNC; }
# Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:58.682345 from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties parsed_277U_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0010'] ) ), Element( u'BHT02', Properties(desc=u'Transaction Set Purpose Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=2, codes=[u'08'] ) ), Element( u'BHT03', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=3, codes=[] ) ), Element( u'BHT04', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=4, codes=[] ) ), Element( u'BHT05', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=5, codes=[] ) ), Element( u'BHT06', Properties(desc=u'Transaction Type Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=6, codes=[u'NO'] ) ), ), ) parsed_277U_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, codes=[u'2'] ) ), Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, codes=[] ) ), Element( u'NM104', Properties(desc=u'Name First', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=4, codes=[] ) ), Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'N', data_type=(u'AN',u'1',u'25'), position=5, codes=[] ) ), Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, codes=[] ) ), Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=7, codes=[] ) ), Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, codes=[u'21', u'AD', u'FI', u'NI', u'PI', u'PP', u'XV'] ) ), Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, codes=[] ) ), Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, codes=[] ) ), Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, codes=[] ) ), ), Segment( u'PER', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'080',desc=u'Payer Contact Information'), Element( u'PER01', Properties(desc=u'Contact Function Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'IC'] ) ), Element( u'PER02', Properties(desc=u'Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=2, codes=[] ) ), Element( u'PER03', Properties(desc=u'Communication Number Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=3, codes=[u'ED', u'EM', u'TE'] ) ), Element( u'PER04', Properties(desc=u'Communication Number', req_sit=u'R', data_type=(u'AN',u'1',u'256'), position=4, codes=[] ) ), Element( u'PER05', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=5, codes=[u'EX'] ) ), Element( u'PER06', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=6, codes=[] ) ), Element( u'PER07', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=7, codes=[u'EX', u'FX'] ) ), Element( u'PER08', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=8, codes=[] ) ), Element( u'PER09', Properties(desc=u'Contact Inquiry Reference', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=9, codes=[] ) ), ), ) parsed_277U_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Information Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, codes=[u'1', u'2'] ) ), Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, codes=[] ) ), Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, codes=[] ) ), Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, codes=[] ) ), Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=6, codes=[] ) ), Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, codes=[] ) ), Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, codes=[u'46', u'FI', u'XX'] ) ), Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, codes=[] ) ), Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, codes=[] ) ), Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, codes=[] ) ), ), ) parsed_277U_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P'] ) ), Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, codes=[u'1', u'2'] ) ), Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, codes=[] ) ), Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, codes=[] ) ), Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, codes=[] ) ), Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=6, codes=[] ) ), Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, codes=[] ) ), Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, codes=[u'FI', u'SV', u'XX'] ) ), Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, codes=[] ) ), Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, codes=[] ) ), Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, codes=[] ) ), ), ) parsed_277U_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL', u'QC'] ) ), Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, codes=[u'1', u'2'] ) ), Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, codes=[] ) ), Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, codes=[] ) ), Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, codes=[] ) ), Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=6, codes=[] ) ), Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, codes=[] ) ), Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, codes=[u'24', u'MI', u'ZZ'] ) ), Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, codes=[] ) ), Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, codes=[] ) ), Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, codes=[] ) ), ), ) parsed_277U_2220D = Loop( u'2220D', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'180',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, codes=[u'AD', u'CI', u'HC', u'ID', u'IV', u'N1', u'N2', u'N3', u'N4', u'ND', u'NH', u'NU', u'RB'] ) ), Element( u'SVC01-02', Properties(desc=u'Product/Service ID', req_sit=u'R', data_type=(u'AN',u'1',u'48'), position=1, codes=[] ) ), Element( u'SVC01-03', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=2, codes=[] ) ), Element( u'SVC01-04', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=3, codes=[] ) ), Element( u'SVC01-05', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=4, codes=[] ) ), Element( u'SVC01-06', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=5, codes=[] ) ), Element( u'SVC01-07', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=6, codes=[] ) ), ), Element( u'SVC02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, codes=[] ) ), Element( u'SVC03', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=3, codes=[] ) ), Element( u'SVC04', Properties(desc=u'Product/Service ID', req_sit=u'S', data_type=(u'AN',u'1',u'48'), position=4, codes=[] ) ), Element( u'SVC05', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, codes=[] ) ), Composite( u'C003', Properties(req_sit=u'N',refdes='',seq=u'06',desc=u'Composite Medical Procedure Identifier'), ), Element( u'SVC07', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=7, codes=[] ) ), ), Segment( u'STC', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'190',desc=u'Service Line Status Information'), Composite( u'C043', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Health Care Claim Status'), Element( u'STC01-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC01-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC01-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, codes=[] ) ), Element( u'STC03', Properties(desc=u'Action Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=3, codes=[] ) ), Element( u'STC04', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=4, codes=[] ) ), Element( u'STC05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=5, codes=[] ) ), Element( u'STC06', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=6, codes=[] ) ), Element( u'STC07', Properties(desc=u'Payment Method Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=7, codes=[] ) ), Element( u'STC08', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=8, codes=[] ) ), Element( u'STC09', Properties(desc=u'Check Number', req_sit=u'N', data_type=(u'AN',u'1',u'16'), position=9, codes=[] ) ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'10',desc=u'Health Care Claim Status'), Element( u'STC10-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC10-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC10-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Health Care Claim Status'), Element( u'STC11-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC11-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC11-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC12', Properties(desc=u'Free-form Message Text', req_sit=u'N', data_type=(u'AN',u'1',u'264'), position=12, codes=[] ) ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'200',desc=u'Service Line Item Identification'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FJ'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'DTP', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'210',desc=u'Service Line Date'), Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'472'] ) ), Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, codes=[u'RD8'] ) ), Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, codes=[] ) ), ), ) parsed_277U_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'2'] ) ), Element( u'TRN02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'TRN03', Properties(desc=u'Originating Company Identifier', req_sit=u'N', data_type=(u'AN',u'10',u'10'), position=3, codes=[] ) ), Element( u'TRN04', Properties(desc=u'Reference Identification', req_sit=u'N', data_type=(u'AN',u'1',u'50'), position=4, codes=[] ) ), ), Segment( u'STC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'100',desc=u'Claim Level Status Information'), Composite( u'C043', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Health Care Claim Status'), Element( u'STC01-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC01-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC01-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, codes=[] ) ), Element( u'STC03', Properties(desc=u'Action Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=3, codes=[] ) ), Element( u'STC04', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=4, codes=[] ) ), Element( u'STC05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=5, codes=[] ) ), Element( u'STC06', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=6, codes=[] ) ), Element( u'STC07', Properties(desc=u'Payment Method Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=7, codes=[u'ACH', u'BOP', u'CHK', u'FWT', u'NON'] ) ), Element( u'STC08', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=8, codes=[] ) ), Element( u'STC09', Properties(desc=u'Check Number', req_sit=u'N', data_type=(u'AN',u'1',u'16'), position=9, codes=[] ) ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'10',desc=u'Health Care Claim Status'), Element( u'STC10-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC10-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC10-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Health Care Claim Status'), Element( u'STC11-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC11-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC11-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC12', Properties(desc=u'Free-form Message Text', req_sit=u'N', data_type=(u'AN',u'1',u'264'), position=12, codes=[] ) ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'110',desc=u'Payer Claim Identification Number'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1K'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'110',desc=u'Institutional Bill Type Identification'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'BLT'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'110',desc=u'Medical Record Identification'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'EA'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'DTP', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'120',desc=u'Claim Service Date'), Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'232'] ) ), Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, codes=[u'RD8'] ) ), Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, codes=[] ) ), ), parsed_277U_2220D, ) parsed_277U_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, codes=[u'1'] ) ), Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, codes=[] ) ), Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, codes=[] ) ), Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, codes=[] ) ), Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=6, codes=[] ) ), Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, codes=[] ) ), Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=8, codes=[u'MI', u'ZZ'] ) ), Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'S', data_type=(u'AN',u'2',u'80'), position=9, codes=[] ) ), Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, codes=[] ) ), Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, codes=[] ) ), ), ) parsed_277U_2220E = Loop( u'2220E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'180',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, codes=[u'AD', u'CI', u'HC', u'ID', u'IV', u'N1', u'N2', u'N3', u'N4', u'ND', u'NH', u'NU', u'RB'] ) ), Element( u'SVC01-02', Properties(desc=u'Product/Service ID', req_sit=u'R', data_type=(u'AN',u'1',u'48'), position=1, codes=[] ) ), Element( u'SVC01-03', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=2, codes=[] ) ), Element( u'SVC01-04', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=3, codes=[] ) ), Element( u'SVC01-05', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=4, codes=[] ) ), Element( u'SVC01-06', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=5, codes=[] ) ), Element( u'SVC01-07', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=6, codes=[] ) ), ), Element( u'SVC02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, codes=[] ) ), Element( u'SVC03', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=3, codes=[] ) ), Element( u'SVC04', Properties(desc=u'Product/Service ID', req_sit=u'S', data_type=(u'AN',u'1',u'48'), position=4, codes=[] ) ), Element( u'SVC05', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, codes=[] ) ), Composite( u'C003', Properties(req_sit=u'N',refdes='',seq=u'06',desc=u'Composite Medical Procedure Identifier'), ), Element( u'SVC07', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=7, codes=[] ) ), ), Segment( u'STC', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'190',desc=u'Service Line Status Information'), Composite( u'C043', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Health Care Claim Status'), Element( u'STC01-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC01-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC01-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, codes=[] ) ), Element( u'STC03', Properties(desc=u'Action Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=3, codes=[] ) ), Element( u'STC04', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=4, codes=[] ) ), Element( u'STC05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=5, codes=[] ) ), Element( u'STC06', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=6, codes=[] ) ), Element( u'STC07', Properties(desc=u'Payment Method Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=7, codes=[] ) ), Element( u'STC08', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=8, codes=[] ) ), Element( u'STC09', Properties(desc=u'Check Number', req_sit=u'N', data_type=(u'AN',u'1',u'16'), position=9, codes=[] ) ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'10',desc=u'Health Care Claim Status'), Element( u'STC10-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC10-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC10-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Health Care Claim Status'), Element( u'STC11-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC11-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC11-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC12', Properties(desc=u'Free-form Message Text', req_sit=u'N', data_type=(u'AN',u'1',u'264'), position=12, codes=[] ) ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'200',desc=u'Service Line Item Identification'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FJ'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'DTP', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'210',desc=u'Service Line Date'), Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'472'] ) ), Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, codes=[u'RD8'] ) ), Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, codes=[] ) ), ), ) parsed_277U_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'2'] ) ), Element( u'TRN02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'TRN03', Properties(desc=u'Originating Company Identifier', req_sit=u'N', data_type=(u'AN',u'10',u'10'), position=3, codes=[] ) ), Element( u'TRN04', Properties(desc=u'Reference Identification', req_sit=u'N', data_type=(u'AN',u'1',u'50'), position=4, codes=[] ) ), ), Segment( u'STC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'100',desc=u'Claim Level Status Information'), Composite( u'C043', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Health Care Claim Status'), Element( u'STC01-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC01-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC01-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, codes=[] ) ), Element( u'STC03', Properties(desc=u'Action Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=3, codes=[] ) ), Element( u'STC04', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=4, codes=[] ) ), Element( u'STC05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=5, codes=[] ) ), Element( u'STC06', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=6, codes=[] ) ), Element( u'STC07', Properties(desc=u'Payment Method Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=7, codes=[u'ACH', u'BOP', u'CHK', u'FWT', u'NON'] ) ), Element( u'STC08', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=8, codes=[] ) ), Element( u'STC09', Properties(desc=u'Check Number', req_sit=u'N', data_type=(u'AN',u'1',u'16'), position=9, codes=[] ) ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'10',desc=u'Health Care Claim Status'), Element( u'STC10-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC10-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC10-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Composite( u'C043', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Health Care Claim Status'), Element( u'STC11-01', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=0, codes=[] ) ), Element( u'STC11-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, codes=[] ) ), Element( u'STC11-03', Properties(desc=u'Entity Identifier Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, codes=[] ) ), ), Element( u'STC12', Properties(desc=u'Free-form Message Text', req_sit=u'N', data_type=(u'AN',u'1',u'264'), position=12, codes=[] ) ), ), Segment( u'REF', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'110',desc=u'Payer Claim Identification Number'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1K'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'110',desc=u'Institutional Bill Type Identification'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'BLT'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'REF', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'110',desc=u'Medical Record Identification'), Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'EA'] ) ), Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, codes=[] ) ), Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, codes=[] ) ), Composite( u'C040', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Reference Identifier'), ), ), Segment( u'DTP', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'120',desc=u'Claim Service Date'), Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'232'] ) ), Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, codes=[u'RD8'] ) ), Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, codes=[] ) ), ), parsed_277U_2220E, ) parsed_277U_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, codes=[] ) ), Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, codes=[u'23'] ) ), Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=4, codes=[] ) ), ), Segment( u'DMG', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'040',desc=u'Dependent Demographic Information'), Element( u'DMG01', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'D8'] ) ), Element( u'DMG02', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=2, codes=[] ) ), Element( u'DMG03', Properties(desc=u'Gender Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=3, codes=[u'F', u'M', u'U'] ) ), Element( u'DMG04', Properties(desc=u'Marital Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=4, codes=[] ) ), Element( u'DMG05', Properties(desc=u'Race or Ethnicity Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=5, codes=[] ) ), Element( u'DMG06', Properties(desc=u'Citizenship Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=6, codes=[] ) ), Element( u'DMG07', Properties(desc=u'Country Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=7, codes=[] ) ), Element( u'DMG08', Properties(desc=u'Basis of Verification Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=8, codes=[] ) ), Element( u'DMG09', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=9, codes=[] ) ), ), parsed_277U_2100E, parsed_277U_2200E, ) parsed_277U_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, codes=[] ) ), Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, codes=[u'22'] ) ), Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, codes=[u'0', u'1'] ) ), ), Segment( u'DMG', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'040',desc=u'Subscriber Demographic Information'), Element( u'DMG01', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'D8'] ) ), Element( u'DMG02', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=2, codes=[] ) ), Element( u'DMG03', Properties(desc=u'Gender Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=3, codes=[u'F', u'M', u'U'] ) ), Element( u'DMG04', Properties(desc=u'Marital Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=4, codes=[] ) ), Element( u'DMG05', Properties(desc=u'Race or Ethnicity Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=5, codes=[] ) ), Element( u'DMG06', Properties(desc=u'Citizenship Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=6, codes=[] ) ), Element( u'DMG07', Properties(desc=u'Country Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=7, codes=[] ) ), Element( u'DMG08', Properties(desc=u'Basis of Verification Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=8, codes=[] ) ), Element( u'DMG09', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=9, codes=[] ) ), ), parsed_277U_2100D, parsed_277U_2200D, parsed_277U_2000E, ) parsed_277U_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, codes=[] ) ), Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, codes=[u'19'] ) ), Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, codes=[u'1'] ) ), ), parsed_277U_2100C, parsed_277U_2000D, ) parsed_277U_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Receiver Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, codes=[] ) ), Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, codes=[u'21'] ) ), Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, codes=[u'1'] ) ), ), parsed_277U_2100B, parsed_277U_2000C, ) parsed_277U_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Source Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'N', data_type=(u'AN',u'1',u'12'), position=2, codes=[] ) ), Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, codes=[u'20'] ) ), Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, codes=[u'1'] ) ), ), parsed_277U_2100A, parsed_277U_2000B, ) parsed_277U_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_277U_2000A, ) parsed_277U_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'277'] ) ), Element( u'ST02', Properties(desc=u'Transaction Set Control Number', req_sit=u'R', data_type=(u'AN',u'4',u'9'), position=2, codes=[] ) ), ), parsed_277U_HEADER, parsed_277U_DETAIL, Segment( u'SE', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'270',desc=u'Transaction Set Trailer'), Element( u'SE01', Properties(desc=u'Number of Included Segments', req_sit=u'R', data_type=(u'N0',u'1',u'10'), position=1, codes=[] ) ), Element( u'SE02', Properties(desc=u'Transaction Set Control Number', req_sit=u'R', data_type=(u'AN',u'4',u'9'), position=2, codes=[] ) ), ), ) parsed_277U_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HN'] ) ), Element( u'GS02', Properties(desc=u'Application Senders Code', req_sit=u'R', data_type=(u'AN',u'2',u'15'), position=2, codes=[] ) ), Element( u'GS03', Properties(desc=u'124', req_sit=u'R', data_type=(u'AN',u'2',u'15'), position=3, codes=[] ) ), Element( u'GS04', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=4, codes=[] ) ), Element( u'GS05', Properties(desc=u'Time', req_sit=u'R', data_type=(u'TM',u'4',u'8'), position=5, codes=[] ) ), Element( u'GS06', Properties(desc=u'Group Control Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=6, codes=[] ) ), Element( u'GS07', Properties(desc=u'Responsible Agency Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=7, codes=[u'X'] ) ), Element( u'GS08', Properties(desc=u'Version / Release / Industry Identifier Code', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=8, codes=[u'004010X070'] ) ), ), parsed_277U_ST_LOOP, Segment( u'GE', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Functional Group Trailer'), Element( u'GE01', Properties(desc=u'97', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), Element( u'GE02', Properties(desc=u'Group Control Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=2, codes=[] ) ), ), ) <API key> = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), Element( u'ISA02', Properties(desc=u'I02', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=2, codes=[] ) ), Element( u'ISA03', Properties(desc=u'I03', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=3, codes=[u'00', u'01'] ) ), Element( u'ISA04', Properties(desc=u'I04', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=4, codes=[] ) ), Element( u'ISA05', Properties(desc=u'I05', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=5, codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', u'ZZ'] ) ), Element( u'ISA06', Properties(desc=u'I06', req_sit=u'R', data_type=(u'AN',u'15',u'15'), position=6, codes=[] ) ), Element( u'ISA07', Properties(desc=u'I05', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=7, codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', u'ZZ'] ) ), Element( u'ISA08', Properties(desc=u'I07', req_sit=u'R', data_type=(u'AN',u'15',u'15'), position=8, codes=[] ) ), Element( u'ISA09', Properties(desc=u'I08', req_sit=u'R', data_type=(u'DT',u'6',u'6'), position=9, codes=[] ) ), Element( u'ISA10', Properties(desc=u'I09', req_sit=u'R', data_type=(u'TM',u'4',u'4'), position=10, codes=[] ) ), Element( u'ISA11', Properties(desc=u'I10', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=11, codes=[u'U'] ) ), Element( u'ISA12', Properties(desc=u'I11', req_sit=u'R', data_type=(u'ID',u'5',u'5'), position=12, codes=[u'00401'] ) ), Element( u'ISA13', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=13, codes=[] ) ), Element( u'ISA14', Properties(desc=u'I13', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=14, codes=[u'0', u'1'] ) ), Element( u'ISA15', Properties(desc=u'I14', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=15, codes=[u'P', u'T'] ) ), Element( u'ISA16', Properties(desc=u'I15', req_sit=u'R', data_type=(u'AN',u'1',u'1'), position=16, codes=[] ) ), ), parsed_277U_GS_LOOP, Segment( u'TA1', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'020',desc=u'Interchange Acknowledgement'), Element( u'TA101', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=1, codes=[] ) ), Element( u'TA102', Properties(desc=u'I08', req_sit=u'R', data_type=(u'DT',u'6',u'6'), position=2, codes=[] ) ), Element( u'TA103', Properties(desc=u'I09', req_sit=u'R', data_type=(u'TM',u'4',u'4'), position=3, codes=[] ) ), Element( u'TA104', Properties(desc=u'I17', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, codes=[u'A', u'E', u'R'] ) ), Element( u'TA105', Properties(desc=u'I18', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=5, codes=[u'000', u'001', u'002', u'003', u'004', u'005', u'006', u'007', u'008', u'009', u'010', u'011', u'012', u'013', u'014', u'015', u'016', u'017', u'018', u'019', u'020', u'021', u'022', u'023', u'024', u'025', u'026', u'027', u'028', u'029', u'030', u'031'] ) ), ), Segment( u'IEA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Interchange Control Trailer'), Element( u'IEA01', Properties(desc=u'I16', req_sit=u'R', data_type=(u'N0',u'1',u'5'), position=1, codes=[] ) ), Element( u'IEA02', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=2, codes=[] ) ), ), ) parsed_277U = Message( u'277', Properties(desc=u'HIPAA Health Care Claim Unsolicited Status Response X070-277U'), <API key>, )
<?php namespace app\controllers\backend; use Yii; use yii\filters\AccessControl; use yii\web\Controller; use app\models\backend\LoginForm; use yii\filters\VerbFilter; /** * Site controller */ class SiteController extends Controller { /** * {@inheritdoc} */ public function behaviors() { return [ 'access' => [ 'class' => AccessControl::class, 'rules' => [ [ 'actions' => ['login', 'error', 'captcha'], 'allow' => true, ], [ 'actions' => ['logout', 'index'], 'allow' => true, 'roles' => ['@'], ], ], ], 'verbs' => [ 'class' => VerbFilter::class, 'actions' => [ 'logout' => ['post'], ], ], ]; } /** * {@inheritdoc} */ public function actions() { return [ 'captcha' => [ 'class' => \yii\captcha\CaptchaAction::class, 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, ], 'error' => [ 'class' => \yii\web\ErrorAction::class, ], ]; } public function actionIndex() { return $this->render('index'); } public function actionLogin() { if (!Yii::$app->user->isGuest) { return $this->goHome(); } $model = new LoginForm(); if ($model->load(Yii::$app->request->post()) && $model->login()) { return $this->goBack(); } else { return $this->render('login', [ 'model' => $model, ]); } } public function actionLogout() { Yii::$app->user->logout(); return $this->goHome(); } }
body { margin: 0; padding: 0; color: #555; font: normal 10pt Arial,Helvetica,sans-serif; background: #EFEFEF; } #page { margin-top: 5px; margin-bottom: 5px; background: white; border: 1px solid #C9E0ED; } #header { margin: 0; padding: 0; border-top: 3px solid #C9E0ED; } #content { padding: 20px; } #sidebar { padding: 20px 20px 20px 0; } #footer { padding: 10px; margin: 10px 20px; font-size: 0.8em; text-align: center; border-top: 1px solid #C9E0ED; } #logo { padding: 10px 20px; font-size: 200%; } #mainmenu { background:white url(bg.gif) repeat-x left top; } #mainmenu ul { padding:6px 20px 5px 20px; margin:0px; } #mainmenu ul li { display: inline; } #mainmenu ul li a { color:#ffffff; background-color:transparent; font-size:12px; font-weight:bold; text-decoration:none; padding: 9px 8px; } #mainmenu ul li a:hover, #mainmenu ul li.active a { color: #6399cd; background-color:#EFF4FA; text-decoration:none; } div.flash-error, div.flash-notice, div.flash-success { padding:.8em; margin-bottom:1em; border:2px solid #ddd; } div.flash-error { background:#FBE3E4; color:#8a1f11; border-color:#FBC2C4; } div.flash-notice { background:#FFF6BF; color:#514721; border-color:#FFD324; } div.flash-success { background:#E6EFC2; color:#264409; border-color:#C6D880; } div.flash-error a { color:#8a1f11; } div.flash-notice a { color:#514721; } div.flash-success a { color:#264409; } div.form .rememberMe label { display: inline; } div.view { padding: 10px; margin: 10px 0; border: 1px solid #C9E0ED; } div.breadcrumbs { font-size: 0.9em; padding: 5px 20px; } div.breadcrumbs span { font-weight: bold; } div.search-form { padding: 10px; margin: 10px 0; background: #eee; } .portlet { } .portlet-decoration { padding: 3px 8px; background: #B7D6E7; border-left: 5px solid #6FACCF; } .portlet-title { font-size: 12px; font-weight: bold; padding: 0; margin: 0; color: #298dcd; } .portlet-content { font-size:0.9em; margin: 0 0 15px 0; padding: 5px 8px; background:#EFFDFF; } .portlet-content ul { list-style-image:none; list-style-position:outside; list-style-type:none; margin: 0; padding: 0; } .portlet-content li { padding: 2px 0 4px 0px; } .operations { list-style-type: none; margin: 0; padding: 0; } .operations li { padding-bottom: 2px; } .operations li a { font: bold 12px Arial; color: #0066A4; display: block; padding: 2px 0 2px 8px; line-height: 15px; text-decoration: none; } .operations li a:visited { color: #0066A4; } .operations li a:hover { background: #80CFFF; } .menu-top ul a, .menu-top ul a:hover{ text-decoration:none;} #menu-top ul { list-style: none; margin: 0; padding: 0; position: relative; height: 30px; } #menu-top ul li { display: block; height: 28px; float: left; overflow: visible; } #menu-top ul li:hover > ul { display: block; } #menu-top ul li a { float: left; display: block; } #menu-top ul li ul { display: none; position: absolute; top: 95%; background: #F2FDFF; color: #0066A4; height: auto; box-shadow: 0px 0px 6px 2px #666; border-radius:4px; } #menu-top ul li ul li a { color: #ccc; padding: 4px 14px; display: block; } #menu-top ul li ul li.active a, #menu-top ul li ul li a:hover { background-color:#F2FDFF;} #menu-top ul li ul li{clear: left;} #menu-top li a::first-letter{ text-decoration: underline; }
local ui_LoginWindow = {} function ui_LoginWindow.setupUi(self) if (self:objectName() == "") then self:setObjectName("LoginWindow") end self:resize(400, 300) local verticleLayout = QVBoxLayout.new(self) verticleLayout:setSpacing(6) verticleLayout:setContentsMargins(11, 11, 11, 11); verticleLayout:setObjectName("verticleLayout") local gridLayout = QGridLayout.new() gridLayout:setSpacing(6) gridLayout:setObjectName("gridLayout") gridLayout:setVerticalSpacing(48); local label_2 = QLabel.new(self) label_2:setObjectName("label_2") gridLayout:addWidget(label_2, 1, 0, 1, 1) local edit_Pwd = QLineEdit.new(self) edit_Pwd:setObjectName("edit_Pwd") edit_Pwd:setEchoMode(2) gridLayout:addWidget(edit_Pwd, 1, 1, 1, 1) local edit_ID = QLineEdit.new(self) edit_ID:setObjectName("edit_ID") gridLayout:addWidget(edit_ID, 0, 1, 1, 1) local label = QLabel.new(self) label:setObjectName("label") gridLayout:addWidget(label, 0, 0, 1, 1) local btn_Login = QPushButton.new(self) btn_Login:setObjectName("btn_Login") gridLayout:addWidget(btn_Login, 2, 0, 1, 2) verticleLayout:addLayout(gridLayout) QWidget.setTabOrder(edit_ID, edit_Pwd) QWidget.setTabOrder(edit_Pwd, btn_Login) local ui = { verticleLayout = verticleLayout, gridLayout = gridLayout, label_2 = label_2, edit_Pwd = edit_Pwd, edit_ID = edit_ID, label = label, btn_Login = btn_Login, } ui_LoginWindow.retranslateUi(self, ui) return ui end function ui_LoginWindow.retranslateUi(self, ui) self:setWindowTitle("Login") ui.label_2:setText("Passwd") ui.label:setText("ID") ui.btn_Login:setText("Login") end return ui_LoginWindow
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <script src="static/riot.js"></script> <script src="static/reference-manager.js"></script> <script src="static/js/vendor/modernizr.js"></script> <script src="static/js/vendor/jquery.js"></script> <script src="static/js/foundation.min.js"></script> <link rel="stylesheet" href="static/css/foundation.css" /> </head> <body> <p align="center"> <img src="static/ggnore.png"> </p> <reference-manager></reference-manager> <script> $(document).foundation(); riot.mount('reference-manager', { 'content': {{ content|safe }}}); </script> </body> </html>
# -*- coding:utf-8 -*- import os import webbrowser import wx import wx.richtext as rt import wx.lib.scrolledpanel as scrolled import wx.lib.platebtn as platebtn import StickyNote class NoteWidget(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent, style = wx.BORDER_THEME) self.SetMinSize((-1, 300)) self.SetBackgroundColour("white") title_edit = wx.TextCtrl(self)#, style = wx.BORDER_NONE) # title_edit.SetMinSize((-1, 30)) content_edit = wx.TextCtrl(self, style = wx.BORDER_NONE | wx.TE_MULTILINE) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(title_edit, 0, wx.EXPAND | wx.TOP | wx.LEFT | wx.RIGHT, 10) sizer.Add(content_edit, 1, wx.EXPAND | wx.ALL, 10) self.SetSizer(sizer) sizer.Fit(self) class MyFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title=title, size = (400, 400), style = wx.DEFAULT_FRAME_STYLE ) StickyNoteBook(self) class StickyNoteBook(scrolled.ScrolledPanel): def __init__(self, parent): scrolled.ScrolledPanel.__init__(self, parent) # Layout self.__DoLayout() self.SetupScrolling() def __DoLayout(self): # w1 = StickyNote.StickyNote(self, pos=(50, 50)) # w, h = self.GetClientSize() e1 = NoteWidget(self) # e2 = NoteWidget(self) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(e1, 1, wx.EXPAND | wx.ALL, 10) # sizer.Add(e2, 1, wx.EXPAND | wx.ALL, 10) # sizer.AddMany([(p1, 0, wx.EXPAND), (p2, 0, wx.EXPAND), # (p3, 0, wx.EXPAND)]) # hsizer = wx.BoxSizer(wx.HORIZONTAL) # hsizer.Add(sizer, 1, wx.EXPAND) self.SetSizer(sizer) # e1.GetSizer().Fit(self) sizer.Fit(self) # self.SetAutoLayout(True) def OnDropArrowPressed(self, evt): print "DROPARROW PRESSED" def OnChildFocus(self, evt): """Override ScrolledPanel.OnChildFocus to prevent erratic scrolling on wxMac. """ if wx.Platform != '__WXMAC__': evt.Skip() child = evt.GetWindow() self.ScrollChildIntoView(child) class GradientPanel(wx.Panel): def __init__(self, parent, size): wx.Panel.__init__(self, parent, size=size) self.Bind(wx.EVT_PAINT, self.OnPaint) def OnPaint(self, evt): dc = wx.PaintDC(self) gc = wx.GraphicsContext.Create(dc) col1 = wx.<API key>(wx.SYS_COLOUR_3DSHADOW) col2 = platebtn.AdjustColour(col1, -90) col1 = platebtn.AdjustColour(col1, 90) rect = self.GetClientRect() grad = gc.<API key>(0, 1, 0, rect.height - 1, col2, col1) pen_col = tuple([min(190, x) for x in platebtn.AdjustColour(col1, -60)]) gc.SetPen(gc.CreatePen(wx.Pen(pen_col, 1))) gc.SetBrush(grad) gc.DrawRectangle(0, 1, rect.width - 0.5, rect.height - 0.5) evt.Skip() if __name__ == '__main__': app = wx.App(False) frame = MyFrame(None, "dfas") frame.Show(True) app.MainLoop()
package net.meisen.dissertation.impl.cache; /** * Default implementation of the {@code Clock} used for by the * {@code CacheStrategy} to determine the current time. * * @author pmeisen * */ public class Clock { /** * Gets the current time. * * @return the current time */ public long getCurrentTime() { return System.currentTimeMillis(); } }
/* global define */ define(['./deps', './mergeInto'], function(__deps, __mergeInto){ var __globals = __deps.globals; /* Class: Namespace Class that will operate as generic namespace object that is able to extend itself. If called directly */ var __Namespace = function Namespace(){ var _args = arguments; //--check if this is being invoked as a constructor, which takes no arguments or will be a namespace and will not have a _this on the helper function defined var _isContructor = false; if( !_args.length || (this instanceof __Namespace && typeof this.__._this === 'undefined') ){ _isContructor = true; } if(!_isContructor){ if(_args.length){ return __Namespace.namespace.apply(this, _args); }else{ return new __Namespace(); } }else{ //--attach this to __ helper so it will have access to it even if methods are invoked directly this.__._this = this; } }; __mergeInto(__Namespace, { helpers: { keys: function(){ var _key; var _keys = []; for(_key in this){ if(_key !== '__'){ _keys.push(_key); } } return _keys; } } /* Method: namespace Create namespaces. Parameters: multiple parameter signatures. (): creates a new namespace. (namespace) (namespace, extend) (scope, namespace) (scope, extend) (scope, namespace, extend) extend(Map): map of key value pairs to merge into the namespace namespace(String): name of namespace. can put 'Namespace.separator' between namespaces to create hierarchical namespaces scope(Object): object to append namespace */ ,namespace: function(){ var _args = arguments; var _i; var _namespace; var _extend; var _scope; //--determine arguments based on number of argumetns switch(_args.length){ case 0: return new __Namespace(); //-! break; case 1: _namespace = _args[0]; break; case 2: if(typeof _args[0] === 'string'){ _namespace = _args[0]; _extend = _args[1]; }else{ _scope = _args[0]; if(typeof _args[1] === 'string'){ _namespace = _args[1]; }else{ _extend = _args[1]; } } break; case 3: _scope = _args[0]; _namespace = _args[1]; _extend = _args[2]; break; } //--_scope defaults to __deps.globals if(!_scope){ _scope = __globals; } //--start our current scope as _scope var _currentScope = _scope; if(typeof _namespace == 'string'){ var _identifierKey; //--split _namespace into identifiers on separator var _identifiers = _namespace.split(__Namespace.separator); //--go through all identifiers for(_i = 0; _i < _identifiers.length; ++_i){ _identifierKey = _identifiers[_i]; //--if current key is not defined, define it if(!_currentScope[_identifierKey]){ _currentScope[_identifierKey] = new __Namespace(); } //--set current scope to new scope _currentScope = _currentScope[_identifierKey]; } } if(_extend){ if(_extend instanceof Array){ for(_i = 0; _i < _extend.length; ++_i){ __Namespace(_extend[_i], _currentScope); } }else{ __mergeInto(_currentScope, _extend); } } return _currentScope; } ,separator: '.' }); __Namespace.prototype.__ = function(){ var _args = arguments; //--if no arguments, return an array of keys if(_args.length === 0){ return __Namespace.helpers.keys.apply(this); }else{ var _arg0 = _args[0]; switch(typeof _arg0){ case 'string': if(_arg0.charAt(0) === __Namespace.separator){ var _name = _arg0.substring(1); var _extend = _args[1] || null; return __Namespace(this, _name, _extend); }else if(typeof __Namespace.helpers[_arg0] == 'function'){ _args.shift(); return __Namespace.helpers.apply(this, _args); }else if(typeof __Namespace.helpers[_arg0] != 'undefined'){ return __Namespace.helpers[_arg0]; }else{ throw 'Namespace: undefined method "' + _arg0 + '"'; } break; case 'object': return __mergeInto(this, _arg0); //-! break; } } }; //--export directly only, since we can't reference tmlib yet return __Namespace; });
#include <mex.h> #include <cstdint> #include <complex> #include <string> #include <vector> #include "mexplus/mxtypes.h" using namespace std; using mexplus::MxTypes; using mexplus::MxCharCompound; using mexplus::MxArithmeticType; using mexplus::<API key>; using mexplus::MxComplexType; using mexplus::MxComplexCompound; using mexplus::<API key>; using mexplus::<API key>; using mexplus::mxNumeric; using mexplus::mxCell; using mexplus::mxComplex; #define EXPECT(...) if (!(__VA_ARGS__)) \ mexErrMsgTxt(#__VA_ARGS__ " not true.") #define RUN_TEST(function) function(); \ mexPrintf("PASS: %s\n", #function); \ mexCallMATLAB(0, NULL, 0, NULL, "drawnow") namespace { typedef struct FakeStruct_tag {} FakeStruct; /** Test type mapping. */ void testArrayType() { // gcc 4.4.7 doesn't accept local types as template argument. EXPECT(is_same<MxTypes<int8_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<uint8_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<int16_t>::array_type, mxNumeric>::value); // Not true with gcc 4.4.7. // EXPECT(is_same<MxTypes<uint16_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<int32_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<uint32_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<int64_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<uint64_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<float>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<double>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<short>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<long>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<long long>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<char>::array_type, mxChar>::value); EXPECT(is_same<MxTypes<wchar_t>::array_type, mxChar>::value); // Visual Studio cannot distinguish char16_t and char32_t from uint. // EXPECT(is_same<MxTypes<char16_t>::array_type, mxChar>::value); // EXPECT(is_same<MxTypes<char32_t>::array_type, mxChar>::value); EXPECT(is_same<MxTypes<mxChar>::array_type, mxChar>::value); EXPECT(is_same<MxTypes<bool>::array_type, mxLogical>::value); EXPECT(is_same<MxTypes<mxLogical>::array_type, mxLogical>::value); EXPECT(is_same<MxTypes<mxLogical>::array_type, mxLogical>::value); // Visual Studio doesn't allow this. // EXPECT(is_same<MxTypes<void>::array_type, mxCell>::value); EXPECT(is_same<MxTypes<void*>::array_type, mxCell>::value); EXPECT(is_same<MxTypes<FakeStruct>::array_type, mxCell>::value); EXPECT(is_same<MxTypes<std::complex<float>>::array_type, mxComplex>::value); EXPECT(is_same<MxTypes<std::complex<double>>::array_type, mxComplex>::value); EXPECT(!is_arithmetic<std::complex<float>>::value); EXPECT(!is_arithmetic<std::complex<double>>::value); EXPECT(is_compound<std::complex<double>>::value); EXPECT(MxArithmeticType<int8_t>::value); EXPECT(<API key><std::vector<float>>::value); EXPECT(MxCharCompound<string>::value); EXPECT(!MxCharCompound<char*>::value); EXPECT(MxArithmeticType<double>::value); EXPECT(MxComplexCompound<vector<complex<double>>>::value); EXPECT(<API key><vector<double>>::value); EXPECT(<API key><vector<int>>::value); EXPECT(!<API key><vector<char>>::value); EXPECT(MxComplexType<std::complex<double>>::value); EXPECT(!MxComplexType<double>::value); EXPECT(<API key><double>::value); EXPECT(!<API key><char>::value); EXPECT(<API key><std::complex<double>>::value); EXPECT(!<API key><vector<double>>::value); EXPECT(!<API key><vector<std::complex<double>>>::value); EXPECT(!<API key><string>::value); EXPECT(!<API key><vector<string>>::value); EXPECT(<API key><vector<double>>::value); EXPECT(<API key><vector<std::complex<float>>>::value); EXPECT(!<API key><string>::value); EXPECT(!<API key><char>::value); EXPECT(!<API key><std::complex<double>>::value); EXPECT(!<API key><vector<string>>::value); EXPECT(is_same<MxTypes<const int8_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const uint8_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const int16_t>::array_type, mxNumeric>::value); // Not true with gcc 4.4.7. // EXPECT(is_same<MxTypes<const uint16_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const int32_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const uint32_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const int64_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const uint64_t>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const float>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const double>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const short>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const long>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const long long>::array_type, mxNumeric>::value); EXPECT(is_same<MxTypes<const char>::array_type, mxChar>::value); EXPECT(is_same<MxTypes<const wchar_t>::array_type, mxChar>::value); // EXPECT(is_same<MxTypes<const char16_t>::array_type, mxChar>::value); // EXPECT(is_same<MxTypes<const char32_t>::array_type, mxChar>::value); EXPECT(is_same<MxTypes<const mxChar>::array_type, mxChar>::value); EXPECT(is_same<MxTypes<const bool>::array_type, mxLogical>::value); EXPECT(is_same<MxTypes<const mxLogical>::array_type, mxLogical>::value); EXPECT(is_same<MxTypes<const mxLogical>::array_type, mxLogical>::value); EXPECT(is_same<MxTypes<const FakeStruct>::array_type, mxCell>::value); EXPECT(is_same<MxTypes<const std::complex<float> >::array_type, mxComplex>::value); EXPECT(is_same<MxTypes<const std::complex<double>>::array_type, mxComplex>::value); EXPECT(!is_arithmetic<const std::complex<float> >::value); EXPECT(!is_arithmetic<const std::complex<double> >::value); } } // namespace void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { RUN_TEST(testArrayType); }
<?php use yii\helpers\Url; use app\models\MMapApi; ?> <!DOCTYPE html> <html> <head><title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;"> <script src="<?php echo Yii::$app->getRequest()->baseUrl.'/../vendor/bower/jquery/dist/jquery.min.js'; ?> "></script> <script src="<?php echo Yii::$app->getRequest()->baseUrl.'/../vendor/bower/bootstrap/dist/js/bootstrap.min.js'; ?> "></script> <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=<?php echo MMapApi::getJsak(); ?>"></script> <! <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=<API key>"></script> <script type="text/javascript"> $(document).ready(function(){ var lat = "<?php echo $lat_end; ?>"; var lng = "<?php echo $lon_end; ?>"; initBMap(lng,lat); }); var walking = function(pointA,pointB,map){ var walking = new BMap.WalkingRoute(map, {renderOptions: {map: map, panel: "result", autoViewport: true}}); walking.search(pointA, pointB); }; var bus = function(pointA,pointB,map){ var transit = new BMap.TransitRoute(map, {renderOptions: {map: map, panel: "result", autoViewport: true}}); transit.search(pointA, pointB); }; var driver = function(pointA,pointB,map){ var transit = new BMap.DrivingRoute(map, { renderOptions: { map: map, panel: "result", enableDragging : true }, }); transit.search(pointA,pointB); }; var initBMap = function(lng1,lat1){ var map = new BMap.Map("map_container"); map.centerAndZoom(pointB,16); var pointB = new BMap.Point(lng1,lat1); map.centerAndZoom(pointB,16); map.addControl(new BMap.NavigationControl()); var pointA = new BMap.Point("<?php echo $lon_begin; ?>","<?php echo $lat_begin; ?>"); if(map.getDistance(pointA,pointB) > 5000) { driver(pointA,pointB,map); } else if(map.getDistance(pointA,pointB) > 1000) { bus(pointA,pointB,map); } else { walking(pointA,pointB,map); } }; </script> <style type="text/css"> #map_container{margin:0px;width:100%;height:200px;} #result{height:100%;width:100%;} .panel-body img{max-width:100%;} </style> </head> <body> <div id="map_container"></div> <div class="panel panel-success"> <div class="panel-heading"> <h3 class="panel-title"><?php echo $office->title; ?></h3> </div> <div class="panel-body"> <?php echo $office->manager; ?> <br /> <a href="tel:<?php echo $office->mobile; ?>"><?php echo $office->mobile; ?></a> <br /> <?php echo $office->address; ?> <a href="<?php echo "http://api.map.baidu.com/direction?origin=latlng:{$lat_begin},{$lon_begin}|name:&destination=latlng:{$lat_end},{$lon_end}|name:{$office->title}&mode=driving&region=&output=html&src=wosotech|wosotech"; ?>"></a> <br/> </div> </div> <div id="result"></div> </body> </html>
#! /bin/sh PROJECT_ROOT=../../.. . $PROJECT_ROOT/common/config.sh ./<API key>.bin ${1+"$@"}
<?php class C1 {} class C2 extends C1 {} class C3 extends C2 {} function f(C2 $obj){} f(new C1()); # ERR f(new C3()); abstract class Abstr { abstract public function f1(C2 $c); } class Work1 extends Abstr { public function f1(C1 $c){} # ERR } class Work3 extends Abstr { public function f1(C3 $c){} # ERR } function foo(Abstr $obj) { $X = new C2(); $obj->f1($X); } foo(new Work1); foo(new Work3); ?>
#include "SkBitmap.h" #include "SkCanvas.h" #include "SkFontPriv.h" #include "SkGradientShader.h" #include "SkImageGenerator.h" #include "SkPaint.h" #include "SkPath.h" #include "SkPathOps.h" #include "SkPicture.h" #include "SkPictureRecorder.h" #include "SkTextUtils.h" #include "ToolUtils.h" #include "gm.h" static void draw_vector_logo(SkCanvas* canvas, const SkRect& viewBox) { constexpr char kSkiaStr[] = "SKIA"; constexpr SkScalar kGradientPad = .1f; constexpr SkScalar kVerticalSpacing = 0.25f; constexpr SkScalar kAccentScale = 1.20f; SkPaint paint; paint.setAntiAlias(true); SkFont font(ToolUtils::<API key>()); font.setSubpixel(true); font.setEmbolden(true); SkPath path; SkRect iBox, skiBox, skiaBox; SkTextUtils::GetPath("SKI", 3, <API key>, 0, 0, font, &path); TightBounds(path, &skiBox); SkTextUtils::GetPath("I", 1, <API key>, 0, 0, font, &path); TightBounds(path, &iBox); iBox.offsetTo(skiBox.fRight - iBox.width(), iBox.fTop); const size_t textLen = strlen(kSkiaStr); SkTextUtils::GetPath(kSkiaStr, textLen, <API key>, 0, 0, font, &path); TightBounds(path, &skiaBox); skiaBox.outset(0, 2 * iBox.width() * (kVerticalSpacing + 1)); const SkScalar accentSize = iBox.width() * kAccentScale; const SkScalar underlineY = iBox.bottom() + (kVerticalSpacing + SkScalarSqrt(3) / 2) * accentSize; SkMatrix m; m.setRectToRect(skiaBox, viewBox, SkMatrix::kFill_ScaleToFit); SkAutoCanvasRestore acr(canvas, true); canvas->concat(m); canvas->drawCircle(iBox.centerX(), iBox.y() - (0.5f + kVerticalSpacing) * accentSize, accentSize / 2, paint); path.reset(); path.moveTo(iBox.centerX() - accentSize / 2, iBox.bottom() + kVerticalSpacing * accentSize); path.rLineTo(accentSize, 0); path.lineTo(iBox.centerX(), underlineY); canvas->drawPath(path, paint); SkRect underlineRect = SkRect::MakeLTRB(iBox.centerX() - iBox.width() * accentSize * 3, underlineY, iBox.centerX(), underlineY + accentSize / 10); const SkPoint pts1[] = { SkPoint::Make(underlineRect.x(), 0), SkPoint::Make(iBox.centerX(), 0) }; const SkScalar pos1[] = { 0, 0.75f }; const SkColor colors1[] = { SK_ColorTRANSPARENT, SK_ColorBLACK }; SkASSERT(SK_ARRAY_COUNT(pos1) == SK_ARRAY_COUNT(colors1)); paint.setShader(SkGradientShader::MakeLinear(pts1, colors1, pos1, SK_ARRAY_COUNT(pos1), SkTileMode::kClamp)); canvas->drawRect(underlineRect, paint); const SkPoint pts2[] = { SkPoint::Make(iBox.x() - iBox.width() * kGradientPad, 0), SkPoint::Make(iBox.right() + iBox.width() * kGradientPad, 0) }; const SkScalar pos2[] = { 0, .01f, 1.0f/3, 1.0f/3, 2.0f/3, 2.0f/3, .99f, 1 }; const SkColor colors2[] = { SK_ColorBLACK, 0xffca5139, 0xffca5139, 0xff8dbd53, 0xff8dbd53, 0xff5460a5, 0xff5460a5, SK_ColorBLACK }; SkASSERT(SK_ARRAY_COUNT(pos2) == SK_ARRAY_COUNT(colors2)); paint.setShader(SkGradientShader::MakeLinear(pts2, colors2, pos2, SK_ARRAY_COUNT(pos2), SkTileMode::kClamp)); canvas->drawSimpleText(kSkiaStr, textLen, <API key>, 0, 0, font, paint); } // This GM exercises <API key> features // (in particular its matrix vs. bounds semantics). class PictureGeneratorGM : public skiagm::GM { protected: SkString onShortName() override { return SkString("<API key>"); } SkISize onISize() override { return SkISize::Make(1160, 860); } void onOnceBeforeDraw() override { const SkRect rect = SkRect::MakeWH(kPictureWidth, kPictureHeight); SkPictureRecorder recorder; SkCanvas* canvas = recorder.beginRecording(rect); draw_vector_logo(canvas, rect); fPicture = recorder.<API key>(); } void onDraw(SkCanvas* canvas) override { const struct { SkISize size; SkScalar scaleX, scaleY; SkScalar opacity; } configs[] = { { SkISize::Make(200, 100), 1, 1, 1 }, { SkISize::Make(200, 200), 1, 1, 1 }, { SkISize::Make(200, 200), 1, 2, 1 }, { SkISize::Make(400, 200), 2, 2, 1 }, { SkISize::Make(200, 100), 1, 1, 0.9f }, { SkISize::Make(200, 200), 1, 1, 0.75f }, { SkISize::Make(200, 200), 1, 2, 0.5f }, { SkISize::Make(400, 200), 2, 2, 0.25f }, { SkISize::Make(200, 200), 0.5f, 1, 1 }, { SkISize::Make(200, 200), 1, 0.5f, 1 }, { SkISize::Make(200, 200), 0.5f, 0.5f, 1 }, { SkISize::Make(200, 200), 2, 2, 1 }, { SkISize::Make(200, 100), -1, 1, 1 }, { SkISize::Make(200, 100), 1, -1, 1 }, { SkISize::Make(200, 100), -1, -1, 1 }, { SkISize::Make(200, 100), -1, -1, 0.5f }, }; auto srgbColorSpace = SkColorSpace::MakeSRGB(); const unsigned kDrawsPerRow = 4; const SkScalar kDrawSize = 250; for (size_t i = 0; i < SK_ARRAY_COUNT(configs); ++i) { SkPaint p; p.setAlphaf(configs[i].opacity); SkMatrix m = SkMatrix::MakeScale(configs[i].scaleX, configs[i].scaleY); if (configs[i].scaleX < 0) { m.postTranslate(SkIntToScalar(configs[i].size.width()), 0); } if (configs[i].scaleY < 0) { m.postTranslate(0, SkIntToScalar(configs[i].size.height())); } std::unique_ptr<SkImageGenerator> gen = SkImageGenerator::MakeFromPicture(configs[i].size, fPicture, &m, p.getAlpha() != 255 ? &p : nullptr, SkImage::BitDepth::kU8, srgbColorSpace); SkImageInfo bmInfo = gen->getInfo().makeColorSpace(canvas->imageInfo().refColorSpace()); SkBitmap bm; bm.allocPixels(bmInfo); SkAssertResult(gen->getPixels(bm.info(), bm.getPixels(), bm.rowBytes())); const SkScalar x = kDrawSize * (i % kDrawsPerRow); const SkScalar y = kDrawSize * (i / kDrawsPerRow); p.setColor(0xfff0f0f0); p.setAlphaf(1.0f); canvas->drawRect(SkRect::MakeXYWH(x, y, SkIntToScalar(bm.width()), SkIntToScalar(bm.height())), p); canvas->drawBitmap(bm, x, y); } } private: sk_sp<SkPicture> fPicture; const SkScalar kPictureWidth = 200; const SkScalar kPictureHeight = 100; typedef skiagm::GM INHERITED; }; DEF_GM(return new PictureGeneratorGM;)
<h1>Spring Web MVC (+ Hibernate, Spring Data JPA) hello world without any XML file using Spring Boot</h1> <p>No web.xml, no Spring xml configuration file, no persistence.xml, no *.hbm.xml, simply no XML configuration file is in this example, which retrieves data from database and returns them in JSON format.</p> <p>This project use embedded HSQL database, which creates an in-memory database at startup and destroys all data on shutdown.</p> <p> How to run: <code>mvn jetty:run</code> </p> <ul> <li>List all customers (in JSON format): <code>http://localhost:8080/customers</code></li> <li>Customer detail (in JSON format): <code>http://localhost:8080/customers/1</code></li> </ul> <p> How to build WAR file: <code>mvn package</code> </p>
<?php /** * Message translations. * * This file is automatically generated by 'yii message' command. * It contains the localizable messages extracted from source code. * You may modify this file by translating the extracted messages. * * Each array element represents the translation (value) of a message (key). * If the value is empty, the message is considered as not translated. * Messages that no longer need translation will have their translations * enclosed between a pair of '@@' marks. * * Message string can be used with plural forms format. Check i18n section * of the guide for details. * * NOTE: this file must be saved in UTF-8 encoding. */ return [ 'Amaya' => '', 'Apple Safari' => '', 'April' => '', 'Arora' => '', 'August' => '', 'Avant' => '', 'Blackberry' => '', 'Chromium' => '', 'December' => '', 'Email' => '', 'Epiphany' => '', 'February' => '', 'Friday' => '', 'Galeon' => '', 'Google Chrome' => '', 'January' => '', 'July' => '', 'June' => '', 'Konqueror' => '', 'March' => '', 'Maxthon' => '', 'May' => '', 'Microsoft Internet Explorer' => '', 'Microsoft Internet Explorer Mobile' => '', 'Minimo' => '', 'Mobile Safari' => '', 'Monday' => '', 'Mosaic' => '', 'Mozilla Firefox' => '', 'Mozilla Firefox Fennec' => '', 'Mozilla Sea Monkey' => '', 'NetFront' => '', 'NetSurf' => '', 'Netscape' => '', 'No' => '', 'November' => '', 'October' => '', 'Omniweb' => '', 'Opera' => '', 'Phone' => '', 'Puffin' => '', 'Safari' => '', 'Saturday' => '', 'September' => '', 'Sunday' => '', 'Thursday' => '', 'Tuesday' => '', 'Wednesday' => '', 'Yes' => '', 'a moment ago' => '', 'ago' => '', 'billion' => '', 'eight' => '', 'eighteen' => '', 'eighty' => '', 'eleven' => '', 'fifteen' => '', 'fifty' => '', 'five' => '', 'forty' => '', 'four' => '', 'fourteen' => '', 'hundred' => '', 'million' => '', 'minus' => '', 'nine' => '', 'nineteen' => '', 'ninety' => '', 'nonillion' => '', 'octillion' => '', 'one' => '', 'quadrillion' => '', 'quintillion' => '', 'septillion' => '', 'seven' => '', 'seventeen' => '', 'seventy' => '', 'sextillion' => '', 'six' => '', 'sixteen' => '', 'sixty' => '', 'ten' => '', 'thirteen' => '', 'thirty' => '', 'thousand' => '', 'three' => '', 'trillion' => '', 'twelve' => '', 'twenty' => '', 'two' => '', 'zero' => '', '{n, plural, one{one day} other{# days}}' => '', '{n, plural, one{one hour} other{# hours}}' => '', '{n, plural, one{one minute} other{# minutes}}' => '', '{n, plural, one{one month} other{# months}}' => '', '{n, plural, one{one second} other{# seconds}}' => '', '{n, plural, one{one week} other{# weeks}}' => '', '{n, plural, one{one year} other{# years}}' => '', ];
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Fhir.Metrics { public struct Unary { public int Exponent; public string Expression; public Unary(int exponent, string expression) { this.Exponent = exponent; this.Expression = expression; } public override string ToString() { return Expression + "^" + Exponent.ToString(); } public Exponential Factor() { return Exponential.Power(Exponential.Exact(Expression), Exponent); } public Exponential Numeric() { return Exponential.Exact(Expression); } public bool IsNumeric { get { return double.TryParse(this.Expression, out _); } } } public static class Parser { public readonly static Regex TokenPattern = new Regex(@"(((?<m>[\.\/])?(?<m>[^\.\/]+))*)?", RegexOptions.Compiled); public readonly static Regex Annotations = new Regex(@"{[^{}]*}", RegexOptions.Compiled); public readonly static Regex ContainsWhitespace = new Regex(@"\s", RegexOptions.Compiled); public static List<string> Tokenize(string expression) { if (ContainsWhitespace.IsMatch(expression)) throw new ArgumentException($"Metric expression \"{expression}\" contains whitespace"); var annotationMatches = Annotations.Matches(expression); if (annotationMatches.Count > 0) expression = <API key>(annotationMatches, expression); var tokenMatch = TokenPattern.Match(expression); if (!tokenMatch.Success || Annotations.IsMatch(expression)) throw new ArgumentException($"Invalid metric expression \"{expression}\""); return tokenMatch.Captures("m").ToList(); } private static string <API key>(MatchCollection matches, string expression) { foreach(Match match in matches) { if (match.Index == 0) // Expressions contains just an annotation, e.g. "{rbc}" { expression = Metrics.Unity.Symbol; } else if (expression[match.Index - 1].Equals('/') || expression[match.Index - 1].Equals('.')) // Annotation is part of a multiplication or division, e.g. "/{count}" or "10*3.{RBC}" { expression = expression.Remove(match.Index, match.Length); expression = expression.Insert(match.Index, Metrics.Unity.Symbol); } else // e.g. // Annotation is directly combined with another unit, e.g. "ml{total}" { expression = expression.Remove(match.Index, match.Length); } } return expression; } static bool IsOperator(string token) { return (token == ".") || (token == "*") || (token == "/"); } static int OperatorExponent(string token) { switch(token) { case ".": case "*": return 1; case "/": return -1; default: return 0; } } private static Unary ParseUnaryExponent(string expression) { int exponent = 1; Match match = Regex.Match(expression, @"[\+\-]?\d+$"); string exp = match.Value; if (!string.IsNullOrEmpty(exp) && exp.Length < expression.Length) { exponent = Convert.ToInt16(match.Value); expression = expression.Remove(expression.Length - exp.Length, exp.Length); } return new Unary(exponent, expression); } static IEnumerable<Unary> ParseTokens(IEnumerable<string> tokens) { int exponent = 1; foreach(string token in tokens) { if (IsOperator(token)) { exponent = OperatorExponent(token); } else { Unary u = ParseUnaryExponent(token); u.Exponent *= exponent; yield return u; } } } public static IEnumerable<Unary> ToUnaryTokens(string expression) { return ParseTokens(Tokenize(expression)); } public static IEnumerable<Unary> Numerics(this IEnumerable<Unary> tokens) { return tokens.Where(u => u.IsNumeric); } public static IEnumerable<Unary> NonNumerics(this IEnumerable<Unary> tokens) { return tokens.Where(u => !u.IsNumeric); } } }
// Use of this source code is governed by a BSD-style package template import ( "bytes" "errors" "fmt" "io/ioutil" "strings" "sync" "testing" ) func TestClone(t *testing.T) { // The {{.}} will be executed with data `<i>*/` in different contexts. // In the t0 template, it will be in a HTML context. // In the t1 template, it will be in a URL query context. // In the t2 template, it will be in a Script context. // In the t3 template, it will be in a StyleSheet context. const tmpl = `{{define "a"}}{{template "lhs"}}{{.}}{{template "rhs"}}{{end}}` const data = `<i>*/` b := new(bytes.Buffer) // Create an incomplete template t0. t0 := Must(New("t0").Parse(tmpl)) // Clone t0 as t1. t1 := Must(t0.Clone()) Must(t1.Parse(`{{define "lhs"}} <q cite="/foo?{{end}}`)) Must(t1.Parse(`{{define "rhs"}}"></q> {{end}}`)) // Execute t1. b.Reset() if err := t1.ExecuteTemplate(b, "a", data); err != nil { t.Fatal(err) } if got, want := b.String(), ` <q cite="/foo?%3ci%3e%2a%2f"></q> `; got != want { t.Errorf("t1: got %q want %q", got, want) } // Clone t0 as t2. t2 := Must(t0.Clone()) Must(t2.Parse(`{{define "lhs"}} <script>{{end}}`)) Must(t2.Parse(`{{define "rhs"}}</script> {{end}}`)) // Execute t2. b.Reset() err := t2.ExecuteTemplate(b, "a", data) if err == nil { t.Fatalf("t2: got %q, expected error", b.String()) } if got, want := err.Error(), `expected a safehtml.Script value`; !strings.Contains(got, want) { t.Errorf("t2: error\n\t%q\ndoes not contain\n\t%q", got, want) } // Clone t0 as t3, but do not execute t3 yet. t3 := Must(t0.Clone()) Must(t3.Parse(`{{define "lhs"}} <style> {{end}}`)) Must(t3.Parse(`{{define "rhs"}} </style> {{end}}`)) // Complete t0. Must(t0.Parse(`{{define "lhs"}} ( {{end}}`)) Must(t0.Parse(`{{define "rhs"}} ) {{end}}`)) // Clone t0 as t4. Redefining the "lhs" template should not fail. t4 := Must(t0.Clone()) if _, err := t4.Parse(`{{define "lhs"}} OK {{end}}`); err != nil { t.Errorf(`redefine "lhs": got err %v want nil`, err) } // Cloning t1 should fail as it has been executed. if _, err := t1.Clone(); err == nil { t.Error("cloning t1: got nil err want non-nil") } // Redefining the "lhs" template in t1 should fail as it has been executed. if _, err := t1.Parse(`{{define "lhs"}} OK {{end}}`); err == nil { t.Error(`redefine "lhs": got nil err want non-nil`) } // Execute t0. b.Reset() if err := t0.ExecuteTemplate(b, "a", data); err != nil { t.Fatal(err) } if got, want := b.String(), ` ( &lt;i&gt;*/ ) `; got != want { t.Errorf("t0: got %q want %q", got, want) } // Clone t0. This should fail, as t0 has already executed. if _, err := t0.Clone(); err == nil { t.Error(`t0.Clone(): got nil err want non-nil`) } // Similarly, cloning sub-templates should fail. if _, err := t0.Lookup("a").Clone(); err == nil { t.Error(`t0.Lookup("a").Clone(): got nil err want non-nil`) } if _, err := t0.Lookup("lhs").Clone(); err == nil { t.Error(`t0.Lookup("lhs").Clone(): got nil err want non-nil`) } // Execute t3. b.Reset() err = t3.ExecuteTemplate(b, "a", data) if err == nil { t.Fatalf("t3: got %q, expected error", b.String()) } if got, want := err.Error(), `expected a safehtml.StyleSheet value`; !strings.Contains(got, want) { t.Errorf("t3: error\n\t%q\ndoes not contain\n\t%q", got, want) } } func TestCloneCrash(t *testing.T) { t1 := New("all") Must(t1.New("t1").Parse(`{{define "foo"}}foo{{end}}`)) t1.Clone() } // Ensure that this guarantee from the docs is upheld: // "Further calls to Parse in the copy will add templates // to the copy but not to the original." func TestCloneThenParse(t *testing.T) { t0 := Must(New("t0").Parse(`{{define "a"}}{{template "embedded"}}{{end}}`)) t1 := Must(t0.Clone()) Must(t1.Parse(`{{define "embedded"}}t1{{end}}`)) if len(t0.Templates())+1 != len(t1.Templates()) { t.Error("adding a template to a clone added it to the original") } // double check that the embedded template isn't available in the original err := t0.ExecuteTemplate(ioutil.Discard, "a", nil) if err == nil { t.Error("expected 'no such template' error") } } func <API key>(t *testing.T) { funcs := FuncMap{"customFunc": func() (string, error) { return "", errors.New("issue5980") }} // get the expected error output (no clone) uncloned := Must(New("").Funcs(funcs).Parse("{{customFunc}}")) wantErr := uncloned.Execute(ioutil.Discard, nil) // toClone must be the same as uncloned. It has to be recreated from scratch, // since cloning cannot occur after execution. toClone := Must(New("").Funcs(funcs).Parse("{{customFunc}}")) cloned := Must(toClone.Clone()) gotErr := cloned.Execute(ioutil.Discard, nil) if wantErr.Error() != gotErr.Error() { t.Errorf("clone error message mismatch want %q got %q", wantErr, gotErr) } } func <API key>(t *testing.T) { const ( input = `<title>{{block "a" .}}a{{end}}</title><body>{{block "b" .}}b{{end}}<body>` overlay = `{{define "b"}}A{{end}}` ) outer := Must(New("outer").Parse(input)) tmpl := Must(Must(outer.Clone()).Parse(overlay)) var wg sync.WaitGroup for i := 0; i < 10; i++ { wg.Add(1) go func() { defer wg.Done() for i := 0; i < 100; i++ { if err := tmpl.Execute(ioutil.Discard, "data"); err != nil { panic(err) } } }() } wg.Wait() } func <API key>(t *testing.T) { // Template.escape makes an assumption that the template associated // with t.Name() is t. Check that this holds. tmpl := Must(New("x").Parse("a")) tmpl = Must(tmpl.Clone()) if tmpl.Lookup(tmpl.Name()) != tmpl { t.Error("after Clone, tmpl.Lookup(tmpl.Name()) != tmpl") } } func TestCloneGrowth(t *testing.T) { tmpl := Must(New("root").Parse(`<title>{{block "B". }}Arg{{end}}</title>`)) tmpl = Must(tmpl.Clone()) Must(tmpl.Parse(`{{define "B"}}Text{{end}}`)) for i := 0; i < 10; i++ { tmpl.Execute(ioutil.Discard, nil) } if len(tmpl.DefinedTemplates()) > 200 { t.Fatalf("too many templates: %v", len(tmpl.DefinedTemplates())) } } func <API key>(t *testing.T) { const base = ` {{ define "a" -}}<title>{{ template "b" . -}}</title>{{ end -}} {{ define "b" }}{{ end -}} ` const page = `{{ template "a" . }}` t1 := Must(New("a").Parse(base)) for i := 0; i < 2; i++ { t2 := Must(t1.Clone()) t2 = Must(t2.New(fmt.Sprintf("%d", i)).Parse(page)) err := t2.Execute(ioutil.Discard, nil) if err != nil { t.Fatal(err) } } }
from __future__ import division from .base import Equation class KDV(Equation): """ The equation is : -c*u + 3/4u^2 + (u + 1/6u")=0 """ def degree(self): return 2 def compute_kernel(self, k): return 1.0-1.0/6*k**2 def flux(self, u): return 0.75*u*u def flux_prime(self, u): return 1.5*u class KDV3 (KDV): def degree(self): return 3 def flux(self, u): return 0.5*u**3 def flux_prime(self, u): return 1.5*u**2 class KDV5 (KDV): def degree(self): return 5 def flux(self, u): return 0.5*u**5 def flux_prime(self, u): return 2.5*u**4
import { <API key>, <API key>, <API key> } from '../../runtime/arc-exceptions.js'; let exceptions = []; before(() => { <API key>(<API key>); <API key>((arc, exception) => exceptions.push(exception)); }); afterEach(function () { if (exceptions.length > 0) { const exception = exceptions[0]; exceptions = []; // Error function not yet included in mocha typescript declarations... this.test['error'](exception); } }); //# sourceMappingURL=<API key>.js.map
<a name="0.5.1"></a> <a name="0.5.0"></a> <a name="0.4.0"></a> <a name="0.3.0"></a> <a name="0.2.0"></a> <a name="0.1.1"></a> <a name="0.0.9"></a> <a name="0.0.8"></a> <a name="0.0.7"></a> <a name="0.0.6"></a> <a name="0.0.5"></a> <a name="0.0.4"></a> <a name="0.0.3"></a> <a name="0.0.2"></a> <a name="0.0.1"></a> ## 0.0.1 (2015-05-15)