prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>github.js<|end_file_name|><|fim▁begin|>var async = require('async'), fs = require('graceful-fs'), path = require('path'), colors = require('colors'), swig = require('swig'), spawn = require('child_process').spawn, util = require('../../util'), file = util.file2, commitMessage = require('./util').commitMessage; // http://git-scm.com/docs/git-clone var rRepo = /(:|\/)([^\/]+)\/([^\/]+)\.git\/?$/; module.exports = function(args, callback){ var baseDir = hexo.base_dir, deployDir = path.join(baseDir, '.deploy'), publicDir = hexo.public_dir; if (!args.repo && !args.repository){ var help = ''; help += 'You should configure deployment settings in _config.yml first!\n\n'; help += 'Example:\n'; help += ' deploy:\n'; help += ' type: github\n'; help += ' repo: <repository url>\n'; help += ' branch: [branch]\n'; help += ' message: [message]\n\n'; help += 'For more help, you can check the docs: ' + 'http://hexo.io/docs/deployment.html'.underline; console.log(help); return callback(); } var url = args.repo || args.repository; if (!rRepo.test(url)){ hexo.log.e(url + ' is not a valid repository URL!'); return callback(); } var branch = args.branch; if (!branch){ var match = url.match(rRepo), username = match[2], repo = match[3], rGh = new RegExp('^' + username + '\\.github\\.[io|com]', 'i'); // https://help.github.com/articles/user-organization-and-project-pages if (repo.match(rGh)){ branch = 'master'; } else { branch = 'gh-pages'; } } var run = function(command, args, callback){ var cp = spawn(command, args, {cwd: deployDir}); cp.stdout.on('data', function(data){ process.stdout.write(data); }); cp.stderr.on('data', function(data){ process.stderr.write(data); }); cp.on('close', callback); }; async.series([ // Set up function(next){ fs.exists(deployDir, function(exist){ if (exist && !args.setup) return next(); hexo.log.i('Setting up GitHub deployment...'); var commands = [ ['init'], ['add', '-A', '.'], ['commit', '-m', 'First commit'] ]; if (branch !== 'master') commands.push(['branch', '-M', branch]); commands.push(['remote', 'add', 'github', url]); file.writeFile(path.join(deployDir, 'placeholder'), '', function(err){ if (err) callback(err); async.eachSeries(commands, function(item, next){ run('git', item, function(code){ if (code === 0) next(); }); }, function(){<|fim▁hole|> }); }, function(next){ hexo.log.i('Clearing .deploy folder...'); file.emptyDir(deployDir, next); }, function(next){ hexo.log.i('Copying files from public folder...'); file.copyDir(publicDir, deployDir, next); }, function(next){ var commands = [ ['add', '-A'], ['commit', '-m', commitMessage(args)], ['push', '-u', 'github', branch, '--force'] ]; async.eachSeries(commands, function(item, next){ run('git', item, function(){ next(); }); }, next); } ], callback); };<|fim▁end|>
if (!args.setup) next(); }); });
<|file_name|>UpdateLogger.py<|end_file_name|><|fim▁begin|># # UpdateLogger.py # """ package oompa.tracking TODO: stil waffling about whether to log two-columns - "datetime {json}" or "{json-with-datetime-field}" """ import json import os from datetime import datetime class UpdateLogger: """ records updates for later replay """ def __init__(self, config): self.config = config # XXX really get from config config_base = os.environ["HOME"] oompa_base = os.path.join(config_base, "oompa") self._updates_folder = os.path.join(oompa_base, "updates") # cache self._streams = {} return # ### # # file-based subclass # TODO: factor out to a subclass # def _getUpdatePath(self, datetime = None): if isinstance(datetime, str): yyyymmdd = datetime else: # in file subclass, we assume datetime is not none yyyymmdd = datetime.strftime("%Y%m%d") return os.path.join(self._updates_folder, "%s.updates.log" % yyyymmdd) def _getUpdateStream(self, datetime = None): path = self._getUpdatePath(datetime) if path not in self._streams: self._streams[path] = open(path, "a") # assumes that oompa_base exists if not os.path.exists(self._updates_folder): os.mkdir(self._updates_folder) return self._streams[path] def _logUpdate(self, info_d): now = datetime.now() info_d["datetime"] = now.strftime("%Y%m%d-%H:%M:%S") updateStream = self._getUpdateStream(now) updateStream.write("%s\n" % json.dumps(info_d)) # print("# wrote update: %s" % json.dumps(info_d)) # updateStream.flush() return # # ### def logListUpdate(self, entityMetadata, fieldName, action, **extra): # i think this may end up being the only kind of update info_d = { "kind": "list3", "subject_kind": entityMetadata.kind, "subject": entityMetadata.name, "field": fieldName, "action": action, } info_d.update(extra) self._logUpdate(info_d) return def logUpdates(self, entityMetadata, fieldName, newItems): """ XXX i don't think this is generic across any kind of update """ if not newItems: return info_d = { "kind": "list1", # stupid - merge list1 and list2 handling "field": fieldName, "subject_kind": entityMetadata.kind, "subject": entityMetadata.name, } for item in newItems: # XXX non-generic if fieldName == "repoNames": # note that created_at and updated_at could be fetched later. updated will certainly change info_d["full_name"] = item.full_name # info_d["created_at"] = item.created_at # these assume that someone has called refresh # info_d["parent"] = item.parent # info_d["source"] = item.source # note: *not* including blurb else: print(" logUpdates() - *not* a repoName: %s" % fieldName) pass self._logUpdate(info_d) pass return def logListUpdates(self, entityMetadata, fieldName, action, values): """ XXX i don't think this is generic across any kind of update TODO: use self.logListUpdate, to get more normalized """ info_d = { "kind": "list2", "field": fieldName, "action": action, "subject_kind": entityMetadata.kind,<|fim▁hole|> for value in values: info_d["full_name"] = value # TODO: if action is added, refresh the metadata to add parent and source # TODO: # # info_d["created_at"] = item.created_at # these assume that someone has called refresh # info_d["parent"] = repo.parent # info_d["source"] = item.source # # note: *not* including the blurb - renderer can look it up self._logUpdate(info_d) pass return def getUpdates(self, start_date = None, end_date = None): """ generate stream of updates TODO: support various filters """ # print("UpdateLogger.getUpdates(): %s - %s" % ( start_date, end_date )) # TODO: assuming today is dumb. maybe discover most recent # update? if end_date is None: end_date = datetime.now() if start_date is None: start_date = end_date if start_date != end_date: xxx # XXX need date_utils.date_range date_range = [ start_date, ] for date in date_range: # yyyymmdd = date.strftime("%Y%m%d") yyyymmdd = date update_path = self._getUpdatePath(yyyymmdd) if not os.path.exists(update_path): print("# update_path does not exist: %s" % update_path) continue for line in open(update_path): yield json.loads(line) return def organizeUpdatesByEntity(self, updates): """ organize updates by ( subject_kind, subject ) from the update """ byEntity = {} for update in updates: entity = ( update["subject_kind"], update["subject"] ) byEntity.setdefault(entity, []).append(update) pass return byEntity def organizeUpdatesByKind(self, updates): """ organize updates by ( kind, ) from each update """ by_kind = {} for update in updates: by_kind.setdefault(update["kind"], []).append(update) pass return by_kind def organizeUpdatesByField(self, updates): """ organize updates by ( field, ) from each update """ by_field = {} for update in updates: by_field.setdefault(update["field"], []).append(update) pass return by_field def close(self): map(lambda stream: stream.close(), self._streams) return pass<|fim▁end|>
"subject": entityMetadata.name, } # TODO: probably just write out full list in one record
<|file_name|>renderers.py<|end_file_name|><|fim▁begin|>import json<|fim▁hole|> return json.dumps(data)<|fim▁end|>
class JSONRenderer(object): def render(self, data):
<|file_name|>15.5.4.20-4-55.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of this code must retain the above // copyright and this notice and otherwise comply with the Use Terms. /*---<|fim▁hole|> (\u000A\u000A) includes: [runTestCase.js] ---*/ function testcase() { if ("\u000A\u000A".trim() === "") { return true; } } runTestCase(testcase);<|fim▁end|>
es5id: 15.5.4.20-4-55 description: > String.prototype.trim handles whitepace and lineterminators
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime import photolib.models import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), ] operations = [ migrations.CreateModel( name='Photo', fields=[<|fim▁hole|> ('uuid', models.CharField(max_length=32, blank=True)), ('filename', models.CharField(help_text='A descriptive file name', max_length=128)), ('alt', models.CharField(help_text='alt attribute text for accessibility', max_length=255, blank=True)), ('caption', models.TextField(help_text='Recommended text to be used as photo caption.', blank=True)), ('notes', models.TextField(help_text='Any other notable information about this photo.', blank=True)), ('credits', models.TextField(help_text='Credits and copyright/left.', blank=True)), ('source', models.CharField(choices=[('Flickr', 'Flickr'), ('iStockphoto', 'iStockphoto')], max_length=32, blank=True)), ('source_url', models.URLField(help_text='Important when citation requires link to source.', blank=True)), ('image', models.ImageField(upload_to=photolib.models.upload_path)), ('uploaded', models.DateTimeField(default=datetime.datetime.utcnow)), ('last_updated', models.DateTimeField(default=datetime.datetime.utcnow, blank=True)), ('photo_tags', taggit.managers.TaggableManager(verbose_name='Tags', to='taggit.Tag', help_text='A comma-separated list of tags.', through='taggit.TaggedItem', blank=True)), ], options={ 'ordering': ('-uploaded',), }, bases=(models.Model,), ), ]<|fim▁end|>
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Custom test runner If args or options, we run the testsuite as quickly as possible. If args but no options, we default to using the spec plugin and aborting on first error/failure. <|fim▁hole|> Run all tests (as fast as possible) $ ./runtests.py Run all unit tests (using spec output) $ ./runtests.py tests/unit Run all checkout unit tests (using spec output) $ ./runtests.py tests/unit/checkout Run all tests relating to shipping $ ./runtests.py --attr=shipping Re-run failing tests (needs to be run twice to first build the index) $ ./runtests.py ... --failed Drop into pdb when a test fails $ ./runtests.py ... --pdb-failures """ import sys import logging import warnings from tests.config import configure from django.utils.six.moves import map # No logging logging.disable(logging.CRITICAL) def run_tests(verbosity, *test_args): from django_nose import NoseTestSuiteRunner test_runner = NoseTestSuiteRunner(verbosity=verbosity) if not test_args: test_args = ['tests'] num_failures = test_runner.run_tests(test_args) if num_failures: sys.exit(num_failures) if __name__ == '__main__': args = sys.argv[1:] verbosity = 1 if not args: # If run with no args, try and run the testsuite as fast as possible. # That means across all cores and with no high-falutin' plugins. import multiprocessing try: num_cores = multiprocessing.cpu_count() except NotImplementedError: num_cores = 4 # Guess args = ['--nocapture', '--stop', '--processes=%s' % num_cores] else: # Some args/options specified. Check to see if any nose options have # been specified. If they have, then don't set any has_options = any(map(lambda x: x.startswith('--'), args)) if not has_options: # Default options: # --stop Abort on first error/failure # --nocapture Don't capture STDOUT args.extend(['--nocapture', '--stop']) else: # Remove options as nose will pick these up from sys.argv for arg in args: if arg.startswith('--verbosity'): verbosity = int(arg[-1]) args = [arg for arg in args if not arg.startswith('-')] configure() with warnings.catch_warnings(): # The warnings module in default configuration will never cause tests # to fail, as it never raises an exception. We alter that behaviour by # turning DeprecationWarnings into exceptions, but exclude warnings # triggered by third-party libs. Note: The context manager is not thread # safe. Behaviour with multiple threads is undefined. warnings.filterwarnings('error', category=DeprecationWarning) warnings.filterwarnings('error', category=RuntimeWarning) libs = r'(sorl\.thumbnail.*|bs4.*|webtest.*)' warnings.filterwarnings( 'ignore', r'.*', DeprecationWarning, libs) run_tests(verbosity, *args)<|fim▁end|>
If options, we ignore defaults and pass options onto Nose. Examples:
<|file_name|>vision.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from __future__ import division ''' All things computer vision. ''' import cv2 from mousetrap.i18n import _ from mousetrap.image import Image import mousetrap.plugins.interface as interface import logging LOGGER = logging.getLogger(__name__) FRAME_WIDTH = 3 FRAME_HEIGHT = 4 class Camera(object): S_CAPTURE_OPEN_ERROR = _( 'Device #%d does not support video capture interface') S_CAPTURE_READ_ERROR = _('Error while capturing. Camera disconnected?') def __init__(self, config): self._config = config self._device = \ self._new_capture_device(config['camera']['device_index']) self.set_dimensions( config['camera']['width'], config['camera']['height'], ) @classmethod def _new_capture_device(cls, device_index): capture = cv2.VideoCapture(device_index) if not capture.isOpened(): capture.release() raise IOError(cls.S_CAPTURE_OPEN_ERROR % device_index) return capture def set_dimensions(self, width, height): self._device.set(FRAME_WIDTH, width) self._device.set(FRAME_HEIGHT, height) def read_image(self): ret, image = self._device.read() if not ret: raise IOError(self.S_CAPTURE_READ_ERROR) return Image(self._config, image) class HaarLoader(object): def __init__(self, config): self._config = config self._haar_files = config['haar_files'] self._haar_cache = {} def from_name(self, name): if not name in self._haar_files: raise HaarNameError(name) haar_file = self._haar_files[name] haar = self.from_file(haar_file, name) return haar def from_file(self, file_, cache_name=None): import os if cache_name in self._haar_cache: return self._haar_cache[cache_name] current_dir = os.path.dirname(os.path.realpath(__file__)) haar_file = os.path.join(current_dir, file_)<|fim▁hole|> if not cache_name is None: if not cache_name in self._haar_cache: self._haar_cache[cache_name] = haar return haar class HaarNameError(Exception): pass class FeatureDetector(object): _INSTANCES = {} @classmethod def get_detector(cls, config, name, scale_factor=1.1, min_neighbors=3): key = (name, scale_factor, min_neighbors) if key in cls._INSTANCES: LOGGER.info("Reusing %s detector.", key) return cls._INSTANCES[key] cls._INSTANCES[key] = FeatureDetector( config, name, scale_factor, min_neighbors) return cls._INSTANCES[key] @classmethod def clear_all_detection_caches(cls): for instance in cls._INSTANCES.values(): instance.clear_cache() def __init__(self, config, name, scale_factor=1.1, min_neighbors=3): ''' name - name of feature to detect scale_factor - how much the image size is reduced at each image scale while searching. Default 1.1. min_neighbors - how many neighbors each candidate rectangle should have to retain it. Default 3. ''' LOGGER.info("Building detector: %s", (name, scale_factor, min_neighbors)) self._config = config self._name = name self._single = None self._plural = None self._image = None self._cascade = HaarLoader(config).from_name(name) self._scale_factor = scale_factor self._min_neighbors = min_neighbors self._last_attempt_successful = False self._detect_cache = {} def detect(self, image): if image in self._detect_cache: message = "Detection cache hit: %(image)d -> %(result)s" % \ {'image':id(image), 'result':self._detect_cache[image]} LOGGER.debug(message) if isinstance(self._detect_cache[image], FeatureNotFoundException): message = str(self._detect_cache[image]) raise FeatureNotFoundException(message, cause=self._detect_cache[image]) return self._detect_cache[image] try: self._image = image self._detect_plural() self._exit_if_none_detected() self._unpack_first() self._extract_image() self._calculate_center() self._detect_cache[image] = self._single return self._detect_cache[image] except FeatureNotFoundException as exception: self._detect_cache[image] = exception raise def _detect_plural(self): self._plural = self._cascade.detectMultiScale( self._image.to_cv_grayscale(), self._scale_factor, self._min_neighbors, ) def _exit_if_none_detected(self): if len(self._plural) == 0: message = _('Feature not detected: %s') % (self._name) if self._last_attempt_successful: self._last_attempt_successful = False LOGGER.info(message) raise FeatureNotFoundException(message) else: if not self._last_attempt_successful: self._last_attempt_successful = True message = _('Feature detected: %s') % (self._name) LOGGER.info(message) def _unpack_first(self): self._single = dict( zip(['x', 'y', 'width', 'height'], self._plural[0])) def _calculate_center(self): self._single["center"] = { "x": (self._single["x"] + self._single["width"]) // 2, "y": (self._single["y"] + self._single["height"]) // 2, } def _extract_image(self): single = self._single from_y = single['y'] to_y = single['y'] + single['height'] from_x = single['x'] to_x = single['x'] + single['width'] image_cv_grayscale = self._image.to_cv_grayscale() single["image"] = Image( self._config, image_cv_grayscale[from_y:to_y, from_x:to_x], is_grayscale=True, ) def clear_cache(self): self._detect_cache.clear() class FeatureDetectorClearCachePlugin(interface.Plugin): def __init__(self, config): super(FeatureDetectorClearCachePlugin, self).__init__(config) self._config = config def run(self, app): FeatureDetector.clear_all_detection_caches() class FeatureNotFoundException(Exception): def __init__(self, message, cause=None): if cause is not None: message = message + ', caused by ' + repr(cause) self.cause = cause super(FeatureNotFoundException, self).__init__(message)<|fim▁end|>
haar = cv2.CascadeClassifier(haar_file)
<|file_name|>solver.worker.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { Craft, CrafterStats, CraftingAction, CraftingActionsRegistry } from '@ffxiv-teamcraft/simulator'; import { first } from 'rxjs/operators'; @Injectable({<|fim▁hole|>}) export class SolverWorkerService { private worker: Worker; private _result$: Subject<CraftingAction[]> = new Subject<CraftingAction[]>(); public result$: Observable<CraftingAction[]> = this._result$.asObservable(); constructor() { if (typeof Worker !== 'undefined') { // Create a new const worker = new Worker('./solver.worker', { type: 'module' }); worker.onmessage = ({ data }) => { this._result$.next(CraftingActionsRegistry.deserializeRotation(data)); }; } else { // Web Workers are not supported in this environment. // You should add a fallback so that your program still executes correctly. } } public solveRotation(recipe: Craft, stats: CrafterStats, seed?: CraftingAction[]): Observable<CraftingAction[]> { this.worker.postMessage({ recipe, stats, seed }); return this.result$.pipe(first()); } public isSupported(): boolean { return this.worker !== undefined; } }<|fim▁end|>
providedIn: 'root'
<|file_name|>ConsultarSituacaoLoteRps.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from pysignfe.xml_sped import * from .Rps import IdentificacaoPrestador, IdentificacaoRps import os DIRNAME = os.path.dirname(__file__) class MensagemRetorno(XMLNFe): def __init__(self): super(MensagemRetorno, self).__init__() self.Codigo = TagCaracter(nome=u'Codigo', tamanho=[1, 4], raiz=u'/[nfse]') self.Mensagem = TagCaracter(nome=u'Mensagem', tamanho=[1, 200], raiz=u'/[nfse]') self.Correcao = TagCaracter(nome=u'Correcao', tamanho=[0, 200], raiz=u'/[nfse]') def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<MensagemRetorno>' xml += self.Codigo.xml xml += self.Mensagem.xml xml += self.Correcao.xml xml += u'</MensagemRetorno>' return xml def set_xml(self, arquivo): if self._le_xml(arquivo): self.Codigo.xml = arquivo self.Mensagem.xml = arquivo self.Correcao.xml = arquivo xml = property(get_xml, set_xml) class MensagemRetornoLote(XMLNFe): def __init__(self): super(MensagemRetornoLote, self).__init__() self.IdentificacaoRps = IdentificacaoRps() self.Codigo = TagCaracter(nome=u'Codigo', tamanho=[1, 4], raiz=u'/[nfse]') self.Mensagem = TagCaracter(nome=u'Mensagem', tamanho=[1, 200], raiz=u'/[nfse]') def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<MensagemRetornoLote>' xml += self.IdentificacaoRps.xml xml += self.Codigo.xml xml += self.Mensagem.xml xml += u'</MensagemRetornoLote>' return xml def set_xml(self, arquivo): if self._le_xml(arquivo): self.IdentificacaoRps.xml = arquivo self.Codigo.xml = arquivo self.Mensagem.xml = arquivo xml = property(get_xml, set_xml) class ListaMensagemRetornoLote(XMLNFe): def __init__(self): super(ListaMensagemRetornoLote, self).__init__() self.MensagemRetornoLote = [] def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<ListaMensagemRetornoLote>' for m in self.MensagemRetornoLote: xml += tira_abertura(m.xml) xml += u'</ListaMensagemRetornoLote>' return xml def set_xml(self, arquivo): if self._le_xml(arquivo): self.MensagemRetornoLote = self.le_grupo('[nfse]//ListaMensagemRetornoLote/MensagemRetornoLote', MensagemRetornoLote) xml = property(get_xml, set_xml) class ListaMensagemRetorno(XMLNFe): def __init__(self): super(ListaMensagemRetorno, self).__init__() self.MensagemRetorno = [] def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<ListaMensagemRetorno>' for m in self.MensagemRetorno: xml += tira_abertura(m.xml)<|fim▁hole|> def set_xml(self, arquivo): if self._le_xml(arquivo): self.MensagemRetorno = self.le_grupo('[nfse]//ListaMensagemRetorno/MensagemRetorno', MensagemRetorno) xml = property(get_xml, set_xml) class ConsultarSituacaoLoteRpsEnvio(XMLNFe): def __init__(self): super(ConsultarSituacaoLoteRpsEnvio, self).__init__() self.versao = TagDecimal(nome=u'ConsultarSituacaoLoteRpsEnvio', propriedade=u'versao', namespace=NAMESPACE_NFSE, valor=u'1.00', raiz=u'/') self.Prestador = IdentificacaoPrestador() self.Protocolo = TagCaracter(nome=u'Protocolo', tamanho=[ 1, 50], raiz=u'/') self.caminho_esquema = os.path.join(DIRNAME, u'schema/') self.arquivo_esquema = u'nfse.xsd' def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<ConsultarSituacaoLoteRpsEnvio xmlns="'+ NAMESPACE_NFSE + '">' xml += self.Prestador.xml.replace(ABERTURA, u'') xml += self.Protocolo.xml xml += u'</ConsultarSituacaoLoteRpsEnvio>' return xml def set_xml(self, arquivo): if self._le_xml(arquivo): self.Prestador.xml = arquivo self.Protocolo.xml = arquivo xml = property(get_xml, set_xml) class ConsultarSituacaoLoteRpsResposta(XMLNFe): def __init__(self): super(ConsultarSituacaoLoteRpsResposta, self).__init__() self.NumeroLote = TagInteiro(nome=u'NumeroLote', tamanho=[1, 15], raiz=u'/') self.Situacao = TagInteiro(nome=u'Situacao', tamanho=[1, 1], raiz=u'/') self.ListaMensagemRetorno = ListaMensagemRetorno() self.caminho_esquema = os.path.join(DIRNAME, u'schema/') self.arquivo_esquema = u'nfse.xsd' def get_xml(self): xml = XMLNFe.get_xml(self) xml += ABERTURA xml += u'<ConsultarSituacaoLoteRpsResposta xmlns="'+ NAMESPACE_NFSE + '">' xml += self.NumeroLote.xml xml += self.Situacao.xml xml += self.ListaMensagemRetorno.xml.replace(ABERTURA, u'') xml += u'</ConsultarSituacaoLoteRpsResposta>' return xml def set_xml(self, arquivo): if self._le_xml(arquivo): self.NumeroLote.xml = arquivo self.Situacao.xml = arquivo self.ListaMensagemRetorno.xml = arquivo xml = property(get_xml, set_xml)<|fim▁end|>
xml += u'</ListaMensagemRetorno>' return xml
<|file_name|>_minexponent.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(<|fim▁hole|> self, plotly_name="minexponent", parent_name="choropleth.colorbar", **kwargs ): super(MinexponentValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs )<|fim▁end|>
<|file_name|>clip_to_rect_test_case.py<|end_file_name|><|fim▁begin|>""" Needed Tests clip_to_rect() tests -------------------- DONE *. clip_to_rect is inclusive on lower end and exclusive on upper end. DONE *. clip_to_rect behaves intelligently under scaled ctm. DONE *. clip_to_rect intersects input rect with the existing clipping rect. DONE *. current rectangular clipping path is saved/restored to the stack when save_state/restore_state are called. DONE *. clip_to_rect clears current path. DONE *. clip_to_rect raises NotImplementedError under a rotated ctm. clip_to_rects() tests --------------------- DONE *. Test that clip_to_rects raises not implemented, or whatever. """ import unittest from numpy import array, transpose import nose from kiva.agg import GraphicsContextArray import kiva from test_utils import Utils class ClipToRectTestCase(unittest.TestCase, Utils): #------------------------------------------------------------------------ # Simple Clipping to a single rectangle. #------------------------------------------------------------------------ def clip_to_rect_helper(self, desired, scale, clip_rects): """ desired -- 2D array with a single channels expected byte pattern. scale -- used in scale_ctm() to change the ctm. clip_args -- passed in as *clip_args to clip_to_rect. """ shp = tuple(transpose(desired.shape)) gc = GraphicsContextArray(shp, pix_format="rgb24") gc.scale_ctm(scale, scale) # clear background to white values (255, 255, 255) gc.clear((1.0, 1.0, 1.0)) if isinstance(clip_rects, tuple): gc.clip_to_rect(*clip_rects) else: for rect in clip_rects: gc.clip_to_rect(*rect) gc.rect(0, 0, 4, 4) # These settings allow the fastest path. gc.set_fill_color((0.0, 0.0, 0.0)) # black gc.fill_path() # test a single color channel actual = gc.bmp_array[:,:,0] self.assertRavelEqual(desired, actual) def test_clip_to_rect_simple(self): desired = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) clip_rect = (1, 1, 2, 2) self.clip_to_rect_helper(desired, 1, clip_rect) def test_clip_to_rect_simple2(self): desired = array([[255, 255, 255, 255], [255, 255, 255, 255], [255, 0, 255, 255], [255, 255, 255, 255]]) clip_rect = (1, 1, 1, 1) self.clip_to_rect_helper(desired, 1, clip_rect) def test_clip_to_rect_negative(self): desired = array([[255, 255, 255, 255], [ 0, 0, 0, 255], [ 0, 0, 0, 255], [ 0, 0, 0, 255]]) clip_rect = (-1, -1, 4, 4) self.clip_to_rect_helper(desired, 1, clip_rect) def test_clip_to_rect_simple3(self): desired = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) clip_rect = (1, 1, 2.49, 2.49) self.clip_to_rect_helper(desired, 1, clip_rect) def test_clip_to_rect_simple4(self): desired = array([[255, 0, 0, 0], [255, 0, 0, 0], [255, 0, 0, 0], [255, 255, 255, 255]]) clip_rect = (1, 1, 2.5, 2.5) self.clip_to_rect_helper(desired, 1, clip_rect) def test_clip_to_rect_simple5(self): # This tests clipping with a larger rectangle desired = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) clip_rects = [(1, 1, 2, 2), (0, 0, 4, 4)] self.clip_to_rect_helper(desired, 1, clip_rects)<|fim▁hole|> desired = array([[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]]) clip_rects = [(1,1,4,4), (3,3,1,1), (1,1,1,1)] self.clip_to_rect_helper(desired, 1, clip_rects) def test_clip_to_rect_scaled(self): desired = array([[255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 0, 0, 0, 0, 255, 255], [255, 255, 0, 0, 0, 0, 255, 255], [255, 255, 0, 0, 0, 0, 255, 255], [255, 255, 0, 0, 0, 0, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255]]) clip_rect = (1, 1, 2, 2) self.clip_to_rect_helper(desired, 2.0, clip_rect) def test_clip_to_rect_scaled2(self): desired = array([[255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 0, 0, 0, 0, 0, 255], [255, 255, 0, 0, 0, 0, 0, 255], [255, 255, 0, 0, 0, 0, 0, 255], [255, 255, 0, 0, 0, 0, 0, 255], [255, 255, 0, 0, 0, 0, 0, 255], [255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255]]) clip_rect = (1, 1, 2.25, 2.25) self.clip_to_rect_helper(desired, 2.0, clip_rect) def test_save_restore_clip_state(self): desired1 = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) desired2 = array([[255, 0, 0, 0], [255, 0, 0, 0], [255, 0, 0, 0], [255, 255, 255, 255]]) gc = GraphicsContextArray((4,4), pix_format="rgb24") gc.clear((1.0, 1.0, 1.0)) gc.set_fill_color((0.0, 0.0, 0.0)) gc.clip_to_rect(1, 1, 3, 3) gc.save_state() gc.clip_to_rect(1, 1, 2, 2) gc.rect(0, 0, 4, 4) gc.fill_path() actual1 = gc.bmp_array[:,:,0] self.assertRavelEqual(desired1, actual1) gc.restore_state() gc.rect(0, 0, 4, 4) gc.fill_path() actual2 = gc.bmp_array[:,:,0] self.assertRavelEqual(desired2, actual2) def test_clip_to_rect_rotated(self): # FIXME: test skipped # This test raises an exception currently because the # underlying library doesn't handle clipping to a rotated # rectangle. For now, we catch the the case with an # exception, so that people can't screw up. In the future, # we should actually support this functionality. raise nose.SkipTest gc = GraphicsContextArray((1,1), pix_format="rgb24") gc.rotate_ctm(1.0) self.failUnlessRaises(NotImplementedError, gc.clip_to_rect, 0, 0, 1, 1) #------------------------------------------------------------------------ # Successive Clipping of multiple rectangles. #------------------------------------------------------------------------ def successive_clip_helper(self, desired, scale, clip_rect1, clip_rect2): """ desired -- 2D array with a single channels expected byte pattern. scale -- used in scale_ctm() to change the ctm. clip_rect1 -- 1st clipping path. clip_rect2 -- 2nd clipping path. """ shp = tuple(transpose(desired.shape)) gc = GraphicsContextArray(shp, pix_format="rgb24") gc.scale_ctm(scale, scale) # clear background to white values (255, 255, 255) gc.clear((1.0, 1.0, 1.0)) gc.clip_to_rect(*clip_rect1) gc.clip_to_rect(*clip_rect2) gc.rect(0, 0, 4, 4) # These settings allow the fastest path. gc. set_fill_color((0.0, 0.0, 0.0)) # black gc.fill_path() # test a single color channel actual = gc.bmp_array[:,:,0] self.assertRavelEqual(desired, actual) def test_clip_successive_rects(self): desired = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) clip_rect1 = (1, 1, 20, 20) clip_rect2 = (0, 0, 3, 3) self.successive_clip_helper(desired, 1.0, clip_rect1, clip_rect2) def test_clip_successive_rects2(self): desired = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) clip_rect1 = (1, 1, 20, 20) clip_rect2 = (-1, -1, 4, 4) self.successive_clip_helper(desired, 1.0, clip_rect1, clip_rect2) #------------------------------------------------------------------------ # Save/Restore clipping path. #------------------------------------------------------------------------ def test_save_restore_clip_path(self): desired = array([[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) # this is the clipping path we hope to see. clip_rect1 = (1, 1, 2, 2) # this will be a second path that will push/pop that should # never be seen. clip_rect2 = (1, 1, 1, 1) shp = tuple(transpose(desired.shape)) gc = GraphicsContextArray(shp, pix_format="rgb24") # clear background to white values (255, 255, 255) gc.clear((1.0, 1.0, 1.0)) gc.clip_to_rect(*clip_rect1) # push and then pop a path that shouldn't affect the drawing gc.save_state() gc.clip_to_rect(*clip_rect2) gc.restore_state() gc.rect(0, 0, 4, 4) # These settings allow the fastest path. gc. set_fill_color((0.0, 0.0, 0.0)) # black gc.fill_path() # test a single color channel actual = gc.bmp_array[:,:,0] self.assertRavelEqual(desired, actual) def test_reset_path(self): """ clip_to_rect() should clear the current path. This is to maintain compatibility with the version of kiva that sits on top of Apple's Quartz engine. """ desired = array([[255, 255, 0, 0], [255, 255, 0, 0], [255, 255, 0, 0], [255, 255, 0, 0]]) shp = tuple(transpose(desired.shape)) gc = GraphicsContextArray(shp, pix_format="rgb24") # clear background to white values (255, 255, 255) gc.clear((1.0, 1.0, 1.0)) gc.rect(0, 0, 2, 4) gc.clip_to_rect(0, 0, 4, 4) gc.rect(2, 0, 2, 4) # These settings allow the fastest path. gc. set_fill_color((0.0, 0.0, 0.0)) # black gc.fill_path() # test a single color channel actual = gc.bmp_array[:,:,0] self.assertRavelEqual(desired, actual) class ClipToRectsTestCase(unittest.TestCase): def test_not_implemented(self): """ fix me: Currently not implemented, so we just ensure that any call to it throws an exception. """ gc = GraphicsContextArray((1,1), pix_format="rgb24") gc.rotate_ctm(1.0) #self.failUnlessRaises(NotImplementedError, gc.clip_to_rects, [[0, 0, 1, 1]]) if __name__ == "__main__": unittest.main()<|fim▁end|>
def test_empty_clip_region(self): # This tests when the clipping region is clipped down to nothing.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### import datetime import hashlib from girder import events from girder.api import access from girder.api.describe import Description, autoDescribeRoute from girder.api.rest import boundHandler, RestException from girder.api.v1.collection import Collection from girder.constants import AccessType, TokenScope from girder.models.model_base import ModelImporter @access.user(scope=TokenScope.DATA_READ) @boundHandler @autoDescribeRoute( Description('Accept a collection\'s Terms of Use for the current user.') .modelParam('id', model='collection', level=AccessType.READ)<|fim▁hole|> if not collection.get('terms'): raise RestException('This collection currently has no terms.') # termsHash should be encoded to a bytes object, but storing bytes into MongoDB behaves # differently in Python 2 vs 3. Additionally, serializing a bytes to JSON behaves differently # in Python 2 vs 3. So, just keep it as a unicode (or ordinary Python 2 str). realTermsHash = hashlib.sha256(collection['terms'].encode('utf-8')).hexdigest() if termsHash != realTermsHash: # This "proves" that the client has at least accessed the terms raise RestException( 'The submitted "termsHash" does not correspond to the collection\'s current terms.') ModelImporter.model('user').update( {'_id': self.getCurrentUser()['_id']}, {'$set': { 'terms.collection.%s' % collection['_id']: { 'hash': termsHash, 'accepted': datetime.datetime.now() } }} ) def afterPostPutCollection(event): # This will only trigger if no exceptions (for access, invalid id, etc.) are thrown extraParams = event.info['params'] if 'terms' in extraParams: collectionResponse = event.info['returnVal'] collectionId = collectionResponse['_id'] terms = extraParams['terms'] ModelImporter.model('collection').update( {'_id': collectionId}, {'$set': {'terms': terms}} ) collectionResponse['terms'] = terms event.addResponse(collectionResponse) def load(info): # Augment the collection creation and edit routes to accept a terms field events.bind('rest.post.collection.after', 'terms', afterPostPutCollection) events.bind('rest.put.collection/:id.after', 'terms', afterPostPutCollection) for handler in [ Collection.createCollection, Collection.updateCollection ]: handler.description.param('terms', 'The Terms of Use for the collection.', required=False) # Expose the terms field on all collections ModelImporter.model('collection').exposeFields(level=AccessType.READ, fields={'terms'}) # Add endpoint for registered users to accept terms info['apiRoot'].collection.route('POST', (':id', 'acceptTerms'), acceptCollectionTerms) # Expose the terms field on all users ModelImporter.model('user').exposeFields(level=AccessType.ADMIN, fields={'terms'})<|fim▁end|>
.param('termsHash', 'The SHA-256 hash of this collection\'s terms, encoded in hexadecimal.') ) def acceptCollectionTerms(self, collection, termsHash):
<|file_name|>copydata_test.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*- /* * Copyright (C) 2014-2016 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package backend_test import ( "fmt" "io/ioutil" "os" "path/filepath" "regexp" "strconv" . "gopkg.in/check.v1" "github.com/snapcore/snapd/dirs" "github.com/snapcore/snapd/osutil" "github.com/snapcore/snapd/overlord/snapstate/backend" "github.com/snapcore/snapd/progress" "github.com/snapcore/snapd/snap" "github.com/snapcore/snapd/snap/snaptest" "github.com/snapcore/snapd/testutil" ) type copydataSuite struct { be backend.Backend tempdir string } var _ = Suite(&copydataSuite{}) func (s *copydataSuite) SetUpTest(c *C) { s.tempdir = c.MkDir() dirs.SetRootDir(s.tempdir) } func (s *copydataSuite) TearDownTest(c *C) { dirs.SetRootDir("") } const ( helloYaml1 = `name: hello version: 1.0 ` helloYaml2 = `name: hello version: 2.0 ` ) func (s *copydataSuite) TestCopyData(c *C) { homedir := filepath.Join(s.tempdir, "home", "user1", "snap") homeData := filepath.Join(homedir, "hello/10") err := os.MkdirAll(homeData, 0755) c.Assert(err, IsNil) homeCommonData := filepath.Join(homedir, "hello/common") err = os.MkdirAll(homeCommonData, 0755) c.Assert(err, IsNil) canaryData := []byte("ni ni ni") v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) // just creates data dirs in this case err = s.be.CopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) canaryDataFile := filepath.Join(v1.DataDir(), "canary.txt") err = ioutil.WriteFile(canaryDataFile, canaryData, 0644) c.Assert(err, IsNil) canaryDataFile = filepath.Join(v1.CommonDataDir(), "canary.common") err = ioutil.WriteFile(canaryDataFile, canaryData, 0644) c.Assert(err, IsNil) err = ioutil.WriteFile(filepath.Join(homeData, "canary.home"), canaryData, 0644) c.Assert(err, IsNil) err = ioutil.WriteFile(filepath.Join(homeCommonData, "canary.common_home"), canaryData, 0644) c.Assert(err, IsNil) v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) err = s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) newCanaryDataFile := filepath.Join(dirs.SnapDataDir, "hello/20", "canary.txt") c.Assert(newCanaryDataFile, testutil.FileEquals, canaryData) // ensure common data file is still there (even though it didn't get copied) newCanaryDataFile = filepath.Join(dirs.SnapDataDir, "hello", "common", "canary.common") c.Assert(newCanaryDataFile, testutil.FileEquals, canaryData) newCanaryDataFile = filepath.Join(homedir, "hello/20", "canary.home") c.Assert(newCanaryDataFile, testutil.FileEquals, canaryData) // ensure home common data file is still there (even though it didn't get copied) newCanaryDataFile = filepath.Join(homedir, "hello", "common", "canary.common_home") c.Assert(newCanaryDataFile, testutil.FileEquals, canaryData) } func (s *copydataSuite) TestCopyDataBails(c *C) { oldSnapDataHomeGlob := dirs.SnapDataHomeGlob defer func() { dirs.SnapDataHomeGlob = oldSnapDataHomeGlob }() v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) c.Assert(s.be.CopySnapData(v1, nil, progress.Null), IsNil) c.Assert(os.Chmod(v1.DataDir(), 0), IsNil) v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) err := s.be.CopySnapData(v2, v1, progress.Null) c.Check(err, ErrorMatches, "cannot copy .*") } // ensure that even with no home dir there is no error and the // system data gets copied func (s *copydataSuite) TestCopyDataNoUserHomes(c *C) { // this home dir path does not exist oldSnapDataHomeGlob := dirs.SnapDataHomeGlob defer func() { dirs.SnapDataHomeGlob = oldSnapDataHomeGlob }() dirs.SnapDataHomeGlob = filepath.Join(s.tempdir, "no-such-home", "*", "snap") v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) err := s.be.CopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) canaryDataFile := filepath.Join(v1.DataDir(), "canary.txt") err = ioutil.WriteFile(canaryDataFile, []byte(""), 0644) c.Assert(err, IsNil) canaryDataFile = filepath.Join(v1.CommonDataDir(), "canary.common") err = ioutil.WriteFile(canaryDataFile, []byte(""), 0644) c.Assert(err, IsNil) v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) err = s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(filepath.Join(v2.DataDir(), "canary.txt")) c.Assert(err, IsNil) _, err = os.Stat(filepath.Join(v2.CommonDataDir(), "canary.common")) c.Assert(err, IsNil) // sanity atm c.Check(v1.DataDir(), Not(Equals), v2.DataDir()) c.Check(v1.CommonDataDir(), Equals, v2.CommonDataDir()) } func (s *copydataSuite) populateData(c *C, revision snap.Revision) { datadir := filepath.Join(dirs.SnapDataDir, "hello", revision.String()) subdir := filepath.Join(datadir, "random-subdir") err := os.MkdirAll(subdir, 0755) c.Assert(err, IsNil) err = ioutil.WriteFile(filepath.Join(subdir, "canary"), []byte(fmt.Sprintln(revision)), 0644) c.Assert(err, IsNil) } func (s *copydataSuite) populatedData(d string) string { bs, err := ioutil.ReadFile(filepath.Join(dirs.SnapDataDir, "hello", d, "random-subdir", "canary")) if err == nil { return string(bs) } if os.IsNotExist(err) { return "" } panic(err) } func (s copydataSuite) populateHomeData(c *C, user string, revision snap.Revision) (homedir string) { homedir = filepath.Join(s.tempdir, "home", user, "snap") homeData := filepath.Join(homedir, "hello", revision.String()) err := os.MkdirAll(homeData, 0755) c.Assert(err, IsNil) err = ioutil.WriteFile(filepath.Join(homeData, "canary.home"), []byte(fmt.Sprintln(revision)), 0644) c.Assert(err, IsNil) return homedir } func (s *copydataSuite) TestCopyDataDoUndo(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) homedir := s.populateHomeData(c, "user1", snap.R(10)) // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // copy data err := s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) v2data := filepath.Join(dirs.SnapDataDir, "hello/20") l, err := filepath.Glob(filepath.Join(v2data, "*")) c.Assert(err, IsNil) c.Assert(l, HasLen, 1) v2HomeData := filepath.Join(homedir, "hello/20") l, err = filepath.Glob(filepath.Join(v2HomeData, "*")) c.Assert(err, IsNil) c.Assert(l, HasLen, 1) err = s.be.UndoCopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) // now removed _, err = os.Stat(v2data) c.Assert(os.IsNotExist(err), Equals, true) _, err = os.Stat(v2HomeData) c.Assert(os.IsNotExist(err), Equals, true) } func (s *copydataSuite) TestCopyDataDoUndoNoUserHomes(c *C) { // this home dir path does not exist oldSnapDataHomeGlob := dirs.SnapDataHomeGlob defer func() { dirs.SnapDataHomeGlob = oldSnapDataHomeGlob }() dirs.SnapDataHomeGlob = filepath.Join(s.tempdir, "no-such-home", "*", "snap") v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // copy data err := s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) v2data := filepath.Join(dirs.SnapDataDir, "hello/20") l, err := filepath.Glob(filepath.Join(v2data, "*")) c.Assert(err, IsNil) c.Assert(l, HasLen, 1) err = s.be.UndoCopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) // now removed _, err = os.Stat(v2data) c.Assert(os.IsNotExist(err), Equals, true) } func (s *copydataSuite) TestCopyDataDoUndoFirstInstall(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) // first install err := s.be.CopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(v1.DataDir()) c.Assert(err, IsNil) _, err = os.Stat(v1.CommonDataDir()) c.Assert(err, IsNil) err = s.be.UndoCopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(v1.DataDir()) c.Check(os.IsNotExist(err), Equals, true) _, err = os.Stat(v1.CommonDataDir()) c.Check(os.IsNotExist(err), Equals, true) } func (s *copydataSuite) TestCopyDataDoABA(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) c.Check(s.populatedData("10"), Equals, "10\n") // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // and write our own data to it s.populateData(c, snap.R(20)) c.Check(s.populatedData("20"), Equals, "20\n") // and now we pretend to refresh back to v1 (r10) c.Check(s.be.CopySnapData(v1, v2, progress.Null), IsNil) // so 10 now has 20's data c.Check(s.populatedData("10"), Equals, "20\n") // but we still have the trash c.Check(s.populatedData("10.old"), Equals, "10\n") // but cleanup cleans it up, huzzah s.be.ClearTrashedData(v1) c.Check(s.populatedData("10.old"), Equals, "") } func (s *copydataSuite) TestCopyDataDoUndoABA(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) c.Check(s.populatedData("10"), Equals, "10\n") // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // and write our own data to it s.populateData(c, snap.R(20)) c.Check(s.populatedData("20"), Equals, "20\n") // and now we pretend to refresh back to v1 (r10) c.Check(s.be.CopySnapData(v1, v2, progress.Null), IsNil) // so v1 (r10) now has v2 (r20)'s data and we have trash c.Check(s.populatedData("10"), Equals, "20\n") c.Check(s.populatedData("10.old"), Equals, "10\n") // but oh no! we have to undo it! c.Check(s.be.UndoCopySnapData(v1, v2, progress.Null), IsNil) // so now v1 (r10) has v1 (r10)'s data and v2 (r20) has v2 (r20)'s data and we have no trash c.Check(s.populatedData("10"), Equals, "10\n") c.Check(s.populatedData("20"), Equals, "20\n") c.Check(s.populatedData("10.old"), Equals, "") } func (s *copydataSuite) TestCopyDataDoIdempotent(c *C) { // make sure that a retry wouldn't stumble on partial work v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) homedir := s.populateHomeData(c, "user1", snap.R(10)) // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // copy data err := s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) err = s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) v2data := filepath.Join(dirs.SnapDataDir, "hello/20") l, err := filepath.Glob(filepath.Join(v2data, "*")) c.Assert(err, IsNil) c.Assert(l, HasLen, 1) v2HomeData := filepath.Join(homedir, "hello/20") l, err = filepath.Glob(filepath.Join(v2HomeData, "*")) c.Assert(err, IsNil) c.Assert(l, HasLen, 1) } func (s *copydataSuite) TestCopyDataUndoIdempotent(c *C) { // make sure that a retry wouldn't stumble on partial work v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) homedir := s.populateHomeData(c, "user1", snap.R(10)) // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // copy data err := s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) v2data := filepath.Join(dirs.SnapDataDir, "hello/20") err = s.be.UndoCopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) err = s.be.UndoCopySnapData(v2, v1, progress.Null) c.Assert(err, IsNil) // now removed _, err = os.Stat(v2data) c.Assert(os.IsNotExist(err), Equals, true) v2HomeData := filepath.Join(homedir, "hello/20") _, err = os.Stat(v2HomeData) c.Assert(os.IsNotExist(err), Equals, true) } func (s *copydataSuite) TestCopyDataDoFirstInstallIdempotent(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) // first install err := s.be.CopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) err = s.be.CopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(v1.DataDir()) c.Assert(err, IsNil) _, err = os.Stat(v1.CommonDataDir()) c.Assert(err, IsNil) err = s.be.UndoCopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(v1.DataDir()) c.Check(os.IsNotExist(err), Equals, true) _, err = os.Stat(v1.CommonDataDir()) c.Check(os.IsNotExist(err), Equals, true) } func (s *copydataSuite) TestCopyDataUndoFirstInstallIdempotent(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) // first install err := s.be.CopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(v1.DataDir()) c.Assert(err, IsNil) _, err = os.Stat(v1.CommonDataDir()) c.Assert(err, IsNil) err = s.be.UndoCopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) err = s.be.UndoCopySnapData(v1, nil, progress.Null) c.Assert(err, IsNil) _, err = os.Stat(v1.DataDir()) c.Check(os.IsNotExist(err), Equals, true) _, err = os.Stat(v1.CommonDataDir()) c.Check(os.IsNotExist(err), Equals, true) } func (s *copydataSuite) TestCopyDataCopyFailure(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) defer testutil.MockCommand(c, "cp", "echo cp: boom; exit 3").Restore()<|fim▁hole|> return regexp.QuoteMeta(strconv.Quote(s)) } // copy data will fail err := s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, ErrorMatches, fmt.Sprintf(`cannot copy %s to %s: .*: "cp: boom" \(3\)`, q(v1.DataDir()), q(v2.DataDir()))) } func (s *copydataSuite) TestCopyDataPartialFailure(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) s.populateData(c, snap.R(10)) homedir1 := s.populateHomeData(c, "user1", snap.R(10)) homedir2 := s.populateHomeData(c, "user2", snap.R(10)) // pretend we install a new version v2 := snaptest.MockSnap(c, helloYaml2, &snap.SideInfo{Revision: snap.R(20)}) // sanity check: the 20 dirs don't exist yet (but 10 do) for _, dir := range []string{dirs.SnapDataDir, homedir1, homedir2} { c.Assert(osutil.FileExists(filepath.Join(dir, "hello", "20")), Equals, false, Commentf(dir)) c.Assert(osutil.FileExists(filepath.Join(dir, "hello", "10")), Equals, true, Commentf(dir)) } c.Assert(os.Chmod(filepath.Join(homedir2, "hello", "10", "canary.home"), 0), IsNil) // try to copy data err := s.be.CopySnapData(v2, v1, progress.Null) c.Assert(err, NotNil) // the copy data failed, so check it cleaned up after itself (but not too much!) for _, dir := range []string{dirs.SnapDataDir, homedir1, homedir2} { c.Check(osutil.FileExists(filepath.Join(dir, "hello", "20")), Equals, false, Commentf(dir)) c.Check(osutil.FileExists(filepath.Join(dir, "hello", "10")), Equals, true, Commentf(dir)) } } func (s *copydataSuite) TestCopyDataSameRevision(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) homedir1 := s.populateHomeData(c, "user1", snap.R(10)) homedir2 := s.populateHomeData(c, "user2", snap.R(10)) c.Assert(os.MkdirAll(v1.DataDir(), 0755), IsNil) c.Assert(os.MkdirAll(v1.CommonDataDir(), 0755), IsNil) c.Assert(ioutil.WriteFile(filepath.Join(v1.DataDir(), "canary.txt"), nil, 0644), IsNil) c.Assert(ioutil.WriteFile(filepath.Join(v1.CommonDataDir(), "canary.common"), nil, 0644), IsNil) // the data is there for _, fn := range []string{ filepath.Join(v1.DataDir(), "canary.txt"), filepath.Join(v1.CommonDataDir(), "canary.common"), filepath.Join(homedir1, "hello", "10", "canary.home"), filepath.Join(homedir2, "hello", "10", "canary.home"), } { c.Assert(osutil.FileExists(fn), Equals, true, Commentf(fn)) } // copy data works err := s.be.CopySnapData(v1, v1, progress.Null) c.Assert(err, IsNil) // the data is still there :-) for _, fn := range []string{ filepath.Join(v1.DataDir(), "canary.txt"), filepath.Join(v1.CommonDataDir(), "canary.common"), filepath.Join(homedir1, "hello", "10", "canary.home"), filepath.Join(homedir2, "hello", "10", "canary.home"), } { c.Check(osutil.FileExists(fn), Equals, true, Commentf(fn)) } } func (s *copydataSuite) TestUndoCopyDataSameRevision(c *C) { v1 := snaptest.MockSnap(c, helloYaml1, &snap.SideInfo{Revision: snap.R(10)}) homedir1 := s.populateHomeData(c, "user1", snap.R(10)) homedir2 := s.populateHomeData(c, "user2", snap.R(10)) c.Assert(os.MkdirAll(v1.DataDir(), 0755), IsNil) c.Assert(os.MkdirAll(v1.CommonDataDir(), 0755), IsNil) c.Assert(ioutil.WriteFile(filepath.Join(v1.DataDir(), "canary.txt"), nil, 0644), IsNil) c.Assert(ioutil.WriteFile(filepath.Join(v1.CommonDataDir(), "canary.common"), nil, 0644), IsNil) // the data is there for _, fn := range []string{ filepath.Join(v1.DataDir(), "canary.txt"), filepath.Join(v1.CommonDataDir(), "canary.common"), filepath.Join(homedir1, "hello", "10", "canary.home"), filepath.Join(homedir2, "hello", "10", "canary.home"), } { c.Assert(osutil.FileExists(fn), Equals, true, Commentf(fn)) } // undo copy data works err := s.be.UndoCopySnapData(v1, v1, progress.Null) c.Assert(err, IsNil) // the data is still there :-) for _, fn := range []string{ filepath.Join(v1.DataDir(), "canary.txt"), filepath.Join(v1.CommonDataDir(), "canary.common"), filepath.Join(homedir1, "hello", "10", "canary.home"), filepath.Join(homedir2, "hello", "10", "canary.home"), } { c.Check(osutil.FileExists(fn), Equals, true, Commentf(fn)) } }<|fim▁end|>
q := func(s string) string {
<|file_name|>MemoryMappedFileFactory.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium) * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */<|fim▁hole|>import java.nio.file.Path; /** * * @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com> */ public interface MemoryMappedFileFactory { MemoryMappedFile create(Path path) throws IOException; }<|fim▁end|>
package eu.itesla_project.commons.io.mmap; import java.io.IOException;
<|file_name|>aggregates.count.assignment.1.test.py<|end_file_name|><|fim▁begin|>input = """ % Atom bug shouldn't be derived, as the body of the rule % should be false. Auxiliary atoms shouldn't be printed % out, as they are censored. d(1). d(2). d(3). bug :- 1 < #count{V : d(V)} <= 2. """ output = """ % Atom bug shouldn't be derived, as the body of the rule % should be false. Auxiliary atoms shouldn't be printed % out, as they are censored. <|fim▁hole|>d(1). d(2). d(3). bug :- 1 < #count{V : d(V)} <= 2. """<|fim▁end|>
<|file_name|>climate.py<|end_file_name|><|fim▁begin|>"""Support for Climate devices of (EMEA/EU-based) Honeywell evohome systems.""" from datetime import datetime, timedelta import logging import requests.exceptions from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( STATE_AUTO, STATE_ECO, STATE_MANUAL, SUPPORT_AWAY_MODE, SUPPORT_ON_OFF, SUPPORT_OPERATION_MODE, SUPPORT_TARGET_TEMPERATURE) from homeassistant.const import ( CONF_SCAN_INTERVAL, HTTP_SERVICE_UNAVAILABLE, HTTP_TOO_MANY_REQUESTS, PRECISION_HALVES, STATE_OFF, TEMP_CELSIUS) from homeassistant.core import callback from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, dispatcher_send) from . import ( CONF_LOCATION_IDX, DATA_EVOHOME, DISPATCHER_EVOHOME, EVO_CHILD, EVO_PARENT, GWS, TCS) _LOGGER = logging.getLogger(__name__) # The Controller's opmode/state and the zone's (inherited) state EVO_RESET = 'AutoWithReset' EVO_AUTO = 'Auto' EVO_AUTOECO = 'AutoWithEco' EVO_AWAY = 'Away' EVO_DAYOFF = 'DayOff' EVO_CUSTOM = 'Custom' EVO_HEATOFF = 'HeatingOff' # These are for Zones' opmode, and state EVO_FOLLOW = 'FollowSchedule' EVO_TEMPOVER = 'TemporaryOverride' EVO_PERMOVER = 'PermanentOverride' # For the Controller. NB: evohome treats Away mode as a mode in/of itself, # where HA considers it to 'override' the exising operating mode TCS_STATE_TO_HA = { EVO_RESET: STATE_AUTO, EVO_AUTO: STATE_AUTO, EVO_AUTOECO: STATE_ECO, EVO_AWAY: STATE_AUTO, EVO_DAYOFF: STATE_AUTO, EVO_CUSTOM: STATE_AUTO, EVO_HEATOFF: STATE_OFF } HA_STATE_TO_TCS = { STATE_AUTO: EVO_AUTO, STATE_ECO: EVO_AUTOECO, STATE_OFF: EVO_HEATOFF } TCS_OP_LIST = list(HA_STATE_TO_TCS) # the Zones' opmode; their state is usually 'inherited' from the TCS EVO_FOLLOW = 'FollowSchedule' EVO_TEMPOVER = 'TemporaryOverride' EVO_PERMOVER = 'PermanentOverride' # for the Zones... ZONE_STATE_TO_HA = { EVO_FOLLOW: STATE_AUTO, EVO_TEMPOVER: STATE_MANUAL, EVO_PERMOVER: STATE_MANUAL } HA_STATE_TO_ZONE = { STATE_AUTO: EVO_FOLLOW, STATE_MANUAL: EVO_PERMOVER } ZONE_OP_LIST = list(HA_STATE_TO_ZONE) async def async_setup_platform(hass, hass_config, async_add_entities, discovery_info=None): """Create the evohome Controller, and its Zones, if any.""" evo_data = hass.data[DATA_EVOHOME] client = evo_data['client'] loc_idx = evo_data['params'][CONF_LOCATION_IDX] # evohomeclient has exposed no means of accessing non-default location # (i.e. loc_idx > 0) other than using a protected member, such as below tcs_obj_ref = client.locations[loc_idx]._gateways[0]._control_systems[0] # noqa: E501; pylint: disable=protected-access _LOGGER.debug( "Found Controller, id=%s [%s], name=%s (location_idx=%s)", tcs_obj_ref.systemId, tcs_obj_ref.modelType, tcs_obj_ref.location.name, loc_idx) controller = EvoController(evo_data, client, tcs_obj_ref) zones = [] for zone_idx in tcs_obj_ref.zones: zone_obj_ref = tcs_obj_ref.zones[zone_idx] _LOGGER.debug( "Found Zone, id=%s [%s], name=%s", zone_obj_ref.zoneId, zone_obj_ref.zone_type, zone_obj_ref.name) zones.append(EvoZone(evo_data, client, zone_obj_ref)) entities = [controller] + zones async_add_entities(entities, update_before_add=False) class EvoClimateDevice(ClimateDevice): """Base for a Honeywell evohome Climate device.""" # pylint: disable=no-member def __init__(self, evo_data, client, obj_ref): """Initialize the evohome entity.""" self._client = client self._obj = obj_ref self._params = evo_data['params'] self._timers = evo_data['timers'] self._status = {} self._available = False # should become True after first update() async def async_added_to_hass(self): """Run when entity about to be added.""" async_dispatcher_connect(self.hass, DISPATCHER_EVOHOME, self._connect) @callback def _connect(self, packet): if packet['to'] & self._type and packet['signal'] == 'refresh': self.async_schedule_update_ha_state(force_refresh=True) def _handle_exception(self, err): try: import evohomeclient2 raise err except evohomeclient2.AuthenticationError: _LOGGER.error( "Failed to (re)authenticate with the vendor's server. " "This may be a temporary error. Message is: %s", err ) except requests.exceptions.ConnectionError: # this appears to be common with Honeywell's servers _LOGGER.warning( "Unable to connect with the vendor's server. " "Check your network and the vendor's status page." ) except requests.exceptions.HTTPError: if err.response.status_code == HTTP_SERVICE_UNAVAILABLE: _LOGGER.warning( "Vendor says their server is currently unavailable. " "This may be temporary; check the vendor's status page." ) elif err.response.status_code == HTTP_TOO_MANY_REQUESTS: _LOGGER.warning( "The vendor's API rate limit has been exceeded. " "So will cease polling, and will resume after %s seconds.", (self._params[CONF_SCAN_INTERVAL] * 3).total_seconds() ) self._timers['statusUpdated'] = datetime.now() + \ self._params[CONF_SCAN_INTERVAL] * 3 else: raise # we don't expect/handle any other HTTPErrors @property def name(self) -> str: """Return the name to use in the frontend UI.""" return self._name @property def icon(self): """Return the icon to use in the frontend UI.""" return self._icon @property def device_state_attributes(self): """Return the device state attributes of the evohome Climate device. This is state data that is not available otherwise, due to the restrictions placed upon ClimateDevice properties, etc. by HA. """ return {'status': self._status} @property def available(self) -> bool: """Return True if the device is currently available.""" return self._available @property def supported_features(self): """Get the list of supported features of the device.""" return self._supported_features @property def operation_list(self): """Return the list of available operations.""" return self._operation_list @property def temperature_unit(self): """Return the temperature unit to use in the frontend UI.""" return TEMP_CELSIUS @property def precision(self): """Return the temperature precision to use in the frontend UI.""" return PRECISION_HALVES class EvoZone(EvoClimateDevice): """Base for a Honeywell evohome Zone device.""" <|fim▁hole|> def __init__(self, evo_data, client, obj_ref): """Initialize the evohome Zone.""" super().__init__(evo_data, client, obj_ref) self._id = obj_ref.zoneId self._name = obj_ref.name self._icon = "mdi:radiator" self._type = EVO_CHILD for _zone in evo_data['config'][GWS][0][TCS][0]['zones']: if _zone['zoneId'] == self._id: self._config = _zone break self._status = {} self._operation_list = ZONE_OP_LIST self._supported_features = \ SUPPORT_OPERATION_MODE | \ SUPPORT_TARGET_TEMPERATURE | \ SUPPORT_ON_OFF @property def min_temp(self): """Return the minimum target temperature of a evohome Zone. The default is 5 (in Celsius), but it is configurable within 5-35. """ return self._config['setpointCapabilities']['minHeatSetpoint'] @property def max_temp(self): """Return the minimum target temperature of a evohome Zone. The default is 35 (in Celsius), but it is configurable within 5-35. """ return self._config['setpointCapabilities']['maxHeatSetpoint'] @property def target_temperature(self): """Return the target temperature of the evohome Zone.""" return self._status['setpointStatus']['targetHeatTemperature'] @property def current_temperature(self): """Return the current temperature of the evohome Zone.""" return (self._status['temperatureStatus']['temperature'] if self._status['temperatureStatus']['isAvailable'] else None) @property def current_operation(self): """Return the current operating mode of the evohome Zone. The evohome Zones that are in 'FollowSchedule' mode inherit their actual operating mode from the Controller. """ evo_data = self.hass.data[DATA_EVOHOME] system_mode = evo_data['status']['systemModeStatus']['mode'] setpoint_mode = self._status['setpointStatus']['setpointMode'] if setpoint_mode == EVO_FOLLOW: # then inherit state from the controller if system_mode == EVO_RESET: current_operation = TCS_STATE_TO_HA.get(EVO_AUTO) else: current_operation = TCS_STATE_TO_HA.get(system_mode) else: current_operation = ZONE_STATE_TO_HA.get(setpoint_mode) return current_operation @property def is_on(self) -> bool: """Return True if the evohome Zone is off. A Zone is considered off if its target temp is set to its minimum, and it is not following its schedule (i.e. not in 'FollowSchedule' mode). """ is_off = \ self.target_temperature == self.min_temp and \ self._status['setpointStatus']['setpointMode'] == EVO_PERMOVER return not is_off def _set_temperature(self, temperature, until=None): """Set the new target temperature of a Zone. temperature is required, until can be: - strftime('%Y-%m-%dT%H:%M:%SZ') for TemporaryOverride, or - None for PermanentOverride (i.e. indefinitely) """ try: import evohomeclient2 self._obj.set_temperature(temperature, until) except (requests.exceptions.RequestException, evohomeclient2.AuthenticationError) as err: self._handle_exception(err) def set_temperature(self, **kwargs): """Set new target temperature, indefinitely.""" self._set_temperature(kwargs['temperature'], until=None) def turn_on(self): """Turn the evohome Zone on. This is achieved by setting the Zone to its 'FollowSchedule' mode. """ self._set_operation_mode(EVO_FOLLOW) def turn_off(self): """Turn the evohome Zone off. This is achieved by setting the Zone to its minimum temperature, indefinitely (i.e. 'PermanentOverride' mode). """ self._set_temperature(self.min_temp, until=None) def set_operation_mode(self, operation_mode): """Set an operating mode for a Zone. Currently limited to 'Auto' & 'Manual'. If 'Off' is needed, it can be enabled via turn_off method. NB: evohome Zones do not have an operating mode as understood by HA. Instead they usually 'inherit' an operating mode from their controller. More correctly, these Zones are in a follow mode, 'FollowSchedule', where their setpoint temperatures are a function of their schedule, and the Controller's operating_mode, e.g. Economy mode is their scheduled setpoint less (usually) 3C. Thus, you cannot set a Zone to Away mode, but the location (i.e. the Controller) is set to Away and each Zones's setpoints are adjusted accordingly to some lower temperature. However, Zones can override these setpoints, either for a specified period of time, 'TemporaryOverride', after which they will revert back to 'FollowSchedule' mode, or indefinitely, 'PermanentOverride'. """ self._set_operation_mode(HA_STATE_TO_ZONE.get(operation_mode)) def _set_operation_mode(self, operation_mode): if operation_mode == EVO_FOLLOW: try: import evohomeclient2 self._obj.cancel_temp_override() except (requests.exceptions.RequestException, evohomeclient2.AuthenticationError) as err: self._handle_exception(err) elif operation_mode == EVO_TEMPOVER: _LOGGER.error( "_set_operation_mode(op_mode=%s): mode not yet implemented", operation_mode ) elif operation_mode == EVO_PERMOVER: self._set_temperature(self.target_temperature, until=None) else: _LOGGER.error( "_set_operation_mode(op_mode=%s): mode not valid", operation_mode ) @property def should_poll(self) -> bool: """Return False as evohome child devices should never be polled. The evohome Controller will inform its children when to update(). """ return False def update(self): """Process the evohome Zone's state data.""" evo_data = self.hass.data[DATA_EVOHOME] for _zone in evo_data['status']['zones']: if _zone['zoneId'] == self._id: self._status = _zone break self._available = True class EvoController(EvoClimateDevice): """Base for a Honeywell evohome hub/Controller device. The Controller (aka TCS, temperature control system) is the parent of all the child (CH/DHW) devices. It is also a Climate device. """ def __init__(self, evo_data, client, obj_ref): """Initialize the evohome Controller (hub).""" super().__init__(evo_data, client, obj_ref) self._id = obj_ref.systemId self._name = '_{}'.format(obj_ref.location.name) self._icon = "mdi:thermostat" self._type = EVO_PARENT self._config = evo_data['config'][GWS][0][TCS][0] self._status = evo_data['status'] self._timers['statusUpdated'] = datetime.min self._operation_list = TCS_OP_LIST self._supported_features = \ SUPPORT_OPERATION_MODE | \ SUPPORT_AWAY_MODE @property def device_state_attributes(self): """Return the device state attributes of the evohome Controller. This is state data that is not available otherwise, due to the restrictions placed upon ClimateDevice properties, etc. by HA. """ status = dict(self._status) if 'zones' in status: del status['zones'] if 'dhw' in status: del status['dhw'] return {'status': status} @property def current_operation(self): """Return the current operating mode of the evohome Controller.""" return TCS_STATE_TO_HA.get(self._status['systemModeStatus']['mode']) @property def min_temp(self): """Return the minimum target temperature of a evohome Controller. Although evohome Controllers do not have a minimum target temp, one is expected by the HA schema; the default for an evohome HR92 is used. """ return 5 @property def max_temp(self): """Return the minimum target temperature of a evohome Controller. Although evohome Controllers do not have a maximum target temp, one is expected by the HA schema; the default for an evohome HR92 is used. """ return 35 @property def target_temperature(self): """Return the average target temperature of the Heating/DHW zones. Although evohome Controllers do not have a target temp, one is expected by the HA schema. """ temps = [zone['setpointStatus']['targetHeatTemperature'] for zone in self._status['zones']] avg_temp = round(sum(temps) / len(temps), 1) if temps else None return avg_temp @property def current_temperature(self): """Return the average current temperature of the Heating/DHW zones. Although evohome Controllers do not have a target temp, one is expected by the HA schema. """ tmp_list = [x for x in self._status['zones'] if x['temperatureStatus']['isAvailable'] is True] temps = [zone['temperatureStatus']['temperature'] for zone in tmp_list] avg_temp = round(sum(temps) / len(temps), 1) if temps else None return avg_temp @property def is_on(self) -> bool: """Return True as evohome Controllers are always on. For example, evohome Controllers have a 'HeatingOff' mode, but even then the DHW would remain on. """ return True @property def is_away_mode_on(self) -> bool: """Return True if away mode is on.""" return self._status['systemModeStatus']['mode'] == EVO_AWAY def turn_away_mode_on(self): """Turn away mode on. The evohome Controller will not remember is previous operating mode. """ self._set_operation_mode(EVO_AWAY) def turn_away_mode_off(self): """Turn away mode off. The evohome Controller can not recall its previous operating mode (as intimated by the HA schema), so this method is achieved by setting the Controller's mode back to Auto. """ self._set_operation_mode(EVO_AUTO) def _set_operation_mode(self, operation_mode): try: import evohomeclient2 self._obj._set_status(operation_mode) # noqa: E501; pylint: disable=protected-access except (requests.exceptions.RequestException, evohomeclient2.AuthenticationError) as err: self._handle_exception(err) def set_operation_mode(self, operation_mode): """Set new target operation mode for the TCS. Currently limited to 'Auto', 'AutoWithEco' & 'HeatingOff'. If 'Away' mode is needed, it can be enabled via turn_away_mode_on method. """ self._set_operation_mode(HA_STATE_TO_TCS.get(operation_mode)) @property def should_poll(self) -> bool: """Return True as the evohome Controller should always be polled.""" return True def update(self): """Get the latest state data of the entire evohome Location. This includes state data for the Controller and all its child devices, such as the operating mode of the Controller and the current temp of its children (e.g. Zones, DHW controller). """ # should the latest evohome state data be retreived this cycle? timeout = datetime.now() + timedelta(seconds=55) expired = timeout > self._timers['statusUpdated'] + \ self._params[CONF_SCAN_INTERVAL] if not expired: return # Retrieve the latest state data via the client API loc_idx = self._params[CONF_LOCATION_IDX] try: import evohomeclient2 self._status.update( self._client.locations[loc_idx].status()[GWS][0][TCS][0]) except (requests.exceptions.RequestException, evohomeclient2.AuthenticationError) as err: self._handle_exception(err) else: self._timers['statusUpdated'] = datetime.now() self._available = True _LOGGER.debug("Status = %s", self._status) # inform the child devices that state data has been updated pkt = {'sender': 'controller', 'signal': 'refresh', 'to': EVO_CHILD} dispatcher_send(self.hass, DISPATCHER_EVOHOME, pkt)<|fim▁end|>
<|file_name|>const_let_promote.rs<|end_file_name|><|fim▁begin|>// run-pass use std::cell::Cell; const X: Option<Cell<i32>> = None;<|fim▁hole|>const Y: Option<Cell<i32>> = { let x = None; x }; // Ensure that binding the final value of a `const` to a variable does not affect promotion. #[allow(unused)] fn main() { let x: &'static _ = &X; let y: &'static _ = &Y; }<|fim▁end|>
<|file_name|>font.rs<|end_file_name|><|fim▁begin|>use {JamResult, JamError}; use rusttype::{self, FontCollection}; use {FontLoadError, load_file_contents}; use std::path::Path; use render::read_directory_paths; pub struct OurFont { pub font: rusttype::Font<'static>, } pub fn load_font(full_path: &Path) -> Result<OurFont, FontLoadError> { let bytes = load_file_contents(&full_path).map_err(|io| FontLoadError::CouldntLoadFile(full_path.to_path_buf(), io))?; let collection = FontCollection::from_bytes(bytes.to_vec()); let font = collection.into_font().ok_or(FontLoadError::CouldntReadAsFont(full_path.to_path_buf()))?; Ok(OurFont { font: font, }) } pub fn load_fonts_in_path(full_path: &Path) -> JamResult<Vec<OurFont>> { let mut fonts = Vec::new(); let mut paths = read_directory_paths(full_path)?; paths.sort(); println!("sorted paths for fonts -> {:?}", paths); <|fim▁hole|> let font = load_font(path.as_path()).map_err(JamError::FontLoadError)?; fonts.push(font); } } } Ok(fonts) }<|fim▁end|>
for path in paths { if let Some(extension) = path.extension().and_then(|p| p.to_str()).map(|s| s.to_lowercase()) { if extension == "ttf" {
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- """ @author: Matthias Feys ([email protected]) @date: %(date) """ import theano class Layer(object): def __init__(self,name, params=None): self.name=name self.input = input self.params = [] if params!=None: self.setParams(params=params.__dict__.get(name)) else: self.initParams() def __getstate__(self): params = {} for param in self.params: params[param.name] = param.get_value() return params def setParams(self,params):<|fim▁hole|> raise NotImplementedError class Network(): def __getstate__(self): return dict([(layer.name,layer) for layer in self.layers])<|fim▁end|>
for pname,param in params.__dict__.iteritems(): self.__dict__[pname[:-(len(self.name)+1)]] = theano.shared(param, name=pname[:-(len(self.name)+1)]+'_'+self.name, borrow=True) def initParams():
<|file_name|>test_ircmsgs.py<|end_file_name|><|fim▁begin|>### # Copyright (c) 2002-2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions, and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions, and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of the author of this software nor the name of # contributors to this software may be used to endorse or promote products # derived from this software without specific prior written consent. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ### from supybot.test import * import copy import pickle import supybot.ircmsgs as ircmsgs import supybot.ircutils as ircutils # The test framework used to provide these, but not it doesn't. We'll add # messages to as we find bugs (if indeed we find bugs). msgs = [] rawmsgs = [] class IrcMsgTestCase(SupyTestCase): def testLen(self): for msg in msgs: if msg.prefix: strmsg = str(msg) self.failIf(len(msg) != len(strmsg) and \ strmsg.replace(':', '') == strmsg) def testRepr(self): IrcMsg = ircmsgs.IrcMsg for msg in msgs: self.assertEqual(msg, eval(repr(msg))) def testStr(self): for (rawmsg, msg) in zip(rawmsgs, msgs): strmsg = str(msg).strip() self.failIf(rawmsg != strmsg and \ strmsg.replace(':', '') == strmsg) def testEq(self): for msg in msgs: self.assertEqual(msg, msg) self.failIf(msgs and msgs[0] == []) # Comparison to unhashable type. def testNe(self): for msg in msgs: self.failIf(msg != msg) ## def testImmutability(self): ## s = 'something else' ## t = ('foo', 'bar', 'baz') ## for msg in msgs: ## self.assertRaises(AttributeError, setattr, msg, 'prefix', s) ## self.assertRaises(AttributeError, setattr, msg, 'nick', s) ## self.assertRaises(AttributeError, setattr, msg, 'user', s) ## self.assertRaises(AttributeError, setattr, msg, 'host', s) ## self.assertRaises(AttributeError, setattr, msg, 'command', s) ## self.assertRaises(AttributeError, setattr, msg, 'args', t)<|fim▁hole|> def testInit(self): for msg in msgs: self.assertEqual(msg, ircmsgs.IrcMsg(prefix=msg.prefix, command=msg.command, args=msg.args)) self.assertEqual(msg, ircmsgs.IrcMsg(msg=msg)) self.assertRaises(ValueError, ircmsgs.IrcMsg, args=('foo', 'bar'), prefix='foo!bar@baz') def testPickleCopy(self): for msg in msgs: self.assertEqual(msg, pickle.loads(pickle.dumps(msg))) self.assertEqual(msg, copy.copy(msg)) def testHashNotZero(self): zeroes = 0 for msg in msgs: if hash(msg) == 0: zeroes += 1 self.failIf(zeroes > (len(msgs)/10), 'Too many zero hashes.') def testMsgKeywordHandledProperly(self): msg = ircmsgs.notice('foo', 'bar') msg2 = ircmsgs.IrcMsg(msg=msg, command='PRIVMSG') self.assertEqual(msg2.command, 'PRIVMSG') self.assertEqual(msg2.args, msg.args) def testMalformedIrcMsgRaised(self): self.assertRaises(ircmsgs.MalformedIrcMsg, ircmsgs.IrcMsg, ':foo') self.assertRaises(ircmsgs.MalformedIrcMsg, ircmsgs.IrcMsg, args=('biff',), prefix='foo!bar@baz') def testTags(self): m = ircmsgs.privmsg('foo', 'bar') self.failIf(m.repliedTo) m.tag('repliedTo') self.failUnless(m.repliedTo) m.tag('repliedTo') self.failUnless(m.repliedTo) m.tag('repliedTo', 12) self.assertEqual(m.repliedTo, 12) class FunctionsTestCase(SupyTestCase): def testIsAction(self): L = [':[email protected] PRIVMSG' ' #sourcereview :ACTION does something', ':[email protected] PRIVMSG #sourcereview ' ':ACTION beats angryman senseless with a Unix manual (#2)', ':[email protected] PRIVMSG #sourcereview ' ':ACTION beats ang senseless with a 50lb Unix manual (#2)', ':[email protected] PRIVMSG #sourcereview ' ':ACTION resizes angryman\'s terminal to 40x24 (#16)'] msgs = map(ircmsgs.IrcMsg, L) for msg in msgs: self.failUnless(ircmsgs.isAction(msg)) def testIsActionIsntStupid(self): m = ircmsgs.privmsg('#x', '\x01NOTANACTION foo\x01') self.failIf(ircmsgs.isAction(m)) m = ircmsgs.privmsg('#x', '\x01ACTION foo bar\x01') self.failUnless(ircmsgs.isAction(m)) def testIsCtcp(self): self.failUnless(ircmsgs.isCtcp(ircmsgs.privmsg('foo', '\x01VERSION\x01'))) self.failIf(ircmsgs.isCtcp(ircmsgs.privmsg('foo', '\x01'))) def testIsActionFalseWhenNoSpaces(self): msg = ircmsgs.IrcMsg('PRIVMSG #foo :\x01ACTIONfoobar\x01') self.failIf(ircmsgs.isAction(msg)) def testUnAction(self): s = 'foo bar baz' msg = ircmsgs.action('#foo', s) self.assertEqual(ircmsgs.unAction(msg), s) def testBan(self): channel = '#osu' ban = '*!*@*.edu' exception = '*!*@*ohio-state.edu' noException = ircmsgs.ban(channel, ban) self.assertEqual(ircutils.separateModes(noException.args[1:]), [('+b', ban)]) withException = ircmsgs.ban(channel, ban, exception) self.assertEqual(ircutils.separateModes(withException.args[1:]), [('+b', ban), ('+e', exception)]) def testBans(self): channel = '#osu' bans = ['*!*@*', 'jemfinch!*@*'] exceptions = ['*!*@*ohio-state.edu'] noException = ircmsgs.bans(channel, bans) self.assertEqual(ircutils.separateModes(noException.args[1:]), [('+b', bans[0]), ('+b', bans[1])]) withExceptions = ircmsgs.bans(channel, bans, exceptions) self.assertEqual(ircutils.separateModes(withExceptions.args[1:]), [('+b', bans[0]), ('+b', bans[1]), ('+e', exceptions[0])]) def testUnban(self): channel = '#supybot' ban = 'foo!bar@baz' self.assertEqual(str(ircmsgs.unban(channel, ban)), 'MODE %s -b :%s\r\n' % (channel, ban)) def testJoin(self): channel = '#osu' key = 'michiganSucks' self.assertEqual(ircmsgs.join(channel).args, ('#osu',)) self.assertEqual(ircmsgs.join(channel, key).args, ('#osu', 'michiganSucks')) def testJoins(self): channels = ['#osu', '#umich'] keys = ['michiganSucks', 'osuSucks'] self.assertEqual(ircmsgs.joins(channels).args, ('#osu,#umich',)) self.assertEqual(ircmsgs.joins(channels, keys).args, ('#osu,#umich', 'michiganSucks,osuSucks')) keys.pop() self.assertEqual(ircmsgs.joins(channels, keys).args, ('#osu,#umich', 'michiganSucks')) def testQuit(self): self.failUnless(ircmsgs.quit(prefix='foo!bar@baz')) def testOps(self): m = ircmsgs.ops('#foo', ['foo', 'bar', 'baz']) self.assertEqual(str(m), 'MODE #foo +ooo foo bar :baz\r\n') def testDeops(self): m = ircmsgs.deops('#foo', ['foo', 'bar', 'baz']) self.assertEqual(str(m), 'MODE #foo -ooo foo bar :baz\r\n') def testVoices(self): m = ircmsgs.voices('#foo', ['foo', 'bar', 'baz']) self.assertEqual(str(m), 'MODE #foo +vvv foo bar :baz\r\n') def testDevoices(self): m = ircmsgs.devoices('#foo', ['foo', 'bar', 'baz']) self.assertEqual(str(m), 'MODE #foo -vvv foo bar :baz\r\n') def testHalfops(self): m = ircmsgs.halfops('#foo', ['foo', 'bar', 'baz']) self.assertEqual(str(m), 'MODE #foo +hhh foo bar :baz\r\n') def testDehalfops(self): m = ircmsgs.dehalfops('#foo', ['foo', 'bar', 'baz']) self.assertEqual(str(m), 'MODE #foo -hhh foo bar :baz\r\n') def testMode(self): m = ircmsgs.mode('#foo', ('-b', 'foo!bar@baz')) s = str(m) self.assertEqual(s, 'MODE #foo -b :foo!bar@baz\r\n') def testIsSplit(self): m = ircmsgs.IrcMsg(prefix="[email protected]", command="QUIT", args=('jupiter.oftc.net quasar.oftc.net',)) self.failUnless(ircmsgs.isSplit(m)) m = ircmsgs.IrcMsg(prefix="[email protected]", command="QUIT", args=('Read error: 110 (Connection timed out)',)) self.failIf(ircmsgs.isSplit(m)) m = ircmsgs.IrcMsg(prefix="[email protected]", command="QUIT", args=('"Bye!"',)) self.failIf(ircmsgs.isSplit(m)) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:<|fim▁end|>
## if msg.args: ## def setArgs(msg): ## msg.args[0] = s ## self.assertRaises(TypeError, setArgs, msg)
<|file_name|>long-live-the-unsized-temporary.rs<|end_file_name|><|fim▁begin|>#![allow(incomplete_features)] #![feature(unsized_locals, unsized_fn_params)] use std::fmt; fn gen_foo() -> Box<fmt::Display> { Box::new(Box::new("foo")) } fn foo(x: fmt::Display) { assert_eq!(x.to_string(), "foo"); } fn foo_indirect(x: fmt::Display) { foo(x);<|fim▁hole|> fn main() { foo(*gen_foo()); foo_indirect(*gen_foo()); { let x: fmt::Display = *gen_foo(); foo(x); } { let x: fmt::Display = *gen_foo(); let y: fmt::Display = *gen_foo(); foo(x); foo(y); } { let mut cnt: usize = 3; let x = loop { let x: fmt::Display = *gen_foo(); if cnt == 0 { break x; } else { cnt -= 1; } }; foo(x); } { let x: fmt::Display = *gen_foo(); let x = if true { x } else { *gen_foo() }; foo(x); } }<|fim▁end|>
}
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env log = CPLog(__name__) class Automation(Plugin): def __init__(self): addEvent('app.load', self.setCrons) if not Env.get('dev'): addEvent('app.load', self.addMovies) addEvent('setting.save.automation.hour.after', self.setCrons) def setCrons(self): fireEvent('schedule.interval', 'automation.add_movies', self.addMovies, hours = self.conf('hour', default = 12)) def addMovies(self): movies = fireEvent('automation.get_movies', merge = True)<|fim▁hole|> for imdb_id in movies: prop_name = 'automation.added.%s' % imdb_id added = Env.prop(prop_name, default = False) if not added: added_movie = fireEvent('movie.add', params = {'identifier': imdb_id}, force_readd = False, search_after = False, update_library = True, single = True) if added_movie: movie_ids.append(added_movie['id']) Env.prop(prop_name, True) for movie_id in movie_ids: movie_dict = fireEvent('movie.get', movie_id, single = True) fireEvent('searcher.single', movie_dict)<|fim▁end|>
movie_ids = []
<|file_name|>legacy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Appier Framework # Copyright (c) 2008-2021 Hive Solutions Lda. # # This file is part of Hive Appier Framework. # # Hive Appier Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apache # Foundation, either version 2.0 of the License, or (at your option) any # later version. # # Hive Appier Framework is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Apache License for more details. # # You should have received a copy of the Apache License along with # Hive Appier Framework. If not, see <http://www.apache.org/licenses/>. __author__ = "João Magalhães <[email protected]>" """ The author(s) of the module """ __version__ = "1.0.0" """ The version of the module """ __revision__ = "$LastChangedRevision$" """ The revision number of the module """ __date__ = "$LastChangedDate$" """ The last change date of the module """ __copyright__ = "Copyright (c) 2008-2021 Hive Solutions Lda." """ The copyright for the module """ __license__ = "Apache License, Version 2.0" """ The license for the module """ import os import imp import sys import inspect import functools import itertools import contextlib import collections import urllib #@UnusedImport ArgSpec = collections.namedtuple( "ArgSpec", ["args", "varargs", "keywords", "defaults"] ) @contextlib.contextmanager def ctx_absolute(): root = sys.path.pop(0) try: yield finally: sys.path.insert(0, root) with ctx_absolute(): try: import urllib2 except ImportError: urllib2 = None with ctx_absolute(): try: import httplib except ImportError: httplib = None with ctx_absolute(): try: import http except ImportError: http = None with ctx_absolute(): try: import urllib.error except ImportError: pass with ctx_absolute(): try: import urllib.request except ImportError: pass with ctx_absolute(): try: import http.client except ImportError: pass try: import HTMLParser except ImportError: import html.parser; HTMLParser = html.parser try: import cPickle except ImportError: import pickle; cPickle = pickle try: import cStringIO except ImportError: import io; cStringIO = io try: import StringIO as _StringIO except ImportError: import io; _StringIO = io try: import urlparse as _urlparse except ImportError: import urllib.parse; _urlparse = urllib.parse PYTHON_3 = sys.version_info[0] >= 3 """ Global variable that defines if the current Python interpreter is at least Python 3 compliant, this is used to take some of the conversion decision for runtime """ PYTHON_35 = sys.version_info[0] >= 3 and sys.version_info[1] >= 5 """ Global variable that defines if the current Python interpreter is at least Python 3.5 compliant """ PYTHON_36 = sys.version_info[0] >= 3 and sys.version_info[1] >= 6 """ Global variable that defines if the current Python interpreter is at least Python 3.6 compliant """ PYTHON_39 = sys.version_info[0] >= 3 and sys.version_info[1] >= 9 """ Global variable that defines if the current Python interpreter is at least Python 3.9 compliant """ PYTHON_ASYNC = PYTHON_35 """ Global variable that defines if the current Python interpreter support the async/await syntax responsible for the easy to use async methods """ PYTHON_ASYNC_GEN = PYTHON_36 """ Global variable that defines if the current Python interpreter support the async/await generator syntax responsible for the async generator methods """ PYTHON_V = int("".join([str(v) for v in sys.version_info[:3]])) """ The Python version integer describing the version of a the interpreter as a set of three integer digits """ if PYTHON_3: LONG = int else: LONG = long #@UndefinedVariable if PYTHON_3: BYTES = bytes else: BYTES = str #@UndefinedVariable if PYTHON_3: UNICODE = str else: UNICODE = unicode #@UndefinedVariable if PYTHON_3: OLD_UNICODE = None else: OLD_UNICODE = unicode #@UndefinedVariable if PYTHON_3: STRINGS = (str,) else: STRINGS = (str, unicode) #@UndefinedVariable if PYTHON_3: ALL_STRINGS = (bytes, str) else: ALL_STRINGS = (bytes, str, unicode) #@UndefinedVariable if PYTHON_3: INTEGERS = (int,) else: INTEGERS = (int, long) #@UndefinedVariable # saves a series of global symbols that are going to be # used latter for some of the legacy operations _ord = ord _chr = chr _str = str _bytes = bytes _range = range try: _xrange = xrange #@UndefinedVariable except Exception: _xrange = None if PYTHON_3: Request = urllib.request.Request else: Request = urllib2.Request if PYTHON_3: HTTPHandler = urllib.request.HTTPHandler else: HTTPHandler = urllib2.HTTPHandler if PYTHON_3: HTTPError = urllib.error.HTTPError else: HTTPError = urllib2.HTTPError if PYTHON_3: HTTPConnection = http.client.HTTPConnection #@UndefinedVariable else: HTTPConnection = httplib.HTTPConnection if PYTHON_3: HTTPSConnection = http.client.HTTPSConnection #@UndefinedVariable else: HTTPSConnection = httplib.HTTPSConnection try: _execfile = execfile #@UndefinedVariable except Exception: _execfile = None try: _reduce = reduce #@UndefinedVariable except Exception: _reduce = None try: _reload = reload #@UndefinedVariable except Exception: _reload = None try: _unichr = unichr #@UndefinedVariable except Exception: _unichr = None def with_meta(meta, *bases): return meta("Class", bases, {}) def eager(iterable): if PYTHON_3: return list(iterable) return iterable def iteritems(associative): if PYTHON_3: return associative.items() return associative.iteritems() def iterkeys(associative): if PYTHON_3: return associative.keys() return associative.iterkeys() def itervalues(associative): if PYTHON_3: return associative.values() return associative.itervalues() def items(associative): if PYTHON_3: return eager(associative.items()) return associative.items() def keys(associative): if PYTHON_3: return eager(associative.keys()) return associative.keys() def values(associative): if PYTHON_3: return eager(associative.values()) return associative.values() def xrange(start, stop = None, step = 1): if PYTHON_3: return _range(start, stop, step) if stop else _range(start) return _xrange(start, stop, step) if stop else _range(start) def range(start, stop = None, step = None): if PYTHON_3: return eager(_range(start, stop, step)) if stop else eager(_range(start)) return _range(start, stop, step) if stop else _range(start) def ord(value): if PYTHON_3 and type(value) == int: return value return _ord(value) def chr(value): if PYTHON_3: return _bytes([value]) if type(value) in INTEGERS: return _chr(value) return value def chri(value): if PYTHON_3: return value if type(value) in INTEGERS: return _chr(value) return value def bytes(value, encoding = "latin-1", errors = "strict", force = False): if not PYTHON_3 and not force: return value if value == None: return value if type(value) == _bytes: return value return value.encode(encoding, errors) def str(value, encoding = "latin-1", errors = "strict", force = False): if not PYTHON_3 and not force: return value if value == None: return value if type(value) in STRINGS: return value return value.decode(encoding, errors) def u(value, encoding = "utf-8", errors = "strict", force = False): if PYTHON_3 and not force: return value if value == None: return value if type(value) == UNICODE: return value return value.decode(encoding, errors) def ascii(value, encoding = "utf-8", errors = "replace"): if is_bytes(value): value = value.decode(encoding, errors) else: value = UNICODE(value) value = value.encode("ascii", errors) value = str(value) return value def orderable(value): if not PYTHON_3: return value return Orderable(value) def is_str(value): return type(value) == _str def is_unicode(value): if PYTHON_3: return type(value) == _str else: return type(value) == unicode #@UndefinedVariable def is_bytes(value): if PYTHON_3: return type(value) == _bytes else: return type(value) == _str #@UndefinedVariable def is_string(value, all = False): target = ALL_STRINGS if all else STRINGS return type(value) in target def is_generator(value): if inspect.isgenerator(value): return True if type(value) in (itertools.chain,): return True if hasattr(value, "_is_generator"): return True return False def is_async_generator(value): if not hasattr(inspect, "isasyncgen"): return False return inspect.isasyncgen(value) def is_unittest(name = "unittest"): current_stack = inspect.stack() for stack_frame in current_stack: for program_line in stack_frame[4]: is_unittest = not name in program_line if is_unittest: continue return True return False def execfile(path, global_vars, local_vars = None, encoding = "utf-8"): <|fim▁hole|> if not PYTHON_3: return _execfile(path, global_vars, local_vars) file = open(path, "rb") try: data = file.read() finally: file.close() data = data.decode(encoding) code = compile(data, path, "exec") exec(code, global_vars, local_vars) #@UndefinedVariable def walk(path, visit, arg): for root, dirs, _files in os.walk(path): names = os.listdir(root) visit(arg, root, names) for dir in list(dirs): exists = dir in names not exists and dirs.remove(dir) def getargspec(func): has_full = hasattr(inspect, "getfullargspec") if has_full: return ArgSpec(*inspect.getfullargspec(func)[:4]) else: return inspect.getargspec(func) def reduce(*args, **kwargs): if PYTHON_3: return functools.reduce(*args, **kwargs) return _reduce(*args, **kwargs) def reload(*args, **kwargs): if PYTHON_3: return imp.reload(*args, **kwargs) return _reload(*args, **kwargs) def unichr(*args, **kwargs): if PYTHON_3: return _chr(*args, **kwargs) return _unichr(*args, **kwargs) def urlopen(*args, **kwargs): if PYTHON_3: return urllib.request.urlopen(*args, **kwargs) else: return urllib2.urlopen(*args, **kwargs) #@UndefinedVariable def build_opener(*args, **kwargs): if PYTHON_3: return urllib.request.build_opener(*args, **kwargs) else: return urllib2.build_opener(*args, **kwargs) #@UndefinedVariable def urlparse(*args, **kwargs): return _urlparse.urlparse(*args, **kwargs) def urlunparse(*args, **kwargs): return _urlparse.urlunparse(*args, **kwargs) def parse_qs(*args, **kwargs): return _urlparse.parse_qs(*args, **kwargs) def urlencode(*args, **kwargs): if PYTHON_3: return urllib.parse.urlencode(*args, **kwargs) else: return urllib.urlencode(*args, **kwargs) #@UndefinedVariable def quote(*args, **kwargs): if PYTHON_3: return urllib.parse.quote(*args, **kwargs) else: return urllib.quote(*args, **kwargs) #@UndefinedVariable def quote_plus(*args, **kwargs): if PYTHON_3: return urllib.parse.quote_plus(*args, **kwargs) else: return urllib.quote_plus(*args, **kwargs) #@UndefinedVariable def unquote(*args, **kwargs): if PYTHON_3: return urllib.parse.unquote(*args, **kwargs) else: return urllib.unquote(*args, **kwargs) #@UndefinedVariable def unquote_plus(*args, **kwargs): if PYTHON_3: return urllib.parse.unquote_plus(*args, **kwargs) else: return urllib.unquote_plus(*args, **kwargs) #@UndefinedVariable def cmp_to_key(*args, **kwargs): if PYTHON_3: return dict(key = functools.cmp_to_key(*args, **kwargs)) #@UndefinedVariable else: return dict(cmp = args[0]) def tobytes(self, *args, **kwargs): if PYTHON_3: return self.tobytes(*args, **kwargs) else: return self.tostring(*args, **kwargs) def tostring(self, *args, **kwargs): if PYTHON_3: return self.tobytes(*args, **kwargs) else: return self.tostring(*args, **kwargs) def StringIO(*args, **kwargs): if PYTHON_3: return cStringIO.StringIO(*args, **kwargs) else: return _StringIO.StringIO(*args, **kwargs) def BytesIO(*args, **kwargs): if PYTHON_3: return cStringIO.BytesIO(*args, **kwargs) else: return cStringIO.StringIO(*args, **kwargs) class Orderable(tuple): """ Simple tuple type wrapper that provides a simple first element ordering, that is compatible with both the Python 2 and Python 3+ infra-structures. """ def __cmp__(self, value): return self[0].__cmp__(value[0]) def __lt__(self, value): return self[0].__lt__(value[0])<|fim▁end|>
if local_vars == None: local_vars = global_vars
<|file_name|>peekreader.rs<|end_file_name|><|fim▁begin|>//! Contains the trait `PeekRead` and type `PeekReader` implementing it. use std::io; use std::io::{Read, Write}; use multifilereader::HasError; /// A trait which supplies a function to peek into a stream without /// actually reading it. /// /// Like `std::io::Read`, it allows to read data from a stream, with /// the additional possibility to reserve a part of the returned data /// with the data which will be read in subsequent calls. /// pub trait PeekRead { /// Reads data into a buffer. /// /// Fills `out` with data. The last `peek_size` bytes of `out` are /// used for data which keeps available on subsequent calls. /// `peek_size` must be smaller or equal to the size of `out`. /// /// Returns a tuple where the first number is the number of bytes /// read from the stream, and the second number is the number of /// bytes additionally read. Any of the numbers might be zero. /// It can also return an error. /// /// A type implementing this trait, will typically also implement /// `std::io::Read`. /// /// # Panics /// Might panic if `peek_size` is larger then the size of `out` fn peek_read(&mut self, out: &mut [u8], peek_size: usize) -> io::Result<(usize,usize)>; } /// Wrapper for `std::io::Read` allowing to peek into the data to be read. pub struct PeekReader<R> { inner: R, temp_buffer: Vec<u8>, } impl<R> PeekReader<R> { /// Create a new `PeekReader` wrapping `inner` pub fn new(inner: R) -> Self { PeekReader { inner: inner, temp_buffer: Vec::new(), } } } impl<R: Read> PeekReader<R> { fn read_from_tempbuffer(&mut self, mut out: &mut [u8]) -> usize { match out.write(self.temp_buffer.as_mut_slice()) { Ok(n) => {<|fim▁hole|> } } fn write_to_tempbuffer(&mut self, bytes: &[u8]) { // if temp_buffer is not empty, data has to be inserted in front let org_buffer: Vec<_> = self.temp_buffer.drain(..).collect(); self.temp_buffer.write(bytes).unwrap(); self.temp_buffer.extend(org_buffer); } } impl<R: Read> Read for PeekReader<R> { fn read(&mut self, out: &mut [u8]) -> io::Result<usize> { let start_pos = self.read_from_tempbuffer(out); match self.inner.read(&mut out[start_pos..]) { Err(e) => Err(e), Ok(n) => Ok(n + start_pos), } } } impl<R: Read> PeekRead for PeekReader<R> { /// Reads data into a buffer. /// /// See `PeekRead::peek_read`. /// /// # Panics /// If `peek_size` is larger then the size of `out` fn peek_read(&mut self, out: &mut [u8], peek_size: usize) -> io::Result<(usize,usize)> { assert!(out.len() >= peek_size); match self.read(out) { Err(e) => Err(e), Ok(bytes_in_buffer) => { let unused = out.len() - bytes_in_buffer; if peek_size <= unused { Ok((bytes_in_buffer, 0)) } else { let actual_peek_size = peek_size - unused; let real_size = bytes_in_buffer - actual_peek_size; self.write_to_tempbuffer(&out[real_size..bytes_in_buffer]); Ok((real_size, actual_peek_size)) } }, } } } impl<R: HasError> HasError for PeekReader<R> { fn has_error(&self) -> bool { self.inner.has_error() } } #[cfg(test)] mod tests { use super::*; use std::io::{Cursor, Read}; #[test] fn test_read_normal() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefgh"[..])); let mut v = [0; 10]; assert_eq!(sut.read(v.as_mut()).unwrap(), 8); assert_eq!(v, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0, 0]); } #[test] fn test_peek_read_without_buffer() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefgh"[..])); let mut v = [0; 10]; assert_eq!(sut.peek_read(v.as_mut(), 0).unwrap(), (8,0)); assert_eq!(v, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0, 0]); } #[test] fn test_peek_read_and_read() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefghij"[..])); let mut v = [0; 8]; assert_eq!(sut.peek_read(v.as_mut(), 4).unwrap(), (4, 4)); assert_eq!(v, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68]); let mut v2 = [0; 8]; assert_eq!(sut.read(v2.as_mut()).unwrap(), 6); assert_eq!(v2, [0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0, 0]); } #[test] fn test_peek_read_multiple_times() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefghij"[..])); let mut s1 = [0; 8]; assert_eq!(sut.peek_read(s1.as_mut(), 4).unwrap(), (4, 4)); assert_eq!(s1, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68]); let mut s2 = [0; 8]; assert_eq!(sut.peek_read(s2.as_mut(), 4).unwrap(), (4, 2)); assert_eq!(s2, [0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0, 0]); let mut s3 = [0; 8]; assert_eq!(sut.peek_read(s3.as_mut(), 4).unwrap(), (2, 0)); assert_eq!(s3, [0x69, 0x6a, 0, 0, 0, 0, 0, 0]); } #[test] fn test_peek_read_and_read_with_small_buffer() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefghij"[..])); let mut v = [0; 8]; assert_eq!(sut.peek_read(v.as_mut(), 4).unwrap(), (4, 4)); assert_eq!(v, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68]); let mut v2 = [0; 2]; assert_eq!(sut.read(v2.as_mut()).unwrap(), 2); assert_eq!(v2, [0x65, 0x66]); assert_eq!(sut.read(v2.as_mut()).unwrap(), 2); assert_eq!(v2, [0x67, 0x68]); assert_eq!(sut.read(v2.as_mut()).unwrap(), 2); assert_eq!(v2, [0x69, 0x6a]); } #[test] fn test_peek_read_with_smaller_buffer() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefghij"[..])); let mut v = [0; 8]; assert_eq!(sut.peek_read(v.as_mut(), 4).unwrap(), (4, 4)); assert_eq!(v, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68]); let mut v2 = [0; 2]; assert_eq!(sut.peek_read(v2.as_mut(), 2).unwrap(), (0, 2)); assert_eq!(v2, [0x65, 0x66]); assert_eq!(sut.peek_read(v2.as_mut(), 0).unwrap(), (2, 0)); assert_eq!(v2, [0x65, 0x66]); assert_eq!(sut.peek_read(v2.as_mut(), 0).unwrap(), (2, 0)); assert_eq!(v2, [0x67, 0x68]); assert_eq!(sut.peek_read(v2.as_mut(), 0).unwrap(), (2, 0)); assert_eq!(v2, [0x69, 0x6a]); } #[test] fn test_peek_read_peek_with_larger_peek_buffer() { let mut sut = PeekReader::new(Cursor::new(&b"abcdefghij"[..])); let mut v = [0; 8]; assert_eq!(sut.peek_read(v.as_mut(), 4).unwrap(), (4, 4)); assert_eq!(v, [0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68]); let mut v2 = [0; 8]; assert_eq!(sut.peek_read(v2.as_mut(), 8).unwrap(), (0, 6)); assert_eq!(v2, [0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0, 0]); } }<|fim▁end|>
self.temp_buffer.drain(..n); n }, Err(_) => 0,
<|file_name|>NotExpression.java<|end_file_name|><|fim▁begin|>/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.facebook.presto.sql.tree; import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Objects; import java.util.Optional; import static java.util.Objects.requireNonNull; public class NotExpression extends Expression { private final Expression value; public NotExpression(Expression value) { this(Optional.empty(), value); } public NotExpression(NodeLocation location, Expression value) { this(Optional.of(location), value); } private NotExpression(Optional<NodeLocation> location, Expression value) { super(location); requireNonNull(value, "value is null"); this.value = value; } public Expression getValue() { return value; } @Override public <R, C> R accept(AstVisitor<R, C> visitor, C context) { return visitor.visitNotExpression(this, context); } @Override public List<Node> getChildren() { return ImmutableList.of(value); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } NotExpression that = (NotExpression) o; return Objects.equals(value, that.value); } @Override public int hashCode()<|fim▁hole|> return value.hashCode(); } }<|fim▁end|>
{
<|file_name|>git-config.d.ts<|end_file_name|><|fim▁begin|>declare module 'git-config' {<|fim▁hole|> }, github: { user?: string } } export function sync(gitFile?: string): Config; }<|fim▁end|>
export type Config = { user: { name?: string, email?: string
<|file_name|>i18n.js<|end_file_name|><|fim▁begin|>/** * Internationalization / Localization Settings * (sails.config.i18n) * * If your app will touch people from all over the world, i18n (or internationalization) * may be an important part of your international strategy. * * * For more information, check out: * http://links.sailsjs.org/docs/config/i18n */ module.exports.i18n = { // Which locales are supported?<|fim▁hole|><|fim▁end|>
locales: ['en', 'es', 'fr', 'de'], objectNotation: true };
<|file_name|>response.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Asymmetric Base Framework - A collection of utilities for django frameworks # Copyright (C) 2013 Asymmetric Ventures Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful,<|fim▁hole|># but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from __future__ import absolute_import, division, print_function, unicode_literals from django.template.response import TemplateResponse from django.template.context import RequestContext from asymmetricbase.jinja import jinja_env from asymmetricbase.logging import logger #@UnusedImport class JinjaTemplateResponse(TemplateResponse): def resolve_template(self, template): if isinstance(template, (list, tuple)): return jinja_env.select_template(template) elif isinstance(template, basestring): return jinja_env.get_template(template) else: return template def resolve_context(self, context): context = super(JinjaTemplateResponse, self).resolve_context(context) if isinstance(context, RequestContext): context = jinja_env.context_to_dict(context) return context<|fim▁end|>
<|file_name|>players.js<|end_file_name|><|fim▁begin|>define(['backbone', 'collections/players', 'views/player'], function(Backbone, PlayersCollection, PlayerView) { return Backbone.View.extend({ tagName: 'table', className: 'table table-striped', template: _.template($('#players-view').html()), initialize: function() {<|fim▁hole|> this.collection = new PlayersCollection(); this.listenTo(this.collection, 'reset', this.render); this.collection.fetch({reset: true}); }, render: function () { this.$el.html(this.template()); this.$tbody = this.$el.find('tbody'); this.$tbody.empty(); this.collection.each(this.renderOne, this); return this; }, renderOne: function (player) { var view = new PlayerView({model: player}); this.$tbody.append(view.render().el); } }); });<|fim▁end|>
<|file_name|>lib.js<|end_file_name|><|fim▁begin|>var ArrayProto = Array.prototype; var ObjProto = Object.prototype; var escapeMap = { '&': '&amp;', '"': '&quot;', "'": '&#39;', "<": '&lt;', ">": '&gt;' }; var escapeRegex = /[&"'<>]/g; var lookupEscape = function(ch) { return escapeMap[ch]; }; var exports = module.exports = {}; exports.withPrettyErrors = function(path, withInternals, func) { try { return func(); } catch (e) { if (!e.Update) { // not one of ours, cast it e = new exports.TemplateError(e); } e.Update(path); // Unless they marked the dev flag, show them a trace from here if (!withInternals) { var old = e; e = new Error(old.message); e.name = old.name; } throw e; } }; exports.TemplateError = function(message, lineno, colno) { var err = this; if (message instanceof Error) { // for casting regular js errors err = message; message = message.name + ": " + message.message; } else { if(Error.captureStackTrace) { Error.captureStackTrace(err); } } err.name = 'Template render error'; err.message = message; err.lineno = lineno; err.colno = colno; err.firstUpdate = true; err.Update = function(path) { var message = "(" + (path || "unknown path") + ")"; // only show lineno + colno next to path of template // where error occurred if (this.firstUpdate) { if(this.lineno && this.colno) { message += ' [Line ' + this.lineno + ', Column ' + this.colno + ']'; } else if(this.lineno) { message += ' [Line ' + this.lineno + ']'; } } message += '\n '; if (this.firstUpdate) { message += ' '; } this.message = message + (this.message || ''); this.firstUpdate = false; return this; }; return err; }; exports.TemplateError.prototype = Error.prototype; exports.escape = function(val) { return val.replace(escapeRegex, lookupEscape); }; exports.isFunction = function(obj) { return ObjProto.toString.call(obj) == '[object Function]'; }; exports.isArray = Array.isArray || function(obj) { return ObjProto.toString.call(obj) == '[object Array]'; }; exports.isString = function(obj) { return ObjProto.toString.call(obj) == '[object String]'; }; exports.isObject = function(obj) { return ObjProto.toString.call(obj) == '[object Object]'; }; exports.groupBy = function(obj, val) { var result = {}; var iterator = exports.isFunction(val) ? val : function(obj) { return obj[val]; }; for(var i=0; i<obj.length; i++) { var value = obj[i]; var key = iterator(value, i); (result[key] || (result[key] = [])).push(value); } return result; }; exports.toArray = function(obj) { return Array.prototype.slice.call(obj); }; exports.without = function(array) { var result = []; if (!array) { return result; } var index = -1, length = array.length, contains = exports.toArray(arguments).slice(1); while(++index < length) { if(exports.indexOf(contains, array[index]) === -1) { result.push(array[index]); } } return result; }; exports.extend = function(obj, obj2) { for(var k in obj2) { obj[k] = obj2[k]; } return obj; }; exports.repeat = function(char_, n) { var str = ''; for(var i=0; i<n; i++) { str += char_; } return str; }; exports.each = function(obj, func, context) { if(obj == null) {<|fim▁hole|> obj.forEach(func, context); } else if(obj.length === +obj.length) { for(var i=0, l=obj.length; i<l; i++) { func.call(context, obj[i], i, obj); } } }; exports.map = function(obj, func) { var results = []; if(obj == null) { return results; } if(ArrayProto.map && obj.map === ArrayProto.map) { return obj.map(func); } for(var i=0; i<obj.length; i++) { results[results.length] = func(obj[i], i); } if(obj.length === +obj.length) { results.length = obj.length; } return results; }; exports.asyncIter = function(arr, iter, cb) { var i = -1; function next() { i++; if(i < arr.length) { iter(arr[i], i, next, cb); } else { cb(); } } next(); }; exports.asyncFor = function(obj, iter, cb) { var keys = exports.keys(obj); var len = keys.length; var i = -1; function next() { i++; var k = keys[i]; if(i < len) { iter(k, obj[k], i, len, next); } else { cb(); } } next(); }; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Polyfill exports.indexOf = Array.prototype.indexOf ? function (arr, searchElement, fromIndex) { return Array.prototype.indexOf.call(arr, searchElement, fromIndex); } : function (arr, searchElement, fromIndex) { var length = this.length >>> 0; // Hack to convert object.length to a UInt32 fromIndex = +fromIndex || 0; if(Math.abs(fromIndex) === Infinity) { fromIndex = 0; } if(fromIndex < 0) { fromIndex += length; if (fromIndex < 0) { fromIndex = 0; } } for(;fromIndex < length; fromIndex++) { if (arr[fromIndex] === searchElement) { return fromIndex; } } return -1; }; if(!Array.prototype.map) { Array.prototype.map = function() { throw new Error("map is unimplemented for this js engine"); }; } exports.keys = function(obj) { if(Object.prototype.keys) { return obj.keys(); } else { var keys = []; for(var k in obj) { if(obj.hasOwnProperty(k)) { keys.push(k); } } return keys; } }<|fim▁end|>
return; } if(ArrayProto.each && obj.each == ArrayProto.each) {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from __future__ import print_function<|fim▁hole|> import sys import os # from setuptools import Distribution from pkg_resources import get_distribution, working_set, VersionConflict def samefile(path, other): """ Workaround for missing ``os.path.samefile`` in Windows Python 2.7. """ return os.path.normcase(os.path.normpath(os.path.realpath(path))) \ == os.path.normcase(os.path.normpath(os.path.realpath(other))) sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) try: import zetup except VersionConflict: egg_info = 'zetup.egg-info' dist = get_distribution('zetup') if samefile( dist.location, os.path.dirname(os.path.realpath(__file__)) ) and os.path.exists(egg_info): print("zetup: Removing possibly outdated %s/" % egg_info, # don't pollute stdout file=sys.stderr) for fname in os.listdir(egg_info): os.remove(os.path.join(egg_info, fname)) os.rmdir(egg_info) # when run via pip, the egg-info is still referenced by setuptools, # which would try to read the contents for keys in working_set.entry_keys.values(): if 'zetup' in keys: keys.remove('zetup') del working_set.by_key['zetup'] from zetup import Zetup, DistributionNotFound, VersionConflict try: from zetup.commands import make, pytest, tox, conda except (ImportError, DistributionNotFound, VersionConflict): # ==> no zetup commands available # standard setup commands work anyway pass # setup_req = 'setuptools >= 15.0' # try: # get_distribution(setup_req) # except VersionConflict: # for mod in ['setuptools', 'pkg_resources']: # for name, _ in list(sys.modules.items()): # if name == mod or name.startswith(mod + '.'): # del sys.modules[name] # sys.path.insert(0, Distribution().fetch_build_egg(setup_req)) zfg = Zetup() zetup.requires.Requirements('setuptools >= 36.2', zfg=zfg).check() setup = zfg.setup setup['package_data']['zetup.commands.make'] = [ 'templates/*.jinja', 'templates/package/*.jinja', ] setup()<|fim▁end|>
<|file_name|>PowerActivationFunction.java<|end_file_name|><|fim▁begin|>package com.anji_ahni.nn.activationfunction; /** * Square-root function. * * @author Oliver Coleman */ public class PowerActivationFunction implements ActivationFunction, ActivationFunctionNonIntegrating { /** * identifying string */ public final static String NAME = "power"; /** * @see Object#toString() */ public String toString() { return NAME; } /** * This class should only be accessd via ActivationFunctionFactory. */ PowerActivationFunction() { // no-op } /** * Not used, returns 0. */ @Override public double apply(double input) { return 0; } <|fim▁hole|> * Return first input raised to the power of the absolute value of the second input (or just first input if no second input). */ @Override public double apply(double[] input, double bias) { if (input.length < 2) return input[0]; double v = Math.pow(input[0], Math.abs(input[1])); if (Double.isNaN(v)) return 0; if (Double.isInfinite(v)) return v < 0 ? -Double.MAX_VALUE / 2 : Double.MAX_VALUE / 2; return v; } /** * @see com.anji_ahni.nn.activationfunction.ActivationFunction#getMaxValue() */ public double getMaxValue() { return Double.MAX_VALUE; } /** * @see com.anji_ahni.nn.activationfunction.ActivationFunction#getMinValue() */ public double getMinValue() { return -Double.MAX_VALUE; } /** * @see com.anji_ahni.nn.activationfunction.ActivationFunction#cost() */ public long cost() { return 75; } }<|fim▁end|>
/**
<|file_name|>issue-15730.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. <|fim▁hole|><|fim▁end|>
fn main() { let mut array = [1, 2, 3]; let pie_slice = &array[1..2]; }
<|file_name|>main.js<|end_file_name|><|fim▁begin|>$('.js-toggle-menu').click(function(e){ e.preventDefault(); $(this).siblings().toggle(); }); $('.nav--primary li').click(function(){ $(this).find('ul').toggleClass('active');<|fim▁hole|><|fim▁end|>
});
<|file_name|>linkedList.js<|end_file_name|><|fim▁begin|>/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v18.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var LinkedList = (function () { function LinkedList() { this.first = null; this.last = null; } LinkedList.prototype.add = function (item) {<|fim▁hole|> item: item, next: null }; if (this.last) { this.last.next = entry; } else { this.first = entry; } this.last = entry; }; LinkedList.prototype.remove = function () { var result = this.first; if (result) { this.first = result.next; if (!this.first) { this.last = null; } } return result.item; }; LinkedList.prototype.isEmpty = function () { return !this.first; }; return LinkedList; }()); exports.LinkedList = LinkedList; var LinkedListItem = (function () { function LinkedListItem() { } return LinkedListItem; }());<|fim▁end|>
var entry = {
<|file_name|>box_.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! The `Box` type, which represents the leaves of the layout tree. use css::node_style::StyledNode; use layout::construct::FlowConstructor; use layout::context::LayoutContext; use layout::display_list_builder::{DisplayListBuilder, DisplayListBuildingInfo, ToGfxColor}; use layout::floats::{ClearBoth, ClearLeft, ClearRight, ClearType}; use layout::flow::{Flow, FlowFlagsInfo}; use layout::flow; use layout::model::{Auto, IntrinsicWidths, MaybeAuto, Specified, specified}; use layout::model; use layout::util::OpaqueNodeMethods; use layout::wrapper::{TLayoutNode, ThreadSafeLayoutNode}; use sync::{MutexArc, Arc}; use geom::{Point2D, Rect, Size2D, SideOffsets2D}; use geom::approxeq::ApproxEq; use gfx::color::rgb; use gfx::display_list::{BackgroundAndBorderLevel, BaseDisplayItem, BorderDisplayItem}; use gfx::display_list::{BorderDisplayItemClass, ClipDisplayItem, ClipDisplayItemClass}; use gfx::display_list::{DisplayList, ImageDisplayItem, ImageDisplayItemClass, LineDisplayItem}; use gfx::display_list::{LineDisplayItemClass, OpaqueNode, SolidColorDisplayItem}; use gfx::display_list::{SolidColorDisplayItemClass, StackingContext, TextDisplayItem}; use gfx::display_list::{TextDisplayItemClass, TextDisplayItemFlags}; use gfx::font::FontStyle; use gfx::text::text_run::TextRun; use servo_msg::constellation_msg::{ConstellationChan, FrameRectMsg, PipelineId, SubpageId}; use servo_net::image::holder::ImageHolder; use servo_net::local_image_cache::LocalImageCache; use servo_util::geometry::Au; use servo_util::geometry; use servo_util::range::*; use servo_util::namespace; use servo_util::smallvec::{SmallVec, SmallVec0}; use servo_util::str::is_whitespace; use std::cast; use std::cell::RefCell; use std::from_str::FromStr; use std::num::Zero; use style::{ComputedValues, TElement, TNode, cascade, initial_values}; use style::computed_values::{LengthOrPercentage, LengthOrPercentageOrAuto, overflow, LPA_Auto}; use style::computed_values::{background_attachment, background_repeat, border_style, clear}; use style::computed_values::{font_family, line_height, position, text_align, text_decoration}; use style::computed_values::{vertical_align, visibility, white_space}; use url::Url; /// Boxes (`struct Box`) are the leaves of the layout tree. They cannot position themselves. In /// general, boxes do not have a simple correspondence with CSS boxes in the specification: /// /// * Several boxes may correspond to the same CSS box or DOM node. For example, a CSS text box /// broken across two lines is represented by two boxes. /// /// * Some CSS boxes are not created at all, such as some anonymous block boxes induced by inline /// boxes with block-level sibling boxes. In that case, Servo uses an `InlineFlow` with /// `BlockFlow` siblings; the `InlineFlow` is block-level, but not a block container. It is /// positioned as if it were a block box, but its children are positioned according to inline /// flow. /// /// A `GenericBox` is an empty box that contributes only borders, margins, padding, and /// backgrounds. It is analogous to a CSS nonreplaced content box. /// /// A box's type influences how its styles are interpreted during layout. For example, replaced /// content such as images are resized differently from tables, text, or other content. Different /// types of boxes may also contain custom data; for example, text boxes contain text. /// /// FIXME(pcwalton): This can be slimmed down quite a bit. #[deriving(Clone)] pub struct Box { /// An opaque reference to the DOM node that this `Box` originates from. node: OpaqueNode, /// The CSS style of this box. style: Arc<ComputedValues>, /// The position of this box relative to its owning flow. /// The size includes padding and border, but not margin. border_box: RefCell<Rect<Au>>, /// The border of the content box. /// /// FIXME(pcwalton): This need not be stored in the box. border: RefCell<SideOffsets2D<Au>>, /// The padding of the content box. padding: RefCell<SideOffsets2D<Au>>, /// The margin of the content box. margin: RefCell<SideOffsets2D<Au>>, /// Info specific to the kind of box. Keep this enum small. specific: SpecificBoxInfo, /// positioned box offsets position_offsets: RefCell<SideOffsets2D<Au>>, /// Inline data inline_info: RefCell<Option<InlineInfo>>, /// New-line chracter(\n)'s positions(relative, not absolute) new_line_pos: ~[uint], } /// Info specific to the kind of box. Keep this enum small. #[deriving(Clone)] pub enum SpecificBoxInfo { GenericBox, ImageBox(ImageBoxInfo), IframeBox(IframeBoxInfo), ScannedTextBox(ScannedTextBoxInfo), TableBox, TableCellBox, TableColumnBox(TableColumnBoxInfo), TableRowBox, TableWrapperBox, UnscannedTextBox(UnscannedTextBoxInfo), } /// A box that represents a replaced content image and its accompanying borders, shadows, etc. #[deriving(Clone)] pub struct ImageBoxInfo { /// The image held within this box. image: RefCell<ImageHolder>, computed_width: RefCell<Option<Au>>, computed_height: RefCell<Option<Au>>, dom_width: Option<Au>, dom_height: Option<Au>, } impl ImageBoxInfo { /// Creates a new image box from the given URL and local image cache. /// /// FIXME(pcwalton): The fact that image boxes store the cache in the box makes little sense to /// me. pub fn new(node: &ThreadSafeLayoutNode, image_url: Url, local_image_cache: MutexArc<LocalImageCache>) -> ImageBoxInfo { fn convert_length(node: &ThreadSafeLayoutNode, name: &str) -> Option<Au> { let element = node.as_element(); element.get_attr(&namespace::Null, name).and_then(|string| { let n: Option<int> = FromStr::from_str(string); n }).and_then(|pixels| Some(Au::from_px(pixels))) } ImageBoxInfo { image: RefCell::new(ImageHolder::new(image_url, local_image_cache)), computed_width: RefCell::new(None), computed_height: RefCell::new(None), dom_width: convert_length(node,"width"), dom_height: convert_length(node,"height"), } } /// Returns the calculated width of the image, accounting for the width attribute. pub fn computed_width(&self) -> Au { match &*self.computed_width.borrow() { &Some(width) => { width }, &None => { fail!("image width is not computed yet!"); } } } /// Returns width of image(just original width) pub fn image_width(&self) -> Au { let mut image_ref = self.image.borrow_mut(); Au::from_px(image_ref.get_size().unwrap_or(Size2D(0,0)).width) } // Return used value for width or height. // // `dom_length`: width or height as specified in the `img` tag. // `style_length`: width as given in the CSS pub fn style_length(style_length: LengthOrPercentageOrAuto, dom_length: Option<Au>, container_width: Au) -> MaybeAuto { match (MaybeAuto::from_style(style_length,container_width),dom_length) { (Specified(length),_) => { Specified(length) }, (Auto,Some(length)) => { Specified(length) }, (Auto,None) => { Auto } } } /// Returns the calculated height of the image, accounting for the height attribute. pub fn computed_height(&self) -> Au { match &*self.computed_height.borrow() { &Some(height) => { height }, &None => { fail!("image height is not computed yet!"); } } } /// Returns height of image(just original height) pub fn image_height(&self) -> Au { let mut image_ref = self.image.borrow_mut(); Au::from_px(image_ref.get_size().unwrap_or(Size2D(0,0)).height) } } /// A box that represents an inline frame (iframe). This stores the pipeline ID so that the size /// of this iframe can be communicated via the constellation to the iframe's own layout task. #[deriving(Clone)] pub struct IframeBoxInfo { /// The pipeline ID of this iframe. pipeline_id: PipelineId, /// The subpage ID of this iframe. subpage_id: SubpageId, } impl IframeBoxInfo { /// Creates the information specific to an iframe box. pub fn new(node: &ThreadSafeLayoutNode) -> IframeBoxInfo { let (pipeline_id, subpage_id) = node.iframe_pipeline_and_subpage_ids(); IframeBoxInfo { pipeline_id: pipeline_id, subpage_id: subpage_id, } } } /// A scanned text box represents a single run of text with a distinct style. A `TextBox` may be /// split into two or more boxes across line breaks. Several `TextBox`es may correspond to a single /// DOM text node. Split text boxes are implemented by referring to subsets of a single `TextRun` /// object. #[deriving(Clone)] pub struct ScannedTextBoxInfo { /// The text run that this represents. run: Arc<~TextRun>, /// The range within the above text run that this represents. range: Range, } impl ScannedTextBoxInfo { /// Creates the information specific to a scanned text box from a range and a text run. pub fn new(run: Arc<~TextRun>, range: Range) -> ScannedTextBoxInfo { ScannedTextBoxInfo { run: run, range: range, } } } /// Data for an unscanned text box. Unscanned text boxes are the results of flow construction that /// have not yet had their width determined. #[deriving(Clone)] pub struct UnscannedTextBoxInfo { /// The text inside the box. text: ~str, } impl UnscannedTextBoxInfo { /// Creates a new instance of `UnscannedTextBoxInfo` from the given DOM node. pub fn new(node: &ThreadSafeLayoutNode) -> UnscannedTextBoxInfo { // FIXME(pcwalton): Don't copy text; atomically reference count it instead. UnscannedTextBoxInfo { text: node.text(), } } /// Creates a new instance of `UnscannedTextBoxInfo` from the given text. #[inline] pub fn from_text(text: ~str) -> UnscannedTextBoxInfo { UnscannedTextBoxInfo { text: text, } } } /// Represents the outcome of attempting to split a box. pub enum SplitBoxResult { CannotSplit, // in general, when splitting the left or right side can // be zero length, due to leading/trailing trimmable whitespace SplitDidFit(Option<Box>, Option<Box>), SplitDidNotFit(Option<Box>, Option<Box>) } /// Data for inline boxes. /// /// FIXME(#2013, pcwalton): Copying `InlineParentInfo` vectors all the time is really inefficient. /// Use atomic reference counting instead. #[deriving(Clone)] pub struct InlineInfo { parent_info: SmallVec0<InlineParentInfo>, baseline: Au, } impl InlineInfo { pub fn new() -> InlineInfo { InlineInfo { parent_info: SmallVec0::new(), baseline: Au(0), } } } #[deriving(Clone)] pub struct InlineParentInfo { padding: SideOffsets2D<Au>, border: SideOffsets2D<Au>, margin: SideOffsets2D<Au>, style: Arc<ComputedValues>, font_ascent: Au, font_descent: Au, node: OpaqueNode, } /// A box that represents a table column. #[deriving(Clone)] pub struct TableColumnBoxInfo { /// the number of columns a <col> element should span span: Option<int>, } impl TableColumnBoxInfo { /// Create the information specific to an table column box. pub fn new(node: &ThreadSafeLayoutNode) -> TableColumnBoxInfo { let span = { let element = node.as_element(); element.get_attr(&namespace::Null, "span").and_then(|string| { let n: Option<int> = FromStr::from_str(string); n }) }; TableColumnBoxInfo { span: span, } } } // FIXME: Take just one parameter and use concat_ident! (mozilla/rust#12249) macro_rules! def_noncontent( ($side:ident, $get:ident, $inline_get:ident) => ( impl Box { pub fn $get(&self) -> Au { self.border.get().$side + self.padding.get().$side } pub fn $inline_get(&self) -> Au { let mut val = Au::new(0); let info = self.inline_info.borrow(); match &*info { &Some(ref info) => { for info in info.parent_info.iter() { val = val + info.border.$side + info.padding.$side; } }, &None => {} } val } } )) macro_rules! def_noncontent_horiz( ($side:ident, $merge:ident, $clear:ident) => ( impl Box { pub fn $merge(&self, other_box: &Box) { let mut info = self.inline_info.borrow_mut(); let other_info = other_box.inline_info.borrow(); match &*other_info { &Some(ref other_info) => { match &mut *info { &Some(ref mut info) => { for other_item in other_info.parent_info.iter() { for item in info.parent_info.mut_iter() { if item.node == other_item.node { item.border.$side = other_item.border.$side; item.padding.$side = other_item.padding.$side; item.margin.$side = other_item.margin.$side; break; } } } }, &None => {} } }, &None => {} } } pub fn $clear(&self) { let mut info = self.inline_info.borrow_mut(); match &mut *info { &Some(ref mut info) => { for item in info.parent_info.mut_iter() { item.border.$side = Au::new(0); item.padding.$side = Au::new(0); item.margin.$side = Au::new(0); } }, &None => {} } } } )) def_noncontent!(left, noncontent_left, noncontent_inline_left) def_noncontent!(right, noncontent_right, noncontent_inline_right) def_noncontent!(top, noncontent_top, noncontent_inline_top) def_noncontent!(bottom, noncontent_bottom, noncontent_inline_bottom) def_noncontent_horiz!(left, merge_noncontent_inline_left, clear_noncontent_inline_left) def_noncontent_horiz!(right, merge_noncontent_inline_right, clear_noncontent_inline_right) impl Box { /// Constructs a new `Box` instance for the given node. /// /// Arguments: /// /// * `constructor`: The flow constructor. /// /// * `node`: The node to create a box for. pub fn new(constructor: &mut FlowConstructor, node: &ThreadSafeLayoutNode) -> Box { Box { node: OpaqueNodeMethods::from_thread_safe_layout_node(node), style: node.style().clone(), border_box: RefCell::new(Au::zero_rect()), border: RefCell::new(Zero::zero()), padding: RefCell::new(Zero::zero()), margin: RefCell::new(Zero::zero()), specific: constructor.build_specific_box_info_for_node(node), position_offsets: RefCell::new(Zero::zero()), inline_info: RefCell::new(None), new_line_pos: ~[], } } /// Constructs a new `Box` instance from a specific info. pub fn new_from_specific_info(node: &ThreadSafeLayoutNode, specific: SpecificBoxInfo) -> Box { Box { node: OpaqueNodeMethods::from_thread_safe_layout_node(node), style: node.style().clone(), border_box: RefCell::new(Au::zero_rect()), border: RefCell::new(Zero::zero()), padding: RefCell::new(Zero::zero()), margin: RefCell::new(Zero::zero()), specific: specific, position_offsets: RefCell::new(Zero::zero()), inline_info: RefCell::new(None), new_line_pos: ~[], } } /// Constructs a new `Box` instance for an anonymous table object. pub fn new_anonymous_table_box(node: &ThreadSafeLayoutNode, specific: SpecificBoxInfo) -> Box { // CSS 2.1 § 17.2.1 This is for non-inherited properties on anonymous table boxes // example: // // <div style="display: table"> // Foo // </div> // // Anonymous table boxes, TableRowBox and TableCellBox, are generated around `Foo`, but it shouldn't inherit the border. let (node_style, _) = cascade(&[], false, Some(node.style().get()), &initial_values(), None); Box { node: OpaqueNodeMethods::from_thread_safe_layout_node(node), style: Arc::new(node_style), border_box: RefCell::new(Au::zero_rect()), border: RefCell::new(Zero::zero()), padding: RefCell::new(Zero::zero()), margin: RefCell::new(Zero::zero()), specific: specific, position_offsets: RefCell::new(Zero::zero()), inline_info: RefCell::new(None), new_line_pos: ~[], } } /// Constructs a new `Box` instance from an opaque node. pub fn from_opaque_node_and_style(node: OpaqueNode, style: Arc<ComputedValues>, specific: SpecificBoxInfo) -> Box { Box { node: node, style: style, border_box: RefCell::new(Au::zero_rect()), border: RefCell::new(Zero::zero()), padding: RefCell::new(Zero::zero()), margin: RefCell::new(Zero::zero()), specific: specific, position_offsets: RefCell::new(Zero::zero()), inline_info: RefCell::new(None), new_line_pos: ~[], } } /// Returns a debug ID of this box. This ID should not be considered stable across multiple /// layouts or box manipulations. pub fn debug_id(&self) -> uint { unsafe { cast::transmute(self) } } /// Transforms this box into another box of the given type, with the given size, preserving all /// the other data. pub fn transform(&self, size: Size2D<Au>, specific: SpecificBoxInfo) -> Box { Box { node: self.node, style: self.style.clone(), border_box: RefCell::new(Rect(self.border_box.get().origin, size)), border: RefCell::new(self.border.get()), padding: RefCell::new(self.padding.get()), margin: RefCell::new(self.margin.get()), specific: specific, position_offsets: RefCell::new(Zero::zero()), inline_info: self.inline_info.clone(), new_line_pos: self.new_line_pos.clone(), } } /// Uses the style only to estimate the intrinsic widths. These may be modified for text or /// replaced elements. fn style_specified_intrinsic_width(&self) -> IntrinsicWidths { let (use_margins, use_padding) = match self.specific { GenericBox | IframeBox(_) | ImageBox(_) => (true, true), TableBox | TableCellBox => (false, true), TableWrapperBox => (true, false), TableRowBox => (false, false), ScannedTextBox(_) | TableColumnBox(_) | UnscannedTextBox(_) => { // Styles are irrelevant for these kinds of boxes. return IntrinsicWidths::new() } }; let style = self.style(); let width = MaybeAuto::from_style(style.Box.get().width, Au::new(0)).specified_or_zero(); let (margin_left, margin_right) = if use_margins { (MaybeAuto::from_style(style.Margin.get().margin_left, Au(0)).specified_or_zero(), MaybeAuto::from_style(style.Margin.get().margin_right, Au(0)).specified_or_zero()) } else { (Au(0), Au(0)) }; let (padding_left, padding_right) = if use_padding { (self.compute_padding_length(style.Padding.get().padding_left, Au(0)), self.compute_padding_length(style.Padding.get().padding_right, Au(0))) } else { (Au(0), Au(0)) }; let surround_width = margin_left + margin_right + padding_left + padding_right + self.border.get().left + self.border.get().right; IntrinsicWidths { minimum_width: width, preferred_width: width, surround_width: surround_width, } } pub fn calculate_line_height(&self, font_size: Au) -> Au { let from_inline = match self.style().InheritedBox.get().line_height { line_height::Normal => font_size.scale_by(1.14), line_height::Number(l) => font_size.scale_by(l), line_height::Length(l) => l }; let minimum = self.style().InheritedBox.get()._servo_minimum_line_height; Au::max(from_inline, minimum) } /// Populates the box model border parameters from the given computed style. /// /// FIXME(pcwalton): This should not be necessary. Just go to the style. pub fn compute_borders(&self, style: &ComputedValues) { let border = match self.specific { TableWrapperBox => { SideOffsets2D::new(Au(0), Au(0), Au(0), Au(0)) }, _ => { #[inline] fn width(width: Au, style: border_style::T) -> Au { if style == border_style::none { Au(0) } else { width } } SideOffsets2D::new(width(style.Border.get().border_top_width, style.Border.get().border_top_style), width(style.Border.get().border_right_width, style.Border.get().border_right_style), width(style.Border.get().border_bottom_width, style.Border.get().border_bottom_style), width(style.Border.get().border_left_width, style.Border.get().border_left_style)) } }; self.border.set(border) } pub fn compute_positioned_offsets(&self, style: &ComputedValues, containing_width: Au, containing_height: Au) { self.position_offsets.set(SideOffsets2D::new( MaybeAuto::from_style(style.PositionOffsets.get().top, containing_height) .specified_or_zero(), MaybeAuto::from_style(style.PositionOffsets.get().right, containing_width) .specified_or_zero(), MaybeAuto::from_style(style.PositionOffsets.get().bottom, containing_height) .specified_or_zero(), MaybeAuto::from_style(style.PositionOffsets.get().left, containing_width) .specified_or_zero())); } /// Compute and set margin-top and margin-bottom values. /// /// If a value is specified or is a percentage, we calculate the right value here. /// If it is auto, it is up to assign-height to ignore this value and /// calculate the correct margin values. pub fn compute_margin_top_bottom(&self, containing_block_width: Au) { match self.specific { TableBox | TableCellBox | TableRowBox | TableColumnBox(_) => { self.margin.set(SideOffsets2D::new(Au(0), Au(0), Au(0), Au(0))) }, _ => { let style = self.style(); // Note: CSS 2.1 defines margin % values wrt CB *width* (not height). let margin_top = MaybeAuto::from_style(style.Margin.get().margin_top, containing_block_width).specified_or_zero(); let margin_bottom = MaybeAuto::from_style(style.Margin.get().margin_bottom, containing_block_width).specified_or_zero(); let mut margin = self.margin.get(); margin.top = margin_top; margin.bottom = margin_bottom; self.margin.set(margin); } } } /// Populates the box model padding parameters from the given computed style. pub fn compute_padding(&self, style: &ComputedValues, containing_block_width: Au) { let padding = match self.specific { TableColumnBox(_) | TableRowBox | TableWrapperBox => { SideOffsets2D::new(Au(0), Au(0), Au(0), Au(0)) }, GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | ScannedTextBox(_) | UnscannedTextBox(_) => { SideOffsets2D::new(self.compute_padding_length(style.Padding .get() .padding_top, containing_block_width), self.compute_padding_length(style.Padding .get() .padding_right, containing_block_width), self.compute_padding_length(style.Padding .get() .padding_bottom, containing_block_width), self.compute_padding_length(style.Padding .get() .padding_left, containing_block_width)) } }; self.padding.set(padding) } fn compute_padding_length(&self, padding: LengthOrPercentage, content_box_width: Au) -> Au { specified(padding, content_box_width) } pub fn padding_box_size(&self) -> Size2D<Au> { let border_box_size = self.border_box.get().size; Size2D(border_box_size.width - self.border.get().left - self.border.get().right, border_box_size.height - self.border.get().top - self.border.get().bottom) } pub fn noncontent_width(&self) -> Au { self.noncontent_left() + self.noncontent_right() } pub fn noncontent_height(&self) -> Au { self.noncontent_top() + self.noncontent_bottom() } // Return offset from original position because of `position: relative`. pub fn relative_position(&self, container_block_size: &Size2D<Au>) -> Point2D<Au> { fn left_right(style: &ComputedValues, block_width: Au) -> Au { // TODO(ksh8281) : consider RTL(right-to-left) culture match (style.PositionOffsets.get().left, style.PositionOffsets.get().right) { (LPA_Auto, _) => { -MaybeAuto::from_style(style.PositionOffsets.get().right, block_width) .specified_or_zero() } (_, _) => { MaybeAuto::from_style(style.PositionOffsets.get().left, block_width) .specified_or_zero() } } } fn top_bottom(style: &ComputedValues,block_height: Au) -> Au { match (style.PositionOffsets.get().top, style.PositionOffsets.get().bottom) { (LPA_Auto, _) => { -MaybeAuto::from_style(style.PositionOffsets.get().bottom, block_height) .specified_or_zero() } (_, _) => { MaybeAuto::from_style(style.PositionOffsets.get().top, block_height) .specified_or_zero() } } } let mut rel_pos: Point2D<Au> = Point2D { x: Au::new(0), y: Au::new(0), }; if self.style().Box.get().position == position::relative { rel_pos.x = rel_pos.x + left_right(self.style(), container_block_size.width); rel_pos.y = rel_pos.y + top_bottom(self.style(), container_block_size.height); } // Go over the ancestor boxes and add all relative offsets (if any). let info = self.inline_info.borrow(); match &*info { &Some(ref info) => { for info in info.parent_info.iter() { if info.style.get().Box.get().position == position::relative { rel_pos.x = rel_pos.x + left_right(info.style.get(), container_block_size.width); rel_pos.y = rel_pos.y + top_bottom(info.style.get(), container_block_size.height); } } }, &None => {} } rel_pos } /// Always inline for SCCP. /// /// FIXME(pcwalton): Just replace with the clear type from the style module for speed? #[inline(always)] pub fn clear(&self) -> Option<ClearType> { let style = self.style(); match style.Box.get().clear { clear::none => None, clear::left => Some(ClearLeft), clear::right => Some(ClearRight), clear::both => Some(ClearBoth), } } /// Converts this node's computed style to a font style used for rendering. /// /// FIXME(pcwalton): This should not be necessary; just make the font part of style sharable /// with the display list somehow. (Perhaps we should use an ARC.) pub fn font_style(&self) -> FontStyle { let my_style = self.style(); debug!("(font style) start"); // FIXME: Too much allocation here. let font_families = my_style.Font.get().font_family.map(|family| { match *family { font_family::FamilyName(ref name) => (*name).clone(), } }); debug!("(font style) font families: `{:?}`", font_families); let font_size = my_style.Font.get().font_size.to_f64().unwrap() / 60.0; debug!("(font style) font size: `{:f}px`", font_size); FontStyle { pt_size: font_size, weight: my_style.Font.get().font_weight, style: my_style.Font.get().font_style, families: font_families, } } #[inline(always)] pub fn style<'a>(&'a self) -> &'a ComputedValues { self.style.get() } /// Returns the text alignment of the computed style of the nearest ancestor-or-self `Element` /// node. pub fn text_align(&self) -> text_align::T { self.style().InheritedText.get().text_align } pub fn vertical_align(&self) -> vertical_align::T { self.style().Box.get().vertical_align } pub fn white_space(&self) -> white_space::T { self.style().InheritedText.get().white_space } /// Returns the text decoration of this box, according to the style of the nearest ancestor /// element. /// /// NB: This may not be the actual text decoration, because of the override rules specified in /// CSS 2.1 § 16.3.1. Unfortunately, computing this properly doesn't really fit into Servo's /// model. Therefore, this is a best lower bound approximation, but the end result may actually /// have the various decoration flags turned on afterward. pub fn text_decoration(&self) -> text_decoration::T { self.style().Text.get().text_decoration } /// Returns the left offset from margin edge to content edge. pub fn left_offset(&self) -> Au { match self.specific { TableWrapperBox => self.margin.get().left, TableBox | TableCellBox => self.border.get().left + self.padding.get().left, TableRowBox => self.border.get().left, TableColumnBox(_) => Au(0), _ => self.margin.get().left + self.border.get().left + self.padding.get().left } } /// Returns the top offset from margin edge to content edge. pub fn top_offset(&self) -> Au { match self.specific { TableWrapperBox => self.margin.get().top, TableBox | TableCellBox => self.border.get().top + self.padding.get().top, TableRowBox => self.border.get().top, TableColumnBox(_) => Au(0), _ => self.margin.get().top + self.border.get().top + self.padding.get().top } } /// Returns the bottom offset from margin edge to content edge. pub fn bottom_offset(&self) -> Au { match self.specific { TableWrapperBox => self.margin.get().bottom, TableBox | TableCellBox => self.border.get().bottom + self.padding.get().bottom, TableRowBox => self.border.get().bottom, TableColumnBox(_) => Au(0), _ => self.margin.get().bottom + self.border.get().bottom + self.padding.get().bottom } } /// Returns true if this element can be split. This is true for text boxes. pub fn can_split(&self) -> bool { match self.specific { ScannedTextBox(..) => true, _ => false, } } /// Returns the amount of left and right "fringe" used by this box. This is based on margins, /// borders, padding, and width. pub fn get_used_width(&self) -> (Au, Au) { // TODO: This should actually do some computation! See CSS 2.1, Sections 10.3 and 10.4. (Au::new(0), Au::new(0)) } /// Returns the amount of left and right "fringe" used by this box. This should be based on /// margins, borders, padding, and width. pub fn get_used_height(&self) -> (Au, Au) { // TODO: This should actually do some computation! See CSS 2.1, Sections 10.5 and 10.6. (Au::new(0), Au::new(0)) } <|fim▁hole|> // FIXME: This causes a lot of background colors to be displayed when they are clearly not // needed. We could use display list optimization to clean this up, but it still seems // inefficient. What we really want is something like "nearest ancestor element that // doesn't have a box". let info = self.inline_info.borrow(); match &*info { &Some(ref box_info) => { let mut bg_rect = absolute_bounds.clone(); for info in box_info.parent_info.as_slice().rev_iter() { // TODO (ksh8281) compute vertical-align, line-height bg_rect.origin.y = box_info.baseline + offset.y - info.font_ascent; bg_rect.size.height = info.font_ascent + info.font_descent; let background_color = info.style.get().resolve_color( info.style.get().Background.get().background_color); if !background_color.alpha.approx_eq(&0.0) { let solid_color_display_item = ~SolidColorDisplayItem { base: BaseDisplayItem { bounds: bg_rect.clone(), node: self.node, }, color: background_color.to_gfx_color(), }; list.push(SolidColorDisplayItemClass(solid_color_display_item)) } let border = &info.border; // Fast path. if border.is_zero() { continue } bg_rect.origin.y = bg_rect.origin.y - border.top; bg_rect.size.height = bg_rect.size.height + border.top + border.bottom; let style = info.style.get(); let top_color = style.resolve_color(style.Border.get().border_top_color); let right_color = style.resolve_color(style.Border.get().border_right_color); let bottom_color = style.resolve_color(style.Border.get().border_bottom_color); let left_color = style.resolve_color(style.Border.get().border_left_color); let top_style = style.Border.get().border_top_style; let right_style = style.Border.get().border_right_style; let bottom_style = style.Border.get().border_bottom_style; let left_style = style.Border.get().border_left_style; let border_display_item = ~BorderDisplayItem { base: BaseDisplayItem { bounds: bg_rect, node: self.node, }, border: border.clone(), color: SideOffsets2D::new(top_color.to_gfx_color(), right_color.to_gfx_color(), bottom_color.to_gfx_color(), left_color.to_gfx_color()), style: SideOffsets2D::new(top_style, right_style, bottom_style, left_style) }; list.push(BorderDisplayItemClass(border_display_item)); bg_rect.origin.x = bg_rect.origin.x + border.left; bg_rect.size.width = bg_rect.size.width - border.left - border.right; } }, &None => {} } } /// Adds the display items necessary to paint the background of this box to the display list if /// necessary. pub fn paint_background_if_applicable(&self, list: &mut DisplayList, builder: &DisplayListBuilder, absolute_bounds: &Rect<Au>) { // FIXME: This causes a lot of background colors to be displayed when they are clearly not // needed. We could use display list optimization to clean this up, but it still seems // inefficient. What we really want is something like "nearest ancestor element that // doesn't have a box". let style = self.style(); let background_color = style.resolve_color(style.Background.get().background_color); if !background_color.alpha.approx_eq(&0.0) { let display_item = ~SolidColorDisplayItem { base: BaseDisplayItem { bounds: *absolute_bounds, node: self.node, }, color: background_color.to_gfx_color(), }; list.push(SolidColorDisplayItemClass(display_item)) } // The background image is painted on top of the background color. // Implements background image, per spec: // http://www.w3.org/TR/CSS21/colors.html#background match style.Background.get().background_image { Some(ref image_url) => { let mut holder = ImageHolder::new(image_url.clone(), builder.ctx.image_cache.clone()); match holder.get_image() { Some(image) => { debug!("(building display list) building background image"); // Adjust bounds for `background-position` and `background-attachment`. let mut bounds = *absolute_bounds; let horizontal_position = model::specified( style.Background.get().background_position.horizontal, bounds.size.width); let vertical_position = model::specified( style.Background.get().background_position.vertical, bounds.size.height); let clip_display_item; match style.Background.get().background_attachment { background_attachment::scroll => { clip_display_item = None; bounds.origin.x = bounds.origin.x + horizontal_position; bounds.origin.y = bounds.origin.y + vertical_position; bounds.size.width = bounds.size.width - horizontal_position; bounds.size.height = bounds.size.height - vertical_position; } background_attachment::fixed => { clip_display_item = Some(~ClipDisplayItem { base: BaseDisplayItem { bounds: bounds, node: self.node, }, child_list: SmallVec0::new(), need_clip: true, }); bounds = Rect { origin: Point2D(horizontal_position, vertical_position), size: Size2D(bounds.origin.x + bounds.size.width, bounds.origin.y + bounds.size.height), } } } // Adjust sizes for `background-repeat`. match style.Background.get().background_repeat { background_repeat::no_repeat => { bounds.size.width = Au::from_px(image.get().width as int); bounds.size.height = Au::from_px(image.get().height as int) } background_repeat::repeat_x => { bounds.size.height = Au::from_px(image.get().height as int) } background_repeat::repeat_y => { bounds.size.width = Au::from_px(image.get().width as int) } background_repeat::repeat => {} }; // Create the image display item. let image_display_item = ImageDisplayItemClass(~ImageDisplayItem { base: BaseDisplayItem { bounds: bounds, node: self.node, }, image: image.clone(), stretch_size: Size2D(Au::from_px(image.get().width as int), Au::from_px(image.get().height as int)), }); match clip_display_item { None => list.push(image_display_item), Some(mut clip_display_item) => { clip_display_item.child_list.push(image_display_item); list.push(ClipDisplayItemClass(clip_display_item)) } } } None => { // No image data at all? Do nothing. // // TODO: Add some kind of placeholder background image. debug!("(building display list) no background image :("); } } } None => {} } } /// Adds the display items necessary to paint the borders of this box to a display list if /// necessary. pub fn paint_borders_if_applicable(&self, list: &mut DisplayList, abs_bounds: &Rect<Au>) { // Fast path. let border = self.border.get(); if border.is_zero() { return } let style = self.style(); let top_color = style.resolve_color(style.Border.get().border_top_color); let right_color = style.resolve_color(style.Border.get().border_right_color); let bottom_color = style.resolve_color(style.Border.get().border_bottom_color); let left_color = style.resolve_color(style.Border.get().border_left_color); let top_style = style.Border.get().border_top_style; let right_style = style.Border.get().border_right_style; let bottom_style = style.Border.get().border_bottom_style; let left_style = style.Border.get().border_left_style; let mut abs_bounds = abs_bounds.clone(); abs_bounds.origin.x = abs_bounds.origin.x + self.noncontent_inline_left(); abs_bounds.size.width = abs_bounds.size.width - self.noncontent_inline_left() - self.noncontent_inline_right(); // Append the border to the display list. let border_display_item = ~BorderDisplayItem { base: BaseDisplayItem { bounds: abs_bounds, node: self.node, }, border: border, color: SideOffsets2D::new(top_color.to_gfx_color(), right_color.to_gfx_color(), bottom_color.to_gfx_color(), left_color.to_gfx_color()), style: SideOffsets2D::new(top_style, right_style, bottom_style, left_style) }; list.push(BorderDisplayItemClass(border_display_item)) } fn build_debug_borders_around_text_boxes(&self, stacking_context: &mut StackingContext, flow_origin: Point2D<Au>, text_box: &ScannedTextBoxInfo) { let box_bounds = self.border_box.get(); let absolute_box_bounds = box_bounds.translate(&flow_origin); // Compute the text box bounds and draw a border surrounding them. let debug_border = SideOffsets2D::new_all_same(Au::from_px(1)); let border_display_item = ~BorderDisplayItem { base: BaseDisplayItem { bounds: absolute_box_bounds, node: self.node, }, border: debug_border, color: SideOffsets2D::new_all_same(rgb(0, 0, 200)), style: SideOffsets2D::new_all_same(border_style::solid) }; stacking_context.content.push(BorderDisplayItemClass(border_display_item)); // Draw a rectangle representing the baselines. let ascent = text_box.run.get().metrics_for_range(&text_box.range).ascent; let baseline = Rect(absolute_box_bounds.origin + Point2D(Au(0), ascent), Size2D(absolute_box_bounds.size.width, Au(0))); let line_display_item = ~LineDisplayItem { base: BaseDisplayItem { bounds: baseline, node: self.node, }, color: rgb(0, 200, 0), style: border_style::dashed, }; stacking_context.content.push(LineDisplayItemClass(line_display_item)) } fn build_debug_borders_around_box(&self, stacking_context: &mut StackingContext, flow_origin: Point2D<Au>) { let box_bounds = self.border_box.get(); let absolute_box_bounds = box_bounds.translate(&flow_origin); // This prints a debug border around the border of this box. let debug_border = SideOffsets2D::new_all_same(Au::from_px(1)); let border_display_item = ~BorderDisplayItem { base: BaseDisplayItem { bounds: absolute_box_bounds, node: self.node, }, border: debug_border, color: SideOffsets2D::new_all_same(rgb(0, 0, 200)), style: SideOffsets2D::new_all_same(border_style::solid) }; stacking_context.content.push(BorderDisplayItemClass(border_display_item)) } /// Adds the display items for this box to the given stacking context. /// /// Arguments: /// /// * `stacking_context`: The stacking context to add display items to. /// * `builder`: The display list builder, which manages the coordinate system and options. /// * `dirty`: The dirty rectangle in the coordinate system of the owning flow. /// * `flow_origin`: Position of the origin of the owning flow wrt the display list root flow. /// box. /// * `flow`: The flow that this box belongs to. pub fn build_display_list(&self, stacking_context: &mut StackingContext, builder: &DisplayListBuilder, _: &DisplayListBuildingInfo, flow_origin: Point2D<Au>, flow: &Flow, background_and_border_level: BackgroundAndBorderLevel) { // Box position wrt to the owning flow. let box_bounds = self.border_box.get(); let absolute_box_bounds = box_bounds.translate(&flow_origin); debug!("Box::build_display_list at rel={}, abs={}: {:s}", box_bounds, absolute_box_bounds, self.debug_str()); debug!("Box::build_display_list: dirty={}, flow_origin={}", builder.dirty, flow_origin); if self.style().InheritedBox.get().visibility != visibility::visible { return } if !absolute_box_bounds.intersects(&builder.dirty) { debug!("Box::build_display_list: Did not intersect..."); return } debug!("Box::build_display_list: intersected. Adding display item..."); { let list = stacking_context.list_for_background_and_border_level(background_and_border_level); // Add a background to the list, if this is an inline. // // FIXME(pcwalton): This is kind of ugly; merge with the call below? self.paint_inline_background_border_if_applicable(list, &absolute_box_bounds, &flow_origin); // Add the background to the list, if applicable. self.paint_background_if_applicable(list, builder, &absolute_box_bounds); // Add a border, if applicable. // // TODO: Outlines. self.paint_borders_if_applicable(list, &absolute_box_bounds); } match self.specific { UnscannedTextBox(_) => fail!("Shouldn't see unscanned boxes here."), TableColumnBox(_) => fail!("Shouldn't see table column boxes here."), ScannedTextBox(ref text_box) => { let text_color = self.style().Color.get().color.to_gfx_color(); // Set the various text display item flags. let mut flow_flags = flow::base(flow).flags_info.clone(); let inline_info = self.inline_info.borrow(); match &*inline_info { &Some(ref info) => { for data in info.parent_info.as_slice().rev_iter() { let parent_info = FlowFlagsInfo::new(data.style.get()); flow_flags.propagate_text_decoration_from_parent(&parent_info); } }, &None => {} } let mut text_flags = TextDisplayItemFlags::new(); text_flags.set_override_underline(flow_flags.flags.override_underline()); text_flags.set_override_overline(flow_flags.flags.override_overline()); text_flags.set_override_line_through(flow_flags.flags.override_line_through()); let mut bounds = absolute_box_bounds.clone(); bounds.origin.x = bounds.origin.x + self.noncontent_left() + self.noncontent_inline_left(); bounds.size.width = bounds.size.width - self.noncontent_width() - self.noncontent_inline_left() - self.noncontent_inline_right(); // Create the text box. let text_display_item = ~TextDisplayItem { base: BaseDisplayItem { bounds: bounds, node: self.node, }, text_run: text_box.run.clone(), range: text_box.range, text_color: text_color, overline_color: flow_flags.overline_color(text_color), underline_color: flow_flags.underline_color(text_color), line_through_color: flow_flags.line_through_color(text_color), flags: text_flags, }; stacking_context.content.push(TextDisplayItemClass(text_display_item)); // Draw debug frames for text bounds. // // FIXME(pcwalton): This is a bit of an abuse of the logging infrastructure. We // should have a real `SERVO_DEBUG` system. debug!("{:?}", self.build_debug_borders_around_text_boxes(stacking_context, flow_origin, text_box)) }, GenericBox | IframeBox(..) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => { let item = ~ClipDisplayItem { base: BaseDisplayItem { bounds: absolute_box_bounds, node: self.node, }, child_list: SmallVec0::new(), need_clip: self.needs_clip() }; stacking_context.content.push(ClipDisplayItemClass(item)); // FIXME(pcwalton): This is a bit of an abuse of the logging infrastructure. We // should have a real `SERVO_DEBUG` system. debug!("{:?}", self.build_debug_borders_around_box(stacking_context, flow_origin)) }, ImageBox(ref image_box) => { let mut image_ref = image_box.image.borrow_mut(); let mut bounds = absolute_box_bounds.clone(); bounds.origin.x = bounds.origin.x + self.noncontent_left() + self.noncontent_inline_left(); bounds.origin.y = bounds.origin.y + self.noncontent_top(); bounds.size.width = bounds.size.width - self.noncontent_width() - self.noncontent_inline_left() - self.noncontent_inline_right(); bounds.size.height = bounds.size.height - self.noncontent_height(); match image_ref.get_image() { Some(image) => { debug!("(building display list) building image box"); // Place the image into the display list. let image_display_item = ~ImageDisplayItem { base: BaseDisplayItem { bounds: bounds, node: self.node, }, image: image.clone(), stretch_size: bounds.size, }; stacking_context.content.push(ImageDisplayItemClass(image_display_item)) } None => { // No image data at all? Do nothing. // // TODO: Add some kind of placeholder image. debug!("(building display list) no image :("); } } // FIXME(pcwalton): This is a bit of an abuse of the logging infrastructure. We // should have a real `SERVO_DEBUG` system. debug!("{:?}", self.build_debug_borders_around_box(stacking_context, flow_origin)) } } // If this is an iframe, then send its position and size up to the constellation. // // FIXME(pcwalton): Doing this during display list construction seems potentially // problematic if iframes are outside the area we're computing the display list for, since // they won't be able to reflow at all until the user scrolls to them. Perhaps we should // separate this into two parts: first we should send the size only to the constellation // once that's computed during assign-heights, and second we should should send the origin // to the constellation here during display list construction. This should work because // layout for the iframe only needs to know size, and origin is only relevant if the // iframe is actually going to be displayed. match self.specific { IframeBox(ref iframe_box) => { self.finalize_position_and_size_of_iframe(iframe_box, flow_origin, builder.ctx) } _ => {} } } /// Returns the intrinsic widths of this fragment. pub fn intrinsic_widths(&self) -> IntrinsicWidths { let mut result = self.style_specified_intrinsic_width(); match self.specific { GenericBox | IframeBox(_) | TableBox | TableCellBox | TableColumnBox(_) | TableRowBox | TableWrapperBox => {} ImageBox(ref image_box_info) => { let image_width = image_box_info.image_width(); result.minimum_width = geometry::max(result.minimum_width, image_width); result.preferred_width = geometry::max(result.preferred_width, image_width); } ScannedTextBox(ref text_box_info) => { let range = &text_box_info.range; let min_line_width = text_box_info.run.get().min_width_for_range(range); let mut max_line_width = Au::new(0); for line_range in text_box_info.run.get().iter_natural_lines_for_range(range) { let line_metrics = text_box_info.run.get().metrics_for_range(&line_range); max_line_width = Au::max(max_line_width, line_metrics.advance_width); } result.minimum_width = geometry::max(result.minimum_width, min_line_width); result.preferred_width = geometry::max(result.preferred_width, max_line_width); } UnscannedTextBox(..) => fail!("Unscanned text boxes should have been scanned by now!"), } // Take borders and padding for parent inline boxes into account. let inline_info = self.inline_info.get(); match inline_info { None => {} Some(ref inline_info) => { for inline_parent_info in inline_info.parent_info.iter() { let border_width = inline_parent_info.border.left + inline_parent_info.border.right; let padding_width = inline_parent_info.padding.left + inline_parent_info.padding.right; result.minimum_width = result.minimum_width + border_width + padding_width; result.preferred_width = result.preferred_width + border_width + padding_width; } } } result } /// TODO: What exactly does this function return? Why is it Au(0) for GenericBox? pub fn content_width(&self) -> Au { match self.specific { GenericBox | IframeBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => Au(0), ImageBox(ref image_box_info) => { image_box_info.computed_width() } ScannedTextBox(ref text_box_info) => { let (range, run) = (&text_box_info.range, &text_box_info.run); let text_bounds = run.get().metrics_for_range(range).bounding_box; text_bounds.size.width } TableColumnBox(_) => fail!("Table column boxes do not have width"), UnscannedTextBox(_) => fail!("Unscanned text boxes should have been scanned by now!"), } } /// Returns, and computes, the height of this box. pub fn content_height(&self) -> Au { match self.specific { GenericBox | IframeBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => Au(0), ImageBox(ref image_box_info) => { image_box_info.computed_height() } ScannedTextBox(ref text_box_info) => { // Compute the height based on the line-height and font size. let (range, run) = (&text_box_info.range, &text_box_info.run); let text_bounds = run.get().metrics_for_range(range).bounding_box; let em_size = text_bounds.size.height; self.calculate_line_height(em_size) } TableColumnBox(_) => fail!("Table column boxes do not have height"), UnscannedTextBox(_) => fail!("Unscanned text boxes should have been scanned by now!"), } } /// Return the size of the content box. pub fn content_box_size(&self) -> Size2D<Au> { let border_box_size = self.border_box.get().size; Size2D(border_box_size.width - self.noncontent_width(), border_box_size.height - self.noncontent_height()) } /// Split box which includes new-line character pub fn split_by_new_line(&self) -> SplitBoxResult { match self.specific { GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => CannotSplit, TableColumnBox(_) => fail!("Table column boxes do not need to split"), UnscannedTextBox(_) => fail!("Unscanned text boxes should have been scanned by now!"), ScannedTextBox(ref text_box_info) => { let mut new_line_pos = self.new_line_pos.clone(); let cur_new_line_pos = new_line_pos.shift().unwrap(); let left_range = Range::new(text_box_info.range.begin(), cur_new_line_pos); let right_range = Range::new(text_box_info.range.begin() + cur_new_line_pos + 1, text_box_info.range.length() - (cur_new_line_pos + 1)); // Left box is for left text of first founded new-line character. let left_box = { let new_text_box_info = ScannedTextBoxInfo::new(text_box_info.run.clone(), left_range); let new_metrics = new_text_box_info.run.get().metrics_for_range(&left_range); let mut new_box = self.transform(new_metrics.bounding_box.size, ScannedTextBox(new_text_box_info)); new_box.new_line_pos = ~[]; Some(new_box) }; // Right box is for right text of first founded new-line character. let right_box = if right_range.length() > 0 { let new_text_box_info = ScannedTextBoxInfo::new(text_box_info.run.clone(), right_range); let new_metrics = new_text_box_info.run.get().metrics_for_range(&right_range); let mut new_box = self.transform(new_metrics.bounding_box.size, ScannedTextBox(new_text_box_info)); new_box.new_line_pos = new_line_pos; Some(new_box) } else { None }; SplitDidFit(left_box, right_box) } } } /// Attempts to split this box so that its width is no more than `max_width`. pub fn split_to_width(&self, max_width: Au, starts_line: bool) -> SplitBoxResult { match self.specific { GenericBox | IframeBox(_) | ImageBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => CannotSplit, TableColumnBox(_) => fail!("Table column boxes do not have width"), UnscannedTextBox(_) => fail!("Unscanned text boxes should have been scanned by now!"), ScannedTextBox(ref text_box_info) => { let mut pieces_processed_count: uint = 0; let mut remaining_width: Au = max_width; let mut left_range = Range::new(text_box_info.range.begin(), 0); let mut right_range: Option<Range> = None; debug!("split_to_width: splitting text box (strlen={:u}, range={}, \ avail_width={})", text_box_info.run.get().text.get().len(), text_box_info.range, max_width); for (glyphs, offset, slice_range) in text_box_info.run.get().iter_slices_for_range( &text_box_info.range) { debug!("split_to_width: considering slice (offset={}, range={}, \ remain_width={})", offset, slice_range, remaining_width); let metrics = text_box_info.run.get().metrics_for_slice(glyphs, &slice_range); let advance = metrics.advance_width; let should_continue; if advance <= remaining_width { should_continue = true; if starts_line && pieces_processed_count == 0 && glyphs.is_whitespace() { debug!("split_to_width: case=skipping leading trimmable whitespace"); left_range.shift_by(slice_range.length() as int); } else { debug!("split_to_width: case=enlarging span"); remaining_width = remaining_width - advance; left_range.extend_by(slice_range.length() as int); } } else { // The advance is more than the remaining width. should_continue = false; let slice_begin = offset + slice_range.begin(); let slice_end = offset + slice_range.end(); if glyphs.is_whitespace() { // If there are still things after the trimmable whitespace, create the // right chunk. if slice_end < text_box_info.range.end() { debug!("split_to_width: case=skipping trimmable trailing \ whitespace, then split remainder"); let right_range_end = text_box_info.range.end() - slice_end; right_range = Some(Range::new(slice_end, right_range_end)); } else { debug!("split_to_width: case=skipping trimmable trailing \ whitespace"); } } else if slice_begin < text_box_info.range.end() { // There are still some things left over at the end of the line. Create // the right chunk. let right_range_end = text_box_info.range.end() - slice_begin; right_range = Some(Range::new(slice_begin, right_range_end)); debug!("split_to_width: case=splitting remainder with right range={:?}", right_range); } } pieces_processed_count += 1; if !should_continue { break } } let left_box = if left_range.length() > 0 { let new_text_box_info = ScannedTextBoxInfo::new(text_box_info.run.clone(), left_range); let mut new_metrics = new_text_box_info.run.get().metrics_for_range(&left_range); new_metrics.bounding_box.size.height = self.border_box.get().size.height; Some(self.transform(new_metrics.bounding_box.size, ScannedTextBox(new_text_box_info))) } else { None }; let right_box = right_range.map_or(None, |range: Range| { let new_text_box_info = ScannedTextBoxInfo::new(text_box_info.run.clone(), range); let mut new_metrics = new_text_box_info.run.get().metrics_for_range(&range); new_metrics.bounding_box.size.height = self.border_box.get().size.height; Some(self.transform(new_metrics.bounding_box.size, ScannedTextBox(new_text_box_info))) }); if pieces_processed_count == 1 || left_box.is_none() { SplitDidNotFit(left_box, right_box) } else { if left_box.is_some() { left_box.get_ref().clear_noncontent_inline_right(); } if right_box.is_some() { right_box.get_ref().clear_noncontent_inline_left(); } SplitDidFit(left_box, right_box) } } } } /// Returns true if this box is an unscanned text box that consists entirely of whitespace. pub fn is_whitespace_only(&self) -> bool { match self.specific { UnscannedTextBox(ref text_box_info) => is_whitespace(text_box_info.text), _ => false, } } /// Assigns replaced width, padding, and margins for this box only if it is replaced content /// per CSS 2.1 § 10.3.2. pub fn assign_replaced_width_if_necessary(&self, container_width: Au) { match self.specific { GenericBox | IframeBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => {} ImageBox(ref image_box_info) => { self.compute_padding(self.style(), container_width); // TODO(ksh8281): compute border,margin let width = ImageBoxInfo::style_length(self.style().Box.get().width, image_box_info.dom_width, container_width); // FIXME(ksh8281): we shouldn't figure height this way // now, we don't know about size of parent's height let height = ImageBoxInfo::style_length(self.style().Box.get().height, image_box_info.dom_height, Au::new(0)); let width = match (width,height) { (Auto,Auto) => { image_box_info.image_width() }, (Auto,Specified(h)) => { let scale = image_box_info. image_height().to_f32().unwrap() / h.to_f32().unwrap(); Au::new((image_box_info.image_width().to_f32().unwrap() / scale) as i32) }, (Specified(w),_) => { w } }; let mut position = self.border_box.borrow_mut(); position.size.width = width + self.noncontent_width() + self.noncontent_inline_left() + self.noncontent_inline_right(); image_box_info.computed_width.set(Some(width)); } ScannedTextBox(_) => { // Scanned text boxes will have already had their // content_widths assigned by this point. let mut position = self.border_box.borrow_mut(); position.size.width = position.size.width + self.noncontent_width() + self.noncontent_inline_left() + self.noncontent_inline_right(); } TableColumnBox(_) => fail!("Table column boxes do not have width"), UnscannedTextBox(_) => fail!("Unscanned text boxes should have been scanned by now!"), } } /// Assign height for this box if it is replaced content. /// /// Ideally, this should follow CSS 2.1 § 10.6.2 pub fn assign_replaced_height_if_necessary(&self) { match self.specific { GenericBox | IframeBox(_) | TableBox | TableCellBox | TableRowBox | TableWrapperBox => {} ImageBox(ref image_box_info) => { // TODO(ksh8281): compute border,margin,padding let width = image_box_info.computed_width(); // FIXME(ksh8281): we shouldn't assign height this way // we don't know about size of parent's height let height = ImageBoxInfo::style_length(self.style().Box.get().height, image_box_info.dom_height, Au::new(0)); let height = match (self.style().Box.get().width, image_box_info.dom_width, height) { (LPA_Auto, None, Auto) => { image_box_info.image_height() }, (_,_,Auto) => { let scale = image_box_info.image_width().to_f32().unwrap() / width.to_f32().unwrap(); Au::new((image_box_info.image_height().to_f32().unwrap() / scale) as i32) }, (_,_,Specified(h)) => { h } }; let mut position = self.border_box.borrow_mut(); image_box_info.computed_height.set(Some(height)); position.size.height = height + self.noncontent_height() } ScannedTextBox(_) => { // Scanned text boxes will have already had their widths assigned by this point let mut position = self.border_box.borrow_mut(); // Scanned text boxes' content heights are calculated by the // text run scanner during Flow construction. position.size.height = position.size.height + self.noncontent_height() } TableColumnBox(_) => fail!("Table column boxes do not have height"), UnscannedTextBox(_) => fail!("Unscanned text boxes should have been scanned by now!"), } } /// Returns true if this box can merge with another adjacent box or false otherwise. pub fn can_merge_with_box(&self, other: &Box) -> bool { match (&self.specific, &other.specific) { (&UnscannedTextBox(_), &UnscannedTextBox(_)) => { self.font_style() == other.font_style() && self.text_decoration() == other.text_decoration() } _ => false, } } /// Cleans up all the memory associated with this box. pub fn teardown(&self) { match self.specific { ScannedTextBox(ref text_box_info) => text_box_info.run.get().teardown(), _ => {} } } /// Returns true if the contents should be clipped (i.e. if `overflow` is `hidden`). pub fn needs_clip(&self) -> bool { self.style().Box.get().overflow == overflow::hidden } /// Returns a debugging string describing this box. pub fn debug_str(&self) -> ~str { let class_name = match self.specific { GenericBox => "GenericBox", IframeBox(_) => "IframeBox", ImageBox(_) => "ImageBox", ScannedTextBox(_) => "ScannedTextBox", TableBox => "TableBox", TableCellBox => "TableCellBox", TableColumnBox(_) => "TableColumnBox", TableRowBox => "TableRowBox", TableWrapperBox => "TableWrapperBox", UnscannedTextBox(_) => "UnscannedTextBox", }; format!("({}{}{}{})", class_name, self.side_offsets_debug_string("b", self.border.get()), self.side_offsets_debug_string("p", self.padding.get()), self.side_offsets_debug_string("m", self.margin.get())) } /// A helper function to return a debug string describing the side offsets for one of the rect /// box model properties (border, padding, or margin). fn side_offsets_debug_string(&self, name: &str, value: SideOffsets2D<Au>) -> ~str { let zero: SideOffsets2D<Au> = Zero::zero(); if value == zero { return "".to_str() } format!(" {}{},{},{},{}", name, value.top, value.right, value.bottom, value.left) } /// Sends the size and position of this iframe box to the constellation. This is out of line to /// guide inlining. #[inline(never)] fn finalize_position_and_size_of_iframe(&self, iframe_box: &IframeBoxInfo, offset: Point2D<Au>, layout_context: &LayoutContext) { let left = offset.x + self.margin.get().left + self.border.get().left + self.padding.get().left; let top = offset.y + self.margin.get().top + self.border.get().top + self.padding.get().top; let width = self.border_box.get().size.width - self.noncontent_width(); let height = self.border_box.get().size.height - self.noncontent_height(); let origin = Point2D(geometry::to_frac_px(left) as f32, geometry::to_frac_px(top) as f32); let size = Size2D(geometry::to_frac_px(width) as f32, geometry::to_frac_px(height) as f32); let rect = Rect(origin, size); debug!("finalizing position and size of iframe for {:?},{:?}", iframe_box.pipeline_id, iframe_box.subpage_id); let msg = FrameRectMsg(iframe_box.pipeline_id, iframe_box.subpage_id, rect); let ConstellationChan(ref chan) = layout_context.constellation_chan; chan.send(msg) } }<|fim▁end|>
pub fn paint_inline_background_border_if_applicable(&self, list: &mut DisplayList, absolute_bounds: &Rect<Au>, offset: &Point2D<Au>) {
<|file_name|>0_4_0.py<|end_file_name|><|fim▁begin|># Copyright (c) 2008-2016 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """0.3.0 to 0.4.0 Revision ID: 0.3.0 Revises: """ # revision identifiers, used by Alembic. revision = '0.4.0' down_revision = '0.3.0' branch_labels = None depends_on = None from alembic import op from db_meta import * from sqlalchemy.dialects import mysql def upgrade(): """ update schema&data """ bind = op.get_bind() #alter column user.username, alter column user.email, project.name and add column replication_policy.deleted op.alter_column('user', 'username', type_=sa.String(32), existing_type=sa.String(15)) op.alter_column('user', 'email', type_=sa.String(255), existing_type=sa.String(128)) op.alter_column('project', 'name', type_=sa.String(41), existing_type=sa.String(30), nullable=False) op.alter_column('replication_target', 'password', type_=sa.String(128), existing_type=sa.String(40)) op.add_column('replication_policy', sa.Column('deleted', mysql.TINYINT(1), nullable=False, server_default=sa.text("'0'"))) #create index pid_optime (project_id, op_time) on table access_log, poid_uptime (policy_id, update_time) on table replication_job op.create_index('pid_optime', 'access_log', ['project_id', 'op_time']) op.create_index('poid_uptime', 'replication_job', ['policy_id', 'update_time']) #create tables: repository Repository.__table__.create(bind) def downgrade(): """ Downgrade has been disabled. """ pass<|fim▁end|>
# you may not use this file except in compliance with the License.
<|file_name|>example.py<|end_file_name|><|fim▁begin|><|fim▁hole|> mygraph = greengraph.Greengraph('New York','Chicago') data = mygraph.green_between(20) plt.plot(data) plt.show()<|fim▁end|>
import greengraph if __name__ == '__main__': from matplotlib import pyplot as plt
<|file_name|>mirror.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Gfx-rs Developers. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // use cocoa::base::{selector, class}; // use cocoa::foundation::{NSUInteger}; use core::{self, shade}; use metal::*; pub fn map_base_type_to_format(ty: shade::BaseType) -> MTLVertexFormat { use core::shade::BaseType::*; match ty { I32 => MTLVertexFormat::Int, U32 => MTLVertexFormat::UInt, F32 => MTLVertexFormat::Float, Bool => MTLVertexFormat::Char2, F64 => { unimplemented!() } } } pub fn populate_vertex_attributes(info: &mut shade::ProgramInfo, desc: NSArray<MTLVertexAttribute>) { use map::{map_base_type, map_container_type}; for idx in 0..desc.count() { let attr = desc.object_at(idx); info.vertex_attributes.push(shade::AttributeVar { name: attr.name().into(), slot: attr.attribute_index() as core::AttributeSlot, base_type: map_base_type(attr.attribute_type()), container: map_container_type(attr.attribute_type()), }); } } pub fn populate_info(info: &mut shade::ProgramInfo, stage: shade::Stage, args: NSArray<MTLArgument>) { use map::{map_base_type, map_texture_type}; let usage = stage.into(); for idx in 0..args.count() { let arg = args.object_at(idx); let name = arg.name(); match arg.type_() { MTLArgumentType::Buffer => { if name.starts_with("vertexBuffer.") { continue; } info.constant_buffers.push(shade::ConstantBufferVar { name: name.into(), slot: arg.index() as core::ConstantBufferSlot, size: arg.buffer_data_size() as usize, usage: usage, elements: Vec::new(), // TODO! }); } MTLArgumentType::Texture => { info.textures.push(shade::TextureVar { name: name.into(), slot: arg.index() as core::ResourceViewSlot, base_type: map_base_type(arg.texture_data_type()), ty: map_texture_type(arg.texture_type()),<|fim▁hole|> }); } MTLArgumentType::Sampler => { let name = name.trim_right_matches('_'); info.samplers.push(shade::SamplerVar { name: name.into(), slot: arg.index() as core::SamplerSlot, ty: shade::SamplerType(shade::IsComparison::NoCompare, shade::IsRect::NoRect), usage: usage, }); } _ => {} } } }<|fim▁end|>
usage: usage,
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Parity is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Parity. If not, see <http://www.gnu.org/licenses/>. import React, { Component, PropTypes } from 'react'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import Loading from '../Loading'; import Status from '../Status'; import Tokens from '../Tokens'; import Actions from '../Actions'; import styles from './application.css'; const muiTheme = getMuiTheme({ palette: { primary1Color: '#27ae60' } }); export default class Application extends Component { static childContextTypes = { muiTheme: PropTypes.object<|fim▁hole|> contract: PropTypes.object }; render () { const { isLoading, contract } = this.props; if (isLoading) { return ( <Loading /> ); } return ( <div className={ styles.application }> <Status address={ contract.address } fee={ contract.fee } /> <Actions /> <Tokens /> </div> ); } getChildContext () { return { muiTheme }; } }<|fim▁end|>
} static propTypes = { isLoading: PropTypes.bool.isRequired,
<|file_name|>view-node-map.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:8b057c8d60d76759e6a75285bd1fcea8ba4acea65ffe3b8e5ff4a1937cb3dacd size 2530
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ######################################################################### import json from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from django.test import TestCase from django.conf import settings from guardian.shortcuts import get_anonymous_user from geonode.groups.models import GroupProfile, GroupInvitation, GroupCategory from geonode.documents.models import Document from geonode.layers.models import Layer from geonode.maps.models import Map from geonode.base.populate_test_data import create_models from geonode.security.views import _perms_info_json class SmokeTest(TestCase): """ Basic checks to make sure pages load, etc. """ fixtures = ['initial_data.json', "group_test_data"] def setUp(self): create_models(type='layer') create_models(type='map') create_models(type='document') self.norman = get_user_model().objects.get(username="norman") self.norman.groups.add(Group.objects.get(name='anonymous')) self.test_user = get_user_model().objects.get(username='test_user') self.test_user.groups.add(Group.objects.get(name='anonymous')) self.bar = GroupProfile.objects.get(slug='bar') self.anonymous_user = get_anonymous_user() def test_group_permissions_extend_to_user(self): """ Ensures that when a user is in a group, the group permissions extend to the user. """ layer = Layer.objects.all()[0] # Set the default permissions layer.set_default_permissions() # Test that the anonymous user can read self.assertTrue( self.anonymous_user.has_perm( 'view_resourcebase', layer.get_self_resource())) # Test that the default perms give Norman view permissions but not # write permissions self.assertTrue( self.norman.has_perm( 'view_resourcebase', layer.get_self_resource())) self.assertFalse( self.norman.has_perm( 'change_resourcebase', layer.get_self_resource())) # Make sure Norman is not in the bar group. self.assertFalse(self.bar.user_is_member(self.norman)) # Add norman to the bar group. self.bar.join(self.norman) # Ensure Norman is in the bar group. self.assertTrue(self.bar.user_is_member(self.norman)) # Give the bar group permissions to change the layer. permissions = { 'groups': { 'bar': [ 'view_resourcebase', 'change_resourcebase']}} layer.set_permissions(permissions) self.assertTrue( self.norman.has_perm( 'view_resourcebase', layer.get_self_resource())) # check that now norman can change the layer self.assertTrue( self.norman.has_perm( 'change_resourcebase', layer.get_self_resource())) # Test adding a new user to the group after setting permissions on the layer. # Make sure Test User is not in the bar group. self.assertFalse(self.bar.user_is_member(self.test_user)) self.assertFalse( self.test_user.has_perm( 'change_resourcebase', layer.get_self_resource())) self.bar.join(self.test_user) self.assertTrue( self.test_user.has_perm( 'change_resourcebase', layer.get_self_resource())) def test_group_resource(self): """ Tests the resources method on a Group object. """ layer = Layer.objects.all()[0] map = Map.objects.all()[0] perm_spec = {'groups': {'bar': ['change_resourcebase']}} # Give the self.bar group write perms on the layer layer.set_permissions(perm_spec) map.set_permissions(perm_spec) # Ensure the layer is returned in the group's resources self.assertTrue(layer.get_self_resource() in self.bar.resources()) self.assertTrue(map.get_self_resource() in self.bar.resources()) # Test the resource filter self.assertTrue( layer.get_self_resource() in self.bar.resources( resource_type='layer')) self.assertTrue( map.get_self_resource() not in self.bar.resources( resource_type='layer')) # Revoke permissions on the layer from the self.bar group layer.set_permissions("{}") # Ensure the layer is no longer returned in the groups resources self.assertFalse(layer.get_self_resource() in self.bar.resources()) def test_perms_info(self): """ Tests the perms_info function (which passes permissions to the response context). """ # Add test to test perms being sent to the front end. layer = Layer.objects.all()[0] layer.set_default_permissions() perms_info = layer.get_all_level_info() # Ensure there is only one group 'anonymous' by default self.assertEqual(len(perms_info['groups'].keys()), 1) # Add the foo group to the layer object groups layer.set_permissions({'groups': {'bar': ['view_resourcebase']}}) perms_info = _perms_info_json(layer) # Ensure foo is in the perms_info output self.assertItemsEqual( json.loads(perms_info)['groups'], { 'bar': ['view_resourcebase']}) def test_resource_permissions(self): """ Tests that the client can get and set group permissions through the test_resource_permissions view. """ self.assertTrue(self.client.login(username="admin", password="admin")) layer = Layer.objects.all()[0] document = Document.objects.all()[0] map_obj = Map.objects.all()[0] layer.set_default_permissions() document.set_default_permissions() map_obj.set_default_permissions() objects = layer, document, map_obj for obj in objects: response = self.client.get( reverse( 'resource_permissions', kwargs=dict( resource_id=obj.id))) self.assertEqual(response.status_code, 200) js = json.loads(response.content) permissions = js.get('permissions', dict()) if isinstance(permissions, unicode) or isinstance( permissions, str): permissions = json.loads(permissions) <|fim▁hole|> # Ensure the groups value is empty by default expected_permissions = {} if settings.DEFAULT_ANONYMOUS_DOWNLOAD_PERMISSION: expected_permissions.setdefault( u'anonymous', []).append(u'download_resourcebase') if settings.DEFAULT_ANONYMOUS_VIEW_PERMISSION: expected_permissions.setdefault( u'anonymous', []).append(u'view_resourcebase') self.assertItemsEqual( permissions.get('groups'), expected_permissions) permissions = { 'groups': { 'bar': ['change_resourcebase'] }, 'users': { 'admin': ['change_resourcebase'] } } # Give the bar group permissions response = self.client.post( reverse( 'resource_permissions', kwargs=dict(resource_id=obj.id)), data=json.dumps(permissions), content_type="application/json") self.assertEqual(response.status_code, 200) response = self.client.get( reverse( 'resource_permissions', kwargs=dict( resource_id=obj.id))) js = json.loads(response.content) permissions = js.get('permissions', dict()) if isinstance(permissions, unicode) or isinstance( permissions, str): permissions = json.loads(permissions) # Make sure the bar group now has write permissions self.assertItemsEqual( permissions['groups'], { 'bar': ['change_resourcebase']}) # Remove group permissions permissions = {"users": {"admin": ['change_resourcebase']}} # Update the object's permissions to remove the bar group response = self.client.post( reverse( 'resource_permissions', kwargs=dict(resource_id=obj.id)), data=json.dumps(permissions), content_type="application/json") self.assertEqual(response.status_code, 200) response = self.client.get( reverse( 'resource_permissions', kwargs=dict( resource_id=obj.id))) js = json.loads(response.content) permissions = js.get('permissions', dict()) if isinstance(permissions, unicode) or isinstance( permissions, str): permissions = json.loads(permissions) # Assert the bar group no longer has permissions self.assertItemsEqual(permissions['groups'], {}) def test_create_new_group(self): """ Tests creating a group through the group_create route. """ d = dict(title='TestGroup', description='This is a test group.', access='public', keywords='testing, groups') self.client.login(username="admin", password="admin") response = self.client.post(reverse('group_create'), data=d) # successful POSTS will redirect to the group's detail view. self.assertEqual(response.status_code, 302) self.assertTrue(GroupProfile.objects.get(title='TestGroup')) def test_delete_group_view(self): """ Tests deleting a group through the group_delete route. """ # Ensure the group exists self.assertTrue(GroupProfile.objects.get(id=self.bar.id)) self.client.login(username="admin", password="admin") # Delete the group response = self.client.post( reverse( 'group_remove', args=[ self.bar.slug])) # successful POSTS will redirect to the group list view. self.assertEqual(response.status_code, 302) self.assertFalse( GroupProfile.objects.filter( id=self.bar.id).count() > 0) def test_delete_group_view_no_perms(self): """ Tests deleting a group through the group_delete with a non-manager. """ # Ensure the group exists self.assertTrue(GroupProfile.objects.get(id=self.bar.id)) self.client.login(username="norman", password="norman") # Delete the group response = self.client.post( reverse( 'group_remove', args=[ self.bar.slug])) self.assertEqual(response.status_code, 403) # Ensure the group still exists self.assertTrue(GroupProfile.objects.get(id=self.bar.id)) def test_groupmember_manager(self): """ Tests the get_managers method. """ norman = get_user_model().objects.get(username="norman") admin = get_user_model().objects.get(username='admin') # Make sure norman is not a user self.assertFalse(self.bar.user_is_member(norman)) # Add norman to the self.bar group self.bar.join(norman) # Ensure norman is now a member self.assertTrue(self.bar.user_is_member(norman)) # Ensure norman is not in the managers queryset self.assertTrue(norman not in self.bar.get_managers()) # Ensure admin is in the managers queryset self.assertTrue(admin in self.bar.get_managers()) def test_public_pages_render(self): """ Verify pages that do not require login load without internal error """ response = self.client.get("/groups/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/group/bar/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/group/bar/members/") self.assertEqual(200, response.status_code) # 302 for auth failure since we redirect to login page response = self.client.get("/groups/create/") self.assertEqual(302, response.status_code) response = self.client.get("/groups/group/bar/update/") self.assertEqual(302, response.status_code) # 405 - json endpoint, doesn't support GET response = self.client.get("/groups/group/bar/invite/") self.assertEqual(405, response.status_code) def test_protected_pages_render(self): """ Verify pages that require login load without internal error """ self.assertTrue(self.client.login(username="admin", password="admin")) response = self.client.get("/groups/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/group/bar/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/group/bar/members/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/create/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/group/bar/update/") self.assertEqual(200, response.status_code) # 405 - json endpoint, doesn't support GET response = self.client.get("/groups/group/bar/invite/") self.assertEqual(405, response.status_code) def test_group_activity_pages_render(self): """ Verify Activity List pages """ self.assertTrue(self.client.login(username="admin", password="admin")) response = self.client.get("/groups/") self.assertEqual(200, response.status_code) response = self.client.get("/groups/group/bar/activity/") self.assertEqual(200, response.status_code) self.assertContains(response, '<a href="/layers/geonode:CA">CA</a>', count=0, status_code=200, msg_prefix='', html=False) self.assertContains(response, 'uploaded', count=0, status_code=200, msg_prefix='', html=False) try: # Add test to test perms being sent to the front end. layer = Layer.objects.all()[0] layer.set_default_permissions() perms_info = layer.get_all_level_info() # Ensure there is only one group 'anonymous' by default self.assertEqual(len(perms_info['groups'].keys()), 1) # Add the foo group to the layer object groups layer.set_permissions({'groups': {'bar': ['view_resourcebase']}}) perms_info = _perms_info_json(layer) # Ensure foo is in the perms_info output self.assertItemsEqual( json.loads(perms_info)['groups'], { 'bar': ['view_resourcebase']}) layer.group = self.bar.group layer.save() response = self.client.get("/groups/group/bar/activity/") self.assertEqual(200, response.status_code) self.assertContains(response, '<a href="/layers/geonode:CA">CA</a>', count=2, status_code=200, msg_prefix='', html=False) self.assertContains(response, 'uploaded', count=2, status_code=200, msg_prefix='', html=False) finally: layer.set_default_permissions() layer.group = None layer.save() class MembershipTest(TestCase): """ Tests membership logic in the geonode.groups models """ fixtures = ["group_test_data"] def test_group_is_member(self): """ Tests checking group membership """ anon = get_anonymous_user() normal = get_user_model().objects.get(username="norman") group = GroupProfile.objects.get(slug="bar") self.assert_(not group.user_is_member(anon)) self.assert_(not group.user_is_member(normal)) def test_group_add_member(self): """ Tests adding a user to a group """ anon = get_anonymous_user() normal = get_user_model().objects.get(username="norman") group = GroupProfile.objects.get(slug="bar") group.join(normal) self.assert_(group.user_is_member(normal)) self.assertRaises(ValueError, lambda: group.join(anon)) class InvitationTest(TestCase): """ Tests invitation logic in geonode.groups models """ fixtures = ["group_test_data"] def test_invite_user(self): """ Tests inviting a registered user """ normal = get_user_model().objects.get(username="norman") admin = get_user_model().objects.get(username="admin") group = GroupProfile.objects.get(slug="bar") group.invite(normal, admin, role="member", send=False) self.assert_( GroupInvitation.objects.filter( user=normal, from_user=admin, group=group).exists()) invite = GroupInvitation.objects.get( user=normal, from_user=admin, group=group) # Test that the user can access the token url. self.client.login(username="norman", password="norman") response = self.client.get( "/groups/group/{group}/invite/{token}/".format(group=group, token=invite.token)) self.assertEqual(200, response.status_code) def test_accept_invitation(self): """ Tests accepting an invitation """ anon = get_anonymous_user() normal = get_user_model().objects.get(username="norman") admin = get_user_model().objects.get(username="admin") group = GroupProfile.objects.get(slug="bar") group.invite(normal, admin, role="member", send=False) invitation = GroupInvitation.objects.get( user=normal, from_user=admin, group=group) self.assertRaises(ValueError, lambda: invitation.accept(anon)) self.assertRaises(ValueError, lambda: invitation.accept(admin)) invitation.accept(normal) self.assert_(group.user_is_member(normal)) self.assert_(invitation.state == "accepted") def test_decline_invitation(self): """ Tests declining an invitation """ anon = get_anonymous_user() normal = get_user_model().objects.get(username="norman") admin = get_user_model().objects.get(username="admin") group = GroupProfile.objects.get(slug="bar") group.invite(normal, admin, role="member", send=False) invitation = GroupInvitation.objects.get( user=normal, from_user=admin, group=group) self.assertRaises(ValueError, lambda: invitation.decline(anon)) self.assertRaises(ValueError, lambda: invitation.decline(admin)) invitation.decline(normal) self.assert_(not group.user_is_member(normal)) self.assert_(invitation.state == "declined") class GroupCategoriesTestCase(TestCase): """ Group Categories tests """ def setUp(self): c1 = GroupCategory.objects.create(name='test #1 category') g = GroupProfile.objects.create(title='test') g.categories.add(c1) g.save() User = get_user_model() u = User.objects.create(username='test') u.set_password('test') u.save() def test_api(self): api_url = '/api/groupcategory/' r = self.client.get(api_url) self.assertEqual(r.status_code, 200) data = json.loads(r.content) self.assertEqual( data['meta']['total_count'], GroupCategory.objects.all().count()) # check if we have non-empty group category self.assertTrue( GroupCategory.objects.filter( groups__isnull=False).exists()) for item in data['objects']: self.assertTrue( GroupCategory.objects.filter( slug=item['slug']).count() == 1) g = GroupCategory.objects.get(slug=item['slug']) self.assertEqual(item['member_count'], g.groups.all().count()) def test_group_categories_list(self): view_url = reverse('group_category_list') r = self.client.get(view_url) self.assertEqual(r.status_code, 200) def test_group_categories_add(self): view_url = reverse('group_category_create') r = self.client.get(view_url) self.assertEqual(r.status_code, 200) r = self.client.post(view_url) self.assertEqual(r.status_code, 200) self.client.login(username='test', password='test') category = 'test #3 category' r = self.client.post(view_url, {'name': category}) self.assertEqual(r.status_code, 302) q = GroupCategory.objects.filter(name=category) self.assertEqual(q.count(), 1) self.assertTrue(q.get().slug)<|fim▁end|>
<|file_name|>LSE.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # import El, time, random n0 = n1 = 50 numRowsB = 5 numRHS = 1 display = False output = False worldRank = El.mpi.WorldRank() worldSize = El.mpi.WorldSize() # NOTE: Increasing the magnitudes of the off-diagonal entries by an order of # magnitude makes the condition number vastly higher. def FD2D(N0,N1): A = El.DistSparseMatrix() height = N0*N1 width = N0*N1 A.Resize(height,width) localHeight = A.LocalHeight() A.Reserve(6*localHeight) for sLoc in xrange(localHeight): s = A.GlobalRow(sLoc) x0 = s % N0 x1 = s / N0 A.QueueLocalUpdate( sLoc, s, 11 ) if x0 > 0: A.QueueLocalUpdate( sLoc, s-1, -1 ) if x0+1 < N0: A.QueueLocalUpdate( sLoc, s+1, 2 ) if x1 > 0: A.QueueLocalUpdate( sLoc, s-N0, -3 ) if x1+1 < N1: A.QueueLocalUpdate( sLoc, s+N0, 4 ) # The dense last column A.QueueLocalUpdate( sLoc, width-1, -10/height ); A.ProcessQueues() return A def Constraints(numRows,N0,N1): B = El.DistSparseMatrix() El.Zeros( B, numRows, N0*N1 ) localHeight = B.LocalHeight() B.Reserve( localHeight*N0*N1 ) for sLoc in xrange(localHeight): s = B.GlobalRow(sLoc) for j in xrange(N0*N1): B.QueueLocalUpdate( sLoc, j, random.uniform(0,1) ) B.ProcessQueues() return B A = FD2D(n0,n1) B = Constraints(numRowsB,n0,n1) if display: El.Display( A, "A" ) El.Display( B, "B" ) if output: El.Print( A, "A" ) El.Print( B, "B" ) C = El.DistMultiVec() D = El.DistMultiVec() El.Uniform( C, A.Height(), numRHS ) El.Uniform( D, B.Height(), numRHS ) if display: El.Display( C, "C" ) El.Display( D, "D" ) if output: El.Print( C, "C" ) El.Print( D, "D" ) CNorm = El.FrobeniusNorm( C ) DNorm = El.FrobeniusNorm( D ) baseAlpha = 1e-4 ctrl = El.LeastSquaresCtrl_d() ctrl.alpha = baseAlpha ctrl.progress = True ctrl.equilibrate = True ctrl.qsdCtrl.relTol = 1e-10 ctrl.qsdCtrl.relTolRefine = 1e-12 ctrl.qsdCtrl.progress = True startLSE = time.clock() X = El.LSE(A,B,C,D,ctrl) endLSE = time.clock() if worldRank == 0: print "LSE time:", endLSE-startLSE, "seconds" if display: El.Display( X, "X" ) if output: El.Print( X, "X" ) E = El.DistMultiVec() El.Copy( C, E ) El.SparseMultiply( El.NORMAL, -1., A, X, 1., E ) residNorm = El.FrobeniusNorm( E ) if display: El.Display( E, "C - A X" ) if output: El.Print( E, "C - A X" )<|fim▁hole|>if worldRank == 0: print "|| C - A X ||_F / || C ||_F =", residNorm/CNorm El.Copy( D, E ) El.SparseMultiply( El.NORMAL, -1., B, X, 1., E ) equalNorm = El.FrobeniusNorm( E ) if display: El.Display( E, "D - B X" ) if output: El.Print( E, "D - B X" ) if worldRank == 0: print "|| D - B X ||_F / || D ||_F =", equalNorm/DNorm # Now try solving a weighted least squares problem # (as lambda -> infinity, the exact solution converges to that of LSE) def SolveWeighted(A,B,C,D,lambd): BScale = El.DistSparseMatrix() El.Copy( B, BScale ) El.Scale( lambd, BScale ) DScale = El.DistMultiVec() El.Copy( D, DScale ) El.Scale( lambd, DScale ) AEmb = El.VCat(A,BScale) CEmb = El.VCat(C,DScale) if output: El.Print( AEmb, "AEmb" ) ctrl.alpha = baseAlpha if worldRank == 0: print "lambda=", lambd, ": ctrl.alpha=", ctrl.alpha X=El.LeastSquares(AEmb,CEmb,ctrl) El.Copy( C, E ) El.SparseMultiply( El.NORMAL, -1., A, X, 1., E ) residNorm = El.FrobeniusNorm( E ) if display: El.Display( E, "C - A X" ) if output: El.Print( E, "C - A X" ) if worldRank == 0: print "lambda=", lambd, ": || C - A X ||_F / || C ||_F =", residNorm/CNorm El.Copy( D, E ) El.SparseMultiply( El.NORMAL, -1., B, X, 1., E ) equalNorm = El.FrobeniusNorm( E ) if display: El.Display( E, "D - B X" ) if output: El.Print( E, "D - B X" ) if worldRank == 0: print "lambda=", lambd, ": || D - B X ||_F / || D ||_F =", equalNorm/DNorm SolveWeighted(A,B,C,D,1) SolveWeighted(A,B,C,D,10) SolveWeighted(A,B,C,D,100) SolveWeighted(A,B,C,D,1000) SolveWeighted(A,B,C,D,10000) SolveWeighted(A,B,C,D,100000) # Require the user to press a button before the figures are closed El.Finalize() if worldSize == 1: raw_input('Press Enter to exit')<|fim▁end|>
<|file_name|>UserInformationManagementFormPanel.js<|end_file_name|><|fim▁begin|>var UserInformation_AccountStore = new Ext.data.Store({ fields:[ {name : 'Name'}, {name : 'ID'}, {name : 'Mail'}, {name : 'Roles'} ], reader : AccountReader }); var UserInformationItem = [ { fieldLabel : 'User ID', name : 'id', readOnly : true }, { fieldLabel : 'User Name', name : 'username', allowBlank : false, regex : /^[^"'\\><&]*$/, regexText : 'deny following char " < > \\ & \'' }, { id : 'UserInformation_Form_Password', fieldLabel : 'Password', name : 'passwd', inputType : 'password', listeners : { 'change': function() { if (this.getValue() == "") { Ext.getCmp('UserInformationManagement_Page').getTopToolbar().get('UserInformation_UpdateAccountBtn').setDisabled(false); Ext.getCmp("UserInformation_Form_reenter").allowBlank = true; } else { Ext.getCmp('UserInformationManagement_Page').getTopToolbar().get('UserInformation_UpdateAccountBtn').setDisabled(true); Ext.getCmp("UserInformation_Form_reenter").allowBlank = false; } } } }, { id : 'UserInformation_Form_reenter', fieldLabel : 'Re-enter', initialPassField : 'passwd', name : 'reenter', inputType : 'password', initialPassField: 'UserInformation_Form_Password', vtype : 'pwdvalid', listeners : { 'change': function() { if (Ext.getCmp("UserInformation_Form_Password").getValue() == "") { Ext.getCmp('UserInformationManagement_Page').getTopToolbar().get('UserInformation_UpdateAccountBtn').setDisabled(true); this.allowBlank = true; } else { Ext.getCmp('UserInformationManagement_Page').getTopToolbar().get('UserInformation_UpdateAccountBtn').setDisabled(false); this.allowBlank = false; } } } }, { fieldLabel : 'E-mail Address', name : 'email', vtype : 'email', allowBlank : false } ]; // the form is for UserInformation Page ezScrum.UserInformationForm = Ext.extend(ezScrum.layout.InfoForm, { id : 'UserInformation_Management_From', url : 'getUserData.do', modifyurl : 'updateAccount.do' , store : UserInformation_AccountStore, width:500, bodyStyle:'padding:50px', monitorValid : true, buttonAlign:'center', initComponent : function() { var config = { items : [UserInformationItem], buttons : [{ formBind : true, text : 'Submit', scope : this, handler : this.submit, disabled : true }] } Ext.apply(this, Ext.apply(this.initialConfig, config)); ezScrum.UserInformationForm.superclass.initComponent.apply(this, arguments); }, submit : function() { Ext.getCmp('UserInformationManagement_Page').doModify(); }, loadDataModel: function() { UserManagementMainLoadMaskShow(); Ext.Ajax.request({ scope : this, url : this.url, success: function(response) { UserInformation_AccountStore.loadData(response.responseXML); var record = UserInformation_AccountStore.getAt(0); this.setDataModel(record); UserManagementMainLoadMaskHide(); }, failure: function(response) { UserManagementMainLoadMaskHide(); Ext.example.msg('Server Error', 'Sorry, the connection is failure.'); } }); }, setDataModel: function(record) { this.getForm().reset(); this.getForm().setValues({ id : record.data['ID'], username: record.data['Name'], passwd : '', reenter : '', email : record.data['Mail'] }); }, doModify: function() {<|fim▁hole|> url : this.modifyurl, params : this.getForm().getValues(), success : function(response) { UserInformation_AccountStore.loadData(response.responseXML); var record = UserInformation_AccountStore.getAt(0); if (record) { Ext.example.msg('Update Account', 'Update Account Success'); } else { Ext.example.msg('Update Account', 'Update Account Failure'); } UserManagementMainLoadMaskHide(); }, failure:function(response){ UserManagementMainLoadMaskHide(); Ext.example.msg('Server Error', 'Sorry, the connection is failure.'); } }); } }); Ext.reg('UserInformationForm', ezScrum.UserInformationForm);<|fim▁end|>
UserManagementMainLoadMaskShow(); Ext.Ajax.request({ scope : this,
<|file_name|>synthetic_dynamic_cast_fast.cpp<|end_file_name|><|fim▁begin|>/// /// \file /// /// This file is a part of pattern matching testing suite. /// /// \autor Yuriy Solodkyy <[email protected]> /// /// This file is a part of the XTL framework (http://parasol.tamu.edu/xtl/). /// Copyright (C) 2005-2012 Texas A&M University. /// All rights reserved. /// #include "testshape.hpp" #include "config.hpp" #include "ptrtools.hpp" //------------------------------------------------------------------------------ #if !XTL_USE_MEMOIZED_CAST #define dynamic_cast constant_time_dynamic_cast #endif //------------------------------------------------------------------------------ static size_t fdc_id(size_t n); //------------------------------------------------------------------------------ template <size_t N> struct shape_kind : shape_kind<N/2> { typedef shape_kind<N/2> base_class; shape_kind(size_t n = N) : base_class(n) {} void accept(ShapeVisitor&) const; }; template <> struct shape_kind<0> : OtherBase, Shape { typedef Shape base_class; shape_kind(size_t n = 0) : base_class(n,fdc_id(n)) {} void accept(ShapeVisitor&) const; }; //------------------------------------------------------------------------------ struct ShapeVisitor { virtual void visit(const shape_kind<0>&) {} #define FOR_EACH_MAX NUMBER_OF_DERIVED-2 #define FOR_EACH_N(N) virtual void visit(const shape_kind<N+1>& s) { visit(static_cast<const shape_kind<N+1>::base_class&>(s)); } #include "loop_over_numbers.hpp" #undef FOR_EACH_N #undef FOR_EACH_MAX }; //------------------------------------------------------------------------------ template <size_t N> void shape_kind<N>::accept(ShapeVisitor& v) const { v.visit(*this); } void shape_kind<0>::accept(ShapeVisitor& v) const { v.visit(*this); } <|fim▁hole|>//------------------------------------------------------------------------------ enum { fdc_size = 10 }; /// Primes numbers for each level of the binary hierarchy const size_t constant_time_dynamic_cast_primes[fdc_size][2] = { { 2, 2}, // Because the root is 2 { 3, 5}, { 7,11}, {13,17}, {19,23}, {29,31}, {37,41}, {43,47}, {53,59}, {61,67} }; //------------------------------------------------------------------------------ static size_t fdc_id(size_t n) { XTL_ASSERT(req_bits(n) < fdc_size); size_t id = 1; if (n) for (size_t m = req_bits(n), i = m; i; --i) id *= constant_time_dynamic_cast_primes[m-i][(n & (1 << (i-1))) != 0]; //std::cout << n << "->" << id << std::endl; return id; } //------------------------------------------------------------------------------ inline size_t id(size_t n) { return fdc_id(n); } const size_t shape_ids[100] = { id( 0), id( 1), id( 2), id( 3), id( 4), id( 5), id( 6), id( 7), id( 8), id( 9), id(10), id(11), id(12), id(13), id(14), id(15), id(16), id(17), id(18), id(19), id(20), id(21), id(22), id(23), id(24), id(25), id(26), id(27), id(28), id(29), id(30), id(31), id(32), id(33), id(34), id(35), id(36), id(37), id(38), id(39), id(40), id(41), id(42), id(43), id(44), id(45), id(46), id(47), id(48), id(49), id(50), id(51), id(52), id(53), id(54), id(55), id(56), id(57), id(58), id(59), id(60), id(61), id(62), id(63), id(64), id(65), id(66), id(67), id(68), id(69), id(70), id(71), id(72), id(73), id(74), id(75), id(76), id(77), id(78), id(79), id(80), id(81), id(82), id(83), id(84), id(85), id(86), id(87), id(88), id(89), id(90), id(91), id(92), id(93), id(94), id(95), id(96), id(97), id(98), id(99), }; //------------------------------------------------------------------------------ template <size_t N> inline const shape_kind<N>* constant_time_dynamic_cast_ex(const shape_kind<N>*, const Shape* u) { return u->m_fdc_id % shape_ids[N] == 0 ? static_cast<const shape_kind<N>*>(u) : 0; } template <typename T> inline T constant_time_dynamic_cast(const Shape* u) { return constant_time_dynamic_cast_ex(static_cast<T>(0), u); } //------------------------------------------------------------------------------ XTL_TIMED_FUNC_BEGIN size_t do_match(const Shape& s, size_t) { if (const shape_kind< 0>* p0 = dynamic_cast<const shape_kind< 0>*>(&s)) { if (const shape_kind< 1>* p1 = dynamic_cast<const shape_kind< 1>*>(p0)) if (const shape_kind< 2>* p2 = dynamic_cast<const shape_kind< 2>*>(p1)) if (const shape_kind< 4>* p4 = dynamic_cast<const shape_kind< 4>*>(p2)) if (const shape_kind< 8>* p8 = dynamic_cast<const shape_kind< 8>*>(p4)) if (const shape_kind<16>* p16 = dynamic_cast<const shape_kind<16>*>(p8)) if (const shape_kind<32>* p32 = dynamic_cast<const shape_kind<32>*>(p16)) if (const shape_kind<64>* p64 = dynamic_cast<const shape_kind<64>*>(p32)) return p64->m_member7 + 64 ; else if (const shape_kind<65>* p65 = dynamic_cast<const shape_kind<65>*>(p32)) return p65->m_member7 + 65 ; else return p32->m_member7 + 32 ; else if (const shape_kind<33>* p33 = dynamic_cast<const shape_kind<33>*>(p16)) if (const shape_kind<66>* p66 = dynamic_cast<const shape_kind<66>*>(p33)) return p66->m_member7 + 66 ; else if (const shape_kind<67>* p67 = dynamic_cast<const shape_kind<67>*>(p33)) return p67->m_member7 + 67 ; else return p33->m_member7 + 33 ; else return p16->m_member7 + 16 ; else if (const shape_kind<17>* p17 = dynamic_cast<const shape_kind<17>*>(p8)) if (const shape_kind<34>* p34 = dynamic_cast<const shape_kind<34>*>(p17)) if (const shape_kind<68>* p68 = dynamic_cast<const shape_kind<68>*>(p34)) return p68->m_member7 + 68 ; else if (const shape_kind<69>* p69 = dynamic_cast<const shape_kind<69>*>(p34)) return p69->m_member7 + 69 ; else return p34->m_member7 + 34 ; else if (const shape_kind<35>* p35 = dynamic_cast<const shape_kind<35>*>(p17)) if (const shape_kind<70>* p70 = dynamic_cast<const shape_kind<70>*>(p35)) return p70->m_member7 + 70 ; else if (const shape_kind<71>* p71 = dynamic_cast<const shape_kind<71>*>(p35)) return p71->m_member7 + 71 ; else return p35->m_member7 + 35 ; else return p17->m_member7 + 17 ; else return p8->m_member7 + 8 ; else if (const shape_kind< 9>* p9 = dynamic_cast<const shape_kind< 9>*>(p4)) if (const shape_kind<18>* p18 = dynamic_cast<const shape_kind<18>*>(p9)) if (const shape_kind<36>* p36 = dynamic_cast<const shape_kind<36>*>(p18)) if (const shape_kind<72>* p72 = dynamic_cast<const shape_kind<72>*>(p36)) return p72->m_member7 + 72 ; else if (const shape_kind<73>* p73 = dynamic_cast<const shape_kind<73>*>(p36)) return p73->m_member7 + 73 ; else return p36->m_member7 + 36 ; else if (const shape_kind<37>* p37 = dynamic_cast<const shape_kind<37>*>(p18)) if (const shape_kind<74>* p74 = dynamic_cast<const shape_kind<74>*>(p37)) return p74->m_member7 + 74 ; else if (const shape_kind<75>* p75 = dynamic_cast<const shape_kind<75>*>(p37)) return p75->m_member7 + 75 ; else return p37->m_member7 + 37 ; else return p18->m_member7 + 18 ; else if (const shape_kind<19>* p19 = dynamic_cast<const shape_kind<19>*>(p9)) if (const shape_kind<38>* p38 = dynamic_cast<const shape_kind<38>*>(p19)) if (const shape_kind<76>* p76 = dynamic_cast<const shape_kind<76>*>(p38)) return p76->m_member7 + 76 ; else if (const shape_kind<77>* p77 = dynamic_cast<const shape_kind<77>*>(p38)) return p77->m_member7 + 77 ; else return p38->m_member7 + 38 ; else if (const shape_kind<39>* p39 = dynamic_cast<const shape_kind<39>*>(p19)) if (const shape_kind<78>* p78 = dynamic_cast<const shape_kind<78>*>(p39)) return p78->m_member7 + 78 ; else if (const shape_kind<79>* p79 = dynamic_cast<const shape_kind<79>*>(p39)) return p79->m_member7 + 79 ; else return p39->m_member7 + 39 ; else return p19->m_member7 + 19 ; else return p9->m_member7 + 9 ; else return p4->m_member7 + 4 ; else if (const shape_kind< 5>* p5 = dynamic_cast<const shape_kind< 5>*>(p2)) if (const shape_kind<10>* p10 = dynamic_cast<const shape_kind<10>*>(p5)) if (const shape_kind<20>* p20 = dynamic_cast<const shape_kind<20>*>(p10)) if (const shape_kind<40>* p40 = dynamic_cast<const shape_kind<40>*>(p20)) if (const shape_kind<80>* p80 = dynamic_cast<const shape_kind<80>*>(p40)) return p80->m_member7 + 80 ; else if (const shape_kind<81>* p81 = dynamic_cast<const shape_kind<81>*>(p40)) return p81->m_member7 + 81 ; else return p40->m_member7 + 40 ; else if (const shape_kind<41>* p41 = dynamic_cast<const shape_kind<41>*>(p20)) if (const shape_kind<82>* p82 = dynamic_cast<const shape_kind<82>*>(p41)) return p82->m_member7 + 82 ; else if (const shape_kind<83>* p83 = dynamic_cast<const shape_kind<83>*>(p41)) return p83->m_member7 + 83 ; else return p41->m_member7 + 41 ; else return p20->m_member7 + 20 ; else if (const shape_kind<21>* p21 = dynamic_cast<const shape_kind<21>*>(p10)) if (const shape_kind<42>* p42 = dynamic_cast<const shape_kind<42>*>(p21)) if (const shape_kind<84>* p84 = dynamic_cast<const shape_kind<84>*>(p42)) return p84->m_member7 + 84 ; else if (const shape_kind<85>* p85 = dynamic_cast<const shape_kind<85>*>(p42)) return p85->m_member7 + 85 ; else return p42->m_member7 + 42 ; else if (const shape_kind<43>* p43 = dynamic_cast<const shape_kind<43>*>(p21)) if (const shape_kind<86>* p86 = dynamic_cast<const shape_kind<86>*>(p43)) return p86->m_member7 + 86 ; else if (const shape_kind<87>* p87 = dynamic_cast<const shape_kind<87>*>(p43)) return p87->m_member7 + 87 ; else return p43->m_member7 + 43 ; else return p21->m_member7 + 21 ; else return p10->m_member7 + 10 ; else if (const shape_kind<11>* p11 = dynamic_cast<const shape_kind<11>*>(p5)) if (const shape_kind<22>* p22 = dynamic_cast<const shape_kind<22>*>(p11)) if (const shape_kind<44>* p44 = dynamic_cast<const shape_kind<44>*>(p22)) if (const shape_kind<88>* p88 = dynamic_cast<const shape_kind<88>*>(p44)) return p88->m_member7 + 88 ; else if (const shape_kind<89>* p89 = dynamic_cast<const shape_kind<89>*>(p44)) return p89->m_member7 + 89 ; else return p44->m_member7 + 44 ; else if (const shape_kind<45>* p45 = dynamic_cast<const shape_kind<45>*>(p22)) if (const shape_kind<90>* p90 = dynamic_cast<const shape_kind<90>*>(p45)) return p90->m_member7 + 90 ; else if (const shape_kind<91>* p91 = dynamic_cast<const shape_kind<91>*>(p45)) return p91->m_member7 + 91 ; else return p45->m_member7 + 45 ; else return p22->m_member7 + 22 ; else if (const shape_kind<23>* p23 = dynamic_cast<const shape_kind<23>*>(p11)) if (const shape_kind<46>* p46 = dynamic_cast<const shape_kind<46>*>(p23)) if (const shape_kind<92>* p92 = dynamic_cast<const shape_kind<92>*>(p46)) return p92->m_member7 + 92 ; else if (const shape_kind<93>* p93 = dynamic_cast<const shape_kind<93>*>(p46)) return p93->m_member7 + 93 ; else return p46->m_member7 + 46 ; else if (const shape_kind<47>* p47 = dynamic_cast<const shape_kind<47>*>(p23)) if (const shape_kind<94>* p94 = dynamic_cast<const shape_kind<94>*>(p47)) return p94->m_member7 + 94 ; else if (const shape_kind<95>* p95 = dynamic_cast<const shape_kind<95>*>(p47)) return p95->m_member7 + 95 ; else return p47->m_member7 + 47 ; else return p23->m_member7 + 23 ; else return p11->m_member7 + 11 ; else return p5->m_member7 + 5 ; else return p2->m_member7 + 2 ; else if (const shape_kind< 3>* p3 = dynamic_cast<const shape_kind< 3>*>(p1)) if (const shape_kind< 6>* p6 = dynamic_cast<const shape_kind< 6>*>(p3)) if (const shape_kind<12>* p12 = dynamic_cast<const shape_kind<12>*>(p6)) if (const shape_kind<24>* p24 = dynamic_cast<const shape_kind<24>*>(p12)) if (const shape_kind<48>* p48 = dynamic_cast<const shape_kind<48>*>(p24)) if (const shape_kind<96>* p96 = dynamic_cast<const shape_kind<96>*>(p48)) return p96->m_member7 + 96 ; else if (const shape_kind<97>* p97 = dynamic_cast<const shape_kind<97>*>(p48)) return p97->m_member7 + 97 ; else return p48->m_member7 + 48 ; else if (const shape_kind<49>* p49 = dynamic_cast<const shape_kind<49>*>(p24)) if (const shape_kind<98>* p98 = dynamic_cast<const shape_kind<98>*>(p49)) return p98->m_member7 + 98 ; else if (const shape_kind<99>* p99 = dynamic_cast<const shape_kind<99>*>(p49)) return p99->m_member7 + 99 ; else return p49->m_member7 + 49 ; else return p24->m_member7 + 24 ; else if (const shape_kind<25>* p25 = dynamic_cast<const shape_kind<25>*>(p12)) if (const shape_kind<50>* p50 = dynamic_cast<const shape_kind<50>*>(p25)) return p50->m_member7 + 50 ; else if (const shape_kind<51>* p51 = dynamic_cast<const shape_kind<51>*>(p25)) return p51->m_member7 + 51 ; else return p25->m_member7 + 25 ; else return p12->m_member7 + 12 ; else if (const shape_kind<13>* p13 = dynamic_cast<const shape_kind<13>*>(p6)) if (const shape_kind<26>* p26 = dynamic_cast<const shape_kind<26>*>(p13)) if (const shape_kind<52>* p52 = dynamic_cast<const shape_kind<52>*>(p26)) return p52->m_member7 + 52 ; else if (const shape_kind<53>* p53 = dynamic_cast<const shape_kind<53>*>(p26)) return p53->m_member7 + 53 ; else return p26->m_member7 + 26 ; else if (const shape_kind<27>* p27 = dynamic_cast<const shape_kind<27>*>(p13)) if (const shape_kind<54>* p54 = dynamic_cast<const shape_kind<54>*>(p27)) return p54->m_member7 + 54 ; else if (const shape_kind<55>* p55 = dynamic_cast<const shape_kind<55>*>(p27)) return p55->m_member7 + 55 ; else return p27->m_member7 + 27 ; else return p13->m_member7 + 13 ; else return p6->m_member7 + 6 ; else if (const shape_kind< 7>* p7 = dynamic_cast<const shape_kind< 7>*>(p3)) if (const shape_kind<14>* p14 = dynamic_cast<const shape_kind<14>*>(p7)) if (const shape_kind<28>* p28 = dynamic_cast<const shape_kind<28>*>(p14)) if (const shape_kind<56>* p56 = dynamic_cast<const shape_kind<56>*>(p28)) return p56->m_member7 + 56 ; else if (const shape_kind<57>* p57 = dynamic_cast<const shape_kind<57>*>(p28)) return p57->m_member7 + 57 ; else return p28->m_member7 + 28 ; else if (const shape_kind<29>* p29 = dynamic_cast<const shape_kind<29>*>(p14)) if (const shape_kind<58>* p58 = dynamic_cast<const shape_kind<58>*>(p29)) return p58->m_member7 + 58 ; else if (const shape_kind<59>* p59 = dynamic_cast<const shape_kind<59>*>(p29)) return p59->m_member7 + 59 ; else return p29->m_member7 + 29 ; else return p14->m_member7 + 14 ; else if (const shape_kind<15>* p15 = dynamic_cast<const shape_kind<15>*>(p7)) if (const shape_kind<30>* p30 = dynamic_cast<const shape_kind<30>*>(p15)) if (const shape_kind<60>* p60 = dynamic_cast<const shape_kind<60>*>(p30)) return p60->m_member7 + 60 ; else if (const shape_kind<61>* p61 = dynamic_cast<const shape_kind<61>*>(p30)) return p61->m_member7 + 61 ; else return p30->m_member7 + 30 ; else if (const shape_kind<31>* p31 = dynamic_cast<const shape_kind<31>*>(p15)) if (const shape_kind<62>* p62 = dynamic_cast<const shape_kind<62>*>(p31)) return p62->m_member7 + 62 ; else if (const shape_kind<63>* p63 = dynamic_cast<const shape_kind<63>*>(p31)) return p63->m_member7 + 63 ; else return p31->m_member7 + 31 ; else return p15->m_member7 + 15 ; else return p7->m_member7 + 7 ; else return p3->m_member7 + 3 ; else return p1->m_member7 + 1 ; else return p0->m_member7 + 0 ; } return invalid; } XTL_TIMED_FUNC_END //------------------------------------------------------------------------------ XTL_TIMED_FUNC_BEGIN size_t do_visit(const Shape& s, size_t) { struct Visitor : ShapeVisitor { #define FOR_EACH_MAX NUMBER_OF_DERIVED-1 #define FOR_EACH_N(N) virtual void visit(const shape_kind<N>& s) { result = s.m_member7 + N; } #include "loop_over_numbers.hpp" #undef FOR_EACH_N #undef FOR_EACH_MAX size_t result; }; Visitor v; v.result = invalid; s.accept(v); return v.result; } XTL_TIMED_FUNC_END //------------------------------------------------------------------------------ Shape* make_shape(size_t i) { switch (i % NUMBER_OF_DERIVED) { #define FOR_EACH_MAX NUMBER_OF_DERIVED-1 #define FOR_EACH_N(N) case N: return new shape_kind<N>; #include "loop_over_numbers.hpp" #undef FOR_EACH_N #undef FOR_EACH_MAX } return 0; } //------------------------------------------------------------------------------ #include "testvismat.hpp" // Utilities for timing tests //------------------------------------------------------------------------------ int main() { verdict pp = test_repetitive(); verdict ps = test_sequential(); verdict pr = test_randomized(); std::cout << "OVERALL: " << "Repetitive: " << pp << "; " << "Sequential: " << ps << "; " << "Random: " << pr << std::endl; } //------------------------------------------------------------------------------<|fim▁end|>
<|file_name|>test_cisco_mech.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. import contextlib import mock import webob.exc as wexc from neutron.api.v2 import base from neutron.common import constants as n_const from neutron import context from neutron.extensions import portbindings from neutron.manager import NeutronManager from neutron.openstack.common import log as logging from neutron.plugins.ml2 import config as ml2_config from neutron.plugins.ml2.drivers.cisco.nexus import config as cisco_config from neutron.plugins.ml2.drivers.cisco.nexus import exceptions as c_exc from neutron.plugins.ml2.drivers.cisco.nexus import mech_cisco_nexus from neutron.plugins.ml2.drivers.cisco.nexus import nexus_network_driver from neutron.plugins.ml2.drivers import type_vlan as vlan_config from neutron.tests.unit import test_db_plugin LOG = logging.getLogger(__name__) ML2_PLUGIN = 'neutron.plugins.ml2.plugin.Ml2Plugin' PHYS_NET = 'physnet1' COMP_HOST_NAME = 'testhost' COMP_HOST_NAME_2 = 'testhost_2' VLAN_START = 1000 VLAN_END = 1100 NEXUS_IP_ADDR = '1.1.1.1' NETWORK_NAME = 'test_network' NETWORK_NAME_2 = 'test_network_2' NEXUS_INTERFACE = '1/1' NEXUS_INTERFACE_2 = '1/2' CIDR_1 = '10.0.0.0/24' CIDR_2 = '10.0.1.0/24' DEVICE_ID_1 = '11111111-1111-1111-1111-111111111111' DEVICE_ID_2 = '22222222-2222-2222-2222-222222222222' DEVICE_OWNER = 'compute:None' class CiscoML2MechanismTestCase(test_db_plugin.NeutronDbPluginV2TestCase): def setUp(self): """Configure for end-to-end neutron testing using a mock ncclient. This setup includes: - Configure the ML2 plugin to use VLANs in the range of 1000-1100. - Configure the Cisco mechanism driver to use an imaginary switch at NEXUS_IP_ADDR. - Create a mock NETCONF client (ncclient) for the Cisco mechanism driver """ self.addCleanup(mock.patch.stopall) # Configure the ML2 mechanism drivers and network types ml2_opts = { 'mechanism_drivers': ['cisco_nexus'], 'tenant_network_types': ['vlan'], } for opt, val in ml2_opts.items(): ml2_config.cfg.CONF.set_override(opt, val, 'ml2') self.addCleanup(ml2_config.cfg.CONF.reset) # Configure the ML2 VLAN parameters phys_vrange = ':'.join([PHYS_NET, str(VLAN_START), str(VLAN_END)]) vlan_config.cfg.CONF.set_override('network_vlan_ranges', [phys_vrange], 'ml2_type_vlan') self.addCleanup(vlan_config.cfg.CONF.reset) # Configure the Cisco Nexus mechanism driver nexus_config = { (NEXUS_IP_ADDR, 'username'): 'admin', (NEXUS_IP_ADDR, 'password'): 'mySecretPassword', (NEXUS_IP_ADDR, 'ssh_port'): 22, (NEXUS_IP_ADDR, COMP_HOST_NAME): NEXUS_INTERFACE, (NEXUS_IP_ADDR, COMP_HOST_NAME_2): NEXUS_INTERFACE_2} nexus_patch = mock.patch.dict( cisco_config.ML2MechCiscoConfig.nexus_dict, nexus_config) nexus_patch.start() self.addCleanup(nexus_patch.stop) # The NETCONF client module is not included in the DevStack # distribution, so mock this module for unit testing. self.mock_ncclient = mock.Mock() mock.patch.object(nexus_network_driver.CiscoNexusDriver, '_import_ncclient', return_value=self.mock_ncclient).start() # Mock port values for 'status' and 'binding:segmentation_id' mock_status = mock.patch.object( mech_cisco_nexus.CiscoNexusMechanismDriver, '_is_status_active').start() mock_status.return_value = n_const.PORT_STATUS_ACTIVE def _mock_get_vlanid(context): network = context.network.current if network['name'] == NETWORK_NAME: return VLAN_START else: return VLAN_START + 1 mock_vlanid = mock.patch.object( mech_cisco_nexus.CiscoNexusMechanismDriver, '_get_vlanid').start() mock_vlanid.side_effect = _mock_get_vlanid super(CiscoML2MechanismTestCase, self).setUp(ML2_PLUGIN) self.port_create_status = 'DOWN' @contextlib.contextmanager def _patch_ncclient(self, attr, value): """Configure an attribute on the mock ncclient module. This method can be used to inject errors by setting a side effect or a return value for an ncclient method. :param attr: ncclient attribute (typically method) to be configured. :param value: Value to be configured on the attribute. """ # Configure attribute. config = {attr: value} self.mock_ncclient.configure_mock(**config) # Continue testing yield # Unconfigure attribute config = {attr: None} self.mock_ncclient.configure_mock(**config) def _is_in_nexus_cfg(self, words): """Check if any config sent to Nexus contains all words in a list.""" for call in (self.mock_ncclient.connect.return_value. edit_config.mock_calls): configlet = call[2]['config'] if all(word in configlet for word in words): return True return False def _is_in_last_nexus_cfg(self, words): """Confirm last config sent to Nexus contains specified keywords.""" last_cfg = (self.mock_ncclient.connect.return_value. edit_config.mock_calls[-1][2]['config']) return all(word in last_cfg for word in words) def _is_vlan_configured(self, vlan_creation_expected=True, add_keyword_expected=False): vlan_created = self._is_in_nexus_cfg(['vlan', 'vlan-name']) add_appears = self._is_in_last_nexus_cfg(['add']) return (self._is_in_last_nexus_cfg(['allowed', 'vlan']) and vlan_created == vlan_creation_expected and add_appears == add_keyword_expected) def _is_vlan_unconfigured(self, vlan_deletion_expected=True): vlan_deleted = self._is_in_last_nexus_cfg( ['no', 'vlan', 'vlan-id-create-delete']) return (self._is_in_nexus_cfg(['allowed', 'vlan', 'remove']) and vlan_deleted == vlan_deletion_expected) class TestCiscoBasicGet(CiscoML2MechanismTestCase, test_db_plugin.TestBasicGet): pass class TestCiscoV2HTTPResponse(CiscoML2MechanismTestCase, test_db_plugin.TestV2HTTPResponse): pass class TestCiscoPortsV2(CiscoML2MechanismTestCase, test_db_plugin.TestPortsV2): @contextlib.contextmanager def _create_resources(self, name=NETWORK_NAME, cidr=CIDR_1, device_id=DEVICE_ID_1, host_id=COMP_HOST_NAME): """Create network, subnet, and port resources for test cases. Create a network, subnet, port and then update the port, yield the result, then delete the port, subnet and network. :param name: Name of network to be created.<|fim▁hole|> :param cidr: cidr address of subnetwork to be created. :param device_id: Device ID to use for port to be created/updated. :param host_id: Host ID to use for port create/update. """ with self.network(name=name) as network: with self.subnet(network=network, cidr=cidr) as subnet: with self.port(subnet=subnet, cidr=cidr) as port: data = {'port': {portbindings.HOST_ID: host_id, 'device_id': device_id, 'device_owner': 'compute:none', 'admin_state_up': True}} req = self.new_update_request('ports', data, port['port']['id']) res = req.get_response(self.api) yield res.status_int def _assertExpectedHTTP(self, status, exc): """Confirm that an HTTP status corresponds to an expected exception. Confirm that an HTTP status which has been returned for an neutron API request matches the HTTP status corresponding to an expected exception. :param status: HTTP status :param exc: Expected exception """ if exc in base.FAULT_MAP: expected_http = base.FAULT_MAP[exc].code else: expected_http = wexc.HTTPInternalServerError.code self.assertEqual(status, expected_http) def test_create_ports_bulk_emulated_plugin_failure(self): real_has_attr = hasattr #ensures the API chooses the emulation code path def fakehasattr(item, attr): if attr.endswith('__native_bulk_support'): return False return real_has_attr(item, attr) with mock.patch('__builtin__.hasattr', new=fakehasattr): plugin_obj = NeutronManager.get_plugin() orig = plugin_obj.create_port with mock.patch.object(plugin_obj, 'create_port') as patched_plugin: def side_effect(*args, **kwargs): return self._do_side_effect(patched_plugin, orig, *args, **kwargs) patched_plugin.side_effect = side_effect with self.network() as net: res = self._create_port_bulk(self.fmt, 2, net['network']['id'], 'test', True) # Expect an internal server error as we injected a fault self._validate_behavior_on_bulk_failure( res, 'ports', wexc.HTTPInternalServerError.code) def test_create_ports_bulk_native(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk port create") def test_create_ports_bulk_emulated(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk port create") def test_create_ports_bulk_native_plugin_failure(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk port create") ctx = context.get_admin_context() with self.network() as net: plugin_obj = NeutronManager.get_plugin() orig = plugin_obj.create_port with mock.patch.object(plugin_obj, 'create_port') as patched_plugin: def side_effect(*args, **kwargs): return self._do_side_effect(patched_plugin, orig, *args, **kwargs) patched_plugin.side_effect = side_effect res = self._create_port_bulk(self.fmt, 2, net['network']['id'], 'test', True, context=ctx) # We expect an internal server error as we injected a fault self._validate_behavior_on_bulk_failure( res, 'ports', wexc.HTTPInternalServerError.code) def test_nexus_enable_vlan_cmd(self): """Verify the syntax of the command to enable a vlan on an intf. Confirm that for the first VLAN configured on a Nexus interface, the command string sent to the switch does not contain the keyword 'add'. Confirm that for the second VLAN configured on a Nexus interface, the command string sent to the switch contains the keyword 'add'. """ # First vlan should be configured without 'add' keyword with self._create_resources(): self.assertTrue(self._is_vlan_configured( vlan_creation_expected=True, add_keyword_expected=False)) self.mock_ncclient.reset_mock() # Second vlan should be configured with 'add' keyword with self._create_resources(name=NETWORK_NAME_2, device_id=DEVICE_ID_2, cidr=CIDR_2): self.assertTrue(self._is_vlan_configured( vlan_creation_expected=True, add_keyword_expected=True)) def test_nexus_connect_fail(self): """Test failure to connect to a Nexus switch. While creating a network, subnet, and port, simulate a connection failure to a nexus switch. Confirm that the expected HTTP code is returned for the create port operation. """ with self._patch_ncclient('connect.side_effect', AttributeError): with self._create_resources() as result_status: self._assertExpectedHTTP(result_status, c_exc.NexusConnectFailed) def test_nexus_vlan_config_two_hosts(self): """Verify config/unconfig of vlan on two compute hosts.""" @contextlib.contextmanager def _create_port_check_vlan(comp_host_name, device_id, vlan_creation_expected=True): with self.port(subnet=subnet, fmt=self.fmt) as port: data = {'port': {portbindings.HOST_ID: comp_host_name, 'device_id': device_id, 'device_owner': DEVICE_OWNER, 'admin_state_up': True}} req = self.new_update_request('ports', data, port['port']['id']) req.get_response(self.api) self.assertTrue(self._is_vlan_configured( vlan_creation_expected=vlan_creation_expected, add_keyword_expected=False)) self.mock_ncclient.reset_mock() yield # Create network and subnet with self.network(name=NETWORK_NAME) as network: with self.subnet(network=network, cidr=CIDR_1) as subnet: # Create an instance on first compute host with _create_port_check_vlan(COMP_HOST_NAME, DEVICE_ID_1, vlan_creation_expected=True): # Create an instance on second compute host with _create_port_check_vlan(COMP_HOST_NAME_2, DEVICE_ID_2, vlan_creation_expected=False): pass # Instance on second host is now terminated. # Vlan should be untrunked from port, but vlan should # still exist on the switch. self.assertTrue(self._is_vlan_unconfigured( vlan_deletion_expected=False)) self.mock_ncclient.reset_mock() # Instance on first host is now terminated. # Vlan should be untrunked from port and vlan should have # been deleted from the switch. self.assertTrue(self._is_vlan_unconfigured( vlan_deletion_expected=True)) def test_nexus_config_fail(self): """Test a Nexus switch configuration failure. While creating a network, subnet, and port, simulate a nexus switch configuration error. Confirm that the expected HTTP code is returned for the create port operation. """ with self._patch_ncclient( 'connect.return_value.edit_config.side_effect', AttributeError): with self._create_resources() as result_status: self._assertExpectedHTTP(result_status, c_exc.NexusConfigFailed) def test_nexus_extended_vlan_range_failure(self): """Test that extended VLAN range config errors are ignored. Some versions of Nexus switch do not allow state changes for the extended VLAN range (1006-4094), but these errors can be ignored (default values are appropriate). Test that such errors are ignored by the Nexus plugin. """ def mock_edit_config_a(target, config): if all(word in config for word in ['state', 'active']): raise Exception("Can't modify state for extended") with self._patch_ncclient( 'connect.return_value.edit_config.side_effect', mock_edit_config_a): with self._create_resources() as result_status: self.assertEqual(result_status, wexc.HTTPOk.code) def mock_edit_config_b(target, config): if all(word in config for word in ['no', 'shutdown']): raise Exception("Command is only allowed on VLAN") with self._patch_ncclient( 'connect.return_value.edit_config.side_effect', mock_edit_config_b): with self._create_resources() as result_status: self.assertEqual(result_status, wexc.HTTPOk.code) def test_nexus_vlan_config_rollback(self): """Test rollback following Nexus VLAN state config failure. Test that the Cisco Nexus plugin correctly deletes the VLAN on the Nexus switch when the 'state active' command fails (for a reason other than state configuration change is rejected for the extended VLAN range). """ def mock_edit_config(target, config): if all(word in config for word in ['state', 'active']): raise ValueError with self._patch_ncclient( 'connect.return_value.edit_config.side_effect', mock_edit_config): with self._create_resources() as result_status: # Confirm that the last configuration sent to the Nexus # switch was deletion of the VLAN. self.assertTrue(self._is_in_last_nexus_cfg(['<no>', '<vlan>'])) self._assertExpectedHTTP(result_status, c_exc.NexusConfigFailed) def test_nexus_host_not_configured(self): """Test handling of a NexusComputeHostNotConfigured exception. Test the Cisco NexusComputeHostNotConfigured exception by using a fictitious host name during port creation. """ with self._create_resources(host_id='fake_host') as result_status: self._assertExpectedHTTP(result_status, c_exc.NexusComputeHostNotConfigured) def test_nexus_missing_fields(self): """Test handling of a NexusMissingRequiredFields exception. Test the Cisco NexusMissingRequiredFields exception by using empty host_id and device_id values during port creation. """ with self._create_resources(device_id='', host_id='') as result_status: self._assertExpectedHTTP(result_status, c_exc.NexusMissingRequiredFields) class TestCiscoNetworksV2(CiscoML2MechanismTestCase, test_db_plugin.TestNetworksV2): def test_create_networks_bulk_emulated_plugin_failure(self): real_has_attr = hasattr def fakehasattr(item, attr): if attr.endswith('__native_bulk_support'): return False return real_has_attr(item, attr) plugin_obj = NeutronManager.get_plugin() orig = plugin_obj.create_network #ensures the API choose the emulation code path with mock.patch('__builtin__.hasattr', new=fakehasattr): with mock.patch.object(plugin_obj, 'create_network') as patched_plugin: def side_effect(*args, **kwargs): return self._do_side_effect(patched_plugin, orig, *args, **kwargs) patched_plugin.side_effect = side_effect res = self._create_network_bulk(self.fmt, 2, 'test', True) LOG.debug("response is %s" % res) # We expect an internal server error as we injected a fault self._validate_behavior_on_bulk_failure( res, 'networks', wexc.HTTPInternalServerError.code) def test_create_networks_bulk_native_plugin_failure(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk network create") plugin_obj = NeutronManager.get_plugin() orig = plugin_obj.create_network with mock.patch.object(plugin_obj, 'create_network') as patched_plugin: def side_effect(*args, **kwargs): return self._do_side_effect(patched_plugin, orig, *args, **kwargs) patched_plugin.side_effect = side_effect res = self._create_network_bulk(self.fmt, 2, 'test', True) # We expect an internal server error as we injected a fault self._validate_behavior_on_bulk_failure( res, 'networks', wexc.HTTPInternalServerError.code) class TestCiscoSubnetsV2(CiscoML2MechanismTestCase, test_db_plugin.TestSubnetsV2): def test_create_subnets_bulk_emulated_plugin_failure(self): real_has_attr = hasattr #ensures the API choose the emulation code path def fakehasattr(item, attr): if attr.endswith('__native_bulk_support'): return False return real_has_attr(item, attr) with mock.patch('__builtin__.hasattr', new=fakehasattr): plugin_obj = NeutronManager.get_plugin() orig = plugin_obj.create_subnet with mock.patch.object(plugin_obj, 'create_subnet') as patched_plugin: def side_effect(*args, **kwargs): self._do_side_effect(patched_plugin, orig, *args, **kwargs) patched_plugin.side_effect = side_effect with self.network() as net: res = self._create_subnet_bulk(self.fmt, 2, net['network']['id'], 'test') # We expect an internal server error as we injected a fault self._validate_behavior_on_bulk_failure( res, 'subnets', wexc.HTTPInternalServerError.code) def test_create_subnets_bulk_native_plugin_failure(self): if self._skip_native_bulk: self.skipTest("Plugin does not support native bulk subnet create") plugin_obj = NeutronManager.get_plugin() orig = plugin_obj.create_subnet with mock.patch.object(plugin_obj, 'create_subnet') as patched_plugin: def side_effect(*args, **kwargs): return self._do_side_effect(patched_plugin, orig, *args, **kwargs) patched_plugin.side_effect = side_effect with self.network() as net: res = self._create_subnet_bulk(self.fmt, 2, net['network']['id'], 'test') # We expect an internal server error as we injected a fault self._validate_behavior_on_bulk_failure( res, 'subnets', wexc.HTTPInternalServerError.code) class TestCiscoPortsV2XML(TestCiscoPortsV2): fmt = 'xml' class TestCiscoNetworksV2XML(TestCiscoNetworksV2): fmt = 'xml' class TestCiscoSubnetsV2XML(TestCiscoSubnetsV2): fmt = 'xml'<|fim▁end|>
<|file_name|>run.py<|end_file_name|><|fim▁begin|>import math import string lookup_map = {} def memcache_read(n): global lookup_map if lookup_map.has_key(n): return lookup_map[n] else: return None def memcache_write(n, value): global lookup_map lookup_map[n] = value def get_chain_length(n): # check cache cache = memcache_read(n) if cache != None: return cache # no cache, so caculate if n <= 1: memcache_write(1, 1)<|fim▁hole|> else: n = 3*n + 1 return get_chain_length(n) + 1 def find_longest_chain_under_N(n): max_chain_num = -1 max_chain_length = 0 for i in xrange(1, n, 1): chain_length = get_chain_length(i) memcache_write(i, chain_length) if chain_length > max_chain_length: max_chain_length = chain_length max_chain_num = i #print max_chain_num #print max_chain_length return max_chain_num if __name__ == '__main__': #print find_longest_chain_under_N(3) print find_longest_chain_under_N(1000000)<|fim▁end|>
return 1 if n % 2 == 0: n = n / 2
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS-IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Classes supporting configuration property editor and REST operations.""" __author__ = 'Pavel Simakov ([email protected])' import cgi import urllib from controllers import sites from controllers.utils import BaseRESTHandler from controllers.utils import XsrfTokenManager from models import config from models import courses from models import models from models import roles from models import transforms from modules.oeditor import oeditor from google.appengine.api import users from google.appengine.ext import db # This is a template because the value type is not yet known. SCHEMA_JSON_TEMPLATE = """ { "id": "Configuration Property", "type": "object", "description": "Configuration Property Override", "properties": { "name" : {"type": "string"}, "value": {"optional": true, "type": "%s"}, "is_draft": {"type": "boolean"} } } """ # This is a template because the doc_string is not yet known. SCHEMA_ANNOTATIONS_TEMPLATE = [ (['title'], 'Configuration Property Override'), (['properties', 'name', '_inputex'], { 'label': 'Name', '_type': 'uneditable'}), oeditor.create_bool_select_annotation( ['properties', 'is_draft'], 'Status', 'Pending', 'Active', description='<strong>Active</strong>: This value is active and ' 'overrides all other defaults.<br/><strong>Pending</strong>: This ' 'value is not active yet, and the default settings still apply.')] class ConfigPropertyRights(object): """Manages view/edit rights for configuration properties.""" @classmethod def can_view(cls): return cls.can_edit() @classmethod def can_edit(cls): return roles.Roles.is_super_admin() @classmethod def can_delete(cls): return cls.can_edit() @classmethod def can_add(cls): return cls.can_edit() class ConfigPropertyEditor(object): """An editor for any configuration property.""" # Map of configuration property type into inputex type. type_map = {str: 'string', int: 'integer', bool: 'boolean'} @classmethod def get_schema_annotations(cls, config_property): """Gets editor specific schema annotations.""" doc_string = '%s Default: \'%s\'.' % ( config_property.doc_string, config_property.default_value) item_dict = [] + SCHEMA_ANNOTATIONS_TEMPLATE item_dict.append(( ['properties', 'value', '_inputex'], { 'label': 'Value', '_type': '%s' % cls.get_value_type( config_property), 'description': doc_string})) return item_dict @classmethod def get_value_type(cls, config_property): """Gets an editor specific type for the property.""" value_type = cls.type_map[config_property.value_type] if not value_type: raise Exception('Unknown type: %s', config_property.value_type) if config_property.value_type == str and config_property.multiline: return 'text' return value_type @classmethod def get_schema_json(cls, config_property): """Gets JSON schema for configuration property.""" return SCHEMA_JSON_TEMPLATE % cls.get_value_type(config_property) def get_add_course(self): """Handles 'add_course' action and renders new course entry editor.""" exit_url = '/admin?action=courses' rest_url = CoursesItemRESTHandler.URI template_values = {} template_values[ 'page_title'] = 'Course Builder - Add Course' template_values['main_content'] = oeditor.ObjectEditor.get_html_for( self, CoursesItemRESTHandler.SCHEMA_JSON, CoursesItemRESTHandler.SCHEMA_ANNOTATIONS_DICT, None, rest_url, exit_url, auto_return=True, save_button_caption='Add New Course') self.render_page(template_values) def get_config_edit(self): """Handles 'edit' property action.""" key = self.request.get('name')<|fim▁hole|> self.redirect('/admin?action=settings') item = config.Registry.registered[key] if not item: self.redirect('/admin?action=settings') template_values = {} template_values[ 'page_title'] = 'Course Builder - Edit Settings' exit_url = '/admin?action=settings#%s' % cgi.escape(key) rest_url = '/rest/config/item' delete_url = '/admin?%s' % urllib.urlencode({ 'action': 'config_reset', 'name': key, 'xsrf_token': cgi.escape(self.create_xsrf_token('config_reset'))}) template_values['main_content'] = oeditor.ObjectEditor.get_html_for( self, ConfigPropertyEditor.get_schema_json(item), ConfigPropertyEditor.get_schema_annotations(item), key, rest_url, exit_url, delete_url=delete_url) self.render_page(template_values) def post_config_override(self): """Handles 'override' property action.""" name = self.request.get('name') # Find item in registry. item = None if name and name in config.Registry.registered.keys(): item = config.Registry.registered[name] if not item: self.redirect('/admin?action=settings') # Add new entity if does not exist. try: entity = config.ConfigPropertyEntity.get_by_key_name(name) except db.BadKeyError: entity = None if not entity: entity = config.ConfigPropertyEntity(key_name=name) entity.value = str(item.value) entity.is_draft = True entity.put() models.EventEntity.record( 'override-property', users.get_current_user(), transforms.dumps({ 'name': name, 'value': str(entity.value)})) self.redirect('/admin?%s' % urllib.urlencode( {'action': 'config_edit', 'name': name})) def post_config_reset(self): """Handles 'reset' property action.""" name = self.request.get('name') # Find item in registry. item = None if name and name in config.Registry.registered.keys(): item = config.Registry.registered[name] if not item: self.redirect('/admin?action=settings') # Delete if exists. try: entity = config.ConfigPropertyEntity.get_by_key_name(name) if entity: old_value = entity.value entity.delete() models.EventEntity.record( 'delete-property', users.get_current_user(), transforms.dumps({ 'name': name, 'value': str(old_value)})) except db.BadKeyError: pass self.redirect('/admin?action=settings') class CoursesItemRESTHandler(BaseRESTHandler): """Provides REST API for course entries.""" URI = '/rest/courses/item' SCHEMA_JSON = """ { "id": "Course Entry", "type": "object", "description": "Course Entry", "properties": { "name": {"type": "string"}, "title": {"type": "string"}, "admin_email": {"type": "string"} } } """ SCHEMA_DICT = transforms.loads(SCHEMA_JSON) SCHEMA_ANNOTATIONS_DICT = [ (['title'], 'New Course Entry'), (['properties', 'name', '_inputex'], {'label': 'Unique Name'}), (['properties', 'title', '_inputex'], {'label': 'Course Title'}), (['properties', 'admin_email', '_inputex'], { 'label': 'Course Admin Email'})] def get(self): """Handles HTTP GET verb.""" if not ConfigPropertyRights.can_view(): transforms.send_json_response( self, 401, 'Access denied.') return transforms.send_json_response( self, 200, 'Success.', payload_dict={ 'name': 'new_course', 'title': 'My New Course', 'admin_email': self.get_user().email()}, xsrf_token=XsrfTokenManager.create_xsrf_token( 'add-course-put')) def put(self): """Handles HTTP PUT verb.""" request = transforms.loads(self.request.get('request')) if not self.assert_xsrf_token_or_fail( request, 'add-course-put', {}): return if not ConfigPropertyRights.can_edit(): transforms.send_json_response( self, 401, 'Access denied.') return payload = request.get('payload') json_object = transforms.loads(payload) name = json_object.get('name') title = json_object.get('title') admin_email = json_object.get('admin_email') # Add the new course entry. errors = [] entry = sites.add_new_course_entry(name, title, admin_email, errors) if not entry: errors.append('Error adding a new course entry.') if errors: transforms.send_json_response(self, 412, '\n'.join(errors)) return # We can't expect our new configuration being immediately available due # to datastore queries consistency limitations. So we will instantiate # our new course here and not use the normal sites.get_all_courses(). app_context = sites.get_all_courses(entry)[0] # Update course with a new title and admin email. new_course = courses.Course(None, app_context=app_context) if not new_course.init_new_course_settings(title, admin_email): transforms.send_json_response( self, 412, 'Added new course entry, but failed to update title and/or ' 'admin email. The course.yaml file already exists and must be ' 'updated manually.') return transforms.send_json_response( self, 200, 'Added.', {'entry': entry}) class ConfigPropertyItemRESTHandler(BaseRESTHandler): """Provides REST API for a configuration property.""" def get(self): """Handles REST GET verb and returns an object as JSON payload.""" key = self.request.get('key') if not ConfigPropertyRights.can_view(): transforms.send_json_response( self, 401, 'Access denied.', {'key': key}) return item = None if key and key in config.Registry.registered.keys(): item = config.Registry.registered[key] if not item: self.redirect('/admin?action=settings') try: entity = config.ConfigPropertyEntity.get_by_key_name(key) except db.BadKeyError: entity = None if not entity: transforms.send_json_response( self, 404, 'Object not found.', {'key': key}) else: entity_dict = {'name': key, 'is_draft': entity.is_draft} entity_dict['value'] = transforms.string_to_value( entity.value, item.value_type) json_payload = transforms.dict_to_json( entity_dict, transforms.loads( ConfigPropertyEditor.get_schema_json(item))) transforms.send_json_response( self, 200, 'Success.', payload_dict=json_payload, xsrf_token=XsrfTokenManager.create_xsrf_token( 'config-property-put')) def put(self): """Handles REST PUT verb with JSON payload.""" request = transforms.loads(self.request.get('request')) key = request.get('key') if not self.assert_xsrf_token_or_fail( request, 'config-property-put', {'key': key}): return if not ConfigPropertyRights.can_edit(): transforms.send_json_response( self, 401, 'Access denied.', {'key': key}) return item = None if key and key in config.Registry.registered.keys(): item = config.Registry.registered[key] if not item: self.redirect('/admin?action=settings') try: entity = config.ConfigPropertyEntity.get_by_key_name(key) except db.BadKeyError: transforms.send_json_response( self, 404, 'Object not found.', {'key': key}) return payload = request.get('payload') json_object = transforms.loads(payload) new_value = item.value_type(json_object['value']) # Validate the value. errors = [] if item.validator: item.validator(new_value, errors) if errors: transforms.send_json_response(self, 412, '\n'.join(errors)) return # Update entity. old_value = entity.value entity.value = str(new_value) entity.is_draft = json_object['is_draft'] entity.put() models.EventEntity.record( 'put-property', users.get_current_user(), transforms.dumps({ 'name': key, 'before': str(old_value), 'after': str(entity.value)})) transforms.send_json_response(self, 200, 'Saved.')<|fim▁end|>
if not key:
<|file_name|>pascal_str.rs<|end_file_name|><|fim▁begin|>use std::borrow::{Cow, ToOwned}; use std::cmp::{Ordering, PartialEq, PartialOrd}; use std::ffi::{CStr, CString}; use std::str; use ::utf8::PascalString; use ::PASCAL_STRING_BUF_SIZE; #[derive(Hash, Eq, Ord)] pub struct PascalStr { string: str } impl PascalStr { #[inline] pub fn as_ptr(&self) -> *const u8 { (&self.string).as_ptr() } #[inline] pub fn as_mut_ptr(&mut self) -> *mut u8 { &mut self.string as *mut str as *mut u8 } #[inline] pub fn as_str(&self) -> &str { &self.string } #[inline] pub fn as_mut_str(&mut self) -> &mut str {<|fim▁hole|> } #[inline] pub fn as_bytes(&self) -> &[u8] { self.string.as_bytes() } pub fn as_cstr(&self) -> Result<Cow<CStr>, InteriorNullError> { unimplemented!() } #[inline] pub fn len(&self) -> usize { self.string.len() } #[inline] pub fn is_empty(&self) -> bool { self.string.is_empty() } #[inline] pub fn is_full(&self) -> bool { self.len() == PASCAL_STRING_BUF_SIZE } #[inline] pub fn chars(&self) -> Chars { self.string.chars() } #[inline] pub fn bytes(&self) -> Bytes { self.string.bytes() } #[inline] pub fn lines(&self) -> Lines { self.string.lines() } } impl<S: AsRef<str> + ?Sized> PartialEq<S> for PascalStr { #[inline] fn eq(&self, other: &S) -> bool { let other = other.as_ref(); self.as_str() == other } } impl<S: AsRef<str> + ?Sized> PartialOrd<S> for PascalStr { #[inline] fn partial_cmp(&self, other: &S) -> Option<Ordering> { let other = other.as_ref(); self.as_str().partial_cmp(&other) } } impl ToOwned for PascalStr { type Owned = PascalString; #[inline] fn to_owned(&self) -> Self::Owned { PascalString::from_str(self.as_str()).unwrap() } } impl AsRef<str> for PascalStr { #[inline] fn as_ref(&self) -> &str { &self.string } } pub type Chars<'a> = str::Chars<'a>; pub type Bytes<'a> = str::Bytes<'a>; pub type Lines<'a> = str::Lines<'a>; pub struct InteriorNullError;<|fim▁end|>
&mut self.string
<|file_name|>crazyeights.js<|end_file_name|><|fim▁begin|>exports.commands = { 'c8': 'crazyeights', crazyeights: function(arg, by, room) { if (room.charAt(0) === ',') return false; if (!crazyeight.gameStatus[room]) { crazyeight.gameStatus[room] = 'off'; } if (!arg) { return false; } else { arg = toId(arg); } switch (arg) { case 'new': if (!Bot.canUse('crazyeights', room, by)) return false; if (crazyeight.gameStatus[room] !== 'off') return Bot.say(by, room, 'A crazyeights game is already going on!'); if (checkGame(room)) return Bot.say(by, room, 'There is already a game going on in this room!'); Bot.say(by, room, 'A new game of Crazy Eights is starting. Do +crazyeights join to join the game!'); Bot.say(config.nick, room, 'The goal is to be the first player to get rid of all your cards. A [ 2] will cause the next player to draw 2 cards and lose their turn.'); Bot.say(config.nick, room, 'A [ J] will skip the next player\'s turn and a [♠Q] will make the next player forfeit his/her turn and draw 4 cards. An [ 8] will allow the player to change the suit.'); Bot.say(config.nick, room, 'You can play a card with either the same suit or number/letter. The goal is to get rid of your cards before the other players do so.'); Bot.say(config.nick, room, 'You only need to say first letter of the suit + value to play your card. Ex. ' + config.commandcharacter[0] + 'play sQ would be playing the Queen of Spades.'); game('crazyeights', room); crazyeight.gameStatus[room] = 'signups'; crazyeight.playerData[room] = {}; crazyeight.playerList[room] = []; crazyeight.currentPlayer[room] = ''; break; case 'join': if (crazyeight.gameStatus[room] !== 'signups') return false; if (crazyeight.playerData[room][toId(by)]) return Bot.say(by, room, 'You\'ve already signed up!'); Bot.say(by, ',' + by, '(' + room + ') Thank you for joining!'); crazyeight.playerData[room][toId(by)] = { name: by.slice(1), hand: [], disqualified: false, }; crazyeight.playerList[room][crazyeight.playerList[room].length] = toId(by); break; case 'leave': if (crazyeight.gameStatus[room] !== 'signups') return false; var pIndex = crazyeight.playerList[room].indexOf(toId(by)); if (pIndex < 0) return false; var pushPlayer = []; for (var x = 0; x < crazyeight.playerList[room].length; x++) { if (x === pIndex) { continue; } pushPlayer.push(crazyeight.playerList[room][x]); } //reset playerlist crazyeight.playerList[room] = pushPlayer; delete crazyeight.playerData[room][toId(by)]; break; case 'end': if (!Bot.canUse('crazyeights', room, by)) return false; if (gameStatus === 'off') return false; clearInterval(crazyeight.interval[room]); crazyeight.gameStatus[room] = 'off'; Bot.say(by, room, 'The game was forcibly ended.'); break; case 'start': if (!Bot.canUse('crazyeights', room, by)) return false; if (crazyeight.gameStatus[room] !== 'signups') return false; if (crazyeight.playerList[room].length < 2) return Bot.say(by, room, 'There aren\'t enough players ;-;'); crazyeight.gameStatus[room] = 'on'; crazyeight.deck[room] = Tools.generateDeck(1); Bot.say(by, room, 'Use ' + config.commandcharacter[0] + 'play [card] to play a card. c for clubs, h for hearts, s for spades and, d for diamonds. When playing a [ 8], be sure to include what you\'re changing to (' + config.commandcharacter[0] + 'play c8 s)'); //deal the cards for (var j = 0; j < 7; j++) { for (var i = 0; i < crazyeight.playerList[room].length; i++) { var tarPlayer = crazyeight.playerList[room][i]; crazyeight.playerData[room][tarPlayer].hand[crazyeight.playerData[room][tarPlayer].hand.length] = crazyeight.deck[room][0]; crazyeight.deck[room] = crazyeight.deck[room].slice(1); if (crazyeight.deck[room].length === 0) { crazyeight.deck[room] = Tools.generateDeck(1); } } } // Determine/initialize topCard crazyeight.topCard[room] = crazyeight.deck[room][0]; crazyeight.deck[room] = crazyeight.deck[room].slice(1); Bot.talk(room, '**Top Card: [' + crazyeight.topCard[room] + ']**'); //new deck if all used up if (crazyeight.deck[room].length === 0) { crazyeight.deck[room] = Tools.generateDeck(1); } //start the turns //init first player crazyeight.currentPlayer[room] = crazyeight.playerList[room][0]; Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); Bot.talk(room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn! __(' + config.commandcharacter[0] + 'play [card] or ' + config.commandcharacter[0] + 'draw)__'); crazyeight.interval[room] = setInterval(function() { if (crazyeight.gameStatus[room] !== 'on') { clearInterval(crazyeight.interval[room]); return false; } //disqualify for inactivity crazyeight.playerData[room][crazyeight.currentPlayer[room]].disqualified = true; //re-make playerlist var pIndex = crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]); var pushPlayer = []; for (var x = 0; x < crazyeight.playerList[room].length; x++) { if (x === pIndex) { continue; } pushPlayer.push(crazyeight.playerList[room][x]); } //reset playerlist crazyeight.playerList[room] = pushPlayer; //checking if all players are DQ'd if (crazyeight.playerList[room].length === 0) { Bot.say(config.nick, room, 'Nobody wins this game :('); } else if (crazyeight.playerList[room].length === 1) { Bot.say(config.nick, room, crazyeight.playerData[room][crazyeight.playerList[room][0]].name + ' wins!'); Bot.say(config.nick, room, 'Rewards: ' + Economy.getPayout(crazyeight.playerList[room].length, room) + ' ' + Economy.currency(room)); Economy.give(crazyeight.playerData[room][crazyeight.playerList[room][0]].name, Economy.getPayout(crazyeight.playerList[room].length, room), room); } if (crazyeight.playerList[room].length < 2) { clearInterval(crazyeight.interval[room]); crazyeight.gameStatus[room] = 'off'; return false; } //change to next player crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; //pming next user their hand Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); Bot.talk(room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn! __(' + config.commandcharacter[0] + 'play [card] or ' + config.commandcharacter[0] + 'draw)__'); Bot.talk(room, '**Top Card: [' + crazyeight.topCard[room] + ']**'); }, 90000); } }, play: function(arg, by, room) { if (toId(by) !== crazyeight.currentPlayer[room] || !crazyeight.gameStatus[room] || crazyeight.gameStatus[room] !== 'on') return false; var suitList = ['♥', '♣', '♦', '♠']; var valueList = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']; arg = arg.split(' '); if (arg[1]) { var modifier = arg[1].slice(0, 1).toLowerCase().replace('c', '♣').replace('h', '♥').replace('d', '♦').replace('s', '♠'); } else { modifier = ''; } var suit = arg[0].slice(0, 1).toLowerCase().replace('c', '♣').replace('h', '♥').replace('d', '♦').replace('s', '♠'); var value = arg[0].slice(1).toUpperCase(); if (suitList.indexOf(suit) === -1 || valueList.indexOf(value) === -1) return Bot.say(by, ',' + by, 'To play a card use the first letter of the card\'s suit + the value of the card. (ex. ' + config.commandcharacter[0] + 'play cK would be [♣K])'); var card = suit + value; if (crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.indexOf(card) === -1) { return Bot.say(by, room, 'You don\'t have this card!'); } if (crazyeight.topCard[room].slice(1) !== value && crazyeight.topCard[room][0] !== suit && value !== '8') { return Bot.say(by, room, 'You can\'t play this card now.'); } if (value === '8' && !modifier) { return Bot.say(by, room, 'Please choose what suit to change to. Ex. ' + config.commandcharacter[0] + 'play c8 s'); } if (modifier) { if (suitList.indexOf(modifier) === -1) { return Bot.say(by, room, 'Not a correct suit.'); } } clearInterval(crazyeight.interval[room]); //new top card crazyeight.topCard[room] = card; Bot.talk(room, '**Top Card: [' + crazyeight.topCard[room] + ']**'); //remove card from hand //determine position of the one card var idx = crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.indexOf(card); var newHand = []; for (var i = 0; i < crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.length; i++) { if (i === idx) { continue; } newHand.push(crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand[i]); } crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand = newHand; if (crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.length === 1) { Bot.say(config.nick, room, 'Last Card!'); } //special effects; switch (value) { case '8': crazyeight.topCard[room] = modifier + value; Bot.talk(room, 'Suit is changed to: ' + modifier); break; case '2': crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; //for loop - draw 2 var tarPlayer = crazyeight.currentPlayer[room]; for (var y = 0; y < 2; y++) { crazyeight.playerData[room][tarPlayer].hand[crazyeight.playerData[room][tarPlayer].hand.length] = crazyeight.deck[room][0];<|fim▁hole|> crazyeight.deck[room] = Tools.generateDeck(1); } } Bot.say(config.nick, room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn has been skipped and is forced to draw 2 cards!'); break; case 'J': crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; Bot.say(config.nick, room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn has been skipped!'); break; } if (crazyeight.topCard[room] === '♠Q') { crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; //for loop - draw 4 tarPlayer = crazyeight.currentPlayer[room]; for (var y = 0; y < 4; y++) { crazyeight.playerData[room][tarPlayer].hand[crazyeight.playerData[room][tarPlayer].hand.length] = crazyeight.deck[room][0]; crazyeight.deck[room] = crazyeight.deck[room].slice(1); if (crazyeight.deck[room].length === 0) { crazyeight.deck[room] = Tools.generateDeck(1); } } Bot.say(config.nick, room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn has been skipped and is forced to draw 4 cards!'); } if (crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.length < 1) { Bot.say(config.nick, room, by.slice(1) + ' wins!'); Bot.say(config.nick, room, 'Rewards: ' + Economy.getPayout(crazyeight.playerList[room].length, room) + ' ' + Economy.currency(room)); Economy.give(crazyeight.playerData[room][crazyeight.playerList[room][0]].name, Economy.getPayout(crazyeight.playerList[room].length, room), room); clearInterval(crazyeight.interval[room]); crazyeight.gameStatus[room] = 'off'; return; } crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); Bot.talk(room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn! __(' + config.commandcharacter[0] + 'play [card] or ' + config.commandcharacter[0] + 'draw)__'); //start new dq cycle crazyeight.interval[room] = setInterval(function() { if (crazyeight.gameStatus[room] !== 'on') { clearInterval(crazyeight.interval[room]); return false; } //disqualify for inactivity crazyeight.playerData[room][crazyeight.currentPlayer[room]].disqualified = true; //re-make playerlist var pIndex = crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]); var pushPlayer = []; for (var x = 0; x < crazyeight.playerList[room].length; x++) { if (x === pIndex) { continue; } pushPlayer.push(crazyeight.playerList[room][x]); } //reset playerlist crazyeight.playerList[room] = pushPlayer; //checking if all players are DQ'd if (crazyeight.playerList[room].length === 0) { Bot.say(config.nick, room, 'Nobody wins this game :('); } else if (crazyeight.playerList[room].length === 1) { Bot.say(config.nick, room, crazyeight.playerData[room][crazyeight.playerList[room][0]].name + ' wins!'); Bot.say(config.nick, room, 'Rewards: ' + Economy.getPayout(crazyeight.playerList[room].length, room) + ' ' + Economy.currency(room)); Economy.give(crazyeight.playerData[room][crazyeight.playerList[room][0]].name, Economy.getPayout(crazyeight.playerList[room].length, room), room); } if (crazyeight.playerList[room].length < 2) { clearInterval(crazyeight.interval[room]); crazyeight.gameStatus[room] = 'off'; return false; } //change to next player crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; //pming next user their hand Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); Bot.talk(room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn! __(' + config.commandcharacter[0] + 'play [card] or ' + config.commandcharacter[0] + 'draw)__'); Bot.talk(room, '**Top Card: [' + crazyeight.topCard[room] + ']**'); }, 90000); }, draw: function(arg, by, room) { if (toId(by) !== crazyeight.currentPlayer[room] || !crazyeight.gameStatus[room] || crazyeight.gameStatus[room] !== 'on') return false; clearInterval(crazyeight.interval[room]); tarPlayer = toId(by); crazyeight.playerData[room][tarPlayer].hand[crazyeight.playerData[room][tarPlayer].hand.length] = crazyeight.deck[room][0]; crazyeight.deck[room] = crazyeight.deck[room].slice(1); if (crazyeight.deck[room].length === 0) { crazyeight.deck[room] = Tools.generateDeck(1); } Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); //next player crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); Bot.talk(room, '**Top Card: [' + crazyeight.topCard[room] + ']**'); Bot.talk(room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn! __(' + config.commandcharacter[0] + 'play [card] or ' + config.commandcharacter[0] + 'draw)__'); //start new dq cycle crazyeight.interval[room] = setInterval(function() { if (crazyeight.gameStatus[room] !== 'on') { clearInterval(crazyeight.interval[room]); return false; } //disqualify for inactivity crazyeight.playerData[room][crazyeight.currentPlayer[room]].disqualified = true; //re-make playerlist var pIndex = crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]); var pushPlayer = []; for (var x = 0; x < crazyeight.playerList[room].length; x++) { if (x === pIndex) { continue; } pushPlayer.push(crazyeight.playerList[room][x]); } //reset playerlist crazyeight.playerList[room] = pushPlayer; //checking if all players are DQ'd if (crazyeight.playerList[room].length === 0) { Bot.say(config.nick, room, 'Nobody wins this game :('); } else if (crazyeight.playerList[room].length === 1) { Bot.say(config.nick, room, crazyeight.playerData[room][crazyeight.playerList[room][0]].name + ' wins!'); Bot.say(config.nick, room, 'Rewards: ' + Economy.getPayout(crazyeight.playerList[room].length, room) + ' ' + Economy.currency(room)); Economy.give(crazyeight.playerData[room][crazyeight.playerList[room][0]].name, Economy.getPayout(crazyeight.playerList[room].length, room), room); } if (crazyeight.playerList[room].length < 2) { clearInterval(crazyeight.interval[room]); crazyeight.gameStatus[room] = 'off'; return false; } //change to next player crazyeight.currentPlayer[room] = crazyeight.playerList[room][(crazyeight.playerList[room].indexOf(crazyeight.currentPlayer[room]) + 1) % crazyeight.playerList[room].length]; //pming next user their hand Bot.talk(',' + crazyeight.currentPlayer[room], '(' + room + ') ' + '[' + crazyeight.playerData[room][crazyeight.currentPlayer[room]].hand.join('], [') + ']'); Bot.talk(room, crazyeight.playerData[room][crazyeight.currentPlayer[room]].name + '\'s turn! __(' + config.commandcharacter[0] + 'play [card] or ' + config.commandcharacter[0] + 'draw)__'); Bot.talk(room, '**Top Card: [' + crazyeight.topCard[room] + ']**'); }, 90000); }, }; /**************************** * For C9 Users * *****************************/ // Yes, sadly it can't be done in one huge chunk w/o undoing it / looking ugly :( /* globals toId */ /* globals Bot */ /* globals config */ /* globals Economy */ /* globals game */ /* globals checkGame */ /* globals crazyeight */ /* globals Tools */ /* globals tarPlayer */ /* globals gameStatus */<|fim▁end|>
crazyeight.deck[room] = crazyeight.deck[room].slice(1); if (crazyeight.deck[room].length === 0) {
<|file_name|>issue-1118-using-forward-decl.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] pub type c = nsTArray; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsTArray_base { pub d: *mut ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_nsTArray_base() { assert_eq!( ::std::mem::size_of::<nsTArray_base>(), 8usize, concat!("Size of: ", stringify!(nsTArray_base)) );<|fim▁hole|> ::std::mem::align_of::<nsTArray_base>(), 8usize, concat!("Alignment of ", stringify!(nsTArray_base)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsTArray_base>())).d as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(nsTArray_base), "::", stringify!(d) ) ); } impl Default for nsTArray_base { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsTArray { pub _base: nsTArray_base, } impl Default for nsTArray { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsIContent { pub foo: nsTArray, } #[test] fn bindgen_test_layout_nsIContent() { assert_eq!( ::std::mem::size_of::<nsIContent>(), 8usize, concat!("Size of: ", stringify!(nsIContent)) ); assert_eq!( ::std::mem::align_of::<nsIContent>(), 8usize, concat!("Alignment of ", stringify!(nsIContent)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<nsIContent>())).foo as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(nsIContent), "::", stringify!(foo) ) ); } impl Default for nsIContent { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } extern "C" { #[link_name = "\u{1}_Z35Gecko_GetAnonymousContentForElementv"] pub fn Gecko_GetAnonymousContentForElement() -> *mut nsTArray; } #[test] fn __bindgen_test_layout_nsTArray_open0_ptr_nsIContent_close0_instantiation() { assert_eq!( ::std::mem::size_of::<nsTArray>(), 8usize, concat!("Size of template specialization: ", stringify!(nsTArray)) ); assert_eq!( ::std::mem::align_of::<nsTArray>(), 8usize, concat!( "Alignment of template specialization: ", stringify!(nsTArray) ) ); } #[test] fn __bindgen_test_layout_nsTArray_open0_ptr_nsIContent_close0_instantiation_1() { assert_eq!( ::std::mem::size_of::<nsTArray>(), 8usize, concat!("Size of template specialization: ", stringify!(nsTArray)) ); assert_eq!( ::std::mem::align_of::<nsTArray>(), 8usize, concat!( "Alignment of template specialization: ", stringify!(nsTArray) ) ); }<|fim▁end|>
assert_eq!(
<|file_name|>managed_process.rs<|end_file_name|><|fim▁begin|>// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // Assumes Unix use libc::{self, c_int}; use std::thread; use std::thread::JoinHandle; use std::sync::{Arc, Mutex, RwLock}; use std::process::Child; use std::io::{Error, ErrorKind, Result}; use std::time::{Duration, Instant}; /// Unix exit statuses #[derive(PartialEq, Eq, Clone, Copy, Debug)] pub struct ExitStatus(c_int); const RESTART_TIME_THRESHOLD: u64 = 5; // seconds pub struct ManagedProcess { kill_signal: Arc<Mutex<u32>>, pid: Arc<Mutex<Option<u32>>>, thread: JoinHandle<()>, backoff: Arc<RwLock<Backoff>>, } struct Backoff { restart_count: u64, restart_threshold: Duration, start_time: Option<Instant>, backoff: u64, } impl Backoff { fn new(restart_threshold: Duration) -> Self { Backoff { restart_count: 0, restart_threshold: restart_threshold, start_time: None, backoff: 1, } } fn from_secs(restart_threshold_secs: u64) -> Self { Backoff::new(Duration::from_secs(restart_threshold_secs)) } fn next_backoff(&mut self) -> Duration { let end_time = Instant::now(); let duration_to_backoff = if let Some(start_time) = self.start_time { if (end_time - start_time) < self.restart_threshold { self.backoff += 1; // non-linear back off Duration::from_secs((self.backoff * self.backoff) >> 1) } else { self.backoff = 1; Duration::from_secs(0) } } else { Duration::from_secs(0) }; self.restart_count += 1; self.start_time = Some(Instant::now()); duration_to_backoff } pub fn get_restart_count(&self) -> u64 { self.restart_count } } impl ManagedProcess { /// Create a new ManagedProcess and start it. /// /// # Examples /// /// use tunnel_controller::ManagedProcess; /// use std::process::Command; /// /// let process = ManagedProcess::start(|| { /// Command::new("echo") /// .arg("Hello") /// .arg("World") /// .spawn() /// }); /// pub fn start<F: 'static>(spawn: F) -> Result<ManagedProcess> where F: Fn() -> Result<Child> + Send { let pid = Arc::new(Mutex::new(None)); // Uses a u32 Mutex to avoid the compiler complaining that you can use an AtomicBool. // In this case we want a bool like thing _and_ a lock. let kill_signal = Arc::new(Mutex::new(0)); let shared_kill_signal = kill_signal.clone(); let backoff = Arc::new(RwLock::new(Backoff::from_secs(RESTART_TIME_THRESHOLD))); let shared_pid = pid.clone(); let shared_backoff = backoff.clone(); let thread = thread::spawn(move || { let backoff = shared_backoff; loop { let mut child_process; { let kill_signal = shared_kill_signal.lock().unwrap(); let mut pid = shared_pid.lock().unwrap(); if *kill_signal == 1 { *pid = None; debug!("Received process kill signal"); break; } info!("Starting process. Restarted {} times", checklock!(backoff.read()).get_restart_count()); child_process = spawn().unwrap(); *pid = Some(child_process.id()); } child_process.wait().unwrap(); let backoff_duration = checklock!(backoff.write()).next_backoff(); thread::sleep(backoff_duration); } }); Ok(ManagedProcess { backoff: backoff, kill_signal: kill_signal, pid: pid, thread: thread, }) } #[allow(dead_code)] pub fn get_restart_count(&self) -> u64 { checklock!(self.backoff.read()).get_restart_count() } /// Get the current process ID or None if no process is running fn get_pid(&self) -> Option<u32> { *self.pid.lock().unwrap() } /// Shut the ManagedProcess down safely. Equivalent to sending SIGKILL to the /// running process if it is currently alive /// /// # Examples /// /// use tunnel_controller::ManagedProcess; /// use std::process::Command; /// /// let process = ManagedProcess::start(|| { /// Command::new("sleep") /// .arg("10000") /// .spawn() /// }); /// /// process.shutdown().unwrap(); /// pub fn shutdown(self) -> Result<()> { { let mut kill_signal = self.kill_signal.lock().unwrap(); *kill_signal = 1; } // If there is no assigned pid, the process is not running. let pid = self.get_pid(); if pid.is_none() { self.join_thread(); return Ok(()); } let pid = pid.unwrap() as i32; // if the process has finished, and therefore had waitpid called,<|fim▁hole|> // newer process that happens to have a re-used id let status_result = try_wait(pid); let needs_kill = match status_result { Ok(Some(_)) => { // Process is already exited false } Ok(None) => { // Process is still alive true } Err(e) => { // Something went wrong probably at the OS level, warn and don't // try and kill the process. warn!("{}", e); false } }; if needs_kill { debug!("Sending SIGKILL to pid: {}", pid); if let Err(e) = unsafe { c_rv(libc::kill(pid, libc::SIGKILL)) } { warn!("{}", e); } } self.join_thread(); Ok(()) } /// Wait for the thread to exit fn join_thread(self) -> () { self.thread.join().unwrap(); } } /// A non-blocking 'wait' for a given process id. fn try_wait(id: i32) -> Result<Option<ExitStatus>> { let mut status = 0 as c_int; match c_rv_retry(|| unsafe { libc::waitpid(id, &mut status, libc::WNOHANG) }) { Ok(0) => Ok(None), Ok(n) if n == id => Ok(Some(ExitStatus(status))), Ok(n) => Err(Error::new(ErrorKind::NotFound, format!("Unknown pid: {}", n))), Err(e) => Err(Error::new(ErrorKind::Other, format!("Unknown waitpid error: {}", e))), } } /// Check the return value of libc function and turn it into a /// Result type fn c_rv(t: c_int) -> Result<c_int> { if t == -1 { Err(Error::last_os_error()) } else { Ok(t) } } /// Check the return value of a libc function, but, retry the given function if /// the returned error is EINTR (Interrupted) fn c_rv_retry<F>(mut f: F) -> Result<c_int> where F: FnMut() -> c_int { loop { match c_rv(f()) { Err(ref e) if e.kind() == ErrorKind::Interrupted => {} other => return other, } } } #[cfg(test)] mod test { use super::Backoff; use std::thread; use std::time::Duration; #[test] fn test_backoff_immediate_if_failed_after_threshold() { let mut backoff = Backoff::from_secs(2); assert_eq!(backoff.next_backoff().as_secs(), 0); // Simulate process running thread::sleep(Duration::new(4, 0)); assert_eq!(backoff.next_backoff().as_secs(), 0); } #[test] fn test_backoff_wait_if_failed_before_threshold() { let mut backoff = Backoff::from_secs(1); assert_eq!(backoff.next_backoff().as_secs(), 0); assert_eq!(backoff.next_backoff().as_secs(), 2); assert_eq!(backoff.next_backoff().as_secs(), 4); assert_eq!(backoff.next_backoff().as_secs(), 8); assert_eq!(backoff.next_backoff().as_secs(), 12); assert_eq!(backoff.next_backoff().as_secs(), 18); assert_eq!(backoff.next_backoff().as_secs(), 24); } #[test] fn test_backoff_reset_if_running_for_more_than_threshold() { let mut backoff = Backoff::from_secs(1); assert_eq!(backoff.next_backoff().as_secs(), 0); assert_eq!(backoff.next_backoff().as_secs(), 2); assert_eq!(backoff.next_backoff().as_secs(), 4); assert_eq!(backoff.next_backoff().as_secs(), 8); // Simulate process running thread::sleep(Duration::new(3, 0)); assert_eq!(backoff.next_backoff().as_secs(), 0); } } #[test] fn test_managed_process_restart() { use std::process::Command; let process = ManagedProcess::start(|| { Command::new("sleep") .arg("0") .spawn() }) .unwrap(); // Maybe spin with try_recv and check a duration // to assert liveness? let mut spin_count = 0; while process.get_restart_count() < 2 { if spin_count > 2 { panic!("Process has not restarted twice, within the expected amount of time"); } else { spin_count += 1; thread::sleep(Duration::new(3, 0)); } } process.shutdown().unwrap(); } #[test] fn test_managed_process_shutdown() { use std::process::Command; // Ideally need a timeout. The test should be, if shutdown doesn't happen immediately, // something's broken. let process = ManagedProcess::start(|| { Command::new("sleep") .arg("1000") .spawn() }) .unwrap(); process.shutdown().unwrap(); }<|fim▁end|>
// and we kill it, then on unix we might ending up killing a
<|file_name|>vhdlscanner.cpp<|end_file_name|><|fim▁begin|>#line 3 "<stdout>" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer vhdlscanYY_create_buffer #define yy_delete_buffer vhdlscanYY_delete_buffer #define yy_flex_debug vhdlscanYY_flex_debug #define yy_init_buffer vhdlscanYY_init_buffer #define yy_flush_buffer vhdlscanYY_flush_buffer #define yy_load_buffer_state vhdlscanYY_load_buffer_state #define yy_switch_to_buffer vhdlscanYY_switch_to_buffer #define yyin vhdlscanYYin #define yyleng vhdlscanYYleng #define yylex vhdlscanYYlex #define yylineno vhdlscanYYlineno #define yyout vhdlscanYYout #define yyrestart vhdlscanYYrestart #define yytext vhdlscanYYtext #define yywrap vhdlscanYYwrap #define yyalloc vhdlscanYYalloc #define yyrealloc vhdlscanYYrealloc #define yyfree vhdlscanYYfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE vhdlscanYYrestart(vhdlscanYYin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 262144 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t vhdlscanYYleng; extern FILE *vhdlscanYYin, *vhdlscanYYout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up vhdlscanYYtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up vhdlscanYYtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via vhdlscanYYrestart()), so that the user can continue scanning by * just pointing vhdlscanYYin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when vhdlscanYYtext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t vhdlscanYYleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow vhdlscanYYwrap()'s to do buffer switches * instead of setting up a fresh vhdlscanYYin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void vhdlscanYYrestart (FILE *input_file ); void vhdlscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE vhdlscanYY_create_buffer (FILE *file,int size ); void vhdlscanYY_delete_buffer (YY_BUFFER_STATE b ); void vhdlscanYY_flush_buffer (YY_BUFFER_STATE b ); void vhdlscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); void vhdlscanYYpop_buffer_state (void ); static void vhdlscanYYensure_buffer_stack (void ); static void vhdlscanYY_load_buffer_state (void ); static void vhdlscanYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER vhdlscanYY_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE vhdlscanYY_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE vhdlscanYY_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE vhdlscanYY_scan_bytes (yyconst char *bytes,yy_size_t len ); void *vhdlscanYYalloc (yy_size_t ); void *vhdlscanYYrealloc (void *,yy_size_t ); void vhdlscanYYfree (void * ); #define yy_new_buffer vhdlscanYY_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ vhdlscanYYensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ vhdlscanYY_create_buffer(vhdlscanYYin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ vhdlscanYYensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ vhdlscanYY_create_buffer(vhdlscanYYin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define vhdlscanYYwrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *vhdlscanYYin = (FILE *) 0, *vhdlscanYYout = (FILE *) 0; typedef int yy_state_type; extern int vhdlscanYYlineno; int vhdlscanYYlineno = 1; extern char *vhdlscanYYtext; #define yytext_ptr vhdlscanYYtext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up vhdlscanYYtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ vhdlscanYYleng = (yy_size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 51 #define YY_END_OF_BUFFER 52 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_acclist[1319] = { 0, 49, 49, 10, 49, 10, 49, 49, 49, 49, 49, 32, 49, 32, 49, 21, 49, 21, 49, 13, 49, 13, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 50, 51, 49, 50, 51, 47, 51, 50, 51, 50, 51, 50, 51, 40, 48, 50, 51, 48, 50, 51, 50, 51, 49, 50, 51, 48, 50, 51, 49, 50, 51, 10, 47, 51, 10, 50, 51, 49, 50, 51, 50, 51, 50, 51, 40, 48, 50, 51, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 50, 51, 48, 50, 51, 49, 50, 51, 10, 47, 51, 10, 50, 51, 49, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 48, 50, 51, 44, 50, 51, 44, 49, 50, 51, 44, 47, 51, 44, 50, 51, 44, 50, 51, 44, 50, 51, 40, 44, 48, 50, 51, 44, 48, 50, 51, 44, 50, 51, 44, 49, 50, 51, 44, 50, 51, 44, 48, 50, 51, 17, 40, 48, 50, 51, 17, 48, 50, 51, 50, 51, 17, 48, 50, 51, 25, 50, 51, 32, 49, 50, 51, 25, 32, 47, 51, 25, 32, 50, 51, 25, 50, 51, 26, 50, 51, 27, 50, 51, 25, 50, 51, 25, 40, 48, 50, 51, 31, 50, 51, 25, 48, 50, 51, 25, 48, 50, 51, 25, 48, 50, 51, 25, 50, 51, 32, 49, 50, 51, 25, 48, 50, 51, 21, 49, 50, 51, 21, 47, 51, 21, 50, 51, 40, 48, 50, 51, 48, 50, 51, 48, 50, 51, 21, 49, 50, 51, 48, 50, 51, 13, 49, 50, 51, 13, 47, 51, 13, 50, 51, 14, 48, 50, 51, 13, 49, 50, 51, 14, 48, 50, 51, 11, 50, 51, 11, 49, 50, 51, 11, 47, 51, 11, 50, 51, 11, 50, 51, 11, 50, 51, 11, 40, 48, 50, 51, 11, 48, 50, 51, 11, 48, 50, 51, 11, 50, 51, 11, 49, 50, 51, 11, 48, 50, 51, 29, 50, 51, 29, 49, 50, 51, 29, 47, 51, 29, 50, 51, 29, 50, 51, 29, 50, 51, 29, 40, 48, 50, 51, 29, 48, 50, 51, 29, 48, 50, 51, 29, 50, 51, 29, 49, 50, 51, 29, 48, 50, 51, 15, 40, 48, 50, 51, 15, 48, 50, 51, 50, 51, 15, 48, 50, 51, 33, 40, 48, 50, 51, 33, 48, 50, 51, 50, 51, 33, 48, 50, 51, 38, 47, 51, 38, 50, 51, 37, 50, 51, 35, 50, 51, 48, 50, 51, 48, 50, 51, 16, 50, 51, 16, 48, 50, 51, 50, 51, 16, 48, 50, 51, 49, 41, 46, 48, 40, 48, 48, 48, 49, 48, 49, 49, 10, 41, 48, 40, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 49, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 46, 17, 17, 48, 17, 40, 48, 17, 48, 17, 48, 17, 48, 32, 49, 32, 48, 48, 32, 49, 21, 49, 21, 48, 40, 48, 23, 48, 48, 21, 49, 48, 13, 49, 13, 14, 14, 14, 48, 13, 49, 14, 14, 48, 48, 49, 48, 49, 15, 48, 15, 40, 48, 15, 48, 15, 48, 15, 48, 33, 48, 33, 40, 48, 33, 48, 33, 48, 33, 48, 48, 36, 48, 16, 41, 16, 16, 16, 16, 48, 16, 48, 16, 48, 46, 45, 46, 40, 48, 48, 40, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 43, 45, 46, 17, 40, 48, 17, 17, 48, 48, 48, 40, 48, 48, 48, 14, 14, 48, 48, 48, 15, 40, 48, 15, 48, 33, 40, 48, 33, 48, 48, 16, 48, 45, 46, 45, 46, 40, 39, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 39, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 6, 6, 6, 43, 43, 45, 46, 43, 45, 46, 17, 39, 24, 24, 28, 48, 48, 48, 48, 40, 23, 48, 48, 39, 14, 14, 39, 48, 30, 48, 48, 48, 36, 39, 45, 46,16426, 39, 48, 48, 48, 34, 48, 48, 48, 48, 48, 48, 48, 3, 3, 3, 39, 39, 39, 39, 39, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 6, 6, 6, 43, 43, 43, 45, 46, 17, 39, 24, 48, 48, 48, 48, 48, 23, 23, 23, 48, 48, 39, 14, 39, 48, 48, 48, 48, 48, 36, 36, 36, 39, 48, 48, 48, 34, 48, 48, 48, 48, 48, 48, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 48, 48, 48, 48, 48, 48, 48, 48, 48, 43, 48, 48, 48, 28, 48, 23, 48, 48, 48, 48, 48, 48, 30, 36, 48, 48, 48, 48, 5, 48, 48, 48, 48, 8, 8, 8, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 8234, 5, 48, 48, 48, 5, 5, 5, 5, 48, 48, 48, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 7, 48, 48, 48, 48, 48, 48, 20, 48, 48, 48, 48, 48, 48, 48, 5, 9, 5, 48, 48, 48, 5, 5, 5, 5, 7, 7, 48, 48, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 7, 7, 7, 48, 48, 48, 48, 48, 48, 20, 48, 22, 23, 48, 48, 48, 48, 5, 5, 5, 5, 5, 9, 5, 5, 5, 5, 48, 48, 5, 7, 7, 7, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 48, 48, 48, 48, 22, 48, 48, 48, 48, 48, 5, 5, 5, 5, 5, 48, 48, 5, 5, 5, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 48, 48, 48, 12, 28, 48, 48, 12, 48, 48, 48, 5, 5, 5, 9, 48, 48, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 5, 39, 28, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 30, 48, 48, 48, 48, 48, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 9, 39, 39, 5, 39, 5, 39, 5, 39, 5, 39, 7, 48, 48, 12, 19, 1, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 9, 39, 39, 5, 39, 5, 39, 5, 39, 5, 39, 7, 7, 7, 48, 48, 9, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 48, 48, 9, 9, 4, 4, 39, 39, 9, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 3, 3, 3, 48, 48, 4, 4, 4, 1, 5, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 48, 18, 5, 5, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 5, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 9, 39, 39, 1, 1, 39, 39, 39, 39, 39, 39, 39, 9, 39, 39, 39, 9, 39, 39, 1, 1, 1, 39, 39, 39, 39, 39, 39, 2, 2, 39, 5, 39, 2, 2, 2, 2, 5, 39, 5, 39, 2 } ; static yyconst flex_int16_t yy_accept[1862] = { 0, 1, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15, 17, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 47, 49, 51, 53, 55, 59, 62, 64, 67, 70, 73, 76, 79, 82, 84, 86, 90, 92, 95, 98, 101, 104, 107, 110, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 167, 170, 173, 176, 179, 184, 188, 191, 195, 198, 202, 207, 211, 213, 217, 220, 224, 228, 232, 235, 238, 241, 244, 249, 252, 256, 260, 264, 267, 271, 275, 279, 282, 285, 289, 292, 295, 299, 302, 306, 309, 312, 316, 320, 324, 327, 331, 334, 337, 340, 343, 348, 352, 356, 359, 363, 367, 370, 374, 377, 380, 383, 386, 391, 395, 399, 402, 406, 410, 415, 419, 421, 425, 430, 434, 436, 440, 443, 446, 449, 452, 455, 458, 461, 465, 467, 471, 472, 472, 472, 472, 473, 473, 474, 474, 475, 477, 478, 478, 478, 479, 480, 480, 481, 482, 482, 483, 483, 483, 483, 483, 483, 483, 483, 484, 484, 485, 485, 485, 485, 485, 485, 485, 486, 488, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 490, 490, 491, 492, 493, 494, 495, 496, 496, 496, 497, 498, 498, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 500, 500, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 520, 521, 522, 524, 527, 529, 529, 529, 531, 533, 535, 536, 536, 536, 536, 537, 538, 540, 542, 543, 543, 543, 544, 546, 547, 548, 549, 551, 552, 554, 555, 556, 557, 559, 561, 562, 564, 565, 566, 566, 566, 567, 568, 570, 573, 575, 575, 575, 577, 579, 581, 584, 586, 586, 586, 588, 590, 590, 591, 592, 593, 595, 596, 597, 598, 600, 600, 600, 602, 604, 604, 605, 607, 607, 609, 609, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 613, 614, 615, 616, 617, 618, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 639, 642, 645, 646, 648, 648, 648, 648, 649, 649, 650, 650, 652, 652, 652, 653, 654, 655, 657, 658, 658, 659, 662, 664, 667, 669, 669, 669, 670, 672, 672, 674, 676, 677, 677, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 679, 680, 680, 680, 680, 681, 682, 683, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 710, 713, 715, 715, 716, 717, 717, 717, 717, 717, 718, 719, 720, 721, 721, 721, 721, 722, 723, 724, 724, 724, 725, 726, 727, 728, 730, 730, 731, 731, 731, 731, 732, 733, 734, 735, 735, 736, 737, 737, 739, 740, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 742, 743, 743, 743, 744, 744, 744, 744, 745, 746, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 766, 766, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 781, 783, 783, 783, 783, 784, 784, 784, 784, 784, 784, 784, 785, 786, 787, 788, 788, 788, 788, 788, 788, 789, 790, 791, 792, 792, 792, 792, 792, 793, 794, 795, 797, 797, 798, 799, 799, 799, 799, 799, 800, 801, 802, 802, 802, 802, 803, 804, 805, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 807, 808, 808, 808, 809, 810, 811, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 833, 833, 834, 835, 836, 837, 838, 838, 838, 838, 838, 838, 838, 839, 840, 841, 841, 842, 842, 842, 843, 844, 844, 844, 844, 844, 845, 846, 846, 846, 847, 848, 848, 848, 849, 850, 850, 851, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 853, 854, 854, 854, 855, 856, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 881, 881, 882, 882, 882, 882, 883, 883, 883, 883, 883, 883, 883, 884, 885, 886, 886, 886, 887, 887, 887, 887, 887, 888, 889, 889, 889, 890, 891, 891, 891, 892, 893, 894, 894, 894, 894, 894, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, 896, 897, 897, 897, 898, 899, 900, 901, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 918, 919, 919, 919, 920, 920, 920, 920, 920, 920, 920, 920, 920, 921, 922, 923, 923, 923, 925, 925, 925, 925, 925, 926, 927, 927, 927, 928, 929, 929, 929, 930, 931, 931, 931, 931, 931, 931, 931, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 932, 933, 933, 934, 935, 936, 936, 936, 937, 938, 939, 940, 941, 941, 941, 941, 941, 941, 942, 942, 942, 943, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 964, 964, 964, 965, 965, 965, 965, 965, 965, 965, 965, 965, 966, 967, 968, 969, 969, 970, 970, 970, 970, 970, 971, 971, 971, 973, 973, 973, 974, 975, 975, 975, 976, 977, 977, 978, 978, 978, 978, 978, 979, 980, 981, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 982, 983, 983, 984, 985, 986, 987, 988, 989, 989, 989, 989, 989, 989, 989, 990, 990, 990, 991, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1009, 1010, 1011, 1012, 1012, 1012, 1012, 1013, 1013, 1013, 1014, 1014, 1014, 1015, 1016, 1016, 1016, 1017, 1018, 1018, 1019, 1019, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1021, 1022, 1023, 1024, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1047, 1048, 1049, 1049, 1049, 1051, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1053, 1053, 1053, 1054, 1055, 1055, 1055, 1056, 1057, 1057, 1057, 1058, 1059, 1060, 1060, 1060, 1060, 1060, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1062, 1063, 1063, 1063, 1063, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1087, 1087, 1087, 1088, 1089, 1089, 1089, 1089, 1089, 1089, 1090, 1090, 1090, 1090, 1091, 1092, 1092, 1092, 1092, 1092, 1093, 1094, 1095, 1096, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1098, 1098, 1098, 1098, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1122, 1123, 1125, 1127, 1129, 1131, 1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132, 1132, 1133, 1134, 1134, 1135, 1135, 1135, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1156, 1157, 1159, 1161, 1163, 1165, 1166, 1167, 1168, 1168, 1168, 1168, 1169, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1170, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1189, 1189, 1189, 1190, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1192, 1192, 1192, 1193, 1193, 1194, 1194, 1194, 1194, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1196, 1197, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1221, 1222, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1224, 1225, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1227, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1244, 1245, 1246, 1246, 1246, 1246, 1246, 1246, 1246, 1246, 1246, 1246, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1279, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1281, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1291, 1292, 1293, 1295, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1297, 1297, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1306, 1306, 1306, 1306, 1306, 1306, 1307, 1307, 1308, 1310, 1311, 1312, 1313, 1313, 1313, 1314, 1316, 1318, 1318, 1318, 1318, 1319, 1319, 1319, 1319, 1319 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 9, 9, 10, 10, 11, 12, 13, 14, 10, 15, 16, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 20, 20, 9, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 31, 38, 39, 40, 41, 42, 31, 31, 43, 31, 9, 44, 9, 9, 45, 1, 46, 47, 48, 49, 50, 51, 52, 53, 54, 31, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 65, 31, 31, 66, 31, 67, 10, 67, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[68] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 6, 6, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 22, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 23 } ; static yyconst flex_int16_t yy_base[2160] = { 0, 0, 67, 134, 200, 264, 331, 398, 465, 532, 38, 599, 666, 733, 800, 867, 934, 1001, 1068, 1135, 1202, 1269, 1336, 204, 0, 208, 0, 1403, 1470, 1537, 1604, 302, 0, 1168,27243, 20, 24, 43, 1670, 1118, 25, 1124, 1736, 369, 54, 1802, 48, 94, 1861, 1920, 98, 284, 1986, 2045, 2105, 0, 2, 4, 68, 2124, 307, 2190, 1761, 1823, 0, 265, 2, 56, 324, 67, 0, 1, 399, 326, 49, 176,27243, 117, 214, 421, 2253, 1109, 204, 1114, 2319, 637, 1100, 451, 445, 389, 2385, 653,27243, 1854, 1942, 1948, 0,27243,27243, 1099, 228, 27243, 1105, 456, 449, 0, 2451, 654, 426, 491, 497, 2505, 2572, 72, 704, 72, 515, 619, 633, 2639, 771, 2706,27243, 696, 700, 754, 0, 1045, 241, 1044, 788, 0, 838, 655,27243, 1624, 1642, 1693, 0, 1035, 306, 1038, 789, 0, 1708, 724, 353, 1032, 2772, 854, 360, 1030, 2838, 855, 763, 777,27243,27243, 2905, 2972, 3038, 508, 3104, 2015, 830, 834, 985, 0,27243, 0, 992, 0, 116, 435, 986, 0, 0, 0, 905, 254, 657, 0, 897, 0, 626, 901, 3170, 3229, 3248, 931, 3297, 961, 627, 628, 3363, 724, 3429, 968, 1021, 1026, 1030, 1088, 1105, 3495, 0, 0, 1956, 974, 2040, 2148, 2065, 2152, 1155, 1159, 957, 3554, 1060, 3573, 398, 338, 1141, 465, 1142, 3620, 3686, 975, 3752, 2162, 0, 1198, 932, 331, 1265, 255, 737, 800, 1271, 1332, 1199, 1200, 2407, 253, 259, 868, 1203, 1268, 1335, 1078, 1270, 1209, 1204, 1208, 603, 8, 1274, 1340, 483, 1143, 673, 1342, 1013, 1077, 1441, 973, 927, 720, 1179, 1423, 786, 3815, 3881, 853, 1455, 2411, 2444, 397, 723, 735, 1486, 1461, 3947, 1051, 1183, 847, 3988, 4039, 4106, 916, 844, 1487, 1781, 1701, 1366, 1433, 0, 0, 4173, 1840, 736, 4240, 1551, 1892, 2077, 790, 1552, 2158, 847, 979, 0, 4306, 4372, 0, 936, 842, 1041, 0, 4438, 4504, 0, 998, 810, 4571, 1232, 4638, 0, 4704, 4770, 0, 1493, 4836, 4902, 0, 1754, 793, 0, 697, 722, 206, 1060, 118, 1309, 1524, 4968, 4987, 1527, 1134, 5044, 5110, 1449, 5176, 1593, 5242, 1898, 2289, 2560, 2627, 0, 5308, 1529, 1342, 1533, 5367, 0, 0, 1602, 5426, 5478, 1797, 1552, 1789, 1848, 1272, 5528, 5594, 1206, 1461, 1395, 1664, 1339, 1667, 1139, 1606, 1598, 1950, 1919, 1671, 2037, 1949, 1941, 2123, 1666, 1951, 1835, 1270, 1396, 2051, 2188, 2197, 1463, 1973, 1643, 1784, 1989, 1746, 2060, 2248, 2250, 2177, 2252, 2249, 2152, 2256, 2262, 2315, 2341, 688, 593, 2015, 5660, 892, 183, 2354, 281, 5726, 2564, 2078, 5779, 5830, 1515, 644, 5897, 2379, 1472, 5964, 2371, 1340, 6030, 637, 520, 491, 493, 1568, 482, 6090, 2475, 0, 487, 0,27243, 439, 0, 2534, 2424, 2027, 2410, 2429, 2260, 6156, 6222, 6288, 6354, 1341, 1607, 2694, 2808, 6420, 2445, 2321, 2507, 2572, 2326, 2449, 2500, 2601, 2663, 2668, 2631, 2870, 2391, 2502, 6479, 6545, 2703, 2560, 2643, 2694, 2704, 2709, 2036, 2712, 2760, 2761, 2705, 2713, 2773, 2772, 2768, 1736, 2769, 2835, 2829, 2896, 1551, 1692, 2120, 2505, 2835, 2839, 2840, 2937, 6612, 2895, 2900, 2905, 2906, 2943, 2749, 3033, 2918, 2973, 2975, 3075, 2194, 2539, 2672, 2994, 372, 431, 0, 921, 3126, 3002, 925, 412, 3131, 3451, 3062,27243, 6678, 6697, 3033, 6760, 1734, 1710, 1866, 376, 2365, 3138, 3162, 6827, 6894, 435, 380, 361, 3025, 2694, 3457, 3707, 3185,27243, 6960, 6979, 3034, 7042, 2612, 340, 296, 288, 2689, 0, 1917, 2329, 7108, 7168, 3267, 3317, 7187, 7253, 7319, 7385, 2428, 2470, 3477, 3656, 3357, 3734, 7451, 7510, 7569, 7628, 2908, 2971, 3549, 3097, 3108, 7687, 7749, 2575, 3328, 3165, 3210, 3277, 3282, 3333, 3237, 3177, 7800, 7866, 3352, 3421, 3393, 3531, 3605, 3408, 3609, 3843, 3652, 3461, 3718, 3838, 7932, 3903, 3863, 3675, 3671, 3873, 2622, 1898, 3596, 3131, 2901, 3301, 3461, 3086, 3206, 3397, 3648, 3743, 7992, 8059, 8126, 3296, 3913, 3441, 3478, 1942, 3885, 3918, 4139, 4206, 3364, 3492, 3749, 3618, 3732, 3567, 3928, 3853, 3981, 3985, 258, 0, 240, 1126, 5270, 4023, 3956,27243, 4925, 2700, 2767, 4294, 4063, 4067, 8192, 8211, 3760, 2779, 8268, 8334, 4071, 2806, 1991, 2974, 3071, 3233, 3252, 3275, 3490, 2193, 2976, 8401, 8468, 980, 239, 3714, 3107, 3125, 4090, 4134, 4130, 4143, 8534, 8553, 3505, 8610, 8676, 4199, 3388, 3513, 3600, 206, 204, 3712, 110, 3510, 2266, 8742, 8795, 3904, 8853, 8919, 8985, 9051, 2407, 3622, 9117, 9176, 9235, 9295, 4342, 9355, 3753, 9420, 322, 4225, 3950, 3963, 4035, 9479, 9528, 3683, 4269, 4172, 99, 4157, 4038, 9591, 9657, 4336, 3814, 3973, 4234, 4226, 4306, 4364, 4250, 4176, 3707, 4371, 4362, 4231, 4363, 3932, 4372, 4044, 4409, 3171, 3309, 3798, 3878, 4294, 4432, 9724, 4458, 9791, 9858, 0, 0, 5291, 80, 9924, 9983, 5330,10042, 4428,10102, 4238, 4439, 3903, 4524, 4532, 4431, 4497, 4553, 4444, 61, 4597, 4528, 3960, 4069, 4664, 4601,10165,10212, 4571,10274,10340, 4089, 4104, 4162, 3977, 3599, 3403, 3498, 3508,10407,10474, 4177, 4247, 4270, 3757, 4669, 4733,10540,10587,10634,10700, 4153, 43, 4294, 3920, 4574, 4383, 4370,10766,10832,10898,10964, 4310, 4739, 4806, 4872, 5014,11030,11089,11148,11207,11266,11328,11387, 5080, 4637, 4143, 4571, 4704, 4636, 4710, 4443, 4375, 4799, 4691, 4772, 4822,11450,11516, 4503, 4703, 4439, 4866, 4452, 11582, 4757, 4769, 4504, 4507, 4890, 4938, 4846, 4510, 4566, 4766, 4826, 4893, 4933, 5006, 5010,11642,11709, 0, 5384, 5398, 5449, 5359, 2942,11775, 5684, 5688,11832, 5764, 5032, 4963, 5028, 5030, 5075, 5139, 5110, 5095, 5199, 5264, 5159, 5508, 5692, 4183, 4313, 5457, 5696,11893,11955, 4927, 4639, 4575, 4659, 5117, 5007, 4697, 4707,12015,12082, 4757, 4683, 4775, 4768, 5770, 5865,12148,12210,27243, 4824, 4826, 5229, 5109, 5463, 5182, 5122, 4986, 4839, 4810, 5468,12259,12319, 5524, 5525, 5952, 5988, 5992, 6126,12378, 5179, 6019, 4894, 12437, 5526, 5529, 5236, 5309, 4847, 5617, 4914, 5207, 5394, 5513, 5622, 5266, 5591, 5245, 5317, 5518, 5389, 5647, 5756, 5178, 5689, 5817, 4985, 5043, 5700, 5596, 5643, 6378, 5088, 5050, 6192, 6382, 6636, 6605, 6640, 6704, 6986, 6918, 5317, 5830, 6135, 6244, 5831, 5125, 5941, 5856, 6326, 5110, 5294, 5923, 6391, 5725, 5818, 6002, 5300, 5367, 0, 5465, 5737, 5161, 5287, 5593, 6117, 5385, 5368, 5464, 5518, 5996, 6451, 5836, 5758, 5525, 5523, 6029, 6002, 5900, 5980, 6141, 5439, 12500,12559, 6282,12618, 6158, 6480, 6815, 7065,12677, 6030, 7079, 7223, 7408, 7412, 5469, 6092, 6155, 4549, 7471, 7489, 5533, 6219, 6224, 6509, 5530, 5824, 5480, 6575, 5947, 5918, 242, 5929, 6068, 6097, 6285, 6156, 6151, 6318, 6407, 6379, 6401, 826, 5608, 6273, 6530, 5543, 5719, 7540, 7599, 6754, 7635,12736,12795, 7530, 7417, 7620, 7707, 7890, 7894, 6922, 6252, 6460, 6395, 6745, 6860, 6409, 5772, 6722, 6796, 6646, 5655, 5729, 7070, 7902, 6089, 6278, 6467, 6407, 5851,27243, 6382, 6582, 5956, 6670,12855, 6716, 6784, 4154, 5894, 5947, 6049, 6073, 7011, 6928, 6479, 6541, 6032, 6665, 6538, 6576, 6820, 6830, 7093, 6791, 7148, 6849, 7160,12921, 7721, 7317, 6961, 7738, 7986, 6037, 6159, 6696, 6291, 6353, 6162, 6154, 6426, 6830, 6932,27243, 6978, 8085, 8238, 7241, 7420, 6531, 6887, 6218, 7074, 7216, 7348, 7711, 6453, 7525, 7313, 7517, 7098, 6972, 1170, 1513, 6460, 6285,12980,13039,13098,13158, 8492, 8028, 8559,13218,13277, 8153, 8702, 8735, 8764, 7716, 7782, 6498, 8217, 7830, 7282, 6352, 6404, 7591, 7851, 6538, 7117, 6985,13336, 6602,13381, 6952,27243,13448, 7210,13515, 6619, 6675, 6611, 8104, 7968, 7824, 6823, 6703, 6690, 7237, 7040, 8114, 7306,13581,13640, 7733, 8159, 7985, 6766, 6748, 7110, 6979, 6771, 7321, 6755, 6813, 7252, 8458, 8039, 8304, 9071, 8354, 7092, 6825, 6890, 8367, 8254, 6971, 8300, 8430, 8320, 7254, 8178, 8502, 7413, 7047, 7789, 9087, 9138, 9157, 13699,13758,13817,13876,13935, 9147, 9203,13998, 9197, 6923, 9228,14064, 9253, 8574, 8596, 7139, 7963, 8640, 8661, 7100, 7244, 8825,14124,14168, 7458, 7616, 8080,14227,27243,14271, 14315, 7184,14382, 8015, 8291, 8371, 7185, 8527, 7329, 8698, 14448,27243,14492, 8706, 8815,14536,14595, 3018,14644,14710, 0, 4017,14776, 8260, 9279, 9076, 9309,14842, 7321, 7319, 9315, 8914, 8979, 9374, 7357, 7388,14901,14960, 1529,15019, 8729, 9391, 9459, 9499,15078,15097, 7401, 8877, 8886,15154, 7404, 8394,15220,15280,15340,15407,15474,15541,15608,15675, 7409, 7421, 8600, 7425, 9578, 7635, 8453, 8954, 9324, 7455, 9257,15741, 9386, 9107, 7455, 8776, 8833, 8434,27243,15800, 15819, 7499, 7549,15882, 8498,15941,15985,16029,16073,16117, 16183,16249, 4094, 7499, 7450, 8648,16315,16359,16403,16447, 16491, 9568, 8904, 8710,27243,16550,16569, 7547,16632,16691, 16757,16823, 8324,16889, 7531, 7476, 9718, 9785, 9885, 9939, 9977, 9998,10071, 7526, 8844,16948, 7536,10081,10122, 7800, 10193,10207,17007, 9006, 9369, 9505,17067, 8837, 8881, 9688, 17086, 7543,17152,17211,10268,17270,17330,17397,17464,17531, 7557, 7576,10395,10497,10524,10567,17598,17665, 7617, 7973, 10670,10736, 9552, 7595, 7904,10984,11002, 9573, 7917, 9016, 9638, 7601, 9813, 9184, 9437,17731, 8966,11061, 9680,17790, 17848,17908,17974,18040,18106, 9442, 7611, 9761, 9642,18172, 18231, 9992, 7636, 9346,10310,10401,10892,11068,11142,11082, 9895, 7615, 9836,18297, 7644,10563, 8908,18356,10188, 9931, 9960,10319,10111,27243,10117,10813,18422, 9825,18468,18534, 10020,18600,11153,10218, 7869,10628,10988,18660,18727, 7814, 7990, 8404, 7636, 7736,18794,18861, 8164, 0, 9466,11212, 642,11226, 8378, 6807, 9023, 9692, 7658,11271,11308,18927, 18974,19032, 0, 7740,19098,10200, 7663,10501, 7684,11312, 11072,11348,19164, 7755, 8234,11486,11553,10506,10528, 9266, 9845,11391,19223, 0, 9954,10664,10730,10865,11418,19289, 10437,19347,11599, 9619,11243,19413,10363,11669,10751,19479, 19538, 8246, 9083, 7999, 7754, 7788, 8582, 8473, 7929, 9851, 7790, 7799, 8389,10757,11736,11779,11569, 4621,10374,11480, 8055, 8917, 7931, 7934, 7863,11809, 4762,11850,11912, 7988, 10819,10692, 8522,27243, 8059,10799,10823, 8133,11320, 8306, 10886,11133,11824,19597, 0,11248,11788,11886,11925,11978, 19663, 9949,10144,11573,19721, 0,10246,10610,10658,10790, 10928,11983,11501,19787,12070,12167,10035, 7993, 8032, 8336, 10102, 9500,11916, 8337, 8052, 8616,19846,19905,12007, 8992, 12194, 8914,12230,12143,10408, 4956, 7371,11407,11546, 9058, 8987, 8099,11441, 9623,12106,12248,11623,27243, 0,11430, 8340,11695,11995, 8341,12189,10060,11635,10517, 0,12324, 12047, 9392, 8397, 8189, 9721,12268, 9166,12312,12357,12393, 9196, 8194,11740, 9695, 8463, 9392, 8208,12110, 9526,27243, 10252, 5032,12002, 5036,11800,12239,12408,19964,10860,12453, 10384,12418,11173, 8273,12171, 9314,12457,12479,12472, 9727, 8495, 9077, 8521,12275,12516, 8406,12540, 8546,12430, 8053, 6111,12521,20022,20088,11745,11933,12566,10575,12586,12135, 12623,12647,12657,12627, 8552,12397, 8625, 9859, 9360,12685, 12695, 8624,10295,12755,12774,10956, 8534, 8623,12301, 7290, 8819,20154, 0, 9646,20220,20286,20352,12875,12879,12883, 12705,12801, 0,20418,12825, 8741, 8598,12913,12939,12950, 13001,12745, 8766,13011,10305, 0, 8600, 8731,12604,13016, 13021, 0, 0,20484,12836,13045,13060, 9711,13075,13080, 13103,20550, 0,20603, 0, 0,13127,13032,10460,13138, 13166,13184, 8743,27243,10688, 9054, 9094,13176,13197,13235, 13226,13245,10870,10951, 9850, 0, 0,20669,13257,13297, 12530,12691,20735,20801,10621,13318,13368, 0, 0,27243, 20868,20891,20914,20937,20960,20983,21006,21029,21052,21075, 21098,21120,21136,21157,21179,21200,21222,21243,21264,21285, 21306,21328,21349,21372,21394,21416,21432,21453,21469,21490, 21513,21535,21552,21573,21596,21609,21630,21651,21672,21693, 21714,21736,21758,21779,21800,21822,21843,21866,21889,21911, 21933,21956,21967,21988,21999,22020,22043,22066,22083,22104, 22121,22142,22165,22181,22202,22223,22245,22267,22288,22310, 22332,22353,22376,22398,22419,22441,22463,22486,22509,22532, 22554,22564,22574,22596,22615,22637,22659,22682,22705,22727, 22749,22772,22794,22815,22836,22859,22882,22905,22928,22950, 22970,22991,23012,23023,23045,23068,23091,23114,23137,23160, 23182,23202,23223,23244,23267,23290,23313,23336,23358,23379, 23401,23424,23446,23467,23488,23509,23532,23555,23578,23601, 23624,23646,23666,23687,23708,23719,23741,23764,23787,23810, 23833,23855,23876,23897,23920,23943,23966,23988,24009,24031, 24054,24077,24099,24120,24141,24162,24185,24208,24231,24254, 24276,24297,24318,24329,24351,24374,24397,24419,24440,24461, 24484,24506,24528,24551,24574,24596,24617,24638,24661,24684, 24707,24729,24750,24772,24795,24817,24838,24859,24881,24904, 24927,24949,24971,24993,25014,25036,25058,25079,25100,25120, 25141,25162,25185,25207,25229,25240,25261,25282,25303,25324, 25345,25366,25388,25411,25433,25454,25475,25496,25517,25540, 25563,25586,25609,25632,25654,25675,25696,25716,25737,25758, 25779,25800,25822,25833,25854,25875,25896,25917,25938,25958, 25979,26000,26022,26044,26065,26086,26107,26128,26149,26170, 26191,26214,26237,26260,26283,26306,26328,26349,26370,26391, 26413,26435,26457,26478,26499,26521,26542,26564,26585,26606, 26627,26648,26669,26692,26715,26738,26760,26781,26802,26823, 26845,26866,26887,26909,26930,26951,26972,26993,27015,27037, 27058,27079,27100,27122,27133,27154,27176,27197,27219 } ; static yyconst flex_int16_t yy_def[2160] = { 0, 1861, 1861, 1860, 3, 1862, 1862, 1863, 1863, 1860, 9, 1864, 1864, 1865, 1865, 1866, 1866, 1867, 1867, 1868, 1868, 1869, 1869, 2, 2, 2, 2, 1870, 1870, 1871, 1871, 2, 2, 1860, 1860, 1860, 1860, 1860, 1872, 1860, 1873, 1873, 1874, 1860, 1873, 1875, 1860, 1860, 1875, 1876, 1877, 1878, 1879, 1880, 1880, 54, 54, 54, 54, 1881, 1878, 48, 1860, 1860, 61, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 1860, 1860, 1860, 1860, 1872, 1860, 1873, 1873, 1874, 1860, 1860, 1873, 1882, 1882, 1883, 1882, 1860, 1860, 1860, 1860, 80, 1860, 1860, 1860, 1873, 1860, 1873, 1873, 1873, 84, 1860, 1873, 1860, 1860, 1860, 1884, 1884, 112, 1860, 112, 1885, 1860, 1860, 1886, 1885, 1886, 1860, 1860, 1860, 1860, 80, 1860, 1873, 1873, 1873, 84, 1860, 1873, 1860, 1860, 1860, 1860, 80, 1860, 1873, 1873, 1873, 84, 1860, 1873, 1887, 1887, 1888, 1887, 1889, 1889, 1890, 1889, 1860, 1860, 1860, 1860, 1891, 1891, 1892, 1893, 1894, 1893, 1860, 1860, 1860, 80, 1860, 80, 1895, 1896, 1873, 1873, 1873, 84, 84, 84, 1860, 1860, 1873, 48, 1860, 48, 1897, 1898, 1899, 1900, 1900, 188, 1901, 1860, 80, 1897, 1902, 80, 1902, 1860, 1860, 1898, 1903, 1903, 1903, 1899, 203, 203, 203, 1860, 203, 203, 203, 203, 1860, 1898, 1897, 1904, 203, 1904, 217, 217, 217, 217, 217, 1905, 1905, 224, 48, 1860, 226, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 188, 1860, 1860, 1860, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 1860, 1860, 1895, 1860, 1906, 1906, 1906, 1907, 1907, 270, 1906, 1860, 1860, 1860, 1860, 1860, 1873, 1873, 1860, 1860, 1860, 1908, 1908, 1909, 1909, 1860, 286, 286, 1860, 286, 1910, 1860, 1911, 1911, 1912, 1910, 1911, 1912, 1873, 1860, 1860, 1860, 1873, 1860, 1913, 1913, 1913, 1914, 1914, 310, 1913, 1915, 1915, 1915, 1916, 1916, 317, 1915, 1917, 1918, 1860, 1918, 1919, 1920, 1920, 1919, 1921, 1922, 1922, 330, 1921, 1860, 1895, 1923, 1924, 1873, 1860, 1873, 1860, 1860, 1925, 1925, 343, 343, 1926, 1926, 347, 1927, 1860, 1927, 1928, 1860, 1860, 1929, 1930, 1929, 357, 357, 357, 1929, 361, 361, 357, 1931, 1931, 366, 366, 366, 366, 366, 1932, 1932, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 1860, 1860, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 1860, 1933, 1934, 1935, 1934, 1860, 1860, 1860, 1936, 1860, 1873, 1937, 1938, 1860, 1860, 1938, 430, 1939, 1940, 1873, 1860, 1941, 1942, 1942, 1943, 1943, 1860, 1860, 1944, 1945, 1946, 1947, 1948, 1860, 1860, 1949, 1860, 1860, 343, 343, 343, 343, 1950, 1950, 1951, 1951, 1860, 1860, 1952, 1953, 1953, 465, 465, 465, 465, 465, 366, 366, 1860, 1860, 1954, 366, 366, 366, 366, 1955, 1955, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 1860, 1860, 366, 366, 366, 366, 366, 366, 1956, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 1860, 1860, 1954, 1957, 1958, 1959, 1949, 1960, 1860, 1860, 1860, 1860, 1960, 1961, 1860, 1962, 1962, 539, 1963, 1860, 1860, 1964, 1965, 1966, 1965, 1860, 1967, 1967, 1968, 1969, 1970, 1860, 1964, 1971, 1971, 1972, 1860, 1973, 1973, 561, 1974, 1975, 1976, 1977, 1978, 1860, 1949, 1860, 1860, 1979, 1979, 573, 573, 1980, 1980, 1981, 1981, 1860, 1860, 1982, 1982, 1860, 1982, 1982, 1982, 1983, 1983, 589, 589, 589, 589, 589, 1984, 1984, 1860, 1985, 596, 1860, 1860, 1985, 1985, 596, 596, 1986, 1986, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 1860, 1860, 596, 596, 596, 596, 596, 1860, 1860, 1985, 1949, 1949, 1987, 1987, 1988, 596, 596, 596, 596, 596, 596, 1860, 1860, 1985, 596, 596, 596, 596, 596, 596, 596, 1860, 1860, 1985, 1989, 1990, 1991, 1949, 1992, 1993, 1993, 1860, 1860, 1860, 1860, 1993, 1860, 1993, 1994, 1994, 675, 675, 1995, 1995, 679, 1860, 1860, 1996, 1997, 1997, 1997, 1998, 1998, 1860, 1860, 1999, 1999, 2000, 2001, 1860, 1996, 1996, 2002, 2002, 1860, 2002, 2003, 2003, 703, 2004, 2004, 706, 2005, 2005, 2005, 2006, 2007, 1860, 1860, 1860, 1860, 2008, 2008, 718, 2009, 2009, 2010, 2010, 1860, 1860, 2011, 2012, 2012, 2013, 2013, 2013, 731, 1860, 733, 731, 731, 731, 731, 2014, 2014, 1860, 2015, 740, 1860, 740, 740, 2016, 2016, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 1860, 1860, 740, 740, 740, 740, 2017, 2018, 2019, 2017, 776, 776, 776, 2018, 776, 776, 776, 776, 740, 740, 740, 740, 740, 2015, 2015, 740, 740, 740, 740, 2020, 2021, 2021, 1860, 1860, 2021, 2021, 2022, 2022, 804, 2023, 2023, 1860, 1860, 2024, 2025, 2026, 2026, 1860, 1860, 2027, 2027, 1860, 1860, 2024, 2024, 2028, 2028, 2029, 2029, 2030, 2030, 2031, 1860, 1860, 1860, 718, 718, 718, 2032, 2032, 2033, 2033, 1860, 1860, 2034, 2034, 2034, 2035, 2034, 2034, 2034, 2034, 2036, 2036, 2037, 850, 1860, 850, 850, 850, 740, 740, 1860, 2015, 740, 740, 740, 2038, 2038, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 1860, 1860, 740, 740, 740, 1860, 1860, 2015, 2039, 2039, 888, 888, 2040, 2040, 888, 2041, 888, 888, 888, 888, 888, 740, 740, 740, 740, 2015, 2015, 740, 1860, 1860, 2015, 740, 2042, 2042, 1860, 1860, 2042, 2042, 2043, 2043, 918, 1860, 1860, 2024, 2044, 2044, 1860, 1860, 2045, 2045, 1860, 1860, 2024, 2024, 2046, 2046, 2047, 2047, 1860, 1860, 1860, 718, 718, 718, 836, 836, 838, 838, 1860, 1860, 2034, 2034, 850, 850, 2048, 2048, 2037, 2037, 2037, 957, 850, 1860, 850, 850, 850, 740, 740, 1860, 2015, 740, 1860, 1860, 2015, 2015, 865, 865, 718, 718, 718, 718, 718, 718, 718, 718, 718, 1860, 1860, 740, 740, 740, 888, 2040, 2040, 2049, 888, 888, 888, 888, 888, 888, 888, 740, 740, 2015, 2015, 740, 1860, 2015, 2042, 2042, 1860, 1860, 2042, 2042, 918, 918, 918, 1860, 1860, 2024, 2044, 2044, 1860, 1860, 928, 928, 1860, 1860, 2024, 2024, 2046, 2046, 936, 936, 1860, 1860, 718, 836, 836, 838, 838, 1860, 2034, 2034, 1860, 2034, 850, 850, 2048, 2048, 2048, 1049, 2048, 2048, 1860, 1860, 957, 957, 957, 1860, 1860, 1860, 961, 850, 850, 961, 740, 740, 1860, 2015, 740, 1860, 1860, 1860, 2015, 865, 865, 718, 718, 718, 718, 718, 718, 1860, 1860, 740, 740, 2040, 2040, 2049, 2049, 2040, 2049, 2049, 2049, 888, 888, 888, 888, 888, 888, 888, 1860, 2015, 740, 2015, 2015, 740, 1860, 2015, 2042, 2042, 1860, 1860, 2042, 2042, 918, 918, 918, 918, 1860, 1860, 2044, 2044, 1860, 1860, 2050, 2044, 1860, 1860, 1860, 1860, 2024, 2024, 2046, 2046, 936, 936, 1860, 1860, 718, 836, 836, 838, 838, 1860, 838, 838, 1860, 2034, 2034, 850, 850, 1860, 1860, 1049, 1049, 1049, 1049, 1049, 1860, 1860, 957, 957, 1860, 1860, 850, 1860, 1860, 961, 850, 740, 740, 1860, 2015, 1860, 1860, 2015, 865, 865, 718, 718, 718, 718, 1860, 1860, 2040, 2040, 2051, 2049, 2049, 888, 888, 888, 888, 2040, 2040, 888, 888, 888, 888, 2015, 2015, 1860, 2015, 2042, 2042, 1860, 1860, 2042, 2042, 918, 918, 918, 2052, 1860, 2053, 2054, 1860, 2053, 2054, 2050, 1860, 1860, 2024, 2055, 2046, 2046, 936, 936, 1860, 1860, 836, 836, 838, 2034, 2034, 850, 850, 850, 1860, 1860, 1049, 1049, 1049, 1049, 1860, 1860, 957, 957, 961, 1860, 1860, 850, 740, 740, 1860, 2015, 1860, 1860, 1860, 2015, 2015, 865, 865, 865, 865, 2040, 2040, 2049, 2049, 2049, 2051, 2049, 2049, 2049, 2049, 888, 888, 2056, 888, 2040, 888, 888, 888, 2015, 2015, 1860, 2015, 2042, 2042, 1860, 1860, 2042, 2057, 2058, 918, 918, 2059, 2060, 1860, 2061, 2062, 1860, 2063, 2064, 2065, 1860, 1860, 2059, 2066, 2059, 2067, 1860, 2068, 2069, 2069, 2070, 2071, 1860, 2072, 2072, 1320, 1320, 2073, 1860, 2074, 1860, 2074, 2075, 1860, 1860, 2076, 2076, 2076, 2076, 1860, 1860, 2077, 1860, 1338, 2077, 1340, 1860, 1860, 2075, 2078, 2078, 1860, 2015, 2015, 2079, 2080, 2080, 2081, 2081, 2082, 2082, 2083, 2083, 2084, 2084, 1360, 1360, 1356, 2080, 1356, 1356, 1356, 2015, 2015, 1860, 2015, 2085, 2086, 1860, 1860, 2086, 2087, 2086, 1860, 2088, 2088, 1381, 1381, 2089, 1860, 2090, 2090, 2091, 2091, 2092, 2092, 2093, 1860, 1860, 2094, 1860, 2095, 2095, 2096, 2096, 2097, 2098, 2099, 2098, 1860, 2100, 2100, 1407, 2101, 2102, 2103, 2103, 1860, 2104, 1860, 1860, 2105, 2105, 2105, 1860, 1860, 2105, 2105, 1860, 1860, 2106, 1860, 2106, 1860, 1860, 1860, 2104, 2104, 2107, 2107, 2108, 2109, 1860, 2110, 2110, 2111, 2112, 2113, 2113, 2112, 2113, 2114, 2114, 2115, 2115, 1450, 1450, 1450, 1450, 2112, 2112, 2116, 2116, 1458, 2112, 2112, 2112, 1448, 1448, 1448, 2112, 2112, 1448, 1448, 2110, 2110, 1860, 2110, 2117, 2117, 2118, 1860, 1860, 2117, 2119, 2119, 2120, 2120, 2121, 2122, 1860, 1860, 2123, 2123, 2124, 2125, 1433, 1860, 1860, 2105, 1860, 1860, 2105, 2105, 2105, 2105, 1860, 1860, 2106, 1860, 1504, 2126, 2127, 2128, 2129, 2129, 2130, 2131, 1860, 2131, 2131, 2132, 2110, 2133, 2133, 2112, 2134, 2134, 1448, 1448, 2112, 2112, 2135, 2135, 1529, 1529, 1529, 2112, 2112, 2136, 2136, 2112, 2112, 1448, 2112, 2112, 2112, 1448, 1860, 2110, 2110, 1860, 2110, 2137, 2138, 2138, 2121, 1552, 1860, 2125, 1555, 1860, 1860, 1860, 2105, 2105, 2105, 2105, 1860, 1860, 1860, 1860, 1504, 1504, 1860, 2126, 2126, 2127, 1573, 1573, 1860, 1860, 2110, 2128, 2128, 2139, 2140, 2141, 2142, 2142, 2143, 2144, 2144, 2110, 2134, 2134, 1448, 1448, 1448, 2112, 2112, 1529, 1529, 1529, 1529, 2112, 2112, 1536, 1536, 2112, 2112, 1448, 1860, 2110, 2137, 1551, 1551, 1860, 1860, 1860, 1563, 1563, 1860, 1860, 1563, 1563, 1860, 1860, 1860, 1860, 2126, 1573, 1573, 2110, 1580, 1860, 2139, 2139, 2140, 1634, 1634, 1860, 1860, 2110, 2141, 2141, 1860, 2142, 2142, 2143, 1645, 1645, 1860, 1860, 2110, 2144, 2144, 2110, 2134, 2112, 2134, 1448, 2112, 2112, 1529, 1529, 1529, 1529, 2112, 2112, 1536, 2112, 2112, 1536, 1536, 2112, 2112, 2112, 1448, 1448, 1860, 1860, 2110, 2137, 1551, 1551, 1860, 1860, 1860, 1860, 1860, 1563, 1860, 1573, 2110, 1860, 2139, 1634, 1634, 2110, 1641, 2142, 1645, 1645, 2144, 2110, 1448, 2112, 2112, 1529, 1529, 1529, 2112, 2112, 1529, 1529, 2112, 2112, 1536, 2112, 1536, 2112, 2137, 1551, 1860, 1860, 1860, 2145, 1634, 2110, 2145, 2145, 2146, 2142, 2144, 1860, 2110, 1448, 2112, 2112, 1529, 2112, 2112, 1529, 1529, 1529, 1529, 2112, 2112, 1536, 2112, 1536, 2112, 2137, 2145, 2147, 2147, 2148, 2149, 2145, 2145, 2146, 2150, 2150, 2151, 2151, 2151, 2152, 1860, 2112, 2112, 2112, 1529, 1529, 1529, 1529, 2112, 2112, 2112, 2112, 1536, 1536, 2112, 1860, 2147, 2147, 2148, 1782, 1782, 2153, 2153, 2154, 1860, 1860, 2110, 2150, 2150, 2155, 2156, 2157, 2112, 2112, 1529, 1529, 2112, 2112, 1529, 1529, 2112, 2112, 2112, 2112, 1860, 2145, 1782, 1634, 1786, 1786, 2154, 1814, 1814, 1814, 1814, 2110, 2145, 2145, 2146, 2155, 2156, 1824, 1824, 2157, 2112, 2112, 2112, 2112, 1529, 2112, 1860, 2147, 1782, 1634, 1814, 1814, 1860, 2110, 2150, 2112, 2112, 2147, 1782, 1634, 2158, 1814, 2150, 2112, 2112, 2159, 2159, 1814, 1814, 1814, 1854, 1854, 0, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860 } ; static yyconst flex_int16_t yy_nxt[27311] = { 0, 34, 35, 36, 37, 35, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 40, 34, 34, 34, 34, 164, 165, 165, 164, 165, 165, 165, 165, 220, 252, 406, 171, 251, 166, 218, 219, 245, 166, 106, 172, 173, 106, 42, 165, 165, 165, 165, 937, 182, 191, 191, 182, 220, 252, 406, 251, 166, 218, 219, 245, 1860, 166, 568, 107, 186, 34, 34, 43, 36, 37, 43, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 40, 34, 34, 34, 34, 107, 180, 246, 259, 220, 44, 894, 182, 191, 191, 182, 197, 198, 198, 199, 221, 250, 222, 289, 291, 166, 744, 42, 186, 180, 246, 259, 186, 220, 44, 164, 165, 165, 164, 450, 1860, 829, 1860, 221, 250, 222, 289, 291, 166, 337, 34, 34, 45, 46, 47, 48, 34, 49, 34, 34, 34, 50, 50, 34, 34, 39, 50, 51, 52, 34, 34, 34, 53, 54, 55, 54, 56, 54, 57, 54, 54, 54, 54, 54, 54, 54, 54, 58, 54, 54, 54, 54, 54, 54, 59, 60, 53, 54, 55, 54, 56, 54, 57, 54, 54, 54, 54, 54, 54, 54, 58, 54, 54, 54, 54, 54, 54, 34, 61, 62, 63, 64, 35, 568, 530, 35, 35, 260, 171, 35, 1860, 261, 165, 165, 165, 165, 172, 173, 65, 337, 66, 322, 67, 68, 69, 166, 70, 41, 530, 71, 260, 41, 171, 72, 261, 73, 74, 75, 569, 568, 172, 173, 65, 1071, 66, 171, 67, 68, 69, 1071, 70, 41, 71, 172, 173, 41, 72, 568, 73, 74, 75, 76, 77, 78, 79, 77, 76, 80, 76, 76, 76, 76, 76, 76, 76, 81, 76, 82, 76, 76, 76, 76, 197, 198, 198, 199, 338, 568, 171, 381, 393, 185, 185, 394, 243, 568, 200, 201, 186, 217, 35, 244, 534, 35, 84, 197, 198, 198, 199, 338, 171, 1860, 381, 393, 185, 185, 394, 243, 172, 173, 734, 186, 217, 734, 244, 41, 534, 76, 76, 85, 78, 79, 85, 76, 80, 76, 76, 76, 76, 76, 76, 76, 86, 76, 82, 76, 76, 76, 76, 41, 247, 256, 257, 342, 87, 322, 248, 171, 215, 367, 569, 249, 377, 258, 171, 306, 307, 178, 165, 165, 178, 84, 313, 314, 247, 256, 257, 342, 87, 248, 166, 553, 215, 367, 249, 377, 258, 265, 265, 265, 265, 287, 179, 1860, 76, 34, 35, 36, 37, 35, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 88, 34, 34, 34, 34, 179, 253, 215, 165, 165, 165, 165, 667, 281, 282, 282, 281, 420, 366, 568, 221, 166, 254, 569, 661, 255, 166, 90, 171, 450, 253, 215, 265, 265, 265, 265, 172, 173, 171, 287, 420, 366, 1860, 221, 1860, 254, 266, 267, 255, 1860, 34, 34, 43, 36, 37, 43, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 88, 34, 34, 34, 34, 180, 279, 215, 568, 278, 91, 282, 282, 282, 282, 564, 450, 282, 282, 282, 282, 369, 370, 409, 166, 215, 439, 90, 180, 279, 166, 215, 278, 327, 91, 292, 293, 293, 292, 327, 327, 327, 174, 450, 369, 370, 327, 409, 166, 215, 34, 92, 93, 94, 95, 93, 92, 96, 92, 92, 92, 97, 98, 92, 92, 99, 92, 100, 92, 101, 92, 92, 102, 102, 102, 102, 103, 102, 102, 102, 104, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 105, 102, 102, 102, 102, 102, 103, 102, 102, 102, 104, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 92, 34, 108, 109, 110, 108, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 111, 34, 34, 34, 34, 293, 293, 293, 293, 113, 405, 215, 340, 192, 340, 340, 192, 340, 166, 293, 293, 293, 293, 262, 165, 165, 262, 42, 341, 195, 341, 1541, 166, 113, 405, 215, 263, 1541, 437, 265, 265, 265, 265, 546, 528, 1860, 1860, 1860, 179, 1860, 34, 34, 114, 109, 110, 114, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 111, 34, 34, 34, 34, 179, 272, 180, 180, 113, 115, 526, 339, 411, 215, 164, 165, 165, 164, 165, 165, 165, 165, 290, 282, 282, 290, 42, 166, 272, 180, 180, 166, 113, 115, 339, 166, 411, 215, 265, 265, 265, 265, 349, 350, 350, 349, 448, 179, 1860, 34, 34, 116, 117, 118, 116, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 40, 34, 34, 34, 34, 179, 165, 165, 165, 165, 180, 351, 421, 342, 447, 165, 165, 165, 165, 166, 422, 382, 432, 297, 293, 293, 297, 42, 166, 165, 165, 165, 165, 180, 351, 421, 166, 342, 265, 265, 265, 265, 166, 422, 382, 432, 1860, 1860, 298, 445, 34, 34, 120, 117, 118, 120, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 40, 34, 34, 34, 34, 298, 300, 304, 435, 342, 121, 1183, 322, 383, 1183, 164, 165, 165, 164, 165, 165, 165, 165, 178, 165, 165, 178, 42, 166, 300, 304, 435, 166, 342, 121, 283, 166, 383, 418, 265, 265, 418, 439, 288, 288, 1860, 1860, 437, 179, 287, 34, 122, 123, 124, 125, 123, 122, 126, 122, 122, 122, 34, 34, 122, 122, 127, 122, 128, 122, 34, 122, 122, 179, 312, 319, 215, 130, 265, 265, 265, 529, 395, 182, 182, 182, 182, 197, 198, 198, 199, 178, 165, 165, 178, 131, 166, 312, 319, 186, 215, 130, 428, 186, 166, 428, 395, 663, 663, 663, 663, 532, 532, 532, 532, 429, 179, 416, 122, 122, 132, 124, 125, 132, 122, 126, 122, 122, 122, 34, 34, 122, 122, 127, 122, 128, 122, 34, 122, 122, 179, 342, 342, 340, 130, 133, 340, 182, 191, 191, 182, 344, 376, 345, 197, 198, 198, 197, 438, 341, 166, 372, 131, 186, 372, 342, 342, 569, 130, 133, 186, 171, 415, 356, 344, 376, 345, 373, 1860, 306, 307, 438, 335, 287, 333, 122, 134, 135, 136, 137, 135, 134, 138, 134, 134, 134, 34, 34, 134, 134, 139, 134, 140, 134, 34, 134, 134, 198, 198, 198, 198, 142, 197, 198, 198, 199, 197, 198, 198, 199, 440, 215, 1860, 186, 1860, 185, 185, 413, 186, 143, 1860, 352, 186, 171, 170, 142, 1860, 281, 282, 282, 281, 313, 314, 440, 170, 215, 361, 362, 362, 363, 166, 413, 134, 134, 144, 136, 137, 144, 134, 138, 134, 134, 134, 34, 34, 134, 134, 139, 134, 140, 134, 34, 134, 134, 197, 198, 198, 199, 142, 145, 171, 364, 449, 185, 185, 215, 215, 414, 200, 201, 186, 197, 198, 198, 199, 400, 143, 1860, 170, 264, 185, 185, 142, 145, 364, 449, 1860, 186, 170, 215, 215, 414, 663, 663, 663, 663, 1860, 170, 400, 134, 34, 35, 36, 37, 35, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 146, 34, 34, 34, 34, 212, 198, 198, 212, 212, 198, 198, 213, 215, 215, 215, 1860, 342, 456, 410, 1183, 216, 489, 1183, 368, 216, 371, 148, 1860, 265, 265, 265, 265, 282, 282, 282, 282, 215, 215, 215, 342, 456, 1860, 410, 417, 489, 166, 368, 1860, 371, 34, 34, 43, 36, 37, 43, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 146, 34, 34, 34, 34, 342, 342, 342, 215, 215, 149, 1860, 374, 215, 215, 441, 391, 482, 441, 375, 392, 403, 342, 390, 396, 402, 404, 148, 442, 342, 342, 342, 215, 215, 149, 374, 1860, 215, 215, 391, 1860, 482, 375, 392, 403, 342, 390, 396, 402, 404, 34, 34, 35, 36, 37, 35, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 150, 34, 34, 34, 34, 342, 215, 384, 215, 378, 479, 342, 215, 215, 1860, 379, 397, 398, 1860, 502, 380, 344, 401, 385, 407, 340, 386, 152, 340, 342, 215, 384, 215, 378, 479, 342, 215, 215, 379, 397, 398, 341, 502, 380, 344, 401, 385, 407, 1860, 386, 34, 34, 43, 36, 37, 43, 34, 38, 34, 34, 34, 34, 34, 34, 34, 39, 34, 150, 34, 34, 34, 34, 342, 215, 367, 387, 388, 153, 215, 556, 215, 580, 292, 293, 293, 292, 487, 389, 342, 399, 206, 467, 408, 412, 152, 166, 342, 215, 367, 387, 388, 153, 215, 556, 215, 580, 1860, 1860, 1860, 487, 389, 342, 399, 206, 467, 408, 412, 34, 34, 35, 154, 155, 35, 34, 38, 34, 34, 34, 156, 157, 34, 34, 39, 34, 40, 34, 34, 34, 34, 265, 265, 265, 265, 484, 485, 171, 503, 1860, 1860, 293, 293, 293, 293, 266, 267, 1860, 1860, 262, 165, 165, 262, 42, 166, 1860, 1860, 457, 484, 485, 457, 503, 263, 265, 265, 265, 265, 1860, 1860, 424, 424, 424, 424, 458, 179, 1860, 34, 34, 43, 154, 155, 43, 34, 38, 34, 34, 34, 156, 157, 34, 34, 39, 34, 40, 34, 34, 34, 34, 179, 419, 1860, 283, 342, 159, 1860, 425, 327, 483, 507, 288, 288, 1860, 327, 327, 327, 174, 552, 423, 430, 327, 42, 1183, 419, 428, 1183, 342, 428, 159, 425, 1860, 483, 507, 451, 350, 350, 451, 429, 1339, 1860, 552, 1339, 423, 430, 34, 34, 35, 36, 37, 35, 34, 160, 34, 34, 34, 34, 34, 34, 34, 39, 34, 40, 34, 34, 34, 34, 1860, 1860, 452, 342, 206, 206, 454, 455, 206, 206, 466, 441, 468, 1860, 441, 1860, 626, 434, 436, 476, 215, 1860, 162, 41, 442, 452, 342, 206, 206, 454, 455, 206, 206, 466, 1860, 468, 451, 350, 350, 451, 626, 434, 436, 476, 215, 34, 34, 43, 36, 37, 43, 34, 160, 34, 34, 34, 34, 34, 34, 34, 39, 34, 40, 34, 34, 34, 34, 301, 302, 302, 301, 452, 163, 1860, 342, 1860, 491, 206, 206, 469, 166, 470, 342, 490, 581, 302, 302, 302, 302, 162, 41, 303, 1860, 1860, 452, 1860, 163, 342, 166, 491, 206, 206, 469, 1860, 470, 342, 490, 581, 1860, 303, 509, 215, 34, 167, 1860, 303, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 303, 509, 215, 302, 302, 302, 302, 342, 1860, 342, 342, 499, 486, 488, 342, 494, 166, 283, 305, 302, 302, 305, 167, 167, 627, 288, 288, 303, 1860, 1860, 342, 166, 342, 342, 499, 486, 488, 342, 494, 1860, 1860, 1860, 303, 179, 682, 167, 175, 431, 627, 175, 175, 303, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 303, 179, 682, 327, 431, 227, 240, 240, 227, 327, 327, 327, 174, 622, 681, 215, 327, 1860, 166, 1860, 1860, 186, 177, 175, 1860, 290, 282, 282, 290, 512, 241, 510, 1860, 1860, 444, 1860, 622, 681, 166, 215, 242, 473, 474, 474, 475, 175, 181, 182, 182, 183, 179, 184, 512, 215, 241, 185, 185, 444, 215, 166, 185, 185, 186, 242, 1860, 1860, 215, 227, 240, 240, 227, 477, 188, 1860, 179, 1860, 1860, 215, 1860, 1860, 166, 189, 215, 186, 297, 293, 293, 297, 190, 185, 215, 1860, 241, 1860, 477, 1860, 188, 166, 273, 274, 274, 273, 242, 501, 189, 181, 182, 182, 183, 298, 184, 166, 342, 1860, 185, 185, 241, 215, 166, 185, 185, 186, 275, 1860, 1860, 242, 276, 501, 1860, 1860, 478, 188, 683, 298, 1860, 342, 301, 302, 302, 301, 189, 215, 197, 198, 198, 199, 275, 190, 185, 166, 276, 185, 185, 478, 1860, 188, 683, 352, 186, 1860, 303, 1860, 1860, 189, 192, 1860, 768, 192, 167, 193, 167, 167, 167, 167, 167, 194, 194, 194, 167, 194, 195, 167, 194, 167, 303, 493, 274, 274, 274, 274, 768, 1860, 274, 274, 274, 274, 342, 1860, 715, 166, 353, 354, 354, 355, 1860, 166, 167, 194, 1860, 493, 277, 497, 788, 496, 276, 492, 277, 1860, 342, 342, 276, 715, 206, 500, 206, 1860, 342, 342, 342, 167, 203, 204, 204, 205, 277, 497, 788, 496, 276, 492, 277, 342, 215, 207, 276, 508, 206, 500, 206, 342, 342, 342, 208, 1860, 209, 511, 210, 809, 215, 265, 265, 265, 265, 1860, 327, 211, 215, 1860, 1860, 508, 327, 327, 327, 174, 417, 1860, 208, 327, 209, 511, 210, 809, 215, 510, 353, 354, 354, 355, 211, 212, 198, 198, 213, 332, 214, 572, 1860, 1860, 185, 185, 214, 214, 214, 202, 342, 216, 206, 214, 206, 353, 354, 354, 355, 342, 342, 504, 332, 495, 357, 572, 215, 302, 302, 302, 302, 217, 1860, 342, 1860, 215, 206, 206, 206, 359, 166, 1860, 342, 342, 1860, 504, 495, 357, 1860, 513, 215, 303, 544, 1860, 217, 212, 198, 198, 213, 215, 214, 206, 1860, 359, 185, 185, 214, 214, 214, 202, 1860, 216, 513, 214, 223, 303, 544, 223, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 498, 215, 1860, 1860, 353, 354, 354, 355, 353, 354, 354, 355, 342, 628, 305, 302, 302, 305, 227, 227, 227, 227, 225, 223, 498, 215, 206, 166, 206, 1860, 206, 166, 206, 215, 186, 342, 628, 358, 303, 179, 1860, 519, 360, 241, 1860, 223, 226, 227, 227, 228, 206, 1860, 206, 242, 206, 516, 206, 215, 215, 1860, 358, 1860, 303, 179, 519, 360, 229, 241, 230, 215, 231, 232, 233, 814, 234, 215, 242, 235, 215, 516, 505, 236, 215, 237, 238, 239, 1860, 656, 506, 1860, 229, 1860, 230, 215, 231, 232, 233, 814, 234, 215, 235, 1860, 215, 505, 236, 1860, 237, 238, 239, 167, 656, 506, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 215, 215, 215, 517, 215, 1860, 1860, 515, 215, 575, 1860, 514, 518, 521, 215, 831, 353, 354, 354, 353, 342, 520, 167, 167, 215, 215, 215, 517, 215, 207, 515, 1860, 215, 575, 514, 518, 1860, 521, 215, 831, 1860, 1860, 461, 342, 520, 167, 175, 1860, 1860, 175, 175, 462, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 461, 215, 523, 524, 524, 525, 591, 206, 462, 1860, 1860, 1860, 206, 1860, 522, 531, 532, 532, 531, 1860, 1860, 594, 177, 175, 716, 215, 685, 215, 533, 685, 591, 206, 554, 554, 554, 554, 206, 522, 1860, 686, 283, 1860, 283, 551, 594, 175, 269, 716, 1860, 269, 269, 215, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 1860, 555, 227, 240, 240, 227, 273, 274, 274, 273, 288, 215, 1860, 288, 1860, 166, 1860, 1860, 186, 166, 1860, 604, 271, 269, 555, 1860, 839, 241, 1860, 1860, 275, 1860, 1860, 288, 276, 215, 288, 242, 342, 274, 274, 274, 274, 573, 604, 269, 280, 274, 274, 280, 839, 241, 166, 570, 275, 571, 724, 342, 276, 166, 242, 342, 574, 277, 1860, 206, 573, 276, 590, 215, 275, 179, 595, 450, 276, 327, 570, 1860, 571, 724, 342, 327, 327, 327, 174, 574, 1860, 277, 327, 206, 1860, 276, 590, 215, 275, 179, 595, 1860, 276, 283, 283, 725, 283, 283, 283, 283, 284, 283, 283, 283, 283, 283, 283, 283, 285, 286, 283, 287, 283, 283, 215, 605, 215, 596, 725, 215, 1860, 206, 629, 451, 350, 350, 451, 1860, 657, 658, 658, 657, 1860, 1860, 592, 1860, 283, 1860, 215, 605, 215, 596, 1860, 215, 216, 206, 629, 1860, 1860, 354, 354, 354, 354, 424, 424, 424, 424, 592, 452, 283, 283, 283, 207, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 461, 1860, 283, 287, 283, 283, 452, 342, 1860, 462, 609, 206, 1860, 542, 543, 473, 474, 474, 473, 1860, 1860, 1860, 468, 593, 461, 741, 709, 1860, 283, 709, 342, 216, 462, 609, 1860, 206, 542, 543, 1860, 710, 1860, 353, 354, 354, 355, 468, 593, 1860, 741, 1860, 597, 283, 295, 295, 207, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 210, 1860, 295, 215, 295, 295, 597, 767, 1860, 211, 474, 474, 474, 474, 599, 473, 474, 474, 475, 658, 658, 658, 658, 342, 210, 610, 186, 215, 295, 1860, 767, 216, 211, 1860, 1860, 186, 713, 599, 1860, 713, 1860, 583, 584, 583, 583, 597, 342, 1860, 610, 714, 598, 295, 295, 295, 585, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 586, 597, 295, 608, 295, 295, 598, 342, 696, 587, 697, 611, 612, 613, 614, 1860, 342, 342, 342, 799, 299, 617, 342, 618, 586, 342, 342, 608, 295, 1860, 342, 696, 587, 697, 611, 1860, 612, 613, 614, 342, 342, 342, 799, 299, 617, 342, 618, 1860, 342, 342, 1860, 295, 309, 646, 215, 309, 309, 1860, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 1860, 342, 342, 619, 620, 646, 215, 615, 616, 342, 342, 800, 621, 342, 342, 623, 353, 354, 354, 355, 674, 805, 311, 309, 342, 342, 1860, 619, 620, 207, 615, 616, 342, 342, 800, 621, 342, 342, 623, 1860, 1860, 1860, 210, 674, 805, 309, 316, 1860, 808, 316, 316, 588, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 210, 624, 215, 1860, 342, 808, 215, 215, 588, 625, 342, 630, 600, 601, 601, 602, 1860, 1860, 1860, 631, 632, 603, 318, 316, 1860, 624, 215, 342, 1860, 1860, 215, 215, 625, 342, 630, 1860, 1860, 215, 523, 524, 524, 525, 631, 632, 1860, 316, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 215, 215, 320, 322, 320, 320, 215, 644, 215, 1860, 342, 215, 215, 1860, 641, 770, 642, 206, 633, 634, 634, 635, 643, 653, 215, 215, 1860, 731, 320, 569, 215, 644, 215, 342, 569, 215, 215, 641, 770, 642, 463, 206, 569, 215, 645, 643, 1860, 653, 215, 215, 731, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 215, 645, 320, 322, 320, 320, 215, 654, 657, 658, 658, 659, 215, 206, 215, 1860, 531, 532, 532, 531, 323, 732, 810, 815, 216, 1860, 1860, 1860, 320, 533, 655, 654, 1324, 1324, 1324, 1324, 215, 206, 215, 554, 554, 554, 554, 323, 732, 810, 815, 647, 648, 648, 649, 320, 167, 655, 1860, 167, 167, 324, 167, 167, 167, 167, 167, 325, 325, 325, 167, 325, 167, 167, 325, 167, 650, 1860, 695, 651, 672, 672, 672, 672, 1860, 676, 652, 677, 704, 685, 674, 702, 685, 633, 634, 634, 635, 537, 167, 325, 650, 695, 686, 651, 633, 634, 634, 633, 676, 652, 677, 704, 1860, 674, 702, 1860, 1860, 1860, 215, 1860, 216, 167, 329, 1860, 1860, 329, 329, 1860, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 215, 206, 664, 664, 664, 664, 738, 668, 668, 668, 668, 737, 206, 1860, 547, 548, 547, 547, 1860, 537, 820, 1860, 331, 329, 537, 206, 1860, 665, 769, 1860, 738, 287, 669, 215, 737, 821, 206, 666, 548, 548, 548, 548, 670, 820, 541, 329, 203, 204, 204, 205, 687, 665, 769, 688, 1860, 1860, 669, 215, 821, 207, 666, 700, 700, 700, 700, 670, 1860, 215, 208, 743, 209, 1860, 210, 687, 689, 879, 688, 690, 559, 215, 1860, 211, 634, 634, 634, 634, 600, 601, 601, 600, 746, 215, 208, 743, 209, 744, 210, 689, 186, 879, 690, 1860, 216, 215, 211, 212, 198, 198, 213, 685, 214, 1860, 685, 746, 185, 185, 214, 214, 214, 185, 1860, 216, 686, 214, 212, 198, 198, 213, 685, 214, 1860, 685, 1860, 185, 185, 214, 214, 214, 185, 215, 216, 811, 214, 212, 198, 198, 213, 745, 343, 1860, 1860, 1860, 185, 601, 601, 601, 601, 1860, 600, 601, 601, 602, 744, 215, 1860, 1860, 1860, 603, 287, 186, 745, 1860, 343, 346, 216, 812, 346, 346, 718, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 212, 198, 198, 213, 771, 215, 812, 785, 718, 185, 215, 197, 198, 198, 199, 880, 197, 198, 198, 199, 1860, 1860, 348, 346, 719, 603, 1860, 186, 771, 215, 1860, 785, 186, 1860, 215, 212, 198, 198, 213, 880, 584, 584, 584, 584, 185, 346, 192, 742, 719, 192, 167, 193, 167, 167, 167, 167, 167, 194, 194, 194, 167, 194, 195, 167, 194, 167, 461, 1860, 1860, 1860, 742, 709, 749, 215, 709, 462, 212, 198, 198, 213, 633, 634, 634, 635, 710, 185, 249, 1860, 167, 194, 461, 633, 634, 634, 635, 749, 216, 215, 462, 1860, 185, 1860, 1860, 287, 212, 198, 198, 213, 1860, 249, 751, 167, 192, 185, 924, 192, 167, 193, 167, 167, 167, 167, 167, 194, 194, 194, 167, 194, 195, 167, 194, 167, 750, 751, 535, 535, 535, 535, 924, 1860, 557, 557, 557, 557, 212, 198, 198, 213, 786, 1860, 215, 537, 1860, 185, 167, 194, 750, 559, 1860, 665, 583, 584, 583, 583, 757, 698, 1860, 1860, 1860, 671, 215, 1860, 786, 585, 215, 699, 541, 167, 203, 204, 204, 205, 563, 665, 1860, 772, 586, 215, 757, 698, 287, 207, 671, 1860, 215, 587, 709, 787, 699, 709, 208, 215, 209, 925, 210, 1860, 813, 251, 772, 710, 586, 215, 1860, 211, 212, 198, 198, 213, 587, 926, 787, 702, 825, 185, 208, 215, 209, 925, 210, 813, 251, 830, 733, 734, 734, 735, 211, 212, 198, 198, 213, 1860, 214, 926, 702, 825, 185, 185, 214, 214, 214, 202, 752, 216, 830, 214, 212, 198, 198, 213, 206, 214, 1860, 1860, 736, 185, 185, 214, 214, 214, 202, 1860, 216, 1860, 214, 752, 215, 1860, 365, 633, 634, 634, 635, 709, 206, 795, 709, 736, 212, 198, 198, 213, 212, 198, 198, 213, 828, 185, 1860, 287, 215, 185, 365, 223, 923, 215, 223, 223, 795, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 793, 1860, 753, 215, 923, 215, 754, 636, 637, 637, 636, 212, 198, 198, 213, 583, 584, 583, 583, 840, 185, 225, 223, 640, 793, 753, 1860, 215, 585, 754, 633, 634, 634, 635, 212, 198, 198, 213, 1860, 185, 1860, 586, 840, 185, 223, 223, 1860, 756, 223, 223, 587, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 586, 557, 557, 557, 557, 756, 713, 1860, 587, 713, 765, 859, 212, 198, 198, 213, 1860, 1860, 559, 714, 1860, 185, 225, 223, 1860, 1860, 698, 873, 583, 584, 583, 583, 758, 765, 859, 342, 699, 637, 637, 637, 637, 726, 818, 563, 819, 223, 226, 227, 227, 228, 698, 873, 215, 773, 586, 1860, 758, 794, 342, 699, 1860, 1860, 1860, 587, 1860, 818, 229, 819, 230, 215, 231, 232, 233, 932, 234, 852, 215, 235, 586, 792, 794, 236, 255, 237, 238, 239, 587, 674, 206, 1860, 229, 804, 230, 215, 231, 232, 233, 932, 234, 852, 235, 1860, 792, 1860, 236, 255, 237, 238, 239, 269, 674, 206, 269, 269, 804, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 866, 1860, 881, 212, 198, 198, 213, 1860, 212, 198, 198, 213, 185, 342, 1860, 1860, 1860, 185, 657, 658, 658, 657, 271, 269, 866, 881, 1860, 759, 212, 198, 198, 213, 1860, 1860, 216, 1860, 342, 185, 212, 198, 198, 213, 1860, 755, 1860, 269, 269, 185, 764, 269, 269, 759, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 755, 882, 212, 198, 198, 213, 764, 789, 1860, 766, 215, 185, 633, 634, 634, 635, 215, 647, 648, 648, 647, 746, 271, 269, 1860, 882, 763, 633, 634, 634, 635, 789, 766, 216, 215, 1860, 1860, 342, 215, 215, 834, 903, 241, 939, 746, 269, 280, 274, 274, 280, 763, 1860, 242, 215, 876, 672, 672, 672, 672, 166, 342, 1860, 215, 834, 903, 342, 241, 939, 1860, 854, 275, 179, 537, 1860, 276, 242, 685, 215, 876, 685, 658, 658, 658, 658, 657, 658, 658, 659, 342, 811, 206, 798, 913, 854, 275, 179, 186, 855, 276, 426, 216, 426, 426, 206, 287, 867, 342, 426, 426, 426, 426, 426, 426, 206, 798, 913, 346, 1860, 1860, 1322, 855, 1860, 672, 672, 672, 672, 206, 1860, 867, 342, 426, 426, 426, 426, 426, 426, 426, 283, 283, 537, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1860, 427, 283, 287, 283, 283, 856, 1860, 1860, 797, 672, 672, 672, 672, 672, 672, 672, 672, 806, 672, 672, 806, 863, 206, 215, 342, 878, 537, 283, 1860, 856, 537, 797, 1860, 1860, 807, 1860, 700, 700, 700, 700, 1486, 1486, 1486, 1486, 863, 206, 215, 342, 878, 914, 283, 283, 283, 559, 283, 283, 283, 283, 284, 283, 283, 283, 283, 283, 283, 283, 285, 286, 283, 287, 283, 283, 914, 920, 1860, 822, 700, 700, 700, 700, 700, 700, 700, 700, 921, 648, 648, 648, 648, 700, 700, 700, 700, 559, 283, 1860, 920, 559, 822, 709, 428, 186, 709, 428, 1860, 1860, 559, 921, 1860, 960, 241, 1860, 828, 429, 1860, 1860, 823, 283, 295, 295, 242, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 960, 241, 295, 862, 295, 295, 823, 861, 1860, 215, 242, 922, 826, 700, 700, 826, 1860, 1860, 1009, 647, 648, 648, 649, 342, 215, 872, 862, 929, 295, 827, 1860, 861, 215, 1860, 922, 216, 1860, 1860, 733, 734, 734, 735, 1009, 1860, 790, 1860, 342, 215, 872, 1860, 929, 295, 295, 295, 791, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 868, 790, 295, 736, 295, 295, 342, 1860, 1860, 382, 791, 342, 206, 869, 342, 197, 198, 198, 199, 1860, 871, 1860, 433, 215, 868, 901, 736, 930, 295, 342, 342, 186, 382, 1860, 342, 206, 869, 342, 1860, 1860, 672, 672, 672, 672, 871, 433, 215, 1860, 901, 860, 930, 295, 309, 342, 931, 309, 309, 537, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 860, 883, 801, 938, 802, 931, 1860, 215, 870, 1010, 633, 634, 634, 635, 342, 1860, 353, 354, 354, 355, 947, 1860, 311, 309, 883, 801, 938, 802, 1860, 207, 215, 1860, 870, 1010, 1860, 1860, 1860, 342, 633, 634, 634, 635, 850, 947, 342, 309, 309, 1860, 1860, 309, 309, 211, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 850, 342, 874, 1860, 342, 342, 342, 875, 211, 380, 386, 877, 342, 342, 342, 942, 834, 633, 634, 634, 635, 966, 311, 309, 941, 342, 874, 342, 342, 342, 875, 1860, 380, 386, 877, 342, 342, 342, 942, 834, 884, 885, 885, 886, 966, 309, 316, 941, 342, 316, 316, 342, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 774, 637, 637, 774, 900, 902, 1860, 906, 342, 215, 910, 1860, 215, 215, 977, 342, 773, 1860, 1860, 1860, 215, 965, 318, 316, 215, 215, 1860, 900, 978, 902, 906, 1860, 215, 1860, 910, 215, 215, 977, 342, 907, 908, 908, 909, 215, 965, 316, 316, 215, 215, 316, 316, 978, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 197, 198, 198, 199, 672, 672, 672, 672, 197, 198, 198, 199, 215, 342, 342, 1860, 186, 982, 975, 981, 984, 537, 318, 316, 186, 1163, 1163, 1163, 1163, 633, 634, 634, 635, 1860, 1164, 215, 342, 342, 912, 904, 982, 975, 981, 984, 905, 316, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 912, 904, 320, 322, 320, 320, 905, 215, 919, 1860, 206, 940, 672, 672, 672, 672, 672, 672, 672, 672, 985, 961, 1860, 342, 674, 206, 1017, 1860, 320, 537, 215, 1860, 919, 537, 206, 940, 1676, 1676, 1676, 1676, 1860, 1860, 1860, 985, 961, 911, 342, 674, 206, 1017, 916, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 1860, 911, 320, 322, 320, 320, 916, 959, 206, 206, 1860, 1016, 672, 672, 672, 672, 1860, 700, 700, 700, 700, 963, 443, 206, 206, 1860, 1860, 1860, 320, 537, 1018, 959, 206, 206, 559, 1016, 1860, 1860, 1860, 600, 601, 601, 602, 1860, 963, 443, 206, 206, 603, 915, 933, 320, 167, 1026, 1018, 167, 167, 324, 167, 167, 167, 167, 167, 325, 325, 325, 167, 325, 167, 167, 325, 167, 915, 933, 1860, 976, 206, 1026, 215, 1021, 964, 700, 700, 700, 700, 342, 962, 948, 948, 948, 948, 206, 1860, 1022, 167, 325, 1860, 215, 559, 976, 206, 215, 1021, 1860, 964, 1860, 1860, 1860, 342, 962, 1685, 1686, 1686, 1687, 206, 934, 1022, 167, 167, 853, 215, 167, 167, 324, 167, 167, 167, 167, 167, 325, 325, 325, 167, 325, 167, 167, 325, 167, 934, 342, 1028, 980, 853, 1025, 968, 1860, 979, 197, 198, 198, 199, 342, 986, 215, 583, 584, 583, 583, 1027, 215, 167, 325, 342, 186, 1028, 980, 1025, 585, 968, 979, 969, 970, 970, 971, 342, 986, 215, 1860, 1860, 972, 586, 1027, 215, 167, 329, 967, 1040, 329, 329, 587, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 586, 1860, 1033, 987, 967, 215, 1040, 1034, 587, 215, 884, 885, 885, 886, 983, 1067, 583, 584, 583, 583, 1039, 1860, 331, 329, 342, 1033, 987, 1860, 215, 585, 1034, 1860, 215, 1860, 907, 908, 908, 909, 983, 1067, 1860, 1860, 586, 1039, 342, 329, 329, 342, 1860, 329, 329, 587, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 586, 342, 342, 668, 668, 668, 668, 1058, 587, 988, 215, 884, 885, 885, 884, 1069, 633, 634, 634, 635, 537, 1860, 331, 329, 1860, 342, 1860, 216, 669, 1015, 1058, 215, 988, 215, 1676, 1676, 1676, 1676, 670, 1069, 674, 523, 524, 524, 525, 329, 212, 198, 198, 213, 342, 214, 669, 1015, 215, 185, 185, 214, 214, 214, 185, 670, 216, 674, 214, 212, 198, 198, 213, 1860, 214, 1860, 1860, 342, 185, 185, 214, 214, 214, 185, 215, 216, 1860, 214, 885, 885, 885, 885, 884, 885, 885, 886, 583, 584, 583, 583, 1082, 1038, 453, 1860, 186, 169, 287, 215, 216, 585, 884, 885, 885, 886, 1750, 1750, 1750, 1750, 1754, 1750, 1750, 1754, 586, 1082, 1038, 453, 346, 1020, 169, 346, 346, 587, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 586, 1000, 1001, 215, 1020, 215, 1860, 215, 587, 1860, 1860, 197, 198, 198, 199, 1083, 953, 954, 954, 955, 1087, 1860, 348, 346, 1000, 1001, 215, 186, 215, 207, 215, 907, 908, 908, 907, 1860, 1860, 1860, 1083, 1860, 1860, 1860, 957, 1087, 1002, 346, 346, 216, 1086, 346, 346, 958, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 957, 1002, 1004, 1035, 287, 1005, 1086, 1860, 958, 197, 198, 198, 199, 342, 347, 1107, 1037, 1860, 1111, 215, 1860, 1019, 348, 346, 1860, 186, 1004, 1035, 1005, 633, 634, 634, 635, 1860, 1860, 1860, 342, 1860, 347, 1107, 1037, 1111, 215, 1003, 1019, 346, 349, 350, 350, 349, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1003, 1123, 215, 908, 908, 908, 908, 956, 347, 1860, 1860, 969, 970, 970, 1070, 351, 342, 1057, 1080, 186, 1071, 1036, 167, 167, 1123, 215, 1860, 216, 1860, 1860, 1860, 956, 347, 600, 601, 601, 602, 1860, 351, 342, 1057, 1080, 603, 1005, 1036, 167, 167, 1860, 1860, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1005, 342, 907, 908, 908, 909, 1860, 1860, 664, 664, 664, 664, 1065, 215, 459, 1860, 460, 342, 216, 1860, 1860, 1076, 167, 167, 342, 537, 1860, 1860, 224, 891, 892, 892, 893, 665, 1860, 1065, 215, 459, 1074, 460, 342, 1860, 1006, 666, 1076, 167, 353, 354, 354, 355, 541, 779, 224, 779, 1860, 1101, 1112, 665, 1102, 207, 1119, 1074, 1124, 1860, 890, 1006, 666, 1066, 891, 892, 892, 893, 210, 1860, 1860, 779, 1860, 779, 464, 465, 1112, 211, 1860, 1860, 1119, 1124, 215, 890, 1077, 342, 779, 1066, 897, 1860, 215, 1860, 210, 891, 892, 892, 893, 464, 465, 890, 211, 361, 362, 362, 363, 215, 1860, 1077, 342, 1860, 779, 1860, 897, 215, 207, 779, 1860, 779, 891, 892, 892, 893, 890, 208, 1120, 209, 1130, 210, 970, 970, 970, 1072, 891, 892, 892, 891, 364, 1071, 1860, 779, 779, 779, 779, 1860, 186, 780, 1860, 208, 1120, 209, 1130, 210, 989, 1860, 1129, 1860, 1079, 342, 990, 364, 212, 198, 198, 213, 779, 214, 779, 991, 1860, 185, 185, 214, 214, 214, 202, 989, 216, 1129, 214, 1079, 342, 1860, 990, 892, 892, 892, 892, 471, 1860, 1860, 991, 672, 672, 672, 672, 1147, 780, 969, 970, 970, 971, 1860, 948, 948, 948, 948, 972, 1860, 537, 990, 1860, 471, 212, 198, 198, 213, 287, 214, 991, 1147, 1860, 185, 185, 214, 214, 214, 202, 956, 216, 1011, 214, 342, 1131, 990, 853, 1121, 1172, 472, 1860, 1860, 1860, 991, 672, 672, 672, 672, 1860, 969, 970, 970, 971, 956, 1011, 1860, 342, 1131, 972, 853, 1121, 537, 1172, 472, 372, 216, 1007, 372, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 373, 223, 223, 223, 206, 206, 206, 1860, 342, 206, 1007, 1132, 1078, 1045, 1137, 1063, 1138, 1046, 468, 206, 206, 206, 1064, 206, 206, 1170, 225, 223, 206, 206, 206, 342, 1185, 206, 1132, 1078, 1045, 1137, 1063, 1138, 1046, 468, 206, 206, 206, 1064, 206, 206, 1170, 223, 480, 350, 350, 480, 223, 1185, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 224, 1125, 197, 198, 198, 199, 1860, 197, 198, 198, 1073, 1860, 1860, 1075, 481, 288, 972, 1184, 186, 1085, 215, 225, 223, 186, 224, 1125, 1068, 1860, 633, 634, 634, 635, 523, 524, 524, 525, 1075, 481, 288, 1860, 1860, 1184, 1085, 215, 223, 418, 265, 265, 418, 269, 1068, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 1860, 342, 215, 1206, 891, 892, 892, 893, 891, 892, 892, 893, 672, 672, 672, 672, 672, 672, 672, 672, 1860, 1860, 271, 269, 342, 215, 779, 1206, 779, 537, 779, 1081, 779, 537, 1008, 1860, 1860, 1860, 1012, 1860, 1860, 996, 995, 342, 1084, 269, 535, 535, 535, 535, 779, 536, 779, 1860, 779, 1081, 779, 1860, 1008, 215, 174, 174, 1012, 537, 996, 995, 342, 1860, 1084, 1860, 1860, 539, 1207, 1115, 287, 1186, 884, 885, 885, 886, 674, 540, 215, 1860, 891, 892, 892, 893, 541, 174, 700, 700, 700, 700, 1122, 539, 1207, 1115, 1186, 1860, 1860, 1136, 702, 674, 540, 545, 779, 559, 779, 1860, 342, 426, 1029, 426, 426, 1860, 287, 1122, 999, 426, 426, 426, 426, 426, 426, 1136, 702, 1860, 1202, 1860, 779, 1860, 779, 342, 1860, 1860, 1029, 633, 634, 634, 635, 999, 426, 426, 426, 426, 426, 426, 426, 283, 283, 1202, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1860, 427, 283, 287, 283, 283, 1860, 342, 1116, 674, 1103, 1106, 672, 672, 672, 672, 702, 1860, 1171, 215, 1135, 700, 700, 700, 700, 215, 215, 1860, 283, 537, 342, 1116, 674, 1860, 1103, 1106, 1860, 1860, 559, 1860, 702, 1171, 215, 1030, 1135, 1214, 1860, 1860, 215, 215, 1109, 283, 283, 547, 548, 547, 547, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1030, 1214, 283, 287, 283, 283, 1109, 969, 970, 970, 1070, 347, 672, 672, 672, 672, 1071, 1221, 970, 970, 970, 1072, 549, 216, 1860, 550, 1141, 1071, 283, 537, 197, 198, 198, 199, 186, 347, 1174, 1175, 1175, 1176, 1221, 953, 954, 954, 1047, 549, 186, 1113, 550, 1141, 1108, 283, 295, 295, 207, 295, 553, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 1049, 1216, 295, 1113, 295, 295, 1222, 1108, 215, 1050, 1051, 954, 954, 1052, 953, 954, 954, 955, 700, 700, 700, 700, 1860, 207, 1049, 1216, 1142, 207, 295, 1222, 1860, 215, 1050, 1860, 1860, 559, 1049, 1860, 1860, 169, 957, 733, 734, 734, 735, 1050, 347, 1117, 1860, 958, 1142, 295, 557, 557, 557, 557, 1133, 558, 1140, 674, 1049, 1118, 169, 1860, 957, 206, 174, 174, 1050, 559, 347, 1117, 958, 736, 1139, 1860, 1048, 561, 1229, 1133, 206, 1140, 674, 1048, 1118, 342, 1158, 562, 1860, 206, 197, 198, 198, 1073, 563, 174, 736, 1860, 1139, 972, 1048, 561, 1229, 206, 1223, 1860, 186, 1048, 342, 1158, 562, 320, 320, 320, 320, 565, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 1860, 1223, 320, 322, 320, 320, 1224, 1779, 1779, 1779, 1779, 1860, 956, 1126, 1127, 1126, 1126, 224, 1860, 1210, 674, 1161, 1053, 1054, 1054, 1055, 1177, 1860, 320, 1224, 1128, 197, 198, 198, 199, 207, 956, 1143, 1144, 1144, 1145, 224, 1210, 674, 1161, 1860, 1146, 186, 957, 1177, 288, 320, 457, 1104, 1860, 457, 346, 958, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 458, 346, 346, 346, 957, 288, 169, 956, 1179, 1104, 206, 1241, 958, 342, 1245, 1860, 1246, 1180, 342, 1162, 1089, 1090, 1089, 1089, 1150, 206, 348, 346, 1860, 169, 1860, 956, 1179, 1091, 206, 1241, 342, 582, 1245, 1246, 1180, 342, 1162, 1860, 1860, 1860, 1092, 1150, 206, 346, 576, 350, 350, 576, 346, 1093, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1092, 206, 197, 198, 198, 199, 1165, 1860, 1093, 1860, 1101, 198, 198, 1101, 1255, 577, 206, 1860, 186, 1860, 1860, 206, 348, 346, 1105, 206, 216, 1860, 1860, 1860, 1165, 633, 634, 634, 635, 1860, 1860, 1255, 577, 206, 1043, 1043, 1043, 1043, 206, 346, 167, 1860, 1105, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 461, 224, 1860, 1211, 215, 674, 853, 1048, 1860, 462, 633, 634, 634, 635, 1178, 1267, 1243, 578, 672, 672, 672, 672, 167, 167, 461, 224, 1211, 215, 674, 853, 1860, 1048, 462, 1860, 1860, 537, 1860, 1178, 1267, 1243, 578, 1860, 1110, 1860, 342, 167, 167, 1860, 1860, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1110, 342, 1860, 1048, 891, 892, 892, 893, 891, 892, 892, 893, 1290, 1860, 579, 1244, 1860, 672, 672, 672, 672, 1101, 167, 167, 1102, 287, 779, 1048, 779, 1181, 779, 1215, 779, 1101, 537, 1290, 1102, 579, 1244, 342, 997, 1114, 1860, 1094, 1860, 167, 353, 354, 354, 355, 779, 1182, 779, 1181, 779, 1215, 779, 1860, 789, 207, 215, 342, 342, 997, 1860, 1114, 1094, 342, 674, 1291, 1213, 589, 210, 1860, 215, 1182, 1247, 700, 700, 700, 700, 211, 789, 215, 342, 1860, 1101, 198, 198, 1102, 342, 674, 1291, 1213, 559, 589, 210, 215, 1860, 1860, 1247, 1134, 216, 1262, 211, 480, 350, 350, 480, 223, 1266, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1134, 1151, 1262, 674, 702, 206, 1860, 1212, 1860, 1266, 1166, 1167, 1167, 1168, 1227, 481, 1860, 1860, 1860, 1169, 206, 1860, 225, 223, 1860, 1151, 674, 1286, 702, 206, 1212, 884, 885, 885, 886, 1860, 1860, 1227, 481, 1174, 1175, 1175, 1176, 206, 206, 223, 223, 1860, 1860, 223, 223, 1286, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 702, 206, 1253, 1860, 215, 215, 1294, 342, 674, 1860, 197, 198, 198, 199, 606, 1228, 607, 1126, 1127, 1126, 1126, 1860, 225, 223, 702, 1253, 186, 215, 215, 1294, 342, 674, 1173, 347, 1128, 1860, 1860, 606, 1228, 607, 891, 892, 892, 893, 1231, 223, 569, 636, 637, 637, 638, 569, 569, 569, 569, 569, 1173, 347, 569, 569, 569, 1302, 779, 640, 779, 569, 569, 1231, 1096, 1860, 1309, 891, 892, 892, 893, 891, 892, 892, 893, 1860, 1860, 672, 672, 672, 672, 1302, 779, 1307, 779, 569, 1860, 1860, 1096, 779, 1309, 779, 1095, 779, 537, 1097, 1144, 1144, 1144, 1230, 1205, 1127, 1127, 1127, 1127, 1071, 1307, 1860, 569, 672, 672, 672, 672, 779, 673, 779, 1095, 779, 1217, 1097, 673, 673, 673, 174, 1205, 1860, 537, 673, 672, 672, 672, 672, 1860, 673, 1860, 891, 892, 892, 893, 673, 673, 673, 174, 1308, 1318, 537, 673, 1126, 1127, 1126, 1126, 1048, 1860, 197, 198, 198, 199, 779, 702, 779, 1860, 1242, 1860, 1860, 1128, 1860, 1308, 675, 1318, 186, 1317, 1860, 1860, 1098, 1860, 1048, 197, 198, 198, 199, 1860, 779, 702, 779, 1242, 1090, 1090, 1090, 1090, 1203, 675, 678, 186, 1317, 678, 678, 1098, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 990, 1203, 1330, 1200, 1127, 1127, 1127, 1127, 1335, 991, 1329, 1144, 1144, 1144, 1230, 1333, 672, 672, 672, 672, 1071, 1217, 680, 678, 990, 1330, 1200, 1544, 198, 198, 1544, 1335, 991, 537, 1329, 953, 954, 954, 1047, 1333, 1860, 1860, 1860, 186, 1204, 678, 283, 283, 207, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1049, 347, 283, 287, 283, 283, 702, 1204, 1336, 1050, 691, 1146, 1233, 956, 1860, 1316, 1232, 1146, 1346, 197, 198, 198, 199, 215, 1049, 347, 169, 1248, 283, 1860, 702, 1336, 1050, 1860, 691, 186, 1233, 956, 1316, 1232, 1860, 1346, 1860, 1201, 1860, 169, 215, 1860, 1860, 169, 1248, 283, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1201, 169, 283, 287, 283, 283, 1347, 1254, 1860, 1860, 891, 892, 892, 893, 891, 892, 892, 893, 215, 692, 700, 700, 700, 700, 1163, 1163, 1163, 1163, 283, 1860, 1347, 1254, 1100, 1164, 779, 1364, 779, 559, 1199, 1860, 1860, 215, 692, 1226, 1219, 1219, 1219, 1219, 1860, 1860, 1860, 283, 700, 700, 700, 700, 1100, 701, 779, 1364, 779, 1217, 1199, 701, 701, 701, 174, 1226, 1860, 559, 701, 700, 700, 700, 700, 1860, 701, 206, 891, 892, 892, 893, 701, 701, 701, 174, 1860, 874, 559, 701, 1860, 1238, 206, 1249, 206, 1048, 1860, 1860, 342, 571, 779, 206, 779, 700, 700, 700, 700, 1332, 1860, 206, 703, 874, 674, 1296, 1238, 206, 1099, 1249, 206, 1048, 559, 342, 571, 1860, 779, 1860, 779, 1860, 1860, 1860, 1332, 1225, 206, 703, 705, 674, 1296, 705, 705, 1099, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 347, 1225, 1319, 1152, 1153, 1153, 1154, 1860, 672, 672, 672, 672, 197, 198, 198, 199, 1860, 1051, 954, 954, 1052, 1351, 707, 705, 347, 537, 1319, 1860, 186, 1155, 207, 1143, 1144, 1144, 1145, 1860, 1101, 1860, 1156, 1102, 1146, 1860, 1208, 1049, 1351, 705, 212, 198, 198, 213, 1256, 214, 1050, 1155, 1345, 185, 185, 214, 214, 214, 185, 1156, 216, 1860, 214, 1208, 1860, 1049, 169, 215, 342, 1374, 1048, 1256, 1860, 1050, 1860, 1860, 1345, 1295, 1860, 1331, 717, 1860, 1860, 1860, 1143, 1144, 1144, 1145, 674, 169, 215, 342, 1374, 1146, 1048, 1370, 948, 948, 948, 948, 1860, 1295, 1331, 717, 600, 601, 601, 602, 1860, 214, 1860, 674, 1860, 603, 185, 214, 214, 214, 185, 1370, 216, 169, 214, 576, 350, 350, 576, 346, 853, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1393, 169, 1394, 1219, 1219, 1219, 1219, 1860, 853, 1257, 1175, 1175, 1257, 1860, 1860, 577, 1051, 954, 954, 1052, 1217, 1860, 348, 346, 1393, 216, 1394, 1860, 1860, 207, 1144, 1144, 1144, 1230, 1166, 1167, 1167, 1168, 577, 1071, 1860, 1860, 1049, 1169, 1258, 346, 346, 1860, 1860, 346, 346, 1050, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1049, 1258, 206, 956, 1350, 224, 1860, 1375, 1050, 672, 672, 672, 672, 1860, 720, 1337, 721, 1779, 1779, 1779, 1779, 1860, 348, 346, 1860, 206, 537, 956, 1350, 224, 1375, 1860, 1860, 1323, 1324, 1324, 1323, 720, 1337, 721, 633, 634, 634, 635, 1236, 346, 167, 1237, 1289, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 208, 1860, 206, 1860, 169, 1289, 1048, 1860, 342, 1259, 1175, 1175, 1259, 1395, 1860, 1415, 1416, 206, 722, 1860, 1334, 1860, 167, 167, 208, 186, 206, 169, 1860, 1860, 1048, 342, 1677, 634, 634, 1677, 1860, 1395, 1415, 1416, 206, 722, 1424, 1334, 1258, 167, 167, 1860, 186, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1424, 1258, 723, 1053, 1054, 1054, 1053, 1054, 1054, 1054, 1054, 1265, 891, 892, 892, 893, 207, 1265, 1252, 1438, 207, 1425, 167, 167, 1169, 1860, 723, 1442, 1458, 1159, 1860, 1860, 224, 1159, 779, 1860, 779, 1860, 1160, 206, 1191, 1860, 1160, 1438, 1425, 167, 583, 584, 583, 583, 1459, 1442, 1458, 1159, 206, 1460, 224, 1159, 779, 585, 779, 1160, 1860, 206, 1191, 1160, 1059, 1060, 1060, 1059, 727, 1472, 586, 1459, 1478, 1164, 1383, 206, 1460, 207, 555, 587, 1860, 1860, 1060, 1060, 1060, 1060, 674, 1860, 1860, 1860, 461, 1164, 727, 1472, 586, 207, 1478, 1860, 1383, 462, 1860, 555, 587, 583, 584, 583, 583, 1494, 461, 674, 884, 885, 885, 886, 461, 1487, 585, 462, 1263, 1144, 1144, 1264, 462, 891, 892, 892, 893, 1265, 1480, 586, 1494, 674, 461, 1089, 1090, 1089, 1089, 728, 587, 1487, 462, 1860, 224, 1860, 342, 779, 1091, 779, 1493, 1505, 582, 1480, 1860, 586, 674, 1502, 1860, 1190, 1521, 1092, 728, 587, 353, 354, 354, 355, 224, 342, 1093, 779, 1860, 779, 1493, 1505, 1531, 207, 704, 1481, 1502, 702, 1190, 674, 1521, 1092, 672, 672, 672, 672, 210, 1860, 1860, 1093, 1089, 1090, 1089, 1089, 729, 211, 1531, 704, 1481, 537, 702, 1532, 674, 1091, 1860, 1860, 779, 582, 1860, 1860, 210, 891, 892, 892, 893, 1292, 1092, 729, 211, 353, 354, 354, 355, 1547, 1532, 1093, 1089, 1090, 1089, 1089, 779, 1384, 207, 779, 1564, 779, 1860, 695, 1292, 1187, 1092, 1360, 674, 582, 1536, 210, 1547, 730, 1093, 1192, 1465, 1601, 1092, 1860, 211, 1384, 1860, 779, 1564, 779, 695, 1093, 779, 1557, 1360, 674, 1860, 1536, 1860, 210, 1565, 730, 1192, 1608, 1465, 1601, 1092, 211, 212, 198, 198, 213, 1614, 214, 1093, 779, 1557, 185, 185, 214, 214, 214, 202, 1565, 216, 1615, 214, 1608, 891, 892, 892, 893, 1257, 1175, 1175, 1260, 1614, 197, 198, 198, 199, 1860, 583, 584, 583, 583, 739, 1860, 216, 1615, 779, 1860, 779, 186, 1236, 585, 1860, 1237, 1860, 1152, 1153, 1153, 1152, 1860, 1193, 1284, 1860, 1261, 586, 739, 212, 198, 198, 213, 779, 214, 779, 1235, 206, 185, 185, 214, 214, 214, 202, 1239, 216, 1193, 214, 1284, 1261, 1602, 586, 206, 1240, 1613, 740, 1860, 1622, 1658, 1235, 1860, 206, 197, 198, 198, 199, 1860, 1860, 1239, 1352, 1352, 1352, 1352, 1602, 1860, 206, 1240, 1613, 186, 740, 223, 1622, 1658, 223, 223, 1285, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 1280, 1659, 1664, 700, 700, 700, 700, 1860, 1285, 672, 672, 672, 672, 581, 1665, 571, 747, 1450, 1860, 1860, 559, 225, 223, 1280, 1659, 1664, 537, 1598, 1860, 1860, 672, 672, 672, 672, 1860, 1860, 581, 1665, 571, 747, 1860, 1450, 1315, 1288, 223, 223, 1860, 537, 223, 223, 1598, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1315, 1288, 1293, 779, 1194, 1195, 1195, 1196, 891, 892, 892, 893, 1684, 1860, 748, 1860, 672, 672, 672, 672, 1860, 1594, 225, 223, 1860, 1293, 779, 779, 779, 1860, 779, 1860, 779, 537, 1543, 1684, 1197, 748, 779, 1205, 1469, 1539, 1860, 1198, 1594, 223, 647, 648, 648, 649, 779, 779, 779, 1209, 779, 185, 779, 1860, 1860, 1197, 1860, 1860, 779, 1205, 1860, 1539, 1198, 1662, 1682, 1860, 1683, 760, 1860, 1860, 761, 779, 1209, 197, 198, 198, 199, 762, 700, 700, 700, 700, 1860, 1537, 1537, 1537, 1537, 1662, 1682, 186, 1683, 760, 1538, 1371, 761, 559, 1153, 1153, 1153, 1153, 762, 569, 636, 637, 637, 638, 569, 569, 569, 569, 569, 1860, 1314, 569, 569, 569, 1860, 1371, 640, 206, 569, 569, 1239, 1328, 1450, 1306, 1306, 1306, 1306, 779, 1860, 1240, 1048, 1599, 206, 1314, 1703, 1657, 891, 892, 892, 893, 1217, 206, 569, 1860, 1239, 1328, 1450, 1342, 1343, 1343, 1344, 779, 1240, 1048, 1599, 206, 206, 1703, 779, 1657, 779, 1750, 1750, 1750, 1750, 569, 569, 774, 637, 637, 775, 569, 569, 569, 569, 569, 1704, 1278, 569, 569, 569, 206, 779, 773, 779, 569, 569, 1680, 1297, 1297, 1297, 1297, 1688, 1166, 1167, 1167, 1250, 674, 1713, 1704, 1278, 1860, 1071, 1753, 206, 1299, 207, 1860, 1860, 569, 1860, 1680, 1310, 1310, 1310, 1310, 1688, 1311, 1860, 461, 674, 1713, 1320, 1144, 1144, 1321, 174, 174, 462, 1312, 1301, 1322, 569, 569, 776, 777, 777, 778, 569, 569, 569, 569, 569, 461, 347, 569, 569, 780, 1720, 1860, 569, 462, 569, 569, 1301, 174, 781, 1860, 782, 1860, 783, 1194, 1195, 1195, 1196, 1860, 1689, 1236, 347, 784, 1237, 1720, 1537, 1537, 1537, 1537, 569, 1860, 1860, 1860, 781, 1538, 782, 779, 783, 779, 1263, 1144, 1144, 1264, 1689, 206, 784, 1197, 1860, 1265, 1860, 1860, 1860, 569, 672, 672, 672, 672, 1860, 673, 206, 779, 1860, 779, 224, 673, 673, 673, 174, 206, 1197, 537, 673, 672, 672, 672, 672, 1860, 673, 197, 198, 198, 199, 206, 673, 673, 673, 174, 224, 1735, 537, 673, 1743, 1860, 1860, 186, 1623, 1623, 1623, 1623, 1167, 1167, 1167, 1251, 1748, 1624, 803, 1287, 1592, 1071, 1860, 1593, 1735, 207, 1860, 1743, 1257, 1175, 1175, 1257, 1860, 1860, 1413, 1324, 1324, 1413, 461, 1748, 779, 803, 678, 1287, 216, 678, 678, 462, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 461, 1258, 779, 1305, 1306, 1305, 1305, 1258, 462, 1860, 1860, 1860, 1259, 1175, 1175, 1259, 1166, 1167, 1167, 1250, 1128, 1765, 680, 678, 1258, 1071, 1860, 1860, 186, 207, 1258, 1860, 197, 198, 198, 199, 1413, 1324, 1324, 1413, 1860, 1860, 461, 1579, 1765, 678, 678, 1258, 186, 678, 678, 462, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 461, 1579, 1349, 1252, 1258, 1258, 1705, 1712, 462, 1169, 1860, 1722, 1724, 197, 198, 198, 199, 1306, 1306, 1306, 1306, 1860, 680, 678, 206, 1349, 1860, 1543, 1258, 186, 1705, 1712, 1860, 1469, 1217, 1722, 1724, 1348, 1860, 206, 1352, 1352, 1352, 1352, 779, 678, 283, 283, 206, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1348, 206, 283, 287, 283, 283, 1734, 779, 816, 1860, 1666, 1280, 1360, 1450, 1860, 1257, 1175, 1175, 1260, 672, 672, 672, 672, 1860, 1860, 1600, 1773, 1860, 283, 1860, 1734, 216, 816, 1666, 1280, 1360, 537, 1450, 1466, 1467, 1467, 1468, 1860, 1338, 1339, 1339, 1340, 1469, 1600, 1773, 1261, 283, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 956, 1746, 283, 287, 283, 283, 1261, 779, 1341, 1860, 891, 892, 892, 893, 817, 1450, 1385, 1385, 1385, 1385, 1263, 1144, 1144, 1264, 956, 1746, 1860, 1661, 283, 1265, 779, 1341, 779, 1299, 779, 1770, 1277, 1450, 817, 1450, 1623, 1623, 1623, 1623, 224, 1310, 1310, 1310, 1310, 1624, 1661, 283, 700, 700, 700, 700, 779, 701, 779, 1770, 1277, 1450, 1312, 701, 701, 701, 174, 1772, 224, 559, 701, 700, 700, 700, 700, 1860, 701, 891, 892, 892, 893, 1860, 701, 701, 701, 174, 1778, 1301, 559, 701, 1360, 1772, 197, 198, 198, 199, 1860, 1860, 1796, 779, 1860, 779, 1860, 1860, 824, 1279, 1860, 1860, 186, 1860, 1778, 1860, 1860, 1360, 197, 198, 198, 199, 1194, 1195, 1195, 1196, 1796, 779, 1450, 779, 1368, 824, 705, 1279, 186, 705, 705, 1660, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 1450, 1368, 1197, 1829, 1860, 1369, 779, 1833, 1660, 1860, 672, 672, 672, 672, 1714, 1797, 1804, 1807, 1396, 1396, 1396, 1396, 707, 705, 1360, 1197, 1829, 537, 1369, 779, 1833, 672, 672, 672, 672, 1312, 1860, 1860, 1714, 1797, 1804, 1807, 1860, 1372, 1860, 705, 705, 1360, 537, 705, 705, 1860, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 1372, 1373, 1310, 1310, 1310, 1310, 891, 892, 892, 893, 700, 700, 700, 700, 700, 700, 700, 700, 1860, 1312, 1860, 1860, 707, 705, 1373, 1860, 1281, 559, 779, 1860, 779, 559, 1860, 1053, 1054, 1054, 1055, 1860, 1860, 891, 892, 892, 893, 1401, 1301, 705, 212, 198, 198, 213, 1281, 214, 779, 1428, 779, 185, 185, 214, 214, 214, 185, 779, 216, 779, 214, 956, 1401, 1828, 891, 892, 892, 893, 1834, 1282, 832, 1860, 1860, 1428, 1860, 1860, 672, 672, 672, 672, 1844, 779, 1860, 779, 956, 1860, 779, 1828, 779, 1860, 1450, 1834, 1282, 537, 832, 212, 198, 198, 213, 1479, 214, 1283, 1860, 1844, 185, 185, 214, 214, 214, 185, 779, 216, 779, 214, 1450, 700, 700, 700, 700, 1809, 1809, 1809, 1809, 1479, 1283, 672, 672, 672, 672, 833, 1860, 1860, 559, 1377, 1377, 1377, 1377, 1513, 1513, 1513, 1513, 1860, 537, 1860, 1503, 1503, 1503, 1503, 1860, 1376, 1379, 1402, 833, 346, 1514, 1860, 346, 346, 1860, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1376, 1402, 541, 1427, 197, 198, 198, 199, 1515, 1516, 1516, 1517, 1860, 197, 198, 198, 199, 835, 1860, 1860, 186, 1860, 348, 346, 186, 1514, 1427, 1439, 1860, 186, 1860, 1403, 1403, 1403, 1403, 1570, 1570, 1570, 1570, 1860, 835, 1152, 1153, 1153, 1154, 346, 346, 1440, 1405, 346, 346, 1439, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1681, 1155, 1860, 1572, 1440, 1860, 1860, 563, 1860, 1087, 1156, 1717, 674, 1418, 836, 197, 198, 198, 199, 1860, 1860, 1860, 348, 346, 1681, 1155, 1572, 1477, 1477, 1477, 1477, 186, 1087, 1156, 1717, 674, 1418, 836, 1860, 1860, 1152, 1153, 1153, 1154, 537, 346, 167, 1860, 1470, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1155, 1434, 1435, 1435, 1434, 1470, 1719, 1716, 1860, 1156, 1419, 1544, 198, 198, 1545, 837, 674, 216, 1544, 198, 198, 1545, 167, 167, 1155, 1360, 1860, 186, 1860, 1860, 1719, 1716, 1156, 1419, 186, 1860, 1860, 1860, 837, 674, 1860, 1860, 1860, 1508, 1860, 167, 167, 1860, 1360, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1167, 1167, 1167, 1251, 838, 1326, 1326, 1326, 1326, 1071, 1117, 1860, 1592, 207, 1164, 1593, 1089, 1090, 1089, 1089, 1846, 674, 167, 167, 1860, 1860, 461, 1860, 838, 1091, 1450, 461, 779, 582, 1117, 462, 1477, 1477, 1477, 1477, 462, 1771, 1092, 1846, 674, 167, 842, 843, 842, 842, 461, 1093, 582, 537, 1450, 461, 779, 582, 462, 844, 1847, 669, 1860, 462, 1771, 582, 1092, 1089, 1090, 1089, 1089, 670, 845, 1860, 1093, 1860, 891, 892, 892, 893, 1091, 846, 1860, 1847, 582, 669, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1092, 670, 1860, 845, 1860, 779, 1091, 1355, 1860, 1093, 582, 846, 583, 584, 583, 583, 1860, 1860, 1860, 1092, 672, 672, 672, 672, 1092, 585, 1450, 1860, 1093, 779, 1741, 1355, 1093, 891, 892, 892, 893, 537, 586, 891, 892, 892, 893, 1092, 1860, 847, 1860, 587, 1860, 1860, 1450, 1093, 1742, 1860, 1741, 1363, 1450, 779, 1860, 797, 1860, 779, 586, 897, 891, 892, 892, 893, 847, 1860, 587, 583, 584, 583, 583, 1860, 1742, 1860, 1356, 1363, 1450, 779, 797, 1860, 585, 779, 779, 897, 779, 891, 892, 892, 893, 197, 198, 198, 199, 586, 1860, 1365, 1860, 1356, 1570, 1570, 1570, 1570, 587, 848, 1860, 186, 779, 779, 779, 779, 1473, 1325, 1326, 1325, 1325, 1860, 1860, 586, 1365, 1860, 1327, 1860, 1367, 1860, 585, 587, 848, 353, 354, 354, 355, 779, 1625, 779, 1473, 1860, 1860, 586, 1860, 1860, 207, 583, 584, 583, 583, 1367, 587, 1152, 1153, 1153, 1154, 1860, 1860, 210, 585, 1625, 197, 198, 198, 199, 849, 586, 211, 468, 1860, 1860, 1860, 586, 1860, 587, 1450, 1417, 186, 1155, 1768, 1860, 587, 210, 1558, 1558, 1558, 1558, 1156, 849, 1860, 211, 468, 353, 354, 354, 355, 586, 1471, 1860, 1450, 1417, 1860, 1155, 1768, 587, 207, 1435, 1435, 1435, 1435, 1156, 1420, 1421, 1421, 1422, 1559, 1860, 1860, 210, 1860, 1471, 1450, 186, 672, 672, 672, 672, 211, 1429, 1343, 1343, 1429, 1799, 851, 1860, 1860, 1860, 1155, 1559, 1860, 537, 207, 210, 1423, 1860, 1450, 1156, 1476, 1508, 779, 211, 1860, 1860, 1860, 461, 1799, 851, 733, 734, 734, 733, 1155, 1733, 1430, 1747, 1860, 1423, 1360, 1860, 1156, 207, 1476, 1860, 779, 672, 672, 672, 672, 461, 1486, 1486, 1486, 1486, 461, 1860, 1733, 1430, 1747, 1860, 853, 1360, 537, 462, 1860, 1860, 1860, 1431, 1343, 1343, 1431, 1554, 1860, 1860, 1605, 1606, 1606, 1607, 461, 1860, 207, 798, 1860, 853, 1860, 1860, 462, 212, 198, 198, 213, 1860, 214, 461, 779, 1554, 185, 185, 214, 214, 214, 202, 1430, 216, 798, 214, 1860, 1429, 1343, 1343, 1432, 857, 1860, 1434, 1435, 1435, 1436, 461, 779, 1860, 207, 1860, 185, 185, 1860, 1430, 1860, 185, 1860, 216, 1860, 1860, 1450, 210, 1860, 857, 212, 198, 198, 213, 1860, 214, 1433, 1860, 1707, 185, 185, 214, 214, 214, 202, 1860, 216, 1860, 214, 1508, 1450, 210, 1860, 1860, 1461, 1462, 1462, 1463, 1860, 1433, 1860, 1707, 674, 1464, 1860, 1118, 1860, 1860, 1860, 858, 700, 700, 700, 700, 779, 1466, 1467, 1467, 1468, 1860, 1461, 1462, 1462, 1463, 1469, 674, 1860, 559, 1118, 1464, 1860, 1860, 858, 223, 1490, 779, 223, 223, 779, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 989, 1860, 779, 1860, 1490, 779, 1860, 1642, 1642, 1642, 1642, 1721, 1721, 1721, 1721, 1860, 1860, 864, 1860, 1860, 1624, 225, 223, 989, 1514, 779, 197, 198, 198, 199, 700, 700, 700, 700, 1810, 1779, 1779, 1810, 1860, 1860, 864, 1860, 186, 1860, 223, 223, 1860, 559, 223, 223, 1546, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 823, 865, 672, 672, 672, 672, 1860, 1860, 1546, 1860, 197, 198, 198, 199, 1544, 198, 198, 1545, 1860, 537, 1860, 225, 223, 823, 1860, 865, 186, 1860, 1860, 1860, 186, 1860, 1518, 1839, 1840, 1840, 1839, 1549, 1860, 1745, 1152, 1153, 1153, 1154, 223, 569, 887, 888, 888, 889, 569, 569, 569, 569, 569, 1360, 1518, 569, 569, 780, 1549, 1860, 569, 1745, 569, 569, 1155, 1450, 781, 1769, 782, 1860, 783, 1450, 1860, 1156, 1495, 1860, 1360, 1736, 1860, 890, 1860, 700, 700, 700, 700, 1860, 569, 1860, 1155, 1450, 781, 1769, 782, 1860, 783, 1450, 1156, 1495, 559, 1860, 1736, 1860, 890, 1860, 1860, 1496, 1497, 1497, 1498, 569, 569, 774, 637, 637, 775, 569, 569, 569, 569, 569, 822, 1860, 569, 569, 569, 1860, 1860, 773, 1860, 569, 569, 1155, 1860, 197, 198, 198, 199, 1499, 1860, 1860, 1156, 1860, 1860, 822, 1860, 197, 198, 198, 199, 186, 1860, 1860, 1860, 569, 1860, 1155, 1503, 1503, 1503, 1503, 1499, 186, 1860, 1156, 1548, 1570, 1570, 1570, 1570, 1589, 1779, 1779, 1779, 1779, 1860, 1860, 569, 569, 776, 777, 777, 778, 569, 569, 569, 569, 569, 1548, 1427, 569, 569, 780, 1860, 1589, 569, 1450, 569, 569, 1860, 1572, 781, 1798, 782, 1450, 783, 1152, 1153, 1153, 1154, 1663, 1860, 1427, 1860, 784, 1860, 1152, 1153, 1153, 1154, 1450, 569, 1860, 1572, 1860, 781, 1798, 782, 1450, 783, 1860, 1860, 1155, 1663, 1500, 1860, 1860, 784, 1860, 1860, 1860, 1156, 1155, 1860, 569, 891, 892, 892, 893, 1860, 1860, 1563, 1510, 1511, 1511, 1510, 1155, 1860, 1500, 1860, 1420, 1421, 1421, 1420, 1156, 1860, 1155, 779, 216, 779, 1642, 1642, 1642, 1642, 1563, 1627, 1570, 1570, 1627, 895, 890, 1511, 1511, 1511, 1511, 1860, 1239, 1514, 1860, 1860, 1860, 779, 1427, 779, 1582, 1240, 1860, 186, 1421, 1421, 1421, 1421, 895, 890, 891, 892, 892, 893, 1860, 1628, 1239, 1860, 1860, 1236, 1860, 1427, 1237, 1860, 1240, 1420, 1421, 1421, 1422, 1582, 1239, 1860, 779, 1860, 779, 1860, 1427, 1860, 1628, 1240, 1860, 208, 1860, 896, 1860, 890, 1860, 1352, 1352, 1352, 1352, 1155, 1860, 206, 1239, 206, 779, 1423, 779, 1427, 1156, 1860, 1240, 1860, 1860, 208, 896, 1860, 890, 891, 892, 892, 893, 1860, 1860, 1155, 206, 1860, 206, 1280, 1423, 1860, 779, 1156, 1860, 1860, 1860, 1726, 1727, 1727, 1728, 779, 1860, 779, 1860, 1860, 1702, 1860, 1152, 1153, 1153, 1154, 1280, 898, 890, 899, 779, 1860, 1053, 1054, 1054, 1055, 1640, 1860, 1860, 779, 1860, 779, 1501, 1702, 1860, 207, 1860, 1860, 1155, 1860, 898, 890, 899, 647, 648, 648, 649, 1156, 957, 1860, 1640, 1860, 1513, 1513, 1513, 1513, 1501, 1506, 1515, 1516, 1516, 1515, 1155, 1429, 1343, 1343, 1429, 1450, 650, 1514, 1156, 651, 957, 1585, 186, 1514, 207, 1860, 652, 1585, 1506, 1706, 215, 1860, 1860, 1642, 1642, 1642, 1642, 461, 1860, 1450, 650, 1860, 1586, 651, 1860, 1585, 1430, 1860, 1586, 652, 1514, 1585, 1706, 215, 672, 672, 672, 672, 1860, 673, 1860, 461, 1860, 1860, 1860, 673, 673, 673, 174, 1430, 1860, 537, 673, 1860, 1860, 1860, 917, 1576, 1577, 1577, 1578, 1860, 1431, 1343, 1343, 1431, 185, 185, 1860, 346, 1860, 1860, 346, 186, 1860, 207, 1429, 1343, 1343, 1432, 917, 672, 672, 672, 672, 1860, 673, 1592, 461, 207, 1593, 1580, 673, 673, 673, 174, 1860, 1430, 537, 673, 1860, 1860, 210, 1860, 347, 721, 1860, 779, 1860, 781, 1860, 1433, 461, 1860, 1580, 1698, 1642, 1642, 1698, 918, 1430, 1721, 1721, 1721, 1721, 1860, 210, 347, 721, 1860, 1624, 779, 1699, 781, 1433, 1860, 1860, 1445, 1445, 1445, 1445, 1860, 918, 806, 672, 672, 806, 678, 1860, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 807, 678, 678, 990, 1805, 1805, 1805, 1805, 1860, 1280, 1860, 1860, 991, 1806, 1805, 1805, 1805, 1805, 1860, 1152, 1153, 1153, 1154, 1806, 1860, 680, 678, 990, 1510, 1511, 1511, 1512, 1280, 1860, 1860, 991, 1860, 185, 185, 1860, 1860, 1860, 185, 1860, 216, 1155, 1860, 1560, 678, 678, 1860, 1860, 678, 678, 1156, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 1155, 1582, 1560, 1648, 1649, 1649, 1650, 1860, 1156, 1860, 1860, 1860, 185, 185, 1677, 634, 634, 1678, 1860, 186, 1514, 1860, 680, 678, 1731, 970, 970, 1764, 1860, 1860, 186, 1860, 1860, 1071, 1860, 1453, 1358, 1358, 1454, 1860, 186, 1496, 1497, 1497, 1496, 678, 283, 283, 780, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1451, 1860, 283, 287, 283, 283, 1239, 779, 1860, 1452, 1860, 1860, 1559, 1860, 1860, 1240, 1631, 1631, 1631, 1631, 927, 989, 1860, 899, 1451, 1860, 1860, 1860, 283, 1860, 1239, 779, 1452, 1860, 1860, 1559, 1860, 1860, 1240, 1843, 1843, 1843, 1843, 927, 989, 1860, 899, 1860, 1806, 1860, 1633, 283, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1860, 1860, 283, 287, 283, 283, 1633, 1860, 1860, 1453, 1358, 1358, 1454, 1558, 1558, 1558, 1558, 1860, 1566, 1567, 1567, 1568, 780, 1860, 928, 1860, 1860, 1569, 283, 1698, 1642, 1642, 1698, 1860, 1860, 1451, 1455, 1456, 1456, 1455, 1053, 1054, 1054, 1055, 1452, 1559, 1699, 928, 1860, 780, 956, 283, 700, 700, 700, 700, 1860, 701, 1860, 1451, 1860, 1860, 1533, 701, 701, 701, 174, 1452, 1559, 559, 701, 1534, 956, 956, 935, 1566, 1567, 1567, 1568, 1456, 1456, 1456, 1456, 1860, 1569, 1860, 1533, 1788, 1789, 1789, 1790, 1860, 780, 1860, 1534, 956, 185, 185, 935, 700, 700, 700, 700, 186, 701, 1533, 1860, 956, 1860, 1057, 701, 701, 701, 174, 1534, 1860, 559, 701, 1860, 1860, 1860, 936, 1648, 1649, 1649, 1648, 1860, 1860, 1860, 1533, 956, 1860, 1057, 1839, 1840, 1840, 1839, 1534, 186, 1514, 1526, 1527, 1527, 1526, 1860, 936, 826, 700, 700, 826, 705, 1860, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 827, 705, 705, 1595, 1860, 1860, 1860, 1649, 1649, 1649, 1649, 1860, 1596, 1576, 1577, 1577, 1576, 1860, 1860, 1461, 1462, 1462, 1461, 186, 1514, 707, 705, 1595, 1538, 186, 1860, 1860, 780, 1860, 1860, 1596, 1860, 1779, 1779, 1779, 1779, 1503, 1503, 1503, 1503, 990, 1860, 1625, 705, 705, 1860, 1860, 705, 705, 991, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 990, 1625, 1860, 1860, 1427, 1845, 1860, 1860, 991, 1860, 1577, 1577, 1577, 1577, 1860, 1860, 1462, 1462, 1462, 1462, 1860, 1860, 707, 705, 1860, 1538, 186, 1427, 1845, 780, 1860, 197, 198, 198, 199, 1860, 1860, 1667, 1668, 1668, 1669, 1860, 990, 1860, 1625, 705, 346, 186, 1860, 346, 346, 991, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 990, 1625, 1653, 1670, 1648, 1649, 1649, 1650, 991, 1360, 1860, 1860, 1860, 1570, 1570, 1570, 1570, 1860, 943, 1860, 186, 1514, 348, 346, 1860, 1653, 1670, 1516, 1516, 1516, 1516, 1860, 1360, 1152, 1153, 1153, 1154, 1627, 1570, 1570, 1627, 943, 1048, 186, 1514, 346, 346, 1572, 1585, 346, 346, 1860, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1860, 1048, 944, 1586, 1572, 1628, 1585, 1860, 1760, 1760, 1760, 1760, 1860, 1576, 1577, 1577, 1578, 1860, 1843, 1843, 1843, 1843, 348, 346, 1048, 1514, 944, 1806, 1628, 186, 1860, 1860, 1860, 1860, 1631, 1631, 1631, 1631, 1860, 1860, 1497, 1497, 1497, 1497, 1860, 346, 167, 1629, 1860, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1239, 1860, 1691, 1860, 1629, 1860, 1559, 1860, 1860, 1240, 1648, 1649, 1649, 1650, 945, 1860, 1860, 1860, 1860, 185, 185, 1860, 167, 167, 1239, 1691, 186, 1514, 1860, 1559, 1860, 1860, 1240, 1851, 1851, 1851, 1852, 945, 1774, 1775, 1775, 1776, 1541, 1860, 1860, 167, 167, 1777, 1860, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1466, 1467, 1467, 1540, 1527, 1527, 1527, 1527, 1860, 1541, 1360, 1860, 1860, 780, 1860, 1860, 1860, 946, 1467, 1467, 1467, 1542, 167, 167, 1860, 1860, 990, 1541, 1860, 1860, 1595, 780, 1860, 1360, 1860, 991, 1860, 1860, 1860, 1596, 946, 1860, 1860, 1860, 990, 167, 842, 843, 842, 842, 990, 1860, 582, 991, 1595, 1860, 1860, 582, 991, 844, 1860, 1860, 1596, 1860, 1860, 582, 1860, 1860, 990, 1860, 1860, 1860, 845, 1860, 1860, 1860, 991, 1477, 1477, 1477, 1477, 846, 1860, 1860, 1496, 1497, 1497, 1498, 1152, 1153, 1153, 1154, 1860, 1860, 537, 1860, 845, 1860, 1152, 1153, 1153, 1154, 669, 1860, 846, 583, 584, 583, 583, 1860, 1155, 1860, 670, 1860, 1155, 1860, 1499, 1860, 585, 1156, 1562, 1860, 1860, 1617, 1155, 1860, 669, 1860, 1860, 727, 1860, 586, 1860, 1156, 1155, 670, 1860, 1860, 1155, 1499, 587, 1860, 1156, 1860, 1562, 1860, 1617, 1860, 1155, 1631, 1631, 1631, 1631, 727, 1860, 586, 1156, 1860, 1152, 1153, 1153, 1154, 1860, 587, 583, 584, 583, 583, 1860, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 585, 1561, 1860, 1860, 1860, 1091, 1633, 1155, 1860, 582, 1860, 1860, 1592, 586, 1860, 1593, 1156, 1860, 1092, 1860, 1860, 728, 587, 1860, 1860, 1561, 1860, 1591, 1860, 1633, 1860, 1155, 779, 1860, 781, 1860, 1860, 586, 1860, 1156, 1860, 1860, 1092, 1860, 728, 587, 583, 584, 583, 583, 1591, 1466, 1467, 1467, 1540, 1860, 779, 1860, 781, 585, 1541, 1860, 1860, 1860, 780, 1467, 1467, 1467, 1542, 1860, 949, 1860, 586, 1860, 1541, 1860, 1860, 990, 780, 1860, 1860, 587, 1642, 1642, 1642, 1642, 991, 1693, 1631, 1631, 1693, 990, 1860, 1860, 949, 1860, 586, 1860, 1860, 1514, 991, 990, 1860, 1860, 587, 583, 584, 583, 583, 991, 197, 198, 198, 199, 1860, 990, 1644, 1860, 585, 1860, 1860, 1694, 1860, 991, 1860, 1860, 186, 1860, 1860, 1860, 1860, 586, 1860, 1860, 1609, 1860, 1860, 1860, 1860, 1644, 587, 1860, 1860, 950, 1694, 1860, 1860, 672, 672, 672, 672, 1152, 1153, 1153, 1154, 586, 1860, 1860, 1609, 197, 198, 198, 199, 587, 537, 1860, 950, 353, 354, 354, 355, 1860, 1860, 1616, 1860, 186, 1860, 1155, 1860, 1860, 207, 801, 1860, 1610, 1690, 1860, 1156, 1420, 1421, 1421, 1422, 951, 1860, 210, 1860, 1860, 1860, 1616, 1860, 1860, 1860, 1155, 211, 1860, 801, 1860, 1610, 1860, 1690, 1156, 1860, 1860, 1860, 1155, 1860, 951, 1860, 210, 1860, 1423, 1860, 1860, 1156, 1860, 1860, 211, 353, 354, 354, 355, 1570, 1570, 1570, 1570, 1860, 1860, 1860, 1155, 1860, 207, 1860, 1860, 1423, 1860, 1860, 1156, 1677, 634, 634, 1678, 359, 1860, 210, 1860, 1860, 1626, 1860, 1576, 1577, 1577, 1578, 211, 186, 1860, 1572, 952, 185, 185, 1860, 197, 198, 198, 199, 186, 359, 1860, 210, 1860, 1860, 1626, 1558, 1558, 1558, 1558, 211, 186, 1860, 1572, 952, 223, 1860, 1580, 223, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 1860, 1860, 1559, 1860, 1580, 1860, 1860, 1860, 1860, 672, 672, 672, 672, 1860, 973, 1566, 1567, 1567, 1566, 1860, 1860, 225, 223, 1860, 1624, 1559, 537, 1860, 207, 1860, 197, 198, 198, 199, 1860, 1860, 1860, 973, 1860, 1860, 1860, 1159, 1860, 1679, 223, 223, 186, 1860, 223, 223, 1160, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1159, 1679, 1701, 1860, 974, 1860, 1860, 1860, 1160, 1860, 672, 672, 672, 672, 1860, 1860, 1860, 1567, 1567, 1567, 1567, 1860, 225, 223, 1860, 1701, 1624, 537, 974, 1860, 207, 1860, 1718, 1671, 1606, 1606, 1674, 1642, 1642, 1642, 1642, 1860, 1860, 1159, 1860, 223, 647, 648, 648, 649, 1860, 1860, 1160, 779, 1514, 1860, 1718, 1860, 1860, 1860, 1697, 1860, 1860, 1637, 1638, 1638, 1639, 1159, 1675, 1860, 1860, 760, 185, 185, 761, 1160, 1860, 779, 1860, 186, 342, 762, 1860, 1860, 1697, 1860, 1860, 1685, 1686, 1686, 1687, 1675, 1860, 1860, 1860, 760, 1860, 1641, 761, 1642, 1642, 1642, 1642, 342, 762, 569, 887, 888, 888, 889, 569, 569, 569, 569, 569, 1860, 1514, 569, 569, 780, 1641, 1048, 569, 1860, 569, 569, 1860, 1860, 781, 1860, 782, 1860, 783, 1648, 1649, 1649, 1650, 1860, 1860, 1860, 1729, 890, 185, 185, 1048, 1860, 1860, 1860, 569, 186, 1514, 1860, 781, 1860, 782, 1860, 783, 1860, 1860, 1723, 1723, 1723, 1723, 1729, 890, 1860, 1860, 1652, 1860, 1860, 1860, 569, 569, 887, 888, 888, 889, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1652, 569, 569, 1633, 1860, 781, 1860, 782, 1860, 783, 1671, 1606, 1606, 1671, 1744, 1744, 1744, 1744, 890, 1755, 1756, 1756, 1755, 780, 1860, 569, 1633, 1860, 1860, 781, 1860, 782, 1860, 783, 1860, 186, 990, 1860, 1860, 1860, 1860, 890, 1860, 1860, 1860, 1672, 1715, 1860, 569, 891, 892, 892, 893, 1673, 1606, 1606, 1673, 1860, 1860, 1860, 990, 1753, 1637, 1638, 1638, 1637, 780, 1860, 1672, 1715, 1860, 779, 1860, 779, 1755, 1756, 1756, 1757, 186, 990, 1860, 993, 994, 1496, 1497, 1497, 1498, 1860, 1672, 1860, 186, 1860, 1048, 1860, 1860, 779, 1691, 779, 1631, 1631, 1631, 1631, 1860, 990, 993, 994, 891, 892, 892, 893, 1860, 1672, 1860, 1860, 1860, 1499, 1860, 1048, 1860, 1691, 1860, 1860, 1860, 1692, 1618, 1619, 1619, 1618, 779, 1860, 779, 1860, 1633, 1624, 1860, 1860, 1860, 1860, 1499, 1860, 1048, 1860, 997, 998, 1860, 1860, 1860, 1692, 1860, 1860, 1239, 1860, 779, 1860, 779, 1633, 1860, 1860, 1860, 1240, 1638, 1638, 1638, 1638, 1860, 997, 998, 672, 672, 672, 672, 1860, 673, 1860, 1239, 1860, 186, 1860, 673, 673, 673, 174, 1240, 1860, 537, 673, 1619, 1619, 1619, 1619, 1708, 1709, 1709, 1710, 1691, 1624, 1860, 1860, 1860, 1637, 1638, 1638, 1639, 1860, 1860, 1013, 1860, 1756, 1756, 1756, 1756, 1860, 1239, 1860, 1450, 186, 1860, 1691, 1860, 1860, 1860, 1240, 1711, 186, 1860, 1860, 1860, 1860, 1013, 672, 672, 672, 672, 1695, 673, 1860, 1239, 1860, 1450, 1860, 673, 673, 673, 174, 1240, 1711, 537, 673, 1860, 1753, 1860, 1860, 1637, 1638, 1638, 1639, 1695, 1648, 1649, 1649, 1650, 185, 185, 1860, 1014, 1860, 185, 185, 186, 1693, 1631, 1631, 1693, 186, 1514, 1860, 1723, 1723, 1723, 1723, 1700, 1667, 1668, 1668, 1669, 1860, 1641, 1014, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1694, 1700, 283, 287, 283, 283, 1641, 1752, 1860, 1860, 1670, 1860, 1860, 1860, 1860, 1753, 1360, 1860, 1731, 970, 970, 1732, 1023, 1694, 1860, 1860, 1860, 972, 283, 1860, 1752, 1860, 1860, 1670, 186, 1860, 1860, 1860, 1860, 1360, 1860, 1655, 1655, 1655, 1655, 1023, 1860, 1860, 1860, 1860, 1538, 283, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 990, 1860, 283, 287, 283, 283, 1860, 1860, 1860, 991, 1685, 1686, 1686, 1685, 672, 672, 672, 672, 1860, 1624, 1860, 1860, 1860, 1024, 990, 1860, 1860, 1860, 283, 1860, 1860, 537, 991, 1860, 1860, 1860, 1239, 1860, 1749, 1760, 1760, 1760, 1760, 1860, 1860, 1240, 1024, 1671, 1606, 1606, 1674, 283, 700, 700, 700, 700, 1514, 701, 1860, 1860, 1239, 1860, 1749, 701, 701, 701, 174, 779, 1240, 559, 701, 1089, 1090, 1089, 1089, 1766, 1766, 1766, 1766, 1860, 1860, 1794, 1675, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1031, 779, 1860, 197, 198, 198, 199, 1092, 1671, 1606, 1606, 1671, 1860, 1860, 1860, 1675, 1093, 1767, 1860, 186, 1860, 780, 1860, 1031, 700, 700, 700, 700, 1725, 701, 1860, 1092, 1860, 1860, 990, 701, 701, 701, 174, 1093, 1767, 559, 701, 1672, 1673, 1606, 1606, 1673, 1032, 1860, 1860, 1860, 1725, 1726, 1727, 1727, 1726, 780, 990, 1860, 1860, 1860, 1686, 1686, 1686, 1686, 1672, 1860, 1860, 186, 990, 1624, 1032, 583, 584, 583, 583, 1860, 1860, 1672, 1860, 1860, 1737, 1738, 1738, 1739, 585, 1752, 1239, 1744, 1744, 1744, 1744, 1860, 990, 1753, 1860, 1240, 1860, 586, 1860, 1860, 1672, 1860, 1860, 1860, 1450, 1860, 587, 1041, 1752, 1860, 1239, 1860, 1740, 1779, 1779, 1779, 1779, 1860, 1240, 1715, 1860, 586, 1860, 1860, 1708, 1709, 1709, 1708, 1450, 587, 1041, 1042, 1043, 1042, 1042, 1740, 1648, 1649, 1649, 1650, 1860, 1808, 1715, 1860, 585, 185, 185, 1860, 1860, 1860, 1595, 1860, 186, 1514, 1860, 1860, 1715, 586, 1860, 1596, 1860, 1860, 1860, 1044, 1860, 1808, 587, 1860, 1860, 1709, 1709, 1709, 1709, 1860, 1595, 1860, 1860, 1730, 1860, 1715, 1860, 586, 1596, 1860, 1860, 1860, 1044, 1860, 1860, 587, 1053, 1054, 1054, 1055, 1860, 1595, 1860, 1860, 1860, 1860, 1730, 1715, 1860, 207, 1596, 1708, 1709, 1709, 1710, 1766, 1766, 1766, 1766, 1860, 1056, 1860, 957, 1860, 1860, 1595, 1727, 1727, 1727, 1727, 1715, 958, 1860, 1596, 1860, 1450, 1731, 970, 970, 1732, 1860, 1860, 186, 1711, 1056, 972, 957, 1767, 672, 672, 672, 672, 186, 1860, 958, 1059, 1060, 1060, 1061, 1450, 1752, 1860, 1860, 1860, 1062, 537, 1711, 1860, 1753, 1860, 1767, 1761, 1762, 1762, 1763, 1737, 1738, 1738, 1737, 206, 185, 185, 1860, 1752, 1860, 1209, 1860, 186, 1514, 360, 1737, 1738, 1738, 1739, 206, 1860, 1860, 1738, 1738, 1738, 1738, 1595, 1860, 206, 1860, 1860, 1860, 1767, 1209, 1860, 1596, 1860, 360, 1860, 1450, 1860, 1860, 206, 583, 584, 583, 583, 1740, 1595, 1860, 1595, 1860, 1860, 1860, 1767, 1767, 585, 1596, 1596, 1667, 1668, 1668, 1669, 1450, 1779, 1779, 1779, 1779, 1860, 586, 1740, 1148, 1595, 1851, 1851, 1851, 1852, 1767, 587, 1860, 1596, 1860, 1541, 1774, 1775, 1775, 1776, 1860, 1860, 1781, 1860, 1670, 1777, 586, 1860, 1148, 1860, 1360, 1860, 1860, 1860, 587, 1042, 1043, 1042, 1042, 1860, 1860, 1860, 1755, 1756, 1756, 1757, 1781, 1670, 585, 1860, 1459, 185, 185, 1360, 1360, 1860, 185, 1860, 186, 1860, 1860, 586, 1788, 1789, 1789, 1790, 1860, 1044, 1860, 1860, 587, 185, 185, 1459, 1860, 1860, 1860, 1360, 186, 1860, 1809, 1809, 1809, 1809, 1753, 586, 1860, 1792, 1860, 1860, 1044, 1860, 1860, 587, 583, 584, 583, 583, 1860, 1761, 1762, 1762, 1761, 1731, 970, 970, 1764, 585, 1835, 1860, 1860, 1792, 1071, 1860, 1149, 186, 1514, 1860, 1860, 186, 586, 1860, 1753, 1762, 1762, 1762, 1762, 1860, 1860, 587, 1860, 1860, 1835, 1761, 1762, 1762, 1763, 1860, 1149, 186, 1514, 1794, 185, 185, 586, 1860, 1860, 185, 1860, 186, 1514, 1860, 587, 1152, 1153, 1153, 1154, 1860, 1860, 1860, 1860, 1708, 1709, 1709, 1710, 1794, 1860, 1851, 1851, 1851, 1852, 1800, 1801, 1801, 1802, 1794, 1541, 1157, 1860, 1155, 1803, 1788, 1789, 1789, 1790, 1450, 1860, 1860, 1156, 1860, 185, 185, 1860, 1711, 1860, 1450, 1860, 186, 1860, 1860, 1860, 1157, 1860, 1155, 1860, 1598, 1860, 1860, 1860, 1450, 1860, 1156, 1089, 1090, 1089, 1089, 1711, 1860, 1860, 1450, 1860, 1800, 1801, 1801, 1802, 1091, 1860, 1860, 1598, 582, 1803, 1774, 1775, 1775, 1774, 1860, 1188, 1860, 1092, 1860, 1806, 1860, 1860, 1860, 780, 1450, 1860, 1093, 1860, 1860, 1775, 1775, 1775, 1775, 1860, 1860, 1860, 1533, 1860, 1806, 1188, 1860, 1092, 780, 1860, 1860, 1534, 1860, 1860, 1450, 1093, 1089, 1090, 1089, 1089, 1860, 1533, 1820, 1821, 1821, 1822, 1533, 1860, 1860, 1091, 1534, 185, 185, 582, 1534, 1860, 1860, 1860, 186, 1860, 1860, 1860, 1092, 1860, 1860, 1533, 197, 198, 198, 199, 1189, 1093, 1860, 1534, 1860, 185, 185, 1815, 1860, 1860, 1815, 1860, 186, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1189, 1093, 283, 1218, 1219, 1218, 1218, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 1816, 283, 1128, 283, 283, 1788, 1789, 1789, 1788, 1789, 1789, 1789, 1789, 1788, 1789, 1789, 1790, 1860, 1860, 1860, 1860, 186, 1860, 1816, 1860, 186, 1860, 283, 1860, 186, 1860, 1860, 1860, 1808, 1860, 1860, 1860, 1808, 1860, 1860, 1860, 1819, 1860, 1737, 1738, 1738, 1739, 1860, 1860, 1860, 283, 583, 584, 583, 583, 1860, 1860, 1808, 1860, 1860, 1860, 1808, 1860, 1860, 585, 1819, 1860, 1450, 1860, 1830, 1831, 1831, 1832, 1234, 1860, 1740, 1860, 586, 1803, 1860, 1800, 1801, 1801, 1800, 1860, 1860, 587, 1860, 1860, 1806, 1860, 1450, 1860, 1450, 1860, 1860, 1860, 1234, 1740, 1860, 1860, 586, 1860, 1598, 1860, 1860, 1595, 1860, 1860, 587, 1269, 1270, 1269, 1269, 1860, 1596, 1088, 1450, 1860, 1860, 1860, 1088, 1860, 1271, 1860, 1860, 1598, 841, 1860, 1088, 1595, 1801, 1801, 1801, 1801, 1860, 1272, 1860, 1596, 1860, 1806, 1744, 1744, 1744, 1744, 1273, 1810, 1779, 1779, 1810, 1860, 1811, 1779, 1779, 1811, 1860, 1860, 1595, 1860, 1860, 1272, 1860, 1766, 1766, 1766, 1766, 1596, 1860, 1273, 1089, 1090, 1089, 1089, 1715, 1836, 1815, 1860, 1860, 1815, 1837, 1860, 1595, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1596, 1815, 1860, 1860, 1815, 1767, 1092, 1715, 1860, 1836, 1860, 1860, 1860, 1274, 1837, 1093, 197, 198, 198, 199, 1816, 1820, 1821, 1821, 1820, 1860, 1838, 1860, 1767, 1860, 1092, 1860, 186, 1860, 1860, 1816, 1274, 186, 1093, 1089, 1090, 1089, 1089, 1816, 1821, 1821, 1821, 1821, 1860, 1835, 1838, 1860, 1091, 1841, 1860, 1860, 582, 1860, 1816, 1860, 186, 1860, 1860, 1753, 1860, 1092, 1860, 1860, 197, 198, 198, 199, 1835, 1835, 1093, 1275, 1841, 185, 185, 1830, 1831, 1831, 1830, 1860, 186, 1860, 1753, 1860, 1806, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1835, 1093, 1275, 891, 892, 892, 893, 1860, 1860, 1595, 1860, 1831, 1831, 1831, 1831, 1860, 1860, 1860, 1596, 1860, 1806, 1848, 1750, 1750, 1848, 779, 1860, 779, 1860, 1830, 1831, 1831, 1832, 1595, 1860, 1860, 1276, 1595, 1803, 997, 1860, 1596, 1839, 1840, 1840, 1839, 1596, 1860, 1860, 779, 1860, 779, 1860, 1450, 1860, 1816, 1860, 1860, 1860, 1276, 1860, 1595, 997, 1194, 1195, 1195, 1194, 1860, 1860, 1596, 1849, 197, 198, 198, 199, 1860, 780, 1450, 1816, 1860, 1840, 1840, 1840, 1840, 1860, 1860, 1860, 186, 1860, 990, 1788, 1789, 1789, 1790, 1849, 1280, 1860, 1860, 991, 185, 185, 1860, 1815, 1860, 1860, 1815, 186, 1860, 1808, 1860, 1860, 1860, 1860, 990, 1691, 1860, 1860, 1860, 1280, 1860, 1860, 991, 1195, 1195, 1195, 1195, 1860, 1850, 1860, 1860, 1860, 1860, 1808, 1860, 1860, 780, 1816, 1691, 1860, 1856, 1860, 1860, 1788, 1789, 1789, 1790, 1860, 1860, 990, 1860, 1850, 185, 185, 1860, 1280, 1860, 1860, 991, 186, 1816, 1860, 1860, 1856, 1815, 1860, 1860, 1815, 1860, 1860, 1860, 1860, 1860, 990, 1860, 1860, 1860, 1860, 1280, 1860, 1860, 991, 1297, 1297, 1297, 1297, 1860, 1298, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 674, 1816, 1299, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1857, 1779, 1779, 1857, 1860, 1860, 1860, 1816, 1860, 1860, 1301, 674, 283, 1218, 1219, 1218, 1218, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1849, 283, 1128, 283, 283, 1860, 1816, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1849, 1860, 1860, 283, 1860, 1816, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 283, 1218, 1219, 1218, 1218, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1860, 283, 1128, 283, 283, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 283, 1305, 1306, 1305, 1305, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 1860, 283, 1128, 283, 283, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 1042, 1043, 1042, 1042, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 585, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 586, 1860, 1860, 1860, 1860, 1860, 1044, 1860, 1860, 587, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 586, 1860, 1860, 1860, 1860, 1044, 1860, 1860, 587, 1325, 1326, 1325, 1325, 1860, 1860, 1860, 1860, 1860, 1327, 1860, 1860, 1860, 585, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 586, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 728, 587, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 586, 1860, 1860, 1860, 1860, 1860, 1860, 728, 587, 1269, 1270, 1269, 1269, 1860, 1860, 1088, 1860, 1860, 1860, 1860, 1088, 1860, 1271, 1860, 1860, 1860, 841, 1860, 1088, 1860, 1860, 1860, 1860, 1860, 1860, 1272, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1273, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1272, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1273, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1188, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1188, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1189, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1189, 1093, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1353, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1353, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1354, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1354, 569, 1357, 1358, 1358, 1359, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 891, 892, 892, 893, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 779, 1860, 779, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1366, 1860, 1860, 997, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 779, 1860, 779, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1366, 1860, 1860, 997, 1297, 1297, 1297, 1297, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 1299, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 673, 1377, 1377, 1377, 1377, 1860, 1378, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 674, 1860, 1379, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1381, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1382, 1860, 1860, 1860, 1860, 1860, 1860, 541, 674, 1860, 1860, 1860, 1860, 1860, 1381, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1382, 1385, 1385, 1385, 1385, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1387, 1387, 1387, 1860, 1387, 1860, 1299, 1387, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1387, 1385, 1385, 1385, 1385, 1860, 1386, 1860, 1860, 1860, 1860, 1860, 1387, 1387, 1387, 174, 1388, 1860, 1299, 1387, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1388, 1390, 1860, 1860, 1390, 1390, 1860, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1392, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 283, 1305, 1306, 1305, 1305, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 1860, 283, 1128, 283, 283, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 283, 1396, 1396, 1396, 1396, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1398, 1398, 1398, 1860, 1398, 1860, 1312, 1398, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1398, 1396, 1396, 1396, 1396, 1860, 1397, 1860, 1860, 1860, 1860, 1860, 1398, 1398, 1398, 174, 1399, 1860, 1312, 1398, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1399, 1403, 1403, 1403, 1403, 1860, 1404, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 174, 702, 1860, 1405, 701, 1860, 1860, 1860, 1860, 1860, 1860, 1407, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1408, 1860, 1860, 1860, 1860, 1860, 1860, 563, 702, 1860, 1860, 1860, 1860, 1860, 1407, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1408, 700, 700, 700, 700, 1860, 701, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 174, 1860, 1860, 559, 701, 1860, 1860, 1860, 1860, 1860, 1409, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1409, 346, 1860, 1860, 346, 346, 1860, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1860, 1860, 1860, 1410, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 348, 346, 1860, 1860, 1860, 1410, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 346, 1320, 1144, 1144, 1321, 346, 1860, 346, 346, 346, 1322, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 348, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 346, 1411, 1324, 1324, 1411, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1412, 1860, 1860, 1860, 1860, 1860, 1860, 167, 167, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1412, 1860, 1860, 1860, 1860, 1860, 1860, 167, 353, 354, 354, 355, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 210, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1414, 211, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 210, 1860, 1860, 1860, 1860, 1860, 1860, 1414, 211, 1053, 1054, 1054, 1055, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 957, 1860, 1426, 1860, 1860, 1860, 1860, 1860, 1860, 958, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 957, 1860, 1426, 1860, 1860, 1860, 1860, 1860, 958, 1338, 1339, 1339, 1338, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1159, 1860, 1860, 1860, 1860, 1860, 1427, 1860, 1860, 1160, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1159, 1860, 1860, 1860, 1860, 1427, 1860, 1860, 1160, 1338, 1339, 1339, 1340, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 957, 1860, 1860, 1860, 1860, 1860, 1341, 1860, 1860, 958, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 957, 1860, 1860, 1860, 1860, 1341, 1860, 1860, 958, 1434, 1435, 1435, 1436, 1860, 214, 1860, 1860, 1860, 185, 185, 214, 214, 214, 202, 1860, 216, 1860, 214, 212, 198, 198, 213, 1860, 214, 1860, 1860, 1860, 185, 185, 214, 214, 214, 202, 1860, 216, 1860, 214, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1437, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1437, 1441, 1324, 1324, 1441, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 225, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 223, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1443, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1443, 1444, 1445, 1444, 1444, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1446, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1446, 1860, 1860, 1093, 569, 891, 892, 892, 893, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1447, 1860, 890, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1447, 1860, 890, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 891, 892, 892, 893, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 890, 1448, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 890, 1448, 1860, 1860, 1860, 1860, 1860, 569, 569, 1357, 1358, 1358, 1449, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1451, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1452, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1451, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1452, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1453, 1358, 1358, 1454, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1451, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1452, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1451, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1452, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1357, 1358, 1358, 1359, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1455, 1456, 1456, 1457, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1377, 1377, 1377, 1377, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 1379, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1474, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1475, 1860, 1860, 1860, 1860, 1860, 1860, 541, 673, 1860, 1860, 1860, 1860, 1860, 1474, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1475, 672, 672, 672, 672, 1860, 673, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 1860, 1860, 537, 673, 672, 672, 672, 672, 1860, 673, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 1860, 1860, 537, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 675, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 675, 1377, 1377, 1377, 1377, 1860, 1378, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 674, 1860, 1379, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1381, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1382, 1860, 1860, 1860, 1860, 1860, 1860, 541, 674, 1860, 1860, 1860, 1860, 1860, 1381, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1382, 1385, 1385, 1385, 1385, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1387, 1387, 1387, 1860, 1387, 1860, 1299, 1387, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1387, 1385, 1385, 1385, 1385, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1387, 1387, 1387, 1860, 1387, 1860, 1299, 1387, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1387, 1385, 1385, 1385, 1385, 1860, 1386, 1860, 1860, 1860, 1860, 1860, 1387, 1387, 1387, 174, 1388, 1860, 1299, 1387, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1388, 1385, 1385, 1385, 1385, 1860, 1386, 1860, 1860, 1860, 1860, 1860, 1387, 1387, 1387, 174, 1388, 1860, 1299, 1387, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1388, 1390, 1860, 1860, 1390, 1390, 1860, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1392, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1390, 1860, 1860, 1390, 1390, 1860, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1392, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1482, 1396, 1396, 1482, 1390, 1311, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1483, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1485, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1396, 1396, 1396, 1396, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1398, 1398, 1398, 1860, 1398, 1860, 1312, 1398, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1398, 1396, 1396, 1396, 1396, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1398, 1398, 1398, 1860, 1398, 1860, 1312, 1398, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1398, 1396, 1396, 1396, 1396, 1860, 1397, 1860, 1860, 1860, 1860, 1860, 1398, 1398, 1398, 174, 1399, 1860, 1312, 1398, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1399, 1396, 1396, 1396, 1396, 1860, 1397, 1860, 1860, 1860, 1860, 1860, 1398, 1398, 1398, 174, 1399, 1860, 1312, 1398, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1301, 1399, 1403, 1403, 1403, 1403, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 1405, 701, 1860, 1860, 1860, 1860, 1860, 1860, 1488, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1489, 1860, 1860, 1860, 1860, 1860, 1860, 563, 701, 1860, 1860, 1860, 1860, 1860, 1488, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1489, 700, 700, 700, 700, 1860, 701, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 174, 1860, 1860, 559, 701, 700, 700, 700, 700, 1860, 701, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 174, 1860, 1860, 559, 701, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 703, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 703, 1403, 1403, 1403, 1403, 1860, 1404, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 174, 702, 1860, 1405, 701, 1860, 1860, 1860, 1860, 1860, 1860, 1407, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1408, 1860, 1860, 1860, 1860, 1860, 1860, 563, 702, 1860, 1860, 1860, 1860, 1860, 1407, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1408, 1491, 1324, 1324, 1491, 346, 1860, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 348, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 346, 1411, 1324, 1324, 1411, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1412, 1860, 1860, 1860, 1860, 1860, 1860, 167, 167, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1412, 1860, 1860, 1860, 1860, 1860, 1860, 167, 167, 1860, 1860, 167, 167, 168, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 460, 1860, 1860, 1860, 1860, 1860, 167, 167, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 460, 1860, 1860, 1860, 1860, 1860, 167, 353, 354, 354, 355, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 210, 1860, 1860, 1860, 1860, 1860, 1860, 1492, 1860, 211, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 210, 1860, 1860, 1860, 1860, 1860, 1492, 1860, 211, 1053, 1054, 1054, 1055, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1504, 1860, 1860, 1860, 957, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 958, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1504, 1860, 1860, 1860, 957, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 958, 353, 354, 354, 355, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 210, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 360, 211, 470, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 210, 1860, 1860, 1860, 1860, 1860, 1860, 360, 211, 470, 1510, 1511, 1511, 1512, 1860, 214, 1860, 1860, 1860, 185, 185, 214, 214, 214, 202, 1860, 216, 1860, 214, 1519, 1324, 1324, 1519, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1520, 1860, 1860, 1860, 1860, 1860, 1860, 225, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1520, 1860, 1860, 1860, 1860, 1860, 1860, 223, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1522, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1522, 1860, 1860, 1860, 1860, 1860, 1093, 1444, 1445, 1444, 1444, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1446, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1446, 1860, 1860, 1093, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1523, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1523, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 569, 891, 892, 892, 893, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 890, 1860, 1860, 1524, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 890, 1860, 1860, 1524, 1860, 1860, 1860, 569, 569, 891, 892, 892, 893, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1525, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 890, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1525, 1860, 1860, 1860, 1860, 1860, 783, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 890, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1357, 1358, 1358, 1449, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1451, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1452, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1451, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1452, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1526, 1527, 1527, 1528, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 569, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1529, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1530, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1529, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1530, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1455, 1456, 1456, 1457, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1455, 1456, 1456, 1457, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1535, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1535, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1377, 1377, 1377, 1377, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 1379, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1474, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1475, 1860, 1860, 1860, 1860, 1860, 1860, 541, 673, 1860, 1860, 1860, 1860, 1860, 1474, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1475, 672, 672, 672, 672, 1860, 673, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 1860, 1860, 537, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1550, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1550, 672, 672, 672, 672, 1860, 673, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 1860, 1860, 537, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 676, 1860, 1551, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 676, 1860, 1551, 1482, 1396, 1396, 1482, 1390, 1860, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1483, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1392, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1390, 1860, 1860, 1390, 1390, 1860, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1392, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1482, 1396, 1396, 1482, 1390, 1397, 1390, 1390, 1390, 1390, 1390, 1552, 1552, 1552, 1390, 1552, 1390, 1483, 1552, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1485, 1552, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1482, 1396, 1396, 1482, 1390, 1311, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1483, 1390, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1485, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1403, 1403, 1403, 1403, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 1405, 701, 1860, 1860, 1860, 1860, 1860, 1860, 1488, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1489, 1860, 1860, 1860, 1860, 1860, 1860, 563, 701, 1860, 1860, 1860, 1860, 1860, 1488, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1489, 1555, 1324, 1324, 1555, 346, 1860, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1556, 1860, 1860, 1860, 1860, 1860, 1860, 348, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1556, 1860, 1860, 1860, 1860, 1860, 1860, 346, 1338, 1339, 1339, 1340, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 207, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 957, 1860, 1860, 1860, 1860, 1860, 1341, 1860, 1860, 958, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 957, 1860, 1860, 1860, 1860, 1341, 1860, 1860, 958, 1573, 1860, 1860, 1573, 1573, 1860, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1575, 1573, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1573, 1515, 1516, 1516, 1517, 1860, 1860, 1860, 1860, 1860, 185, 185, 1860, 1860, 1860, 185, 1860, 186, 1514, 1860, 1860, 1860, 1588, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1586, 1860, 1860, 1588, 1519, 1324, 1324, 1519, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1520, 1860, 1860, 1860, 1860, 1860, 1860, 225, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1520, 1860, 1860, 1860, 1860, 1860, 1860, 223, 223, 1860, 1860, 223, 223, 1860, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 607, 1860, 1860, 1860, 1860, 1860, 225, 223, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 607, 1860, 1860, 1860, 1860, 1860, 223, 1089, 1090, 1089, 1089, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1590, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1590, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 569, 1526, 1527, 1527, 1528, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 569, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1529, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1530, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1529, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1530, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1526, 1527, 1527, 1528, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 569, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1597, 1860, 1529, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1530, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1597, 1860, 1529, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1530, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1455, 1456, 1456, 1457, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1603, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1603, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1860, 1860, 1860, 1860, 569, 569, 1455, 1456, 1456, 1457, 569, 569, 569, 569, 569, 1860, 1860, 569, 569, 780, 1860, 1860, 569, 1860, 569, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1604, 1860, 1860, 1860, 569, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1361, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1362, 1860, 1860, 1604, 1860, 1860, 1860, 569, 672, 672, 672, 672, 1860, 673, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 1860, 1860, 537, 673, 1860, 1860, 1860, 1611, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1611, 672, 672, 672, 672, 1860, 673, 1860, 1860, 1860, 1860, 1860, 673, 673, 673, 174, 1860, 1860, 537, 673, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1612, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1612, 1482, 1396, 1396, 1482, 1390, 1397, 1390, 1390, 1390, 1390, 1390, 1552, 1552, 1552, 1390, 1552, 1390, 1483, 1552, 1390, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1485, 1552, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1390, 1555, 1324, 1324, 1555, 346, 1860, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1556, 1860, 1860, 1860, 1860, 1860, 1860, 348, 346, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1556, 1860, 1860, 1860, 1860, 1860, 1860, 346, 1618, 1619, 1619, 1620, 1860, 1860, 1860, 1860, 1860, 1621, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1155, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1242, 1156, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1155, 1860, 1860, 1860, 1860, 1860, 1860, 1242, 1156, 1573, 1860, 1860, 1573, 1573, 1860, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1575, 1573, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1573, 1576, 1577, 1577, 1578, 1860, 1860, 1860, 1860, 1860, 185, 185, 1860, 1860, 1860, 1860, 1860, 186, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1630, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1580, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1630, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1580, 1634, 1860, 1860, 1634, 1634, 1860, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1636, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1634, 1645, 1860, 1860, 1645, 1645, 1860, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1647, 1645, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1645, 1444, 1445, 1444, 1444, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1446, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1446, 1860, 1860, 1093, 1654, 1655, 1654, 1654, 1860, 1860, 1860, 1860, 1860, 1656, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1189, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1189, 1093, 1634, 1860, 1860, 1634, 1634, 1860, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1636, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1634, 1637, 1638, 1638, 1639, 1860, 1860, 1860, 1860, 1860, 185, 185, 1860, 1860, 1860, 1860, 1860, 186, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1696, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1641, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1696, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1641, 1645, 1860, 1860, 1645, 1645, 1860, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1647, 1645, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1645, 1654, 1655, 1654, 1654, 1860, 1860, 1860, 1860, 1860, 1656, 1860, 1860, 1860, 1091, 1860, 1860, 1860, 582, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1092, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1093, 1667, 1668, 1668, 1667, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 780, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1533, 1860, 1860, 1860, 1860, 1860, 1715, 1860, 1860, 1534, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1533, 1860, 1860, 1860, 1860, 1715, 1860, 1860, 1534, 1668, 1668, 1668, 1668, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 780, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1533, 1860, 1860, 1860, 1860, 1860, 1715, 1860, 1860, 1534, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1533, 1860, 1860, 1860, 1860, 1715, 1860, 1860, 1534, 1726, 1727, 1727, 1728, 1860, 1860, 1860, 1860, 1860, 185, 185, 1860, 1860, 1860, 185, 1860, 186, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1759, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1753, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1759, 1782, 1860, 1860, 1782, 1782, 1860, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1784, 1782, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1782, 1754, 1750, 1750, 1754, 1634, 1860, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1785, 1634, 1634, 1634, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1787, 1785, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1634, 1782, 1860, 1860, 1782, 1782, 1860, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1784, 1782, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1782, 1811, 1779, 1779, 1811, 1634, 1860, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1812, 1812, 1634, 1634, 1634, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1636, 1812, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1634, 1811, 1779, 1779, 1811, 1634, 1860, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1812, 1812, 1634, 1634, 1634, 1634, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1636, 1812, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1634, 1814, 1631, 1631, 1814, 1815, 1860, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1817, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1818, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1817, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1815, 1824, 1860, 1860, 1824, 1824, 1860, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1826, 1824, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1824, 1814, 1631, 1631, 1814, 1815, 1860, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1817, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1818, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1817, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1815, 1820, 1821, 1821, 1822, 1860, 1860, 1860, 1860, 1860, 185, 185, 1860, 1860, 1860, 185, 1860, 186, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1842, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1753, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1842, 1824, 1860, 1860, 1824, 1824, 1860, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1826, 1824, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1824, 1848, 1750, 1750, 1848, 1815, 1860, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1853, 1815, 1815, 1815, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1855, 1853, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1815, 1857, 1779, 1779, 1857, 1815, 1860, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1858, 1858, 1815, 1815, 1815, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1818, 1858, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1815, 1857, 1779, 1779, 1857, 1815, 1860, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1815, 1858, 1858, 1815, 1815, 1815, 1815, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1818, 1858, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1815, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 169, 1860, 1860, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 174, 176, 1860, 1860, 176, 176, 1860, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 187, 187, 187, 187, 1860, 187, 1860, 187, 1860, 1860, 187, 187, 187, 187, 1860, 1860, 1860, 187, 187, 187, 187, 196, 1860, 1860, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 185, 185, 185, 185, 1860, 1860, 1860, 185, 1860, 1860, 1860, 185, 185, 185, 1860, 1860, 1860, 185, 185, 1860, 185, 202, 202, 202, 202, 1860, 1860, 202, 202, 1860, 1860, 1860, 202, 202, 202, 1860, 1860, 1860, 202, 202, 1860, 202, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 224, 1860, 1860, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 268, 268, 268, 268, 1860, 1860, 268, 1860, 1860, 1860, 1860, 268, 268, 1860, 1860, 1860, 1860, 268, 268, 1860, 268, 270, 1860, 1860, 270, 270, 1860, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 294, 294, 294, 294, 1860, 1860, 1860, 1860, 1860, 1860, 294, 1860, 1860, 1860, 1860, 1860, 1860, 294, 294, 1860, 294, 296, 296, 1860, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 1860, 296, 296, 296, 296, 296, 296, 296, 308, 1860, 1860, 1860, 1860, 308, 308, 1860, 1860, 1860, 1860, 308, 308, 1860, 308, 310, 1860, 1860, 310, 310, 1860, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 315, 1860, 1860, 1860, 1860, 315, 315, 1860, 1860, 1860, 1860, 315, 315, 1860, 315, 317, 1860, 1860, 317, 317, 1860, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 326, 1860, 1860, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 328, 1860, 1860, 328, 328, 328, 328, 328, 1860, 1860, 328, 1860, 328, 328, 1860, 328, 330, 1860, 1860, 330, 330, 1860, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 334, 334, 1860, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 336, 1860, 336, 336, 1860, 1860, 1860, 1860, 336, 1860, 1860, 336, 214, 1860, 1860, 214, 1860, 214, 1860, 1860, 214, 214, 214, 1860, 214, 214, 1860, 214, 1860, 214, 214, 1860, 214, 185, 185, 185, 185, 1860, 1860, 1860, 185, 1860, 1860, 1860, 185, 185, 185, 1860, 1860, 1860, 185, 185, 1860, 185, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 342, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 1860, 342, 347, 1860, 1860, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 196, 1860, 1860, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 202, 202, 202, 202, 1860, 1860, 1860, 202, 1860, 1860, 1860, 202, 202, 202, 1860, 1860, 1860, 202, 202, 1860, 202, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 224, 1860, 1860, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 268, 268, 268, 268, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 268, 268, 1860, 1860, 1860, 1860, 268, 268, 1860, 268, 270, 1860, 1860, 270, 270, 1860, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 294, 294, 294, 294, 1860, 1860, 1860, 1860, 1860, 1860, 294, 1860, 1860, 1860, 1860, 1860, 1860, 294, 294, 1860, 294, 295, 295, 1860, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 1860, 295, 295, 295, 295, 295, 295, 295, 296, 296, 1860, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 1860, 296, 296, 296, 296, 296, 296, 296, 308, 308, 1860, 1860, 1860, 1860, 308, 308, 1860, 308, 310, 1860, 1860, 310, 310, 1860, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 315, 315, 1860, 1860, 1860, 1860, 315, 315, 1860, 315, 317, 1860, 1860, 317, 317, 1860, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 327, 1860, 1860, 327, 327, 327, 1860, 327, 1860, 1860, 327, 1860, 327, 327, 1860, 327, 326, 1860, 1860, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 328, 1860, 1860, 328, 328, 328, 328, 328, 1860, 1860, 328, 1860, 328, 328, 1860, 328, 330, 1860, 1860, 330, 330, 1860, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 446, 446, 1860, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 336, 1860, 1860, 336, 1860, 336, 336, 1860, 1860, 1860, 1860, 336, 1860, 1860, 336, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 342, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 1860, 342, 347, 1860, 1860, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 202, 202, 202, 202, 1860, 1860, 1860, 202, 1860, 1860, 1860, 202, 202, 202, 1860, 1860, 1860, 202, 202, 1860, 202, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 463, 463, 463, 463, 463, 463, 463, 1860, 463, 1860, 463, 463, 463, 463, 463, 463, 463, 1860, 463, 463, 463, 463, 463, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 224, 1860, 1860, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 527, 527, 1860, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 268, 268, 268, 268, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 268, 268, 1860, 1860, 1860, 1860, 268, 268, 1860, 268, 270, 270, 270, 270, 270, 1860, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 538, 538, 538, 538, 1860, 538, 1860, 1860, 1860, 1860, 1860, 538, 538, 1860, 538, 1860, 1860, 538, 538, 538, 538, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 295, 295, 1860, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 1860, 295, 295, 295, 295, 295, 295, 295, 296, 296, 1860, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 1860, 296, 296, 296, 296, 296, 296, 296, 560, 560, 560, 560, 1860, 560, 1860, 1860, 1860, 1860, 1860, 560, 560, 1860, 560, 1860, 1860, 560, 560, 560, 560, 308, 308, 1860, 1860, 1860, 1860, 308, 308, 1860, 308, 315, 315, 1860, 1860, 1860, 1860, 315, 315, 1860, 315, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 328, 1860, 328, 1860, 1860, 328, 328, 328, 328, 328, 1860, 1860, 328, 1860, 328, 328, 1860, 328, 566, 566, 1860, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 447, 447, 1860, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 1860, 569, 569, 569, 569, 569, 569, 569, 347, 1860, 1860, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 1860, 1860, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 185, 185, 185, 185, 1860, 1860, 1860, 185, 1860, 1860, 1860, 185, 185, 185, 1860, 1860, 1860, 185, 185, 1860, 185, 224, 224, 224, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 1860, 639, 639, 639, 639, 639, 639, 639, 660, 660, 1860, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 528, 528, 1860, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 536, 536, 536, 536, 1860, 536, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 536, 1860, 1860, 536, 536, 536, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 679, 1860, 1860, 679, 679, 1860, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 174, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 174, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 684, 684, 1860, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 295, 295, 1860, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 1860, 295, 295, 295, 295, 295, 295, 295, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 1860, 694, 694, 694, 694, 694, 694, 694, 558, 558, 558, 558, 1860, 558, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 558, 1860, 1860, 558, 558, 558, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 702, 702, 702, 702, 1860, 702, 1860, 1860, 702, 702, 702, 702, 702, 1860, 702, 702, 1860, 702, 702, 1860, 702, 706, 1860, 1860, 706, 706, 1860, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 708, 708, 1860, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 342, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 1860, 342, 347, 347, 347, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 1860, 1860, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 185, 185, 185, 185, 1860, 1860, 1860, 185, 1860, 1860, 1860, 185, 185, 185, 1860, 1860, 1860, 185, 185, 1860, 185, 224, 1860, 1860, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 1860, 639, 639, 639, 639, 639, 639, 639, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 1860, 779, 779, 779, 779, 779, 779, 779, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 661, 661, 1860, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 536, 536, 536, 536, 1860, 536, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 536, 1860, 1860, 536, 536, 536, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 679, 1860, 1860, 679, 679, 1860, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 174, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 174, 684, 684, 1860, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 1860, 694, 694, 694, 694, 694, 694, 694, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 702, 702, 702, 702, 1860, 702, 1860, 1860, 702, 702, 702, 702, 702, 1860, 702, 702, 1860, 702, 702, 1860, 702, 706, 1860, 1860, 706, 706, 1860, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 708, 708, 1860, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 342, 342, 342, 342, 342, 1860, 342, 1860, 342, 342, 1860, 342, 347, 1860, 1860, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 1860, 1860, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 185, 185, 185, 185, 1860, 1860, 1860, 185, 1860, 1860, 1860, 185, 185, 185, 1860, 1860, 1860, 185, 185, 1860, 185, 224, 1860, 1860, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 1860, 779, 779, 779, 779, 779, 779, 779, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 1860, 569, 569, 569, 569, 569, 569, 569, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 1860, 639, 639, 639, 639, 639, 639, 639, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 679, 679, 679, 679, 679, 1860, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 174, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 174, 684, 684, 1860, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 702, 702, 702, 702, 1860, 702, 1860, 1860, 702, 702, 702, 702, 702, 1860, 702, 702, 1860, 702, 702, 1860, 702, 706, 706, 706, 706, 706, 1860, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 708, 708, 1860, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 347, 1860, 1860, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 1860, 1860, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 841, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 956, 956, 956, 956, 1860, 1860, 1860, 956, 1860, 1860, 956, 956, 956, 1860, 1860, 1860, 1860, 956, 956, 1860, 956, 224, 1860, 1860, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 1860, 779, 779, 779, 779, 779, 779, 779, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 1860, 569, 569, 569, 569, 569, 569, 569, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 283, 283, 1860, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 288, 288, 1860, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 702, 702, 702, 702, 1860, 702, 1860, 1860, 702, 702, 702, 702, 702, 1860, 702, 702, 1860, 702, 702, 1860, 702, 1048, 1048, 1048, 1048, 1860, 1860, 1860, 1048, 1860, 1860, 1048, 1048, 1048, 1860, 1860, 1860, 1860, 1048, 1048, 1860, 1048, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1300, 1300, 1300, 1300, 1860, 1300, 1860, 1860, 1300, 1300, 1300, 1300, 1300, 1860, 1300, 1300, 1860, 1300, 1300, 1300, 1300, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1304, 1304, 1304, 1304, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1304, 1860, 1304, 1860, 1860, 1304, 1304, 1860, 1304, 1313, 1313, 1313, 1313, 1860, 1313, 1860, 1860, 1860, 1860, 1860, 1313, 1313, 1860, 1313, 1860, 1860, 1313, 1313, 1313, 1313, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1860, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1298, 1298, 1298, 1298, 1860, 1298, 1860, 1860, 1298, 1298, 1298, 1860, 1298, 1860, 1298, 1298, 1860, 1298, 1298, 1298, 1298, 1380, 1380, 1380, 1380, 1860, 1380, 1860, 1860, 1380, 1380, 1380, 1380, 1380, 1860, 1380, 1380, 1860, 1380, 1380, 1380, 1380, 1311, 1311, 1311, 1311, 1860, 1311, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1311, 1860, 1860, 1311, 1311, 1311, 1386, 1386, 1386, 1386, 1860, 1386, 1860, 1860, 1386, 1386, 1386, 1860, 1386, 1860, 1386, 1386, 1860, 1386, 1386, 1386, 1386, 1389, 1389, 1389, 1389, 1860, 1389, 1860, 1860, 1389, 1389, 1389, 1389, 1389, 1860, 1389, 1389, 1860, 1389, 1389, 1389, 1389, 1391, 1860, 1860, 1391, 1391, 1860, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1304, 1304, 1304, 1304, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1304, 1860, 1304, 1860, 1860, 1304, 1304, 1860, 1304, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 174, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 174, 1397, 1397, 1397, 1397, 1860, 1397, 1860, 1860, 1397, 1397, 1397, 1860, 1397, 1860, 1397, 1397, 1860, 1397, 1397, 1397, 1397, 1400, 1400, 1400, 1400, 1860, 1400, 1860, 1860, 1400, 1400, 1400, 1400, 1400, 1860, 1400, 1400, 1860, 1400, 1400, 1400, 1400, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 1406, 1406, 1406, 1406, 1860, 1406, 1860, 1860, 1406, 1406, 1406, 1406, 1406, 1860, 1406, 1406, 1860, 1406, 1406, 1406, 1406, 702, 702, 702, 702, 1860, 702, 1860, 1860, 702, 702, 702, 702, 702, 1860, 702, 702, 1860, 702, 702, 1860, 702, 347, 1860, 1860, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 1048, 1048, 1048, 1048, 1860, 1860, 1860, 1048, 1860, 1860, 1860, 1048, 1048, 1860, 1860, 1860, 1860, 1048, 1048, 1860, 1048, 956, 956, 956, 956, 1860, 1860, 1860, 956, 1860, 1860, 956, 956, 956, 1860, 1860, 1860, 1860, 956, 956, 1860, 956, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 224, 224, 224, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 1860, 569, 569, 569, 569, 569, 569, 569, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 1860, 779, 779, 779, 779, 779, 779, 779, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1860, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1860, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1378, 1378, 1378, 1378, 1860, 1378, 1860, 1860, 1378, 1378, 1378, 1860, 1378, 1860, 1378, 1378, 1860, 1378, 1378, 1378, 1378, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 536, 536, 536, 536, 1860, 536, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 536, 1860, 1860, 536, 536, 536, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 1380, 1380, 1380, 1380, 1860, 1380, 1860, 1860, 1380, 1380, 1380, 1380, 1380, 1860, 1380, 1380, 1860, 1380, 1380, 1380, 1380, 1386, 1386, 1386, 1386, 1860, 1386, 1860, 1860, 1386, 1386, 1386, 1860, 1386, 1860, 1386, 1386, 1860, 1386, 1386, 1386, 1386, 1389, 1389, 1389, 1389, 1860, 1389, 1860, 1860, 1389, 1389, 1389, 1389, 1389, 1860, 1389, 1389, 1860, 1389, 1389, 1389, 1389, 1391, 1860, 1860, 1391, 1391, 1860, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 174, 174, 1860, 1860, 1860, 1860, 174, 174, 1860, 174, 1397, 1397, 1397, 1397, 1860, 1397, 1860, 1860, 1397, 1397, 1397, 1860, 1397, 1860, 1397, 1397, 1860, 1397, 1397, 1397, 1397, 1400, 1400, 1400, 1400, 1860, 1400, 1860, 1860, 1400, 1400, 1400, 1400, 1400, 1860, 1400, 1400, 1860, 1400, 1400, 1400, 1400, 1404, 1404, 1404, 1404, 1860, 1404, 1860, 1860, 1404, 1404, 1404, 1860, 1404, 1860, 1404, 1404, 1860, 1404, 1404, 1404, 1404, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 558, 558, 558, 558, 1860, 558, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 558, 1860, 1860, 558, 558, 558, 702, 702, 702, 702, 1860, 702, 1860, 1860, 702, 702, 702, 702, 702, 1860, 702, 702, 1860, 702, 702, 1860, 702, 1406, 1406, 1406, 1406, 1860, 1406, 1860, 1860, 1406, 1406, 1406, 1406, 1406, 1860, 1406, 1406, 1860, 1406, 1406, 1406, 1406, 347, 347, 347, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 206, 206, 206, 206, 1860, 1860, 1860, 206, 1860, 1860, 206, 206, 206, 1860, 1860, 1860, 1860, 206, 206, 1860, 206, 1048, 1048, 1048, 1048, 1860, 1860, 1860, 1048, 1860, 1860, 1860, 1048, 1048, 1860, 1860, 1860, 1860, 1048, 1048, 1860, 1048, 956, 956, 956, 956, 1860, 1860, 1860, 956, 1860, 1860, 956, 956, 956, 1860, 1860, 1860, 1860, 956, 956, 1860, 956, 1507, 1507, 1507, 1507, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1507, 1507, 1860, 1860, 1860, 1507, 1507, 1507, 1507, 1509, 1509, 1509, 1509, 1860, 1860, 1860, 1509, 1860, 1860, 1860, 1509, 1509, 1509, 1860, 1860, 1860, 1509, 1509, 1509, 1509, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 215, 215, 215, 215, 215, 1860, 215, 1860, 215, 215, 1860, 215, 185, 185, 185, 185, 1860, 1860, 1860, 185, 1860, 1860, 1860, 185, 185, 185, 185, 1860, 1860, 185, 185, 1860, 185, 224, 224, 224, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 1860, 569, 569, 569, 569, 569, 569, 569, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 779, 1860, 779, 779, 779, 779, 779, 779, 779, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1860, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1860, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 1378, 1378, 1378, 1378, 1860, 1378, 1860, 1860, 1378, 1378, 1378, 1860, 1378, 1860, 1378, 1378, 1860, 1378, 1378, 1378, 1378, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 1391, 1391, 1391, 1391, 1391, 1860, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1553, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 701, 701, 701, 701, 1860, 701, 1860, 1860, 701, 701, 701, 1860, 701, 1860, 701, 701, 1860, 701, 701, 1860, 701, 1404, 1404, 1404, 1404, 1860, 1404, 1860, 1860, 1404, 1404, 1404, 1860, 1404, 1860, 1404, 1404, 1860, 1404, 1404, 1404, 1404, 347, 347, 347, 347, 347, 1860, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 1571, 1571, 1571, 1571, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1571, 1571, 1860, 1860, 1860, 1860, 1571, 1571, 1860, 1571, 1574, 1860, 1860, 1574, 1574, 1860, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1574, 1579, 1579, 1579, 1579, 1860, 1860, 1860, 1579, 1860, 1860, 1860, 1579, 1579, 1579, 1860, 1860, 1860, 1579, 1579, 1860, 1579, 1581, 1581, 1581, 1581, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1581, 1581, 1860, 1860, 1860, 1581, 1581, 1581, 1581, 1583, 1583, 1583, 1583, 1860, 1860, 1860, 1583, 1860, 1860, 1860, 1583, 1583, 1583, 1860, 1860, 1860, 1583, 1583, 1583, 1583, 1584, 1584, 1584, 1584, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1584, 1860, 1584, 1860, 1860, 1584, 1584, 1584, 1584, 1587, 1587, 1587, 1587, 1860, 1860, 1860, 1587, 1860, 1860, 1860, 1587, 1587, 1587, 1587, 1860, 1860, 1587, 1587, 1587, 1587, 224, 224, 224, 224, 224, 1860, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1860, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1860, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 673, 673, 673, 673, 1860, 673, 1860, 1860, 673, 673, 673, 1860, 673, 1860, 673, 673, 1860, 673, 673, 1860, 673, 674, 674, 674, 674, 1860, 674, 1860, 1860, 674, 674, 674, 674, 674, 1860, 674, 674, 1860, 674, 674, 1860, 674, 1632, 1632, 1632, 1632, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1632, 1632, 1860, 1860, 1860, 1860, 1632, 1632, 1860, 1632, 1635, 1860, 1860, 1635, 1635, 1860, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1635, 1640, 1640, 1640, 1640, 1860, 1860, 1860, 1640, 1860, 1860, 1860, 1640, 1640, 1640, 1860, 1860, 1860, 1640, 1640, 1860, 1640, 1643, 1643, 1643, 1643, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1643, 1643, 1860, 1643, 1860, 1860, 1643, 1643, 1860, 1643, 1646, 1860, 1860, 1646, 1646, 1860, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1646, 1651, 1651, 1651, 1651, 1860, 1860, 1860, 1651, 1860, 1860, 1860, 1651, 1651, 1651, 1651, 1860, 1860, 1651, 1651, 1860, 1651, 1751, 1751, 1751, 1751, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1751, 1860, 1860, 1860, 1860, 1751, 1751, 1751, 1751, 1758, 1758, 1758, 1758, 1860, 1860, 1860, 1758, 1860, 1860, 1860, 1758, 1758, 1758, 1860, 1860, 1860, 1758, 1758, 1758, 1758, 1780, 1780, 1780, 1780, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1780, 1780, 1860, 1860, 1860, 1860, 1780, 1780, 1860, 1780, 1783, 1860, 1860, 1783, 1783, 1860, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1783, 1786, 1786, 1786, 1786, 1786, 1860, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1791, 1791, 1791, 1791, 1860, 1860, 1860, 1791, 1860, 1860, 1860, 1791, 1791, 1791, 1860, 1860, 1860, 1791, 1791, 1860, 1791, 1793, 1793, 1793, 1793, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1793, 1860, 1793, 1860, 1860, 1793, 1793, 1793, 1793, 1795, 1795, 1795, 1795, 1860, 1860, 1860, 1795, 1860, 1860, 1860, 1795, 1795, 1795, 1795, 1860, 1860, 1795, 1795, 1795, 1795, 1813, 1813, 1813, 1813, 1813, 1860, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1813, 1816, 1816, 1816, 1816, 1816, 1860, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1816, 1823, 1823, 1860, 1860, 1860, 1860, 1823, 1823, 1860, 1823, 1825, 1860, 1860, 1825, 1825, 1860, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1825, 1827, 1827, 1827, 1827, 1860, 1860, 1860, 1827, 1860, 1860, 1860, 1827, 1827, 1827, 1860, 1860, 1860, 1827, 1827, 1860, 1827, 1854, 1854, 1854, 1854, 1854, 1860, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1859, 1859, 1859, 1859, 1859, 1860, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 33, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860 } ; static yyconst flex_int16_t yy_chk[27311] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 35, 35, 35, 36, 36, 36, 36, 57, 71, 253, 40, 70, 35, 55, 56, 66, 36, 10, 40, 40, 10, 1, 37, 37, 37, 37, 829, 46, 46, 46, 46, 57, 71, 253, 70, 37, 55, 56, 66, 44, 46, 796, 10, 46, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 44, 67, 74, 69, 2, 780, 47, 47, 47, 47, 50, 50, 50, 50, 58, 69, 58, 113, 115, 47, 744, 2, 47, 44, 67, 74, 50, 69, 2, 77, 77, 77, 77, 339, 172, 714, 339, 58, 69, 58, 113, 115, 77, 172, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 23, 712, 420, 23, 25, 75, 82, 25, 337, 75, 78, 78, 78, 78, 82, 82, 4, 337, 4, 711, 4, 4, 4, 78, 4, 23, 420, 4, 75, 25, 100, 4, 75, 4, 4, 4, 694, 662, 100, 100, 4, 1071, 4, 128, 4, 4, 4, 1071, 4, 23, 4, 128, 128, 25, 4, 660, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 51, 51, 51, 51, 179, 567, 51, 233, 241, 51, 51, 242, 65, 566, 51, 51, 51, 65, 31, 65, 422, 31, 5, 60, 60, 60, 60, 179, 140, 60, 233, 241, 60, 60, 242, 65, 140, 140, 734, 60, 65, 734, 65, 31, 422, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 31, 68, 73, 73, 231, 6, 565, 68, 146, 219, 219, 553, 68, 231, 73, 150, 146, 146, 43, 43, 43, 43, 6, 150, 150, 68, 73, 73, 231, 6, 68, 43, 552, 219, 219, 68, 231, 73, 89, 89, 89, 89, 545, 43, 89, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 43, 72, 218, 79, 79, 79, 79, 533, 108, 108, 108, 108, 275, 218, 527, 72, 79, 72, 551, 526, 72, 108, 7, 173, 449, 72, 218, 88, 88, 88, 88, 173, 173, 88, 551, 275, 218, 104, 72, 87, 72, 88, 88, 72, 103, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 87, 104, 221, 446, 103, 8, 109, 109, 109, 109, 442, 440, 110, 110, 110, 110, 221, 221, 256, 109, 256, 439, 8, 87, 104, 110, 221, 103, 161, 8, 116, 116, 116, 116, 161, 161, 161, 161, 438, 221, 221, 161, 256, 116, 256, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 117, 117, 117, 117, 11, 252, 252, 184, 192, 193, 184, 192, 193, 117, 118, 118, 118, 118, 85, 85, 85, 85, 11, 184, 192, 193, 1541, 118, 11, 252, 252, 85, 1541, 437, 91, 91, 91, 91, 429, 416, 91, 107, 133, 85, 180, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 85, 91, 107, 133, 12, 12, 415, 180, 258, 258, 123, 123, 123, 123, 124, 124, 124, 124, 114, 114, 114, 114, 12, 123, 91, 107, 133, 124, 12, 12, 180, 114, 258, 258, 265, 265, 265, 265, 195, 195, 195, 195, 336, 114, 145, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 114, 125, 125, 125, 125, 145, 195, 276, 234, 335, 154, 154, 154, 154, 125, 277, 234, 298, 120, 120, 120, 120, 13, 154, 155, 155, 155, 155, 145, 195, 276, 120, 234, 268, 268, 268, 268, 155, 277, 234, 298, 130, 142, 120, 333, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 120, 130, 142, 303, 235, 14, 1082, 320, 235, 1082, 164, 164, 164, 164, 165, 165, 165, 165, 132, 132, 132, 132, 14, 164, 130, 142, 303, 165, 235, 14, 288, 132, 235, 271, 271, 271, 271, 313, 288, 288, 149, 153, 306, 132, 283, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 132, 149, 153, 243, 15, 419, 419, 419, 419, 243, 182, 182, 182, 182, 185, 185, 185, 185, 178, 178, 178, 178, 15, 182, 149, 153, 182, 243, 15, 287, 185, 178, 287, 243, 529, 529, 529, 529, 532, 532, 532, 532, 287, 178, 264, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 178, 189, 230, 214, 16, 16, 214, 191, 191, 191, 191, 189, 230, 189, 197, 197, 197, 197, 312, 214, 191, 225, 16, 191, 225, 189, 230, 693, 16, 16, 197, 307, 263, 207, 189, 230, 189, 225, 174, 307, 307, 312, 170, 693, 166, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 198, 198, 198, 198, 17, 199, 199, 199, 199, 200, 200, 200, 200, 319, 260, 151, 198, 147, 200, 200, 260, 199, 17, 141, 200, 200, 314, 139, 17, 129, 281, 281, 281, 281, 314, 314, 319, 127, 260, 216, 216, 216, 216, 281, 260, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 201, 201, 201, 201, 18, 18, 201, 216, 338, 201, 201, 261, 247, 261, 201, 201, 201, 202, 202, 202, 202, 247, 18, 102, 99, 86, 202, 202, 18, 18, 216, 338, 83, 202, 81, 261, 247, 261, 663, 663, 663, 663, 41, 39, 247, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 212, 212, 212, 212, 213, 213, 213, 213, 220, 222, 257, 33, 345, 345, 257, 1183, 212, 380, 1183, 220, 213, 222, 19, 0, 266, 266, 266, 266, 282, 282, 282, 282, 220, 222, 257, 345, 345, 0, 257, 266, 380, 282, 220, 0, 222, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 229, 238, 239, 244, 250, 20, 0, 229, 251, 249, 322, 239, 374, 322, 229, 239, 250, 374, 238, 244, 249, 251, 20, 322, 229, 238, 239, 244, 250, 20, 229, 0, 251, 249, 239, 0, 374, 229, 239, 250, 374, 238, 244, 249, 251, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 232, 245, 236, 248, 232, 371, 236, 254, 371, 0, 232, 245, 245, 0, 393, 232, 236, 248, 236, 254, 340, 236, 21, 340, 232, 245, 236, 248, 232, 371, 236, 254, 371, 232, 245, 245, 340, 393, 232, 236, 248, 236, 254, 0, 236, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 237, 246, 246, 237, 237, 22, 255, 435, 259, 461, 292, 292, 292, 292, 378, 237, 378, 246, 359, 359, 255, 259, 22, 292, 237, 246, 246, 237, 237, 22, 255, 435, 259, 461, 0, 0, 0, 378, 237, 378, 246, 359, 359, 255, 259, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 267, 267, 267, 267, 376, 376, 267, 394, 0, 0, 293, 293, 293, 293, 267, 267, 0, 0, 262, 262, 262, 262, 27, 293, 0, 0, 348, 376, 376, 348, 394, 262, 272, 272, 272, 272, 0, 0, 279, 279, 279, 279, 348, 262, 279, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 262, 272, 278, 289, 375, 28, 0, 279, 328, 375, 398, 289, 289, 0, 328, 328, 328, 328, 432, 278, 289, 328, 28, 1184, 272, 428, 1184, 375, 428, 28, 279, 0, 375, 398, 341, 341, 341, 341, 428, 1339, 0, 432, 1339, 278, 289, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 300, 304, 341, 344, 358, 358, 344, 344, 360, 360, 358, 441, 360, 0, 441, 0, 502, 300, 304, 368, 368, 0, 29, 29, 441, 341, 344, 358, 358, 344, 344, 360, 360, 358, 0, 360, 350, 350, 350, 350, 502, 300, 304, 368, 368, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 135, 135, 135, 135, 350, 30, 0, 382, 0, 382, 364, 364, 364, 135, 364, 381, 381, 462, 136, 136, 136, 136, 30, 30, 135, 0, 0, 350, 0, 30, 382, 136, 382, 364, 364, 364, 0, 364, 381, 381, 462, 0, 136, 400, 400, 30, 38, 0, 135, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 136, 400, 400, 137, 137, 137, 137, 377, 0, 390, 379, 390, 377, 379, 385, 385, 137, 291, 144, 144, 144, 144, 38, 38, 503, 291, 291, 137, 0, 0, 377, 144, 390, 379, 390, 377, 379, 385, 385, 0, 0, 0, 144, 144, 543, 38, 42, 291, 503, 42, 42, 137, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 144, 144, 543, 332, 291, 62, 62, 62, 62, 332, 332, 332, 332, 497, 542, 403, 332, 0, 62, 0, 0, 62, 42, 42, 0, 290, 290, 290, 290, 403, 62, 401, 0, 0, 332, 0, 497, 542, 290, 403, 62, 367, 367, 367, 367, 42, 45, 45, 45, 45, 290, 45, 403, 401, 62, 45, 45, 332, 369, 45, 45, 45, 45, 62, 0, 0, 367, 63, 63, 63, 63, 369, 45, 0, 290, 0, 0, 401, 0, 0, 63, 45, 369, 63, 297, 297, 297, 297, 45, 45, 367, 0, 63, 0, 369, 0, 45, 297, 93, 93, 93, 93, 63, 392, 45, 48, 48, 48, 48, 297, 48, 93, 392, 0, 48, 48, 63, 370, 48, 48, 48, 48, 93, 0, 0, 63, 93, 392, 0, 0, 370, 48, 544, 297, 0, 392, 301, 301, 301, 301, 48, 370, 352, 352, 352, 352, 93, 48, 48, 301, 93, 352, 352, 370, 0, 48, 544, 352, 352, 0, 301, 0, 0, 48, 49, 0, 627, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 301, 384, 94, 94, 94, 94, 627, 0, 95, 95, 95, 95, 384, 0, 570, 94, 206, 206, 206, 206, 0, 95, 49, 49, 0, 384, 94, 388, 645, 387, 94, 383, 95, 0, 388, 384, 95, 570, 206, 391, 206, 0, 387, 383, 391, 49, 52, 52, 52, 52, 94, 388, 645, 387, 94, 383, 95, 388, 399, 52, 95, 399, 206, 391, 206, 387, 383, 391, 52, 0, 52, 402, 52, 682, 402, 417, 417, 417, 417, 0, 163, 52, 399, 0, 0, 399, 163, 163, 163, 163, 417, 0, 52, 163, 52, 402, 52, 682, 402, 488, 208, 208, 208, 208, 52, 53, 53, 53, 53, 163, 53, 453, 0, 0, 53, 53, 53, 53, 53, 53, 453, 53, 208, 53, 208, 210, 210, 210, 210, 488, 386, 395, 163, 386, 208, 453, 395, 302, 302, 302, 302, 53, 0, 453, 425, 404, 208, 210, 208, 210, 302, 0, 488, 386, 0, 395, 386, 208, 0, 404, 395, 302, 425, 0, 53, 54, 54, 54, 54, 404, 54, 210, 0, 210, 54, 54, 54, 54, 54, 54, 0, 54, 404, 54, 59, 302, 425, 59, 59, 0, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 389, 504, 0, 0, 209, 209, 209, 209, 211, 211, 211, 211, 389, 504, 305, 305, 305, 305, 227, 227, 227, 227, 59, 59, 389, 504, 209, 305, 209, 0, 211, 227, 211, 410, 227, 389, 504, 209, 305, 305, 0, 410, 211, 227, 0, 59, 61, 61, 61, 61, 209, 0, 209, 227, 211, 407, 211, 410, 407, 0, 209, 0, 305, 305, 410, 211, 61, 227, 61, 396, 61, 61, 61, 689, 61, 522, 227, 61, 397, 407, 396, 61, 407, 61, 61, 61, 0, 522, 397, 0, 61, 0, 61, 396, 61, 61, 61, 689, 61, 522, 61, 0, 397, 396, 61, 0, 61, 61, 61, 80, 522, 397, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 405, 409, 406, 408, 408, 0, 0, 406, 411, 456, 0, 405, 409, 412, 412, 716, 353, 353, 353, 353, 456, 411, 80, 80, 405, 409, 406, 408, 408, 353, 406, 0, 411, 456, 405, 409, 0, 412, 412, 716, 0, 0, 353, 456, 411, 80, 84, 0, 0, 84, 84, 353, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 353, 413, 414, 414, 414, 414, 467, 467, 353, 0, 0, 0, 470, 0, 413, 421, 421, 421, 421, 0, 0, 470, 84, 84, 571, 413, 546, 414, 421, 546, 467, 467, 434, 434, 434, 434, 470, 413, 434, 546, 431, 431, 431, 431, 470, 84, 90, 571, 0, 90, 90, 414, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 0, 434, 240, 240, 240, 240, 273, 273, 273, 273, 431, 478, 0, 431, 0, 240, 0, 0, 240, 273, 0, 478, 90, 90, 434, 0, 724, 240, 0, 0, 273, 0, 0, 431, 273, 478, 431, 240, 454, 274, 274, 274, 274, 454, 478, 90, 106, 106, 106, 106, 724, 240, 274, 452, 273, 452, 580, 455, 273, 106, 240, 454, 455, 274, 0, 466, 454, 274, 466, 471, 106, 106, 471, 444, 106, 444, 452, 0, 452, 580, 455, 444, 444, 444, 444, 455, 0, 274, 444, 466, 0, 274, 466, 471, 106, 106, 471, 0, 106, 111, 111, 581, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 472, 479, 479, 472, 581, 505, 0, 468, 505, 451, 451, 451, 451, 0, 523, 523, 523, 523, 0, 0, 468, 0, 111, 0, 472, 479, 479, 472, 0, 505, 523, 468, 505, 0, 0, 354, 354, 354, 354, 424, 424, 424, 424, 468, 451, 111, 112, 112, 354, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 354, 0, 112, 112, 112, 112, 451, 483, 0, 354, 483, 469, 0, 424, 424, 473, 473, 473, 473, 0, 0, 0, 469, 469, 354, 597, 564, 0, 112, 564, 483, 473, 354, 483, 0, 469, 424, 424, 0, 564, 0, 355, 355, 355, 355, 469, 469, 0, 597, 0, 473, 112, 119, 119, 355, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 355, 0, 119, 476, 119, 119, 473, 626, 0, 355, 474, 474, 474, 474, 476, 475, 475, 475, 475, 524, 524, 524, 524, 484, 355, 484, 474, 476, 119, 0, 626, 475, 355, 0, 0, 524, 568, 476, 0, 568, 0, 463, 463, 463, 463, 474, 484, 0, 484, 568, 475, 119, 121, 121, 463, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 463, 474, 121, 482, 121, 121, 475, 485, 555, 463, 555, 485, 486, 487, 489, 0, 482, 486, 492, 669, 121, 492, 487, 493, 463, 489, 493, 482, 121, 0, 485, 555, 463, 555, 485, 0, 486, 487, 489, 482, 486, 492, 669, 121, 492, 487, 493, 0, 489, 493, 0, 121, 148, 516, 516, 148, 148, 0, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 0, 490, 491, 494, 495, 516, 516, 490, 491, 496, 498, 670, 496, 495, 494, 498, 464, 464, 464, 464, 677, 677, 148, 148, 490, 491, 0, 494, 495, 464, 490, 491, 496, 498, 670, 496, 495, 494, 498, 0, 0, 0, 464, 677, 677, 148, 152, 0, 681, 152, 152, 464, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 464, 499, 506, 0, 500, 681, 507, 508, 464, 500, 499, 506, 477, 477, 477, 477, 0, 0, 0, 507, 508, 477, 152, 152, 0, 499, 506, 500, 0, 0, 507, 508, 500, 499, 506, 0, 0, 477, 501, 501, 501, 501, 507, 508, 0, 152, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 477, 511, 158, 158, 158, 158, 512, 514, 630, 0, 501, 513, 514, 0, 511, 630, 512, 590, 509, 509, 509, 509, 513, 518, 518, 511, 0, 590, 158, 894, 512, 514, 630, 501, 894, 513, 514, 511, 630, 512, 894, 590, 894, 509, 515, 513, 0, 518, 518, 515, 590, 158, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 509, 515, 159, 159, 159, 159, 515, 519, 525, 525, 525, 525, 519, 591, 520, 0, 531, 531, 531, 531, 159, 591, 683, 690, 525, 0, 0, 0, 159, 531, 520, 519, 1318, 1318, 1318, 1318, 519, 591, 520, 554, 554, 554, 554, 159, 591, 683, 690, 517, 517, 517, 517, 159, 160, 520, 0, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 517, 0, 554, 517, 536, 536, 536, 536, 0, 540, 517, 540, 562, 684, 540, 562, 684, 521, 521, 521, 521, 536, 160, 160, 517, 554, 684, 517, 633, 633, 633, 633, 540, 517, 540, 562, 0, 540, 562, 0, 0, 0, 521, 0, 633, 160, 162, 0, 0, 162, 162, 0, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 521, 593, 530, 530, 530, 530, 594, 534, 534, 534, 534, 593, 594, 0, 547, 547, 547, 547, 0, 530, 696, 0, 162, 162, 534, 593, 0, 530, 629, 0, 594, 547, 534, 629, 593, 697, 594, 530, 548, 548, 548, 548, 534, 696, 530, 162, 186, 186, 186, 186, 547, 530, 629, 547, 0, 0, 534, 629, 697, 186, 530, 558, 558, 558, 558, 534, 0, 599, 186, 599, 186, 0, 186, 547, 548, 767, 547, 548, 558, 605, 0, 186, 634, 634, 634, 634, 600, 600, 600, 600, 605, 599, 186, 599, 186, 600, 186, 548, 634, 767, 548, 0, 600, 605, 186, 187, 187, 187, 187, 685, 187, 0, 685, 605, 187, 187, 187, 187, 187, 187, 0, 187, 685, 187, 188, 188, 188, 188, 686, 188, 0, 686, 0, 188, 188, 188, 188, 188, 188, 604, 188, 686, 188, 574, 574, 574, 574, 604, 188, 0, 0, 0, 574, 601, 601, 601, 601, 0, 602, 602, 602, 602, 601, 604, 0, 0, 0, 602, 687, 601, 604, 0, 188, 190, 602, 687, 190, 190, 574, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 575, 575, 575, 575, 631, 641, 687, 641, 574, 575, 631, 598, 598, 598, 598, 768, 603, 603, 603, 603, 0, 0, 190, 190, 575, 603, 0, 598, 631, 641, 0, 641, 603, 0, 631, 608, 608, 608, 608, 768, 584, 584, 584, 584, 608, 190, 194, 598, 575, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 584, 0, 0, 0, 598, 708, 608, 650, 708, 584, 610, 610, 610, 610, 635, 635, 635, 635, 708, 610, 650, 0, 194, 194, 584, 613, 613, 613, 613, 608, 635, 650, 584, 0, 613, 0, 0, 813, 609, 609, 609, 609, 0, 650, 610, 194, 196, 609, 813, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 609, 610, 535, 535, 535, 535, 813, 0, 556, 556, 556, 556, 617, 617, 617, 617, 643, 0, 643, 535, 0, 617, 196, 196, 609, 556, 0, 535, 582, 582, 582, 582, 617, 556, 0, 0, 0, 535, 632, 0, 643, 582, 643, 556, 535, 196, 203, 203, 203, 203, 556, 535, 0, 632, 582, 644, 617, 556, 688, 203, 535, 0, 632, 582, 709, 644, 556, 709, 203, 651, 203, 814, 203, 0, 688, 651, 632, 709, 582, 644, 0, 203, 611, 611, 611, 611, 582, 815, 644, 704, 704, 611, 203, 651, 203, 814, 203, 688, 651, 715, 592, 592, 592, 592, 203, 215, 215, 215, 215, 0, 215, 815, 704, 704, 215, 215, 215, 215, 215, 215, 611, 215, 715, 215, 217, 217, 217, 217, 592, 217, 0, 0, 592, 217, 217, 217, 217, 217, 217, 0, 217, 0, 217, 611, 655, 0, 217, 628, 628, 628, 628, 710, 592, 655, 710, 592, 612, 612, 612, 612, 614, 614, 614, 614, 710, 612, 0, 812, 655, 614, 217, 223, 812, 628, 223, 223, 655, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, 0, 653, 0, 612, 653, 812, 628, 614, 636, 636, 636, 636, 616, 616, 616, 616, 583, 583, 583, 583, 725, 616, 223, 223, 636, 653, 612, 0, 653, 583, 614, 624, 624, 624, 624, 623, 623, 623, 623, 0, 624, 0, 583, 725, 623, 223, 224, 0, 616, 224, 224, 583, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 583, 557, 557, 557, 557, 616, 713, 0, 583, 713, 623, 741, 618, 618, 618, 618, 0, 0, 557, 713, 0, 618, 224, 224, 0, 0, 557, 758, 585, 585, 585, 585, 618, 623, 741, 758, 557, 637, 637, 637, 637, 585, 695, 557, 695, 224, 226, 226, 226, 226, 557, 758, 654, 637, 585, 0, 618, 654, 758, 557, 0, 0, 0, 585, 0, 695, 226, 695, 226, 652, 226, 226, 226, 821, 226, 732, 654, 226, 585, 652, 654, 226, 652, 226, 226, 226, 585, 676, 732, 0, 226, 676, 226, 652, 226, 226, 226, 821, 226, 732, 226, 0, 652, 0, 226, 652, 226, 226, 226, 269, 676, 732, 269, 269, 676, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 750, 0, 769, 619, 619, 619, 619, 0, 615, 615, 615, 615, 619, 750, 0, 0, 0, 615, 657, 657, 657, 657, 269, 269, 750, 769, 0, 619, 622, 622, 622, 622, 0, 0, 657, 0, 750, 622, 625, 625, 625, 625, 0, 615, 0, 269, 270, 625, 622, 270, 270, 619, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 615, 770, 621, 621, 621, 621, 622, 646, 0, 625, 646, 621, 642, 642, 642, 642, 770, 647, 647, 647, 647, 646, 270, 270, 0, 770, 621, 656, 656, 656, 656, 646, 625, 647, 646, 0, 0, 719, 642, 770, 719, 789, 647, 831, 646, 270, 280, 280, 280, 280, 621, 0, 647, 656, 763, 666, 666, 666, 666, 280, 719, 0, 642, 719, 789, 763, 647, 831, 0, 736, 280, 280, 666, 0, 280, 647, 811, 656, 763, 811, 658, 658, 658, 658, 659, 659, 659, 659, 763, 811, 736, 666, 799, 736, 280, 280, 658, 737, 280, 284, 659, 284, 284, 737, 284, 751, 751, 284, 284, 284, 284, 284, 284, 736, 666, 799, 1322, 1322, 1322, 1322, 737, 0, 665, 665, 665, 665, 737, 0, 751, 751, 284, 284, 284, 284, 284, 284, 284, 285, 285, 665, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 0, 285, 285, 285, 285, 285, 738, 0, 0, 665, 672, 672, 672, 672, 673, 673, 673, 673, 680, 680, 680, 680, 746, 738, 746, 765, 765, 672, 285, 0, 738, 673, 665, 0, 0, 680, 0, 698, 698, 698, 698, 1393, 1393, 1393, 1393, 746, 738, 746, 765, 765, 800, 285, 286, 286, 698, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 800, 808, 0, 698, 700, 700, 700, 700, 699, 699, 699, 699, 809, 648, 648, 648, 648, 701, 701, 701, 701, 700, 286, 0, 808, 699, 698, 828, 1128, 648, 828, 1128, 0, 0, 701, 809, 0, 853, 648, 0, 828, 1128, 0, 0, 699, 286, 296, 296, 648, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 853, 648, 296, 745, 296, 296, 699, 743, 0, 745, 648, 810, 707, 707, 707, 707, 0, 0, 913, 649, 649, 649, 649, 757, 743, 757, 745, 818, 296, 707, 0, 743, 745, 0, 810, 649, 0, 0, 735, 735, 735, 735, 913, 0, 649, 0, 757, 743, 757, 0, 818, 296, 299, 299, 649, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 752, 649, 299, 735, 299, 299, 753, 0, 0, 761, 649, 761, 735, 753, 752, 742, 742, 742, 742, 0, 756, 0, 299, 787, 752, 787, 735, 819, 299, 753, 756, 742, 761, 0, 761, 735, 753, 752, 0, 0, 671, 671, 671, 671, 756, 299, 787, 0, 787, 742, 819, 299, 309, 756, 820, 309, 309, 671, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 742, 771, 671, 830, 671, 820, 0, 771, 754, 914, 749, 749, 749, 749, 754, 0, 730, 730, 730, 730, 839, 0, 309, 309, 771, 671, 830, 671, 0, 730, 771, 0, 754, 914, 0, 0, 0, 754, 755, 755, 755, 755, 730, 839, 749, 309, 310, 0, 0, 310, 310, 730, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 730, 749, 759, 0, 760, 762, 755, 762, 730, 760, 762, 764, 834, 759, 764, 834, 759, 766, 766, 766, 766, 859, 310, 310, 833, 833, 759, 760, 762, 755, 762, 0, 760, 762, 764, 834, 759, 764, 834, 759, 772, 772, 772, 772, 859, 310, 316, 833, 833, 316, 316, 766, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 774, 774, 774, 774, 785, 788, 0, 792, 766, 785, 795, 0, 792, 772, 868, 868, 774, 0, 0, 0, 788, 858, 316, 316, 858, 795, 0, 785, 870, 788, 792, 0, 785, 0, 795, 792, 772, 868, 868, 793, 793, 793, 793, 788, 858, 316, 317, 858, 795, 317, 317, 870, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 317, 790, 790, 790, 790, 798, 798, 798, 798, 791, 791, 791, 791, 793, 866, 874, 0, 790, 875, 866, 874, 879, 798, 317, 317, 791, 1058, 1058, 1058, 1058, 794, 794, 794, 794, 0, 1058, 793, 866, 874, 798, 790, 875, 866, 874, 879, 791, 317, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 798, 790, 321, 321, 321, 321, 791, 794, 805, 0, 854, 832, 797, 797, 797, 797, 802, 802, 802, 802, 880, 854, 0, 832, 805, 854, 921, 0, 321, 797, 794, 0, 805, 802, 854, 832, 1608, 1608, 1608, 1608, 0, 0, 0, 880, 854, 797, 832, 805, 854, 921, 802, 321, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 0, 797, 323, 323, 323, 323, 802, 852, 856, 852, 0, 920, 801, 801, 801, 801, 0, 822, 822, 822, 822, 856, 323, 856, 852, 0, 0, 0, 323, 801, 922, 852, 856, 852, 822, 920, 0, 0, 0, 861, 861, 861, 861, 0, 856, 323, 856, 852, 861, 801, 822, 323, 325, 930, 922, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 801, 822, 0, 867, 855, 930, 861, 925, 857, 823, 823, 823, 823, 867, 855, 840, 840, 840, 840, 855, 0, 926, 325, 325, 0, 857, 823, 867, 855, 861, 925, 0, 857, 0, 0, 0, 867, 855, 1617, 1617, 1617, 1617, 855, 823, 926, 325, 326, 840, 857, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 823, 872, 932, 873, 840, 929, 862, 0, 872, 860, 860, 860, 860, 873, 881, 881, 841, 841, 841, 841, 931, 862, 326, 326, 872, 860, 932, 873, 929, 841, 862, 872, 863, 863, 863, 863, 873, 881, 881, 0, 0, 863, 841, 931, 862, 326, 329, 860, 947, 329, 329, 841, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 841, 0, 938, 882, 860, 863, 947, 939, 841, 882, 869, 869, 869, 869, 878, 966, 842, 842, 842, 842, 946, 0, 329, 329, 878, 938, 882, 0, 863, 842, 939, 0, 882, 0, 876, 876, 876, 876, 878, 966, 0, 0, 842, 946, 869, 329, 330, 878, 0, 330, 330, 842, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 842, 869, 876, 668, 668, 668, 668, 960, 842, 883, 883, 884, 884, 884, 884, 968, 877, 877, 877, 877, 668, 0, 330, 330, 0, 876, 0, 884, 668, 919, 960, 968, 883, 883, 1676, 1676, 1676, 1676, 668, 968, 919, 901, 901, 901, 901, 330, 342, 342, 342, 342, 877, 342, 668, 919, 968, 342, 342, 342, 342, 342, 342, 668, 342, 919, 342, 343, 343, 343, 343, 0, 343, 0, 0, 877, 343, 343, 343, 343, 343, 343, 901, 343, 0, 343, 885, 885, 885, 885, 886, 886, 886, 886, 843, 843, 843, 843, 984, 945, 343, 0, 885, 945, 924, 901, 886, 843, 902, 902, 902, 902, 1722, 1722, 1722, 1722, 1724, 1724, 1724, 1724, 843, 984, 945, 343, 346, 924, 945, 346, 346, 843, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 843, 900, 903, 902, 924, 903, 0, 900, 843, 0, 0, 904, 904, 904, 904, 985, 851, 851, 851, 851, 991, 0, 346, 346, 900, 903, 902, 904, 903, 851, 900, 907, 907, 907, 907, 0, 0, 0, 985, 0, 0, 0, 851, 991, 904, 346, 347, 907, 990, 347, 347, 851, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 851, 904, 906, 941, 923, 907, 990, 0, 851, 905, 905, 905, 905, 941, 944, 1005, 944, 0, 1009, 906, 0, 923, 347, 347, 0, 905, 906, 941, 907, 910, 910, 910, 910, 0, 0, 0, 941, 0, 944, 1005, 944, 1009, 906, 905, 923, 347, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 905, 1021, 910, 908, 908, 908, 908, 958, 943, 0, 0, 969, 969, 969, 969, 349, 981, 958, 981, 908, 969, 943, 349, 349, 1021, 910, 0, 969, 0, 0, 0, 958, 943, 940, 940, 940, 940, 0, 349, 981, 958, 981, 940, 908, 943, 349, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 908, 940, 909, 909, 909, 909, 0, 0, 664, 664, 664, 664, 964, 964, 351, 0, 351, 975, 909, 0, 0, 975, 351, 351, 940, 664, 0, 0, 973, 779, 779, 779, 779, 664, 0, 964, 964, 351, 973, 351, 975, 0, 909, 664, 975, 351, 357, 357, 357, 357, 664, 779, 973, 779, 0, 1000, 1010, 664, 1000, 357, 1016, 973, 1022, 0, 779, 909, 664, 965, 783, 783, 783, 783, 357, 0, 0, 779, 0, 779, 357, 357, 1010, 357, 0, 0, 1016, 1022, 965, 779, 976, 976, 783, 965, 783, 0, 1000, 0, 357, 893, 893, 893, 893, 357, 357, 783, 357, 361, 361, 361, 361, 965, 0, 976, 976, 0, 783, 0, 783, 1000, 361, 893, 0, 893, 890, 890, 890, 890, 783, 361, 1017, 361, 1026, 361, 970, 970, 970, 970, 891, 891, 891, 891, 361, 970, 0, 893, 890, 893, 890, 0, 970, 891, 0, 361, 1017, 361, 1026, 361, 890, 0, 1025, 0, 978, 978, 891, 361, 365, 365, 365, 365, 890, 365, 890, 891, 0, 365, 365, 365, 365, 365, 365, 890, 365, 1025, 365, 978, 978, 0, 891, 892, 892, 892, 892, 365, 0, 0, 891, 915, 915, 915, 915, 1040, 892, 942, 942, 942, 942, 0, 948, 948, 948, 948, 942, 0, 915, 892, 0, 365, 366, 366, 366, 366, 1019, 366, 892, 1040, 0, 366, 366, 366, 366, 366, 366, 1055, 366, 915, 366, 942, 1027, 892, 948, 1019, 1067, 366, 0, 0, 0, 892, 911, 911, 911, 911, 0, 971, 971, 971, 971, 1055, 915, 0, 942, 1027, 971, 948, 1019, 911, 1067, 366, 372, 971, 911, 372, 372, 0, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 951, 952, 962, 0, 977, 963, 911, 1028, 977, 951, 1033, 962, 1034, 952, 962, 951, 952, 962, 963, 1061, 963, 1065, 372, 372, 951, 952, 962, 977, 1086, 963, 1028, 977, 951, 1033, 962, 1034, 952, 962, 951, 952, 962, 963, 1061, 963, 1065, 372, 373, 373, 373, 373, 373, 1086, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 0, 974, 1023, 967, 967, 967, 967, 0, 972, 972, 972, 972, 0, 0, 974, 373, 1023, 972, 1083, 967, 987, 987, 373, 373, 972, 974, 1023, 967, 0, 988, 988, 988, 988, 979, 979, 979, 979, 974, 373, 1023, 0, 0, 1083, 987, 987, 373, 418, 418, 418, 418, 418, 967, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 0, 979, 988, 1111, 896, 896, 896, 896, 897, 897, 897, 897, 912, 912, 912, 912, 916, 916, 916, 916, 0, 0, 418, 418, 979, 988, 896, 1111, 896, 912, 897, 982, 897, 916, 912, 0, 0, 0, 916, 0, 0, 897, 896, 982, 986, 418, 423, 423, 423, 423, 896, 423, 896, 0, 897, 982, 897, 0, 912, 986, 423, 423, 916, 423, 897, 896, 982, 0, 986, 0, 0, 423, 1112, 1013, 1020, 1087, 980, 980, 980, 980, 1013, 423, 986, 0, 899, 899, 899, 899, 423, 423, 933, 933, 933, 933, 1020, 423, 1112, 1013, 1087, 0, 0, 1032, 1032, 1013, 423, 426, 899, 933, 899, 0, 980, 426, 933, 426, 426, 0, 426, 1020, 899, 426, 426, 426, 426, 426, 426, 1032, 1032, 0, 1107, 0, 899, 0, 899, 980, 0, 0, 933, 983, 983, 983, 983, 899, 426, 426, 426, 426, 426, 426, 426, 427, 427, 1107, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 0, 427, 427, 427, 427, 427, 0, 983, 1014, 1014, 1001, 1004, 1007, 1007, 1007, 1007, 1031, 0, 1066, 1066, 1031, 934, 934, 934, 934, 1001, 1004, 0, 427, 1007, 983, 1014, 1014, 0, 1001, 1004, 0, 0, 934, 0, 1031, 1066, 1066, 934, 1031, 1119, 0, 0, 1001, 1004, 1007, 427, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 934, 1119, 430, 430, 430, 430, 1007, 1070, 1070, 1070, 1070, 1037, 1011, 1011, 1011, 1011, 1070, 1129, 1072, 1072, 1072, 1072, 430, 1070, 0, 430, 1037, 1072, 430, 1011, 1006, 1006, 1006, 1006, 1072, 1037, 1069, 1069, 1069, 1069, 1129, 953, 953, 953, 953, 430, 1006, 1011, 430, 1037, 1006, 430, 433, 433, 953, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 953, 1123, 433, 1011, 433, 433, 1130, 1006, 1069, 953, 954, 954, 954, 954, 955, 955, 955, 955, 1029, 1029, 1029, 1029, 0, 954, 953, 1123, 1038, 955, 433, 1130, 0, 1069, 953, 0, 0, 1029, 954, 0, 0, 1038, 955, 959, 959, 959, 959, 954, 1036, 1015, 0, 955, 1038, 433, 436, 436, 436, 436, 1029, 436, 1036, 1015, 954, 1015, 1038, 0, 955, 959, 436, 436, 954, 436, 1036, 1015, 955, 959, 1035, 0, 1050, 436, 1137, 1029, 959, 1036, 1015, 1154, 1015, 1035, 1050, 436, 0, 959, 1073, 1073, 1073, 1073, 436, 436, 959, 0, 1035, 1073, 1050, 436, 1137, 959, 1131, 0, 1073, 1154, 1035, 1050, 436, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 0, 1131, 443, 443, 443, 443, 1132, 1751, 1751, 1751, 1751, 0, 1056, 1024, 1024, 1024, 1024, 1074, 0, 1115, 1115, 1056, 956, 956, 956, 956, 1074, 0, 443, 1132, 1024, 1002, 1002, 1002, 1002, 956, 1056, 1039, 1039, 1039, 1039, 1074, 1115, 1115, 1056, 0, 1039, 1002, 956, 1074, 1024, 443, 457, 1002, 0, 457, 457, 956, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 956, 1024, 1039, 1057, 1076, 1002, 1045, 1155, 956, 1077, 1159, 0, 1160, 1077, 1076, 1057, 992, 992, 992, 992, 1045, 1045, 457, 457, 0, 1039, 0, 1057, 1076, 992, 1045, 1155, 1077, 992, 1159, 1160, 1077, 1076, 1057, 0, 0, 0, 992, 1045, 1045, 457, 458, 458, 458, 458, 458, 992, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 992, 1062, 1003, 1003, 1003, 1003, 1063, 0, 992, 0, 1101, 1101, 1101, 1101, 1172, 458, 1062, 0, 1003, 0, 0, 1063, 458, 458, 1003, 1062, 1101, 0, 0, 0, 1063, 1084, 1084, 1084, 1084, 0, 0, 1172, 458, 1062, 1043, 1043, 1043, 1043, 1063, 458, 459, 0, 1003, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 1043, 1075, 0, 1116, 1084, 1116, 1043, 1157, 0, 1043, 1078, 1078, 1078, 1078, 1075, 1186, 1157, 459, 1008, 1008, 1008, 1008, 459, 459, 1043, 1075, 1116, 1084, 1116, 1043, 0, 1157, 1043, 0, 0, 1008, 0, 1075, 1186, 1157, 459, 0, 1008, 0, 1078, 459, 460, 0, 0, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 1008, 1078, 0, 1158, 989, 989, 989, 989, 993, 993, 993, 993, 1206, 0, 460, 1158, 0, 1012, 1012, 1012, 1012, 1103, 460, 460, 1103, 1121, 989, 1158, 989, 1080, 993, 1121, 993, 1079, 1012, 1206, 1079, 460, 1158, 1080, 989, 1012, 0, 993, 0, 460, 465, 465, 465, 465, 989, 1081, 989, 1080, 993, 1121, 993, 0, 1106, 465, 1103, 1081, 1080, 989, 0, 1012, 993, 1079, 1118, 1207, 1118, 465, 465, 0, 1106, 1081, 1161, 1030, 1030, 1030, 1030, 465, 1106, 1103, 1081, 0, 1102, 1102, 1102, 1102, 1079, 1118, 1207, 1118, 1030, 465, 465, 1106, 0, 0, 1161, 1030, 1102, 1177, 465, 480, 480, 480, 480, 480, 1185, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 1030, 1046, 1177, 1117, 1135, 1046, 0, 1117, 0, 1185, 1064, 1064, 1064, 1064, 1135, 480, 0, 0, 0, 1064, 1046, 0, 480, 480, 0, 1046, 1117, 1202, 1135, 1046, 1117, 1085, 1085, 1085, 1085, 0, 0, 1135, 480, 1139, 1139, 1139, 1139, 1046, 1064, 480, 481, 481, 481, 481, 481, 1202, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 1136, 1064, 1170, 0, 1085, 1170, 1210, 1139, 1210, 0, 1068, 1068, 1068, 1068, 481, 1136, 481, 1122, 1122, 1122, 1122, 0, 481, 481, 1136, 1170, 1068, 1085, 1170, 1210, 1139, 1210, 1068, 1140, 1122, 0, 0, 481, 1136, 481, 995, 995, 995, 995, 1140, 481, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 1068, 1140, 510, 510, 510, 1214, 995, 510, 995, 510, 510, 1140, 995, 0, 1223, 994, 994, 994, 994, 996, 996, 996, 996, 0, 0, 1110, 1110, 1110, 1110, 1214, 995, 1221, 995, 510, 0, 0, 995, 994, 1223, 994, 994, 996, 1110, 996, 1138, 1138, 1138, 1138, 1110, 1124, 1124, 1124, 1124, 1138, 1221, 0, 510, 538, 538, 538, 538, 994, 538, 994, 994, 996, 1124, 996, 538, 538, 538, 538, 1110, 0, 538, 538, 539, 539, 539, 539, 0, 539, 0, 997, 997, 997, 997, 539, 539, 539, 539, 1222, 1229, 539, 539, 1126, 1126, 1126, 1126, 1156, 0, 1108, 1108, 1108, 1108, 997, 1228, 997, 0, 1156, 0, 0, 1126, 0, 1222, 539, 1229, 1108, 1228, 0, 0, 997, 0, 1156, 1104, 1104, 1104, 1104, 0, 997, 1228, 997, 1156, 1090, 1090, 1090, 1090, 1108, 539, 541, 1104, 1228, 541, 541, 997, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, 1090, 1108, 1240, 1104, 1127, 1127, 1127, 1127, 1245, 1090, 1239, 1144, 1144, 1144, 1144, 1243, 1109, 1109, 1109, 1109, 1144, 1127, 541, 541, 1090, 1240, 1104, 1544, 1544, 1544, 1544, 1245, 1090, 1109, 1239, 1047, 1047, 1047, 1047, 1243, 0, 0, 0, 1544, 1109, 541, 549, 549, 1047, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, 1047, 1141, 549, 549, 549, 549, 1227, 1109, 1246, 1047, 549, 1146, 1142, 1162, 0, 1227, 1141, 1146, 1254, 1105, 1105, 1105, 1105, 1254, 1047, 1141, 1142, 1162, 549, 0, 1227, 1246, 1047, 0, 549, 1105, 1142, 1162, 1227, 1141, 0, 1254, 0, 1105, 0, 1146, 1254, 0, 0, 1142, 1162, 549, 550, 550, 0, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1105, 1146, 550, 550, 550, 550, 1255, 1171, 0, 0, 999, 999, 999, 999, 1100, 1100, 1100, 1100, 1171, 550, 1134, 1134, 1134, 1134, 1163, 1163, 1163, 1163, 550, 0, 1255, 1171, 999, 1163, 999, 1280, 1100, 1134, 1100, 0, 0, 1171, 550, 1134, 1216, 1216, 1216, 1216, 0, 0, 0, 550, 560, 560, 560, 560, 999, 560, 999, 1280, 1100, 1216, 1100, 560, 560, 560, 560, 1134, 0, 560, 560, 561, 561, 561, 561, 0, 561, 1151, 998, 998, 998, 998, 561, 561, 561, 561, 0, 1182, 561, 561, 0, 1151, 1151, 1165, 1165, 1242, 0, 0, 1182, 1258, 998, 1151, 998, 1133, 1133, 1133, 1133, 1242, 0, 1165, 561, 1182, 1212, 1212, 1151, 1151, 998, 1165, 1165, 1242, 1133, 1182, 1258, 0, 998, 0, 998, 0, 0, 0, 1242, 1133, 1165, 561, 563, 1212, 1212, 563, 563, 998, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1231, 1133, 1231, 1048, 1048, 1048, 1048, 0, 1113, 1113, 1113, 1113, 1173, 1173, 1173, 1173, 1048, 1051, 1051, 1051, 1051, 1266, 563, 563, 1231, 1113, 1231, 0, 1173, 1048, 1051, 1143, 1143, 1143, 1143, 0, 1181, 0, 1048, 1181, 1143, 0, 1113, 1051, 1266, 563, 572, 572, 572, 572, 1173, 572, 1051, 1048, 1253, 572, 572, 572, 572, 572, 572, 1048, 572, 0, 572, 1113, 0, 1051, 1143, 1253, 1181, 1290, 1241, 1173, 0, 1051, 0, 0, 1253, 1211, 0, 1241, 572, 0, 0, 0, 1145, 1145, 1145, 1145, 1211, 1143, 1253, 1181, 1290, 1145, 1241, 1286, 1147, 1147, 1147, 1147, 0, 1211, 1241, 572, 573, 573, 573, 573, 0, 573, 0, 1211, 0, 573, 573, 573, 573, 573, 573, 1286, 573, 1145, 573, 576, 576, 576, 576, 576, 1147, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 1302, 1145, 1307, 1219, 1219, 1219, 1219, 0, 1147, 1174, 1174, 1174, 1174, 0, 0, 576, 1052, 1052, 1052, 1052, 1219, 0, 576, 576, 1302, 1174, 1307, 0, 0, 1052, 1230, 1230, 1230, 1230, 1168, 1168, 1168, 1168, 576, 1230, 0, 0, 1052, 1168, 1174, 576, 577, 577, 577, 577, 577, 1052, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 1052, 1174, 1168, 1247, 1262, 1262, 0, 1291, 1052, 1205, 1205, 1205, 1205, 0, 577, 1247, 577, 1780, 1780, 1780, 1780, 0, 577, 577, 0, 1168, 1205, 1247, 1262, 1262, 1291, 0, 0, 1233, 1233, 1233, 1233, 577, 1247, 577, 1179, 1179, 1179, 1179, 1150, 577, 578, 1150, 1205, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 1150, 0, 1150, 0, 1233, 1205, 1244, 0, 1179, 1175, 1175, 1175, 1175, 1309, 0, 1329, 1330, 1150, 578, 0, 1244, 0, 578, 578, 1150, 1175, 1150, 1233, 0, 0, 1244, 1179, 1677, 1677, 1677, 1677, 0, 1309, 1329, 1330, 1150, 578, 1335, 1244, 1175, 578, 579, 0, 1677, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 1335, 1175, 579, 1053, 1053, 1053, 1053, 1054, 1054, 1054, 1054, 1265, 1095, 1095, 1095, 1095, 1053, 1265, 1169, 1347, 1054, 1336, 579, 579, 1169, 0, 579, 1351, 1361, 1053, 0, 0, 1265, 1054, 1095, 0, 1095, 0, 1053, 1169, 1095, 0, 1054, 1347, 1336, 579, 586, 586, 586, 586, 1362, 1351, 1361, 1053, 1169, 1364, 1265, 1054, 1095, 586, 1095, 1053, 0, 1169, 1095, 1054, 1059, 1059, 1059, 1059, 586, 1370, 586, 1362, 1375, 1059, 1295, 1169, 1364, 1059, 1395, 586, 0, 0, 1060, 1060, 1060, 1060, 1295, 0, 0, 0, 1059, 1060, 586, 1370, 586, 1060, 1375, 0, 1295, 1059, 0, 1395, 586, 587, 587, 587, 587, 1416, 1060, 1295, 1180, 1180, 1180, 1180, 1059, 1394, 587, 1060, 1178, 1178, 1178, 1178, 1059, 1094, 1094, 1094, 1094, 1178, 1382, 587, 1416, 1382, 1060, 1088, 1088, 1088, 1088, 587, 587, 1394, 1060, 0, 1178, 0, 1180, 1094, 1088, 1094, 1415, 1427, 1088, 1382, 0, 587, 1382, 1424, 0, 1094, 1442, 1088, 587, 587, 588, 588, 588, 588, 1178, 1180, 1088, 1094, 0, 1094, 1415, 1427, 1451, 588, 1408, 1383, 1424, 1408, 1094, 1383, 1442, 1088, 1208, 1208, 1208, 1208, 588, 0, 0, 1088, 1089, 1089, 1089, 1089, 588, 588, 1451, 1408, 1383, 1208, 1408, 1452, 1383, 1089, 0, 0, 1464, 1089, 0, 0, 588, 1096, 1096, 1096, 1096, 1208, 1089, 588, 588, 589, 589, 589, 589, 1472, 1452, 1089, 1091, 1091, 1091, 1091, 1464, 1296, 589, 1096, 1502, 1096, 0, 1487, 1208, 1091, 1089, 1459, 1296, 1091, 1459, 589, 1472, 589, 1089, 1096, 1366, 1533, 1091, 0, 589, 1296, 0, 1096, 1502, 1096, 1487, 1091, 1366, 1493, 1459, 1296, 0, 1459, 0, 589, 1505, 589, 1096, 1547, 1366, 1533, 1091, 589, 595, 595, 595, 595, 1557, 595, 1091, 1366, 1493, 595, 595, 595, 595, 595, 595, 1505, 595, 1559, 595, 1547, 1097, 1097, 1097, 1097, 1176, 1176, 1176, 1176, 1557, 1200, 1200, 1200, 1200, 0, 1149, 1149, 1149, 1149, 595, 0, 1176, 1559, 1097, 0, 1097, 1200, 1236, 1149, 0, 1236, 0, 1152, 1152, 1152, 1152, 0, 1097, 1200, 0, 1176, 1149, 595, 596, 596, 596, 596, 1097, 596, 1097, 1149, 1236, 596, 596, 596, 596, 596, 596, 1152, 596, 1097, 596, 1200, 1176, 1534, 1149, 1236, 1152, 1554, 596, 0, 1564, 1595, 1149, 0, 1236, 1201, 1201, 1201, 1201, 0, 0, 1152, 1267, 1267, 1267, 1267, 1534, 0, 1236, 1152, 1554, 1201, 596, 606, 1564, 1595, 606, 606, 1201, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 0, 1267, 1596, 1601, 1226, 1226, 1226, 1226, 0, 1201, 1204, 1204, 1204, 1204, 1430, 1602, 1430, 606, 1530, 0, 0, 1226, 606, 606, 1267, 1596, 1601, 1204, 1530, 0, 0, 1209, 1209, 1209, 1209, 0, 0, 1430, 1602, 1430, 606, 0, 1530, 1226, 1204, 606, 607, 0, 1209, 607, 607, 1530, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 1226, 1204, 1209, 1525, 1098, 1098, 1098, 1098, 1099, 1099, 1099, 1099, 1615, 0, 607, 0, 1114, 1114, 1114, 1114, 0, 1525, 607, 607, 0, 1209, 1098, 1525, 1098, 0, 1099, 0, 1099, 1114, 1469, 1615, 1098, 607, 1465, 1114, 1469, 1465, 0, 1099, 1525, 607, 620, 620, 620, 620, 1098, 1469, 1098, 1114, 1099, 620, 1099, 0, 0, 1098, 0, 0, 1465, 1114, 0, 1465, 1099, 1599, 1613, 0, 1614, 620, 0, 0, 620, 1469, 1114, 1287, 1287, 1287, 1287, 620, 1225, 1225, 1225, 1225, 0, 1460, 1460, 1460, 1460, 1599, 1613, 1287, 1614, 620, 1460, 1287, 620, 1225, 1153, 1153, 1153, 1153, 620, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 0, 1225, 638, 638, 638, 0, 1287, 638, 1238, 638, 638, 1153, 1238, 1531, 1304, 1304, 1304, 1304, 1594, 0, 1153, 1620, 1531, 1238, 1225, 1658, 1594, 1192, 1192, 1192, 1192, 1304, 1238, 638, 0, 1153, 1238, 1531, 1249, 1249, 1249, 1249, 1594, 1153, 1620, 1531, 1238, 1249, 1658, 1192, 1594, 1192, 1750, 1750, 1750, 1750, 638, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 1659, 1192, 639, 639, 639, 1249, 1192, 639, 1192, 639, 639, 1611, 1297, 1297, 1297, 1297, 1625, 1166, 1166, 1166, 1166, 1611, 1665, 1659, 1192, 0, 1166, 1750, 1249, 1297, 1166, 0, 0, 639, 0, 1611, 1224, 1224, 1224, 1224, 1625, 1224, 0, 1166, 1611, 1665, 1232, 1232, 1232, 1232, 1224, 1224, 1166, 1224, 1297, 1232, 639, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 1166, 1232, 640, 640, 640, 1682, 0, 640, 1166, 640, 640, 1224, 1224, 640, 0, 640, 0, 640, 1196, 1196, 1196, 1196, 0, 1628, 1237, 1232, 640, 1237, 1682, 1537, 1537, 1537, 1537, 640, 0, 0, 0, 640, 1537, 640, 1196, 640, 1196, 1263, 1263, 1263, 1263, 1628, 1237, 640, 1196, 0, 1263, 0, 0, 0, 640, 674, 674, 674, 674, 0, 674, 1237, 1196, 0, 1196, 1263, 674, 674, 674, 674, 1237, 1196, 674, 674, 675, 675, 675, 675, 0, 675, 1203, 1203, 1203, 1203, 1237, 675, 675, 675, 675, 1263, 1704, 675, 675, 1712, 0, 0, 1203, 1565, 1565, 1565, 1565, 1167, 1167, 1167, 1167, 1717, 1565, 675, 1203, 1592, 1167, 0, 1592, 1704, 1167, 0, 1712, 1257, 1257, 1257, 1257, 0, 0, 1324, 1324, 1324, 1324, 1167, 1717, 1592, 675, 678, 1203, 1257, 678, 678, 1167, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 1167, 1257, 1592, 1305, 1305, 1305, 1305, 1324, 1167, 0, 0, 0, 1259, 1259, 1259, 1259, 1250, 1250, 1250, 1250, 1305, 1734, 678, 678, 1257, 1250, 0, 0, 1259, 1250, 1324, 0, 1261, 1261, 1261, 1261, 1413, 1413, 1413, 1413, 0, 0, 1250, 1630, 1734, 678, 679, 1259, 1261, 679, 679, 1250, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 1250, 1630, 1261, 1252, 1259, 1413, 1660, 1664, 1250, 1252, 0, 1691, 1694, 1256, 1256, 1256, 1256, 1306, 1306, 1306, 1306, 0, 679, 679, 1252, 1261, 0, 1543, 1413, 1256, 1660, 1664, 0, 1543, 1306, 1691, 1694, 1256, 0, 1252, 1352, 1352, 1352, 1352, 1543, 679, 691, 691, 1252, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, 1256, 1252, 691, 691, 691, 691, 1703, 1543, 691, 0, 1603, 1352, 1603, 1532, 0, 1260, 1260, 1260, 1260, 1378, 1378, 1378, 1378, 0, 0, 1532, 1746, 0, 691, 0, 1703, 1260, 691, 1603, 1352, 1603, 1378, 1532, 1367, 1367, 1367, 1367, 0, 1248, 1248, 1248, 1248, 1367, 1532, 1746, 1260, 691, 692, 692, 0, 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, 692, 1248, 1715, 692, 692, 692, 692, 1260, 1367, 1248, 0, 1191, 1191, 1191, 1191, 692, 1598, 1385, 1385, 1385, 1385, 1264, 1264, 1264, 1264, 1248, 1715, 0, 1598, 692, 1264, 1367, 1248, 1191, 1385, 1191, 1741, 1191, 1741, 692, 1598, 1623, 1623, 1623, 1623, 1264, 1308, 1308, 1308, 1308, 1623, 1598, 692, 702, 702, 702, 702, 1191, 702, 1191, 1741, 1191, 1741, 1308, 702, 702, 702, 702, 1743, 1264, 702, 702, 703, 703, 703, 703, 0, 703, 1193, 1193, 1193, 1193, 0, 703, 703, 703, 703, 1748, 1308, 703, 703, 1777, 1743, 1284, 1284, 1284, 1284, 0, 0, 1765, 1193, 0, 1193, 0, 0, 703, 1193, 0, 0, 1284, 0, 1748, 0, 0, 1777, 1285, 1285, 1285, 1285, 1363, 1363, 1363, 1363, 1765, 1193, 1597, 1193, 1284, 703, 705, 1193, 1285, 705, 705, 1597, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 705, 1597, 1284, 1363, 1797, 0, 1285, 1363, 1807, 1597, 0, 1288, 1288, 1288, 1288, 1666, 1767, 1772, 1778, 1396, 1396, 1396, 1396, 705, 705, 1666, 1363, 1797, 1288, 1285, 1363, 1807, 1289, 1289, 1289, 1289, 1396, 0, 0, 1666, 1767, 1772, 1778, 0, 1288, 0, 705, 706, 1666, 1289, 706, 706, 0, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 706, 1288, 1289, 1310, 1310, 1310, 1310, 1197, 1197, 1197, 1197, 1314, 1314, 1314, 1314, 1404, 1404, 1404, 1404, 0, 1310, 0, 0, 706, 706, 1289, 0, 1197, 1314, 1197, 0, 1197, 1404, 0, 1341, 1341, 1341, 1341, 0, 0, 1198, 1198, 1198, 1198, 1314, 1310, 706, 717, 717, 717, 717, 1197, 717, 1197, 1341, 1197, 717, 717, 717, 717, 717, 717, 1198, 717, 1198, 717, 1341, 1314, 1796, 1199, 1199, 1199, 1199, 1808, 1198, 717, 0, 0, 1341, 0, 0, 1376, 1376, 1376, 1376, 1833, 1198, 0, 1198, 1341, 0, 1199, 1796, 1199, 0, 1803, 1808, 1198, 1376, 717, 718, 718, 718, 718, 1376, 718, 1199, 0, 1833, 718, 718, 718, 718, 718, 718, 1199, 718, 1199, 718, 1803, 1315, 1315, 1315, 1315, 1781, 1781, 1781, 1781, 1376, 1199, 1292, 1292, 1292, 1292, 718, 0, 0, 1315, 1377, 1377, 1377, 1377, 1438, 1438, 1438, 1438, 0, 1292, 0, 1425, 1425, 1425, 1425, 0, 1292, 1377, 1315, 718, 720, 1438, 0, 720, 720, 0, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 1292, 1315, 1377, 1425, 1348, 1348, 1348, 1348, 1439, 1439, 1439, 1439, 0, 1349, 1349, 1349, 1349, 720, 0, 0, 1348, 0, 720, 720, 1439, 1439, 1425, 1348, 0, 1349, 0, 1403, 1403, 1403, 1403, 1507, 1507, 1507, 1507, 0, 720, 1332, 1332, 1332, 1332, 720, 721, 1349, 1403, 721, 721, 1348, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 1612, 1332, 0, 1507, 1349, 0, 0, 1403, 0, 1672, 1332, 1672, 1612, 1332, 721, 1368, 1368, 1368, 1368, 0, 0, 0, 721, 721, 1612, 1332, 1507, 1477, 1477, 1477, 1477, 1368, 1672, 1332, 1672, 1612, 1332, 721, 0, 0, 1333, 1333, 1333, 1333, 1477, 721, 722, 0, 1368, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 1333, 1434, 1434, 1434, 1434, 1368, 1681, 1670, 0, 1333, 1333, 1470, 1470, 1470, 1470, 722, 1681, 1434, 1545, 1545, 1545, 1545, 722, 722, 1333, 1670, 0, 1470, 1470, 0, 1681, 1670, 1333, 1333, 1545, 1545, 0, 0, 722, 1681, 0, 0, 0, 1434, 0, 722, 723, 0, 1670, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 1251, 1251, 1251, 1251, 723, 1326, 1326, 1326, 1326, 1251, 1680, 0, 1593, 1251, 1326, 1593, 1268, 1268, 1268, 1268, 1836, 1680, 723, 723, 0, 0, 1251, 0, 723, 1268, 1742, 1326, 1593, 1268, 1680, 1251, 1374, 1374, 1374, 1374, 1326, 1742, 1268, 1836, 1680, 723, 726, 726, 726, 726, 1251, 1268, 726, 1374, 1742, 1326, 1593, 726, 1251, 726, 1837, 1374, 0, 1326, 1742, 726, 1268, 1269, 1269, 1269, 1269, 1374, 726, 0, 1268, 0, 1276, 1276, 1276, 1276, 1269, 726, 0, 1837, 1269, 1374, 1270, 1270, 1270, 1270, 0, 0, 0, 1269, 1374, 0, 726, 0, 1276, 1270, 1276, 0, 1269, 1270, 726, 727, 727, 727, 727, 0, 0, 0, 1270, 1474, 1474, 1474, 1474, 1269, 727, 1707, 0, 1270, 1276, 1707, 1276, 1269, 1279, 1279, 1279, 1279, 1474, 727, 1277, 1277, 1277, 1277, 1270, 0, 727, 0, 727, 0, 0, 1707, 1270, 1711, 0, 1707, 1279, 1711, 1279, 0, 1474, 0, 1277, 727, 1277, 1281, 1281, 1281, 1281, 727, 0, 727, 728, 728, 728, 728, 0, 1711, 0, 1277, 1279, 1711, 1279, 1474, 0, 728, 1277, 1281, 1277, 1281, 1283, 1283, 1283, 1283, 1371, 1371, 1371, 1371, 728, 0, 1281, 0, 1277, 1570, 1570, 1570, 1570, 728, 728, 0, 1371, 1281, 1283, 1281, 1283, 1371, 1325, 1325, 1325, 1325, 0, 0, 728, 1281, 0, 1325, 0, 1283, 0, 1325, 728, 728, 729, 729, 729, 729, 1283, 1570, 1283, 1371, 0, 0, 1325, 0, 0, 729, 1327, 1327, 1327, 1327, 1283, 1325, 1331, 1331, 1331, 1331, 0, 0, 729, 1327, 1570, 1369, 1369, 1369, 1369, 729, 1325, 729, 729, 0, 0, 0, 1327, 0, 1325, 1736, 1331, 1369, 1331, 1736, 0, 1327, 729, 1494, 1494, 1494, 1494, 1331, 729, 0, 729, 729, 731, 731, 731, 731, 1327, 1369, 0, 1736, 1331, 0, 1331, 1736, 1327, 731, 1435, 1435, 1435, 1435, 1331, 1334, 1334, 1334, 1334, 1494, 0, 0, 731, 0, 1369, 1769, 1435, 1373, 1373, 1373, 1373, 731, 1342, 1342, 1342, 1342, 1769, 731, 0, 0, 0, 1334, 1494, 0, 1373, 1342, 731, 1334, 0, 1769, 1334, 1373, 1435, 1702, 731, 0, 0, 0, 1342, 1769, 731, 733, 733, 733, 733, 1334, 1702, 1342, 1716, 0, 1334, 1716, 0, 1334, 733, 1373, 0, 1702, 1475, 1475, 1475, 1475, 1342, 1486, 1486, 1486, 1486, 733, 0, 1702, 1342, 1716, 0, 733, 1716, 1475, 733, 0, 0, 0, 1343, 1343, 1343, 1343, 1486, 0, 0, 1539, 1539, 1539, 1539, 733, 0, 1343, 1475, 0, 733, 0, 0, 733, 739, 739, 739, 739, 0, 739, 1343, 1539, 1486, 739, 739, 739, 739, 739, 739, 1343, 739, 1475, 739, 0, 1344, 1344, 1344, 1344, 739, 0, 1436, 1436, 1436, 1436, 1343, 1539, 0, 1344, 0, 1436, 1436, 0, 1343, 0, 1436, 0, 1436, 0, 0, 1662, 1344, 0, 739, 740, 740, 740, 740, 0, 740, 1344, 0, 1662, 740, 740, 740, 740, 740, 740, 0, 740, 0, 740, 1436, 1662, 1344, 0, 0, 1463, 1463, 1463, 1463, 0, 1344, 0, 1662, 1719, 1463, 0, 1719, 0, 0, 0, 740, 1402, 1402, 1402, 1402, 1463, 1468, 1468, 1468, 1468, 0, 1365, 1365, 1365, 1365, 1468, 1719, 0, 1402, 1719, 1365, 0, 0, 740, 747, 1402, 1468, 747, 747, 1463, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 0, 1365, 0, 1365, 0, 1402, 1468, 0, 1584, 1584, 1584, 1584, 1684, 1684, 1684, 1684, 0, 0, 747, 0, 0, 1684, 747, 747, 1365, 1584, 1365, 1471, 1471, 1471, 1471, 1489, 1489, 1489, 1489, 1784, 1784, 1784, 1784, 0, 0, 747, 0, 1471, 1471, 747, 748, 0, 1489, 748, 748, 1471, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 0, 1489, 748, 1479, 1479, 1479, 1479, 0, 0, 1471, 0, 1440, 1440, 1440, 1440, 1546, 1546, 1546, 1546, 0, 1479, 0, 748, 748, 1489, 0, 748, 1440, 1440, 0, 0, 1546, 1546, 1440, 1818, 1818, 1818, 1818, 1479, 0, 1714, 1417, 1417, 1417, 1417, 748, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 1714, 1440, 773, 773, 773, 1479, 0, 773, 1714, 773, 773, 1417, 1705, 773, 1740, 773, 0, 773, 1740, 0, 1417, 1417, 0, 1714, 1705, 0, 773, 0, 1488, 1488, 1488, 1488, 0, 773, 0, 1417, 1705, 773, 1740, 773, 0, 773, 1740, 1417, 1417, 1488, 0, 1705, 0, 773, 0, 0, 1418, 1418, 1418, 1418, 773, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 1488, 0, 775, 775, 775, 0, 0, 775, 0, 775, 775, 1418, 0, 1473, 1473, 1473, 1473, 1418, 0, 0, 1418, 0, 0, 1488, 0, 1518, 1518, 1518, 1518, 1473, 1473, 0, 0, 775, 0, 1418, 1503, 1503, 1503, 1503, 1418, 1518, 1518, 1418, 1473, 1571, 1571, 1571, 1571, 1518, 1845, 1845, 1845, 1845, 0, 0, 775, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 1473, 1503, 776, 776, 776, 0, 1518, 776, 1600, 776, 776, 0, 1571, 776, 1768, 776, 1768, 776, 1419, 1419, 1419, 1419, 1600, 0, 1503, 0, 776, 0, 1501, 1501, 1501, 1501, 1600, 776, 0, 1571, 0, 776, 1768, 776, 1768, 776, 0, 0, 1419, 1600, 1419, 0, 0, 776, 0, 0, 0, 1419, 1501, 0, 776, 781, 781, 781, 781, 0, 0, 1501, 1510, 1510, 1510, 1510, 1419, 0, 1419, 0, 1420, 1420, 1420, 1420, 1419, 0, 1501, 781, 1510, 781, 1642, 1642, 1642, 1642, 1501, 1575, 1575, 1575, 1575, 781, 781, 1511, 1511, 1511, 1511, 0, 1420, 1642, 0, 0, 0, 781, 1420, 781, 1510, 1420, 0, 1511, 1421, 1421, 1421, 1421, 781, 781, 782, 782, 782, 782, 0, 1575, 1420, 0, 0, 1492, 0, 1420, 1492, 0, 1420, 1422, 1422, 1422, 1422, 1511, 1421, 0, 782, 0, 782, 0, 1421, 0, 1575, 1421, 0, 1492, 0, 782, 0, 782, 0, 1521, 1521, 1521, 1521, 1422, 0, 1492, 1421, 1492, 782, 1422, 782, 1421, 1422, 0, 1421, 0, 0, 1492, 782, 0, 782, 784, 784, 784, 784, 0, 0, 1422, 1492, 0, 1492, 1521, 1422, 0, 1657, 1422, 0, 0, 0, 1696, 1696, 1696, 1696, 784, 0, 784, 0, 0, 1657, 0, 1423, 1423, 1423, 1423, 1521, 784, 784, 784, 1657, 0, 1428, 1428, 1428, 1428, 1696, 0, 0, 784, 0, 784, 1423, 1657, 0, 1428, 0, 0, 1423, 0, 784, 784, 784, 786, 786, 786, 786, 1423, 1428, 0, 1696, 0, 1513, 1513, 1513, 1513, 1423, 1428, 1515, 1515, 1515, 1515, 1423, 1429, 1429, 1429, 1429, 1661, 786, 1513, 1423, 786, 1428, 1513, 1515, 1515, 1429, 0, 786, 1515, 1428, 1661, 786, 0, 0, 1643, 1643, 1643, 1643, 1429, 0, 1661, 786, 0, 1513, 786, 0, 1513, 1429, 0, 1515, 786, 1643, 1515, 1661, 786, 803, 803, 803, 803, 0, 803, 0, 1429, 0, 0, 0, 803, 803, 803, 803, 1429, 0, 803, 803, 0, 0, 0, 803, 1509, 1509, 1509, 1509, 0, 1431, 1431, 1431, 1431, 1509, 1509, 0, 1556, 1556, 1556, 1556, 1509, 0, 1431, 1432, 1432, 1432, 1432, 803, 804, 804, 804, 804, 0, 804, 1524, 1431, 1432, 1524, 1509, 804, 804, 804, 804, 0, 1431, 804, 804, 0, 0, 1432, 0, 1556, 1556, 0, 1524, 0, 1524, 0, 1432, 1431, 0, 1509, 1647, 1647, 1647, 1647, 804, 1431, 1721, 1721, 1721, 1721, 0, 1432, 1556, 1556, 0, 1721, 1524, 1647, 1524, 1432, 0, 0, 1445, 1445, 1445, 1445, 0, 804, 806, 806, 806, 806, 806, 0, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 1445, 1773, 1773, 1773, 1773, 0, 1445, 0, 0, 1445, 1773, 1805, 1805, 1805, 1805, 0, 1495, 1495, 1495, 1495, 1805, 0, 806, 806, 1445, 1512, 1512, 1512, 1512, 1445, 0, 0, 1445, 0, 1512, 1512, 0, 0, 0, 1512, 0, 1512, 1495, 0, 1495, 806, 807, 807, 807, 807, 807, 1495, 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, 1495, 1512, 1495, 1587, 1587, 1587, 1587, 0, 1495, 0, 0, 0, 1587, 1587, 1609, 1609, 1609, 1609, 0, 1587, 1587, 0, 807, 807, 1731, 1731, 1731, 1731, 0, 0, 1609, 1609, 0, 1731, 0, 1453, 1453, 1453, 1453, 0, 1731, 1496, 1496, 1496, 1496, 807, 816, 816, 1453, 816, 816, 816, 816, 816, 816, 816, 816, 816, 816, 816, 816, 1453, 0, 816, 816, 816, 816, 1496, 1675, 0, 1453, 0, 0, 1496, 0, 0, 1496, 1581, 1581, 1581, 1581, 816, 1675, 0, 1675, 1453, 0, 0, 0, 816, 0, 1496, 1675, 1453, 0, 0, 1496, 0, 0, 1496, 1829, 1829, 1829, 1829, 816, 1675, 0, 1675, 0, 1829, 0, 1581, 816, 817, 817, 0, 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, 817, 0, 0, 817, 817, 817, 817, 1581, 0, 0, 1454, 1454, 1454, 1454, 1558, 1558, 1558, 1558, 0, 1568, 1568, 1568, 1568, 1454, 0, 817, 0, 0, 1568, 817, 1698, 1698, 1698, 1698, 0, 0, 1454, 1455, 1455, 1455, 1455, 1569, 1569, 1569, 1569, 1454, 1558, 1698, 817, 0, 1455, 1568, 817, 824, 824, 824, 824, 0, 824, 0, 1454, 0, 0, 1455, 824, 824, 824, 824, 1454, 1558, 824, 824, 1455, 1569, 1568, 824, 1506, 1506, 1506, 1506, 1456, 1456, 1456, 1456, 0, 1506, 0, 1455, 1758, 1758, 1758, 1758, 0, 1456, 0, 1455, 1569, 1758, 1758, 824, 825, 825, 825, 825, 1758, 825, 1456, 0, 1506, 0, 1506, 825, 825, 825, 825, 1456, 0, 825, 825, 0, 0, 0, 825, 1648, 1648, 1648, 1648, 0, 0, 0, 1456, 1506, 0, 1506, 1855, 1855, 1855, 1855, 1456, 1648, 1648, 1526, 1526, 1526, 1526, 0, 825, 826, 826, 826, 826, 826, 0, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 826, 1526, 0, 0, 0, 1649, 1649, 1649, 1649, 0, 1526, 1576, 1576, 1576, 1576, 0, 0, 1461, 1461, 1461, 1461, 1649, 1649, 826, 826, 1526, 1461, 1576, 0, 0, 1461, 0, 0, 1526, 0, 1835, 1835, 1835, 1835, 1622, 1622, 1622, 1622, 1461, 0, 1576, 826, 827, 827, 827, 827, 827, 1461, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, 827, 1461, 1576, 0, 0, 1622, 1835, 0, 0, 1461, 0, 1577, 1577, 1577, 1577, 0, 0, 1462, 1462, 1462, 1462, 0, 0, 827, 827, 0, 1462, 1577, 1622, 1835, 1462, 0, 1589, 1589, 1589, 1589, 0, 0, 1604, 1604, 1604, 1604, 0, 1462, 0, 1577, 827, 835, 1589, 1589, 835, 835, 1462, 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, 835, 1462, 1577, 1589, 1604, 1650, 1650, 1650, 1650, 1462, 1604, 0, 0, 0, 1626, 1626, 1626, 1626, 0, 835, 0, 1650, 1650, 835, 835, 0, 1589, 1604, 1516, 1516, 1516, 1516, 0, 1604, 1621, 1621, 1621, 1621, 1627, 1627, 1627, 1627, 835, 1621, 1516, 1516, 835, 836, 1626, 1516, 836, 836, 0, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 836, 0, 1621, 836, 1516, 1626, 1627, 1516, 0, 1729, 1729, 1729, 1729, 0, 1578, 1578, 1578, 1578, 0, 1843, 1843, 1843, 1843, 836, 836, 1621, 1729, 836, 1843, 1627, 1578, 1578, 0, 0, 0, 1631, 1631, 1631, 1631, 0, 0, 1497, 1497, 1497, 1497, 0, 836, 837, 1578, 0, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 837, 1497, 0, 1631, 0, 1578, 0, 1497, 0, 0, 1497, 1651, 1651, 1651, 1651, 837, 0, 0, 0, 0, 1651, 1651, 0, 837, 837, 1497, 1631, 1651, 1651, 0, 1497, 0, 0, 1497, 1844, 1844, 1844, 1844, 837, 1776, 1776, 1776, 1776, 1844, 0, 0, 837, 838, 1776, 0, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, 1466, 1466, 1466, 1466, 1527, 1527, 1527, 1527, 0, 1466, 1776, 0, 0, 1466, 0, 0, 0, 838, 1467, 1467, 1467, 1467, 838, 838, 0, 0, 1466, 1467, 0, 0, 1527, 1467, 0, 1776, 0, 1466, 0, 0, 0, 1527, 838, 0, 0, 0, 1467, 838, 844, 844, 844, 844, 1466, 0, 844, 1467, 1527, 0, 0, 844, 1466, 844, 0, 0, 1527, 0, 0, 844, 0, 0, 1467, 0, 0, 0, 844, 0, 0, 0, 1467, 1478, 1478, 1478, 1478, 844, 0, 0, 1498, 1498, 1498, 1498, 1561, 1561, 1561, 1561, 0, 0, 1478, 0, 844, 0, 1500, 1500, 1500, 1500, 1478, 0, 844, 845, 845, 845, 845, 0, 1498, 0, 1478, 0, 1561, 0, 1498, 0, 845, 1498, 1500, 0, 0, 1561, 1500, 0, 1478, 0, 0, 845, 0, 845, 0, 1500, 1498, 1478, 0, 0, 1561, 1498, 845, 0, 1498, 0, 1500, 0, 1561, 0, 1500, 1632, 1632, 1632, 1632, 845, 0, 845, 1500, 0, 1499, 1499, 1499, 1499, 0, 845, 846, 846, 846, 846, 0, 1523, 1523, 1523, 1523, 0, 0, 0, 0, 846, 1499, 0, 0, 0, 1523, 1632, 1499, 0, 1523, 0, 0, 1733, 846, 0, 1733, 1499, 0, 1523, 0, 0, 846, 846, 0, 0, 1499, 0, 1523, 0, 1632, 0, 1499, 1733, 0, 1733, 0, 0, 846, 0, 1499, 0, 0, 1523, 0, 846, 846, 847, 847, 847, 847, 1523, 1540, 1540, 1540, 1540, 0, 1733, 0, 1733, 847, 1540, 0, 0, 0, 1540, 1542, 1542, 1542, 1542, 0, 847, 0, 847, 0, 1542, 0, 0, 1540, 1542, 0, 0, 847, 1585, 1585, 1585, 1585, 1540, 1636, 1636, 1636, 1636, 1542, 0, 0, 847, 0, 847, 0, 0, 1585, 1542, 1540, 0, 0, 847, 848, 848, 848, 848, 1540, 1548, 1548, 1548, 1548, 0, 1542, 1585, 0, 848, 0, 0, 1636, 0, 1542, 0, 0, 1548, 1548, 0, 0, 0, 848, 0, 0, 1548, 0, 0, 0, 0, 1585, 848, 0, 0, 848, 1636, 0, 0, 1549, 1549, 1549, 1549, 1560, 1560, 1560, 1560, 848, 0, 0, 1548, 1629, 1629, 1629, 1629, 848, 1549, 0, 848, 849, 849, 849, 849, 0, 0, 1560, 0, 1629, 1629, 1560, 0, 0, 849, 1549, 0, 1549, 1629, 0, 1560, 1562, 1562, 1562, 1562, 849, 0, 849, 0, 0, 0, 1560, 0, 0, 0, 1560, 849, 0, 1549, 0, 1549, 0, 1629, 1560, 0, 0, 0, 1562, 0, 849, 0, 849, 0, 1562, 0, 0, 1562, 0, 0, 849, 850, 850, 850, 850, 1572, 1572, 1572, 1572, 0, 0, 0, 1562, 0, 850, 0, 0, 1562, 0, 0, 1562, 1678, 1678, 1678, 1678, 850, 0, 850, 0, 0, 1572, 0, 1579, 1579, 1579, 1579, 850, 1678, 1678, 1572, 850, 1579, 1579, 0, 1690, 1690, 1690, 1690, 1579, 850, 0, 850, 0, 0, 1572, 1683, 1683, 1683, 1683, 850, 1690, 1690, 1572, 850, 864, 0, 1579, 864, 864, 0, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 0, 0, 0, 1683, 0, 1579, 0, 0, 0, 0, 1610, 1610, 1610, 1610, 0, 864, 1566, 1566, 1566, 1566, 0, 0, 864, 864, 0, 1566, 1683, 1610, 0, 1566, 0, 1653, 1653, 1653, 1653, 0, 0, 0, 864, 0, 0, 0, 1566, 0, 1610, 864, 865, 1653, 1653, 865, 865, 1566, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 1566, 1610, 1653, 0, 865, 0, 0, 0, 1566, 0, 1679, 1679, 1679, 1679, 0, 0, 0, 1567, 1567, 1567, 1567, 0, 865, 865, 0, 1653, 1567, 1679, 865, 0, 1567, 0, 1679, 1607, 1607, 1607, 1607, 1644, 1644, 1644, 1644, 0, 0, 1567, 0, 865, 871, 871, 871, 871, 0, 0, 1567, 1607, 1644, 0, 1679, 0, 0, 0, 1644, 0, 0, 1583, 1583, 1583, 1583, 1567, 1607, 0, 0, 871, 1583, 1583, 871, 1567, 0, 1607, 0, 1583, 871, 871, 0, 0, 1644, 0, 0, 1687, 1687, 1687, 1687, 1607, 0, 0, 0, 871, 0, 1583, 871, 1697, 1697, 1697, 1697, 871, 871, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 0, 1697, 887, 887, 887, 1583, 1687, 887, 0, 887, 887, 0, 0, 887, 0, 887, 0, 887, 1588, 1588, 1588, 1588, 0, 0, 0, 1697, 887, 1588, 1588, 1687, 0, 0, 0, 887, 1588, 1588, 0, 887, 0, 887, 0, 887, 0, 0, 1692, 1692, 1692, 1692, 1697, 887, 0, 0, 1588, 0, 0, 0, 887, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 0, 0, 888, 888, 888, 0, 0, 888, 1588, 888, 888, 1692, 0, 888, 0, 888, 0, 888, 1605, 1605, 1605, 1605, 1713, 1713, 1713, 1713, 888, 1755, 1755, 1755, 1755, 1605, 0, 888, 1692, 0, 0, 888, 0, 888, 0, 888, 0, 1755, 1605, 0, 0, 0, 0, 888, 0, 0, 0, 1605, 1713, 0, 888, 895, 895, 895, 895, 1606, 1606, 1606, 1606, 0, 0, 0, 1605, 1755, 1637, 1637, 1637, 1637, 1606, 0, 1605, 1713, 0, 895, 0, 895, 1725, 1725, 1725, 1725, 1637, 1606, 0, 895, 895, 1616, 1616, 1616, 1616, 0, 1606, 0, 1725, 1725, 1616, 0, 0, 895, 1637, 895, 1633, 1633, 1633, 1633, 0, 1606, 895, 895, 898, 898, 898, 898, 0, 1606, 0, 0, 0, 1616, 0, 1616, 0, 1637, 0, 0, 0, 1633, 1618, 1618, 1618, 1618, 898, 0, 898, 0, 1633, 1618, 0, 0, 0, 0, 1616, 0, 1616, 0, 898, 898, 0, 0, 0, 1633, 0, 0, 1618, 0, 898, 0, 898, 1633, 0, 0, 0, 1618, 1638, 1638, 1638, 1638, 0, 898, 898, 917, 917, 917, 917, 0, 917, 0, 1618, 0, 1638, 0, 917, 917, 917, 917, 1618, 0, 917, 917, 1619, 1619, 1619, 1619, 1663, 1663, 1663, 1663, 1638, 1619, 0, 0, 0, 1639, 1639, 1639, 1639, 0, 0, 917, 0, 1756, 1756, 1756, 1756, 0, 1619, 0, 1663, 1639, 1639, 1638, 0, 0, 0, 1619, 1663, 1756, 0, 0, 0, 0, 917, 918, 918, 918, 918, 1639, 918, 0, 1619, 0, 1663, 0, 918, 918, 918, 918, 1619, 1663, 918, 918, 0, 1756, 0, 0, 1640, 1640, 1640, 1640, 1639, 1652, 1652, 1652, 1652, 1640, 1640, 0, 918, 0, 1652, 1652, 1640, 1693, 1693, 1693, 1693, 1652, 1652, 0, 1723, 1723, 1723, 1723, 1652, 1669, 1669, 1669, 1669, 0, 1640, 918, 927, 927, 0, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, 1693, 1652, 927, 927, 927, 927, 1640, 1723, 0, 0, 1669, 0, 0, 0, 0, 1723, 1669, 0, 1701, 1701, 1701, 1701, 927, 1693, 0, 0, 0, 1701, 927, 0, 1723, 0, 0, 1669, 1701, 1701, 0, 0, 0, 1669, 0, 1655, 1655, 1655, 1655, 927, 0, 0, 0, 0, 1655, 927, 928, 928, 0, 928, 928, 928, 928, 928, 928, 928, 928, 928, 928, 928, 928, 1655, 0, 928, 928, 928, 928, 0, 0, 0, 1655, 1685, 1685, 1685, 1685, 1718, 1718, 1718, 1718, 0, 1685, 0, 0, 0, 928, 1655, 0, 0, 0, 928, 0, 0, 1718, 1655, 0, 0, 0, 1685, 0, 1718, 1760, 1760, 1760, 1760, 0, 0, 1685, 928, 1674, 1674, 1674, 1674, 928, 935, 935, 935, 935, 1760, 935, 0, 0, 1685, 0, 1718, 935, 935, 935, 935, 1674, 1685, 935, 935, 1656, 1656, 1656, 1656, 1735, 1735, 1735, 1735, 0, 0, 1760, 1674, 0, 1656, 0, 0, 0, 1656, 0, 935, 1674, 0, 1695, 1695, 1695, 1695, 1656, 1671, 1671, 1671, 1671, 0, 0, 0, 1674, 1656, 1735, 0, 1695, 1695, 1671, 0, 935, 936, 936, 936, 936, 1695, 936, 0, 1656, 0, 0, 1671, 936, 936, 936, 936, 1656, 1735, 936, 936, 1671, 1673, 1673, 1673, 1673, 936, 0, 0, 0, 1695, 1726, 1726, 1726, 1726, 1673, 1671, 0, 0, 0, 1686, 1686, 1686, 1686, 1671, 0, 0, 1726, 1673, 1686, 936, 949, 949, 949, 949, 0, 0, 1673, 0, 0, 1706, 1706, 1706, 1706, 949, 1726, 1686, 1744, 1744, 1744, 1744, 0, 1673, 1726, 0, 1686, 0, 949, 0, 0, 1673, 0, 0, 0, 1706, 0, 949, 949, 1726, 0, 1686, 0, 1706, 1779, 1779, 1779, 1779, 0, 1686, 1744, 0, 949, 0, 0, 1708, 1708, 1708, 1708, 1706, 949, 949, 950, 950, 950, 950, 1706, 1700, 1700, 1700, 1700, 0, 1779, 1744, 0, 950, 1700, 1700, 0, 0, 0, 1708, 0, 1700, 1700, 0, 0, 1708, 950, 0, 1708, 0, 0, 0, 950, 0, 1779, 950, 0, 0, 1709, 1709, 1709, 1709, 0, 1708, 0, 0, 1700, 0, 1708, 0, 950, 1708, 0, 0, 0, 950, 0, 0, 950, 957, 957, 957, 957, 0, 1709, 0, 0, 0, 0, 1700, 1709, 0, 957, 1709, 1710, 1710, 1710, 1710, 1766, 1766, 1766, 1766, 0, 957, 0, 957, 0, 0, 1709, 1727, 1727, 1727, 1727, 1709, 957, 0, 1709, 0, 1710, 1732, 1732, 1732, 1732, 0, 0, 1727, 1710, 957, 1732, 957, 1766, 1749, 1749, 1749, 1749, 1732, 1732, 957, 961, 961, 961, 961, 1710, 1727, 0, 0, 0, 961, 1749, 1710, 0, 1727, 0, 1766, 1730, 1730, 1730, 1730, 1737, 1737, 1737, 1737, 961, 1730, 1730, 0, 1727, 0, 1749, 0, 1730, 1730, 961, 1739, 1739, 1739, 1739, 961, 0, 0, 1738, 1738, 1738, 1738, 1737, 0, 961, 0, 0, 0, 1737, 1749, 0, 1737, 0, 961, 0, 1739, 0, 0, 961, 1041, 1041, 1041, 1041, 1739, 1738, 0, 1737, 0, 0, 0, 1738, 1737, 1041, 1738, 1737, 1745, 1745, 1745, 1745, 1739, 1752, 1752, 1752, 1752, 0, 1041, 1739, 1041, 1738, 1851, 1851, 1851, 1851, 1738, 1041, 0, 1738, 0, 1851, 1747, 1747, 1747, 1747, 0, 0, 1752, 0, 1745, 1747, 1041, 0, 1041, 0, 1745, 0, 0, 0, 1041, 1042, 1042, 1042, 1042, 0, 0, 0, 1757, 1757, 1757, 1757, 1752, 1745, 1042, 0, 1747, 1757, 1757, 1745, 1747, 0, 1757, 0, 1757, 0, 0, 1042, 1759, 1759, 1759, 1759, 0, 1042, 0, 0, 1042, 1759, 1759, 1747, 0, 0, 0, 1747, 1759, 0, 1809, 1809, 1809, 1809, 1757, 1042, 0, 1759, 0, 0, 1042, 0, 0, 1042, 1044, 1044, 1044, 1044, 0, 1761, 1761, 1761, 1761, 1764, 1764, 1764, 1764, 1044, 1809, 0, 0, 1759, 1764, 0, 1044, 1761, 1761, 0, 0, 1764, 1044, 0, 1809, 1762, 1762, 1762, 1762, 0, 0, 1044, 0, 0, 1809, 1763, 1763, 1763, 1763, 0, 1044, 1762, 1762, 1761, 1763, 1763, 1044, 0, 0, 1763, 0, 1763, 1763, 0, 1044, 1049, 1049, 1049, 1049, 0, 0, 0, 0, 1770, 1770, 1770, 1770, 1762, 1049, 1852, 1852, 1852, 1852, 1771, 1771, 1771, 1771, 1763, 1852, 1049, 0, 1049, 1771, 1791, 1791, 1791, 1791, 1770, 0, 0, 1049, 0, 1791, 1791, 0, 1770, 0, 1771, 0, 1791, 0, 0, 0, 1049, 0, 1049, 0, 1771, 0, 0, 0, 1770, 0, 1049, 1092, 1092, 1092, 1092, 1770, 0, 0, 1771, 0, 1802, 1802, 1802, 1802, 1092, 0, 0, 1771, 1092, 1802, 1774, 1774, 1774, 1774, 0, 1092, 0, 1092, 0, 1774, 0, 0, 0, 1774, 1802, 0, 1092, 0, 0, 1775, 1775, 1775, 1775, 0, 0, 0, 1774, 0, 1775, 1092, 0, 1092, 1775, 0, 0, 1774, 0, 0, 1802, 1092, 1093, 1093, 1093, 1093, 0, 1775, 1792, 1792, 1792, 1792, 1774, 0, 0, 1093, 1775, 1792, 1792, 1093, 1774, 0, 0, 0, 1792, 0, 0, 0, 1093, 0, 0, 1775, 1795, 1795, 1795, 1795, 1093, 1093, 0, 1775, 0, 1795, 1795, 1815, 1815, 1815, 1815, 0, 1795, 0, 0, 0, 1093, 0, 0, 0, 0, 0, 0, 1093, 1093, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1125, 1815, 1125, 1125, 1125, 1125, 1788, 1788, 1788, 1788, 1789, 1789, 1789, 1789, 1790, 1790, 1790, 1790, 0, 0, 0, 0, 1788, 0, 1815, 0, 1789, 0, 1125, 0, 1790, 1790, 0, 0, 1788, 0, 0, 0, 1789, 0, 0, 0, 1790, 0, 1798, 1798, 1798, 1798, 0, 0, 0, 1125, 1148, 1148, 1148, 1148, 0, 0, 1788, 0, 0, 0, 1789, 0, 0, 1148, 1790, 0, 1798, 0, 1799, 1799, 1799, 1799, 1148, 0, 1798, 0, 1148, 1799, 0, 1800, 1800, 1800, 1800, 0, 0, 1148, 0, 0, 1800, 0, 1798, 0, 1799, 0, 0, 0, 1148, 1798, 0, 0, 1148, 0, 1799, 0, 0, 1800, 0, 0, 1148, 1187, 1187, 1187, 1187, 0, 1800, 1187, 1799, 0, 0, 0, 1187, 0, 1187, 0, 0, 1799, 1187, 0, 1187, 1800, 1801, 1801, 1801, 1801, 0, 1187, 0, 1800, 0, 1801, 1804, 1804, 1804, 1804, 1187, 1810, 1810, 1810, 1810, 0, 1811, 1811, 1811, 1811, 0, 0, 1801, 0, 0, 1187, 0, 1828, 1828, 1828, 1828, 1801, 0, 1187, 1188, 1188, 1188, 1188, 1804, 1810, 1816, 1816, 1816, 1816, 1811, 0, 1801, 1188, 0, 0, 0, 1188, 0, 0, 1801, 1817, 1817, 1817, 1817, 1828, 1188, 1804, 0, 1810, 0, 0, 0, 1188, 1811, 1188, 1819, 1819, 1819, 1819, 1816, 1820, 1820, 1820, 1820, 0, 1817, 0, 1828, 0, 1188, 0, 1819, 1819, 0, 1817, 1188, 1820, 1188, 1189, 1189, 1189, 1189, 1816, 1821, 1821, 1821, 1821, 0, 1820, 1817, 0, 1189, 1819, 0, 0, 1189, 0, 1817, 0, 1821, 0, 0, 1820, 0, 1189, 0, 0, 1827, 1827, 1827, 1827, 1821, 1820, 1189, 1189, 1819, 1827, 1827, 1830, 1830, 1830, 1830, 0, 1827, 0, 1821, 0, 1830, 1189, 0, 0, 0, 0, 0, 0, 1821, 1189, 1189, 1190, 1190, 1190, 1190, 0, 0, 1830, 0, 1831, 1831, 1831, 1831, 0, 0, 0, 1830, 0, 1831, 1838, 1838, 1838, 1838, 1190, 0, 1190, 0, 1832, 1832, 1832, 1832, 1830, 0, 0, 1190, 1831, 1832, 1190, 0, 1830, 1839, 1839, 1839, 1839, 1831, 0, 0, 1190, 0, 1190, 0, 1832, 0, 1838, 0, 0, 0, 1190, 0, 1831, 1190, 1194, 1194, 1194, 1194, 0, 0, 1831, 1839, 1841, 1841, 1841, 1841, 0, 1194, 1832, 1838, 0, 1840, 1840, 1840, 1840, 0, 0, 0, 1841, 1841, 1194, 1842, 1842, 1842, 1842, 1839, 1194, 0, 0, 1194, 1842, 1842, 0, 1849, 1849, 1849, 1849, 1842, 0, 1840, 0, 0, 0, 0, 1194, 1840, 0, 0, 0, 1194, 0, 0, 1194, 1195, 1195, 1195, 1195, 0, 1842, 0, 0, 0, 0, 1840, 0, 0, 1195, 1849, 1840, 0, 1849, 0, 0, 1850, 1850, 1850, 1850, 0, 0, 1195, 0, 1842, 1850, 1850, 0, 1195, 0, 0, 1195, 1850, 1849, 0, 0, 1849, 1856, 1856, 1856, 1856, 0, 0, 0, 0, 0, 1195, 0, 0, 0, 0, 1195, 0, 0, 1195, 1213, 1213, 1213, 1213, 0, 1213, 0, 0, 0, 0, 0, 1213, 1213, 1213, 1213, 1213, 1856, 1213, 1213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1857, 1857, 1857, 1857, 0, 0, 0, 1856, 0, 0, 1213, 1213, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1215, 1857, 1215, 1215, 1215, 1215, 0, 1857, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1857, 0, 0, 1215, 0, 1857, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1215, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 1218, 0, 1218, 1218, 1218, 1218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1218, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 0, 1220, 1220, 1220, 1220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1220, 1234, 1234, 1234, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 1234, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 1234, 0, 0, 1234, 1235, 1235, 1235, 1235, 0, 0, 0, 0, 0, 1235, 0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 0, 1235, 1235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 1235, 1235, 1271, 1271, 1271, 1271, 0, 0, 1271, 0, 0, 0, 0, 1271, 0, 1271, 0, 0, 0, 1271, 0, 1271, 0, 0, 0, 0, 0, 0, 1271, 0, 0, 0, 0, 0, 0, 0, 0, 1271, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1271, 0, 0, 0, 0, 0, 0, 0, 1271, 1272, 1272, 1272, 1272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1272, 0, 0, 0, 1272, 0, 0, 0, 0, 0, 0, 1272, 0, 1272, 0, 0, 0, 0, 0, 0, 0, 0, 1272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1272, 0, 1272, 0, 0, 0, 0, 0, 0, 0, 1272, 1273, 1273, 1273, 1273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1273, 0, 0, 0, 1273, 0, 0, 0, 0, 0, 0, 0, 0, 1273, 0, 0, 0, 0, 0, 0, 0, 1273, 1273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1273, 0, 0, 0, 0, 0, 0, 1273, 1273, 1274, 1274, 1274, 1274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1274, 0, 0, 0, 1274, 0, 0, 0, 0, 0, 0, 1274, 0, 1274, 0, 0, 0, 0, 0, 0, 0, 0, 1274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1274, 0, 1274, 0, 0, 0, 0, 0, 0, 0, 1274, 1275, 1275, 1275, 1275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1275, 0, 0, 0, 1275, 0, 0, 0, 0, 0, 0, 0, 0, 1275, 0, 0, 0, 0, 0, 0, 0, 0, 1275, 0, 0, 1275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1275, 0, 0, 0, 0, 0, 0, 0, 1275, 0, 0, 1275, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 0, 0, 1278, 1278, 1278, 0, 0, 1278, 0, 1278, 1278, 0, 0, 0, 0, 0, 0, 1278, 0, 0, 0, 0, 0, 0, 0, 0, 1278, 0, 0, 0, 0, 0, 0, 1278, 0, 0, 0, 0, 0, 0, 0, 1278, 0, 0, 0, 0, 0, 0, 0, 1278, 0, 0, 0, 0, 0, 0, 1278, 1282, 1282, 1282, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 0, 1282, 1293, 1293, 1293, 1293, 0, 0, 0, 0, 0, 0, 0, 1293, 1293, 1293, 0, 1293, 0, 1293, 1293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1293, 1293, 1294, 1294, 1294, 1294, 0, 1294, 0, 0, 0, 0, 0, 1294, 1294, 1294, 1294, 1294, 0, 1294, 1294, 0, 0, 0, 0, 0, 0, 1294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1294, 0, 0, 0, 0, 0, 0, 1294, 1294, 0, 0, 0, 0, 0, 1294, 0, 0, 0, 0, 0, 0, 0, 0, 1294, 1298, 1298, 1298, 1298, 0, 0, 0, 0, 0, 0, 0, 1298, 1298, 1298, 0, 1298, 0, 1298, 1298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1298, 1298, 1300, 1300, 1300, 1300, 0, 1300, 0, 0, 0, 0, 0, 1300, 1300, 1300, 1300, 1300, 0, 1300, 1300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1300, 1300, 1301, 0, 0, 1301, 1301, 0, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1301, 1301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1301, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 0, 1303, 1303, 1303, 1303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1303, 1311, 1311, 1311, 1311, 0, 0, 0, 0, 0, 0, 0, 1311, 1311, 1311, 0, 1311, 0, 1311, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1311, 1311, 1313, 1313, 1313, 1313, 0, 1313, 0, 0, 0, 0, 0, 1313, 1313, 1313, 1313, 1313, 0, 1313, 1313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1313, 1313, 1316, 1316, 1316, 1316, 0, 1316, 0, 0, 0, 0, 0, 1316, 1316, 1316, 1316, 1316, 0, 1316, 1316, 0, 0, 0, 0, 0, 0, 1316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1316, 0, 0, 0, 0, 0, 0, 1316, 1316, 0, 0, 0, 0, 0, 1316, 0, 0, 0, 0, 0, 0, 0, 0, 1316, 1317, 1317, 1317, 1317, 0, 1317, 0, 0, 0, 0, 0, 1317, 1317, 1317, 1317, 0, 0, 1317, 1317, 0, 0, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1317, 1319, 0, 0, 1319, 1319, 0, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 0, 0, 0, 1319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 1319, 0, 0, 0, 1319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 1320, 1320, 1320, 1320, 1320, 0, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 1320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1323, 0, 0, 0, 0, 0, 0, 1323, 1323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1323, 0, 0, 0, 0, 0, 0, 1323, 1328, 1328, 1328, 1328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1328, 0, 0, 0, 0, 0, 0, 0, 1328, 1328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1328, 0, 0, 0, 0, 0, 0, 1328, 1328, 1337, 1337, 1337, 1337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1337, 0, 1337, 0, 0, 0, 0, 0, 0, 1337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1337, 0, 1337, 0, 0, 0, 0, 0, 1337, 1338, 1338, 1338, 1338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1338, 0, 0, 0, 0, 0, 1338, 0, 0, 1338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1338, 0, 0, 0, 0, 1338, 0, 0, 1338, 1340, 1340, 1340, 1340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1340, 0, 0, 0, 0, 0, 1340, 0, 0, 1340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1340, 0, 0, 0, 0, 1340, 0, 0, 1340, 1345, 1345, 1345, 1345, 0, 1345, 0, 0, 0, 1345, 1345, 1345, 1345, 1345, 1345, 0, 1345, 0, 1345, 1346, 1346, 1346, 1346, 0, 1346, 0, 0, 0, 1346, 1346, 1346, 1346, 1346, 1346, 0, 1346, 0, 1346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1346, 1350, 1350, 1350, 1350, 1350, 0, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 1350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1350, 1350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1350, 1353, 1353, 1353, 1353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1353, 0, 0, 0, 1353, 0, 0, 0, 0, 0, 0, 0, 0, 1353, 0, 0, 0, 0, 0, 0, 0, 0, 1353, 1353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1353, 0, 0, 0, 0, 0, 0, 0, 1353, 1353, 1354, 1354, 1354, 1354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1354, 0, 0, 0, 1354, 0, 0, 0, 0, 0, 0, 0, 0, 1354, 0, 0, 0, 0, 0, 1354, 0, 0, 1354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1354, 0, 0, 0, 0, 1354, 0, 0, 1354, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 0, 0, 1355, 1355, 1355, 0, 0, 1355, 0, 1355, 1355, 0, 0, 0, 0, 0, 0, 1355, 0, 0, 0, 0, 0, 0, 1355, 0, 1355, 0, 0, 0, 0, 0, 0, 1355, 0, 0, 0, 0, 0, 0, 0, 1355, 0, 0, 0, 0, 0, 1355, 0, 1355, 0, 0, 0, 0, 0, 0, 1355, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 1356, 0, 0, 1356, 1356, 1356, 0, 0, 1356, 0, 1356, 1356, 0, 0, 0, 0, 0, 0, 1356, 0, 0, 0, 0, 0, 0, 0, 0, 1356, 1356, 0, 0, 0, 0, 0, 1356, 0, 0, 0, 0, 0, 0, 0, 1356, 0, 0, 0, 0, 0, 0, 0, 1356, 1356, 0, 0, 0, 0, 0, 1356, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 1357, 0, 0, 1357, 1357, 1357, 0, 0, 1357, 0, 1357, 1357, 0, 0, 0, 0, 0, 0, 1357, 0, 0, 0, 0, 0, 0, 0, 0, 1357, 0, 0, 0, 0, 0, 0, 1357, 0, 0, 0, 0, 0, 0, 0, 1357, 0, 0, 0, 0, 0, 0, 0, 1357, 0, 0, 0, 0, 0, 0, 1357, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 0, 0, 1358, 1358, 1358, 0, 0, 1358, 0, 1358, 1358, 0, 0, 0, 0, 0, 0, 1358, 0, 0, 0, 0, 0, 0, 0, 0, 1358, 0, 0, 0, 0, 0, 0, 1358, 0, 0, 0, 0, 0, 0, 0, 1358, 0, 0, 0, 0, 0, 0, 0, 1358, 0, 0, 0, 0, 0, 0, 1358, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 0, 0, 1359, 1359, 1359, 0, 0, 1359, 0, 1359, 1359, 0, 0, 0, 0, 0, 0, 1359, 0, 0, 0, 0, 0, 0, 0, 0, 1359, 0, 0, 0, 0, 0, 0, 1359, 0, 0, 0, 0, 0, 0, 0, 1359, 0, 0, 0, 0, 0, 0, 0, 1359, 0, 0, 0, 0, 0, 0, 1359, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 0, 0, 1360, 1360, 1360, 0, 0, 1360, 0, 1360, 1360, 0, 0, 0, 0, 0, 0, 1360, 0, 0, 0, 0, 0, 0, 0, 0, 1360, 0, 0, 0, 0, 0, 0, 1360, 0, 0, 0, 0, 0, 0, 0, 1360, 0, 0, 0, 0, 0, 0, 0, 1360, 0, 0, 0, 0, 0, 0, 1360, 1372, 1372, 1372, 1372, 0, 0, 0, 0, 0, 0, 0, 1372, 1372, 1372, 0, 1372, 0, 1372, 1372, 0, 0, 0, 0, 0, 0, 1372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1372, 0, 0, 0, 0, 0, 0, 1372, 1372, 0, 0, 0, 0, 0, 1372, 0, 0, 0, 0, 0, 0, 0, 0, 1372, 1380, 1380, 1380, 1380, 0, 1380, 0, 0, 0, 0, 0, 1380, 1380, 1380, 1380, 0, 0, 1380, 1380, 1381, 1381, 1381, 1381, 0, 1381, 0, 0, 0, 0, 0, 1381, 1381, 1381, 1381, 0, 0, 1381, 1381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1381, 1384, 1384, 1384, 1384, 0, 1384, 0, 0, 0, 0, 0, 1384, 1384, 1384, 1384, 1384, 0, 1384, 1384, 0, 0, 0, 0, 0, 0, 1384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1384, 0, 0, 0, 0, 0, 0, 1384, 1384, 0, 0, 0, 0, 0, 1384, 0, 0, 0, 0, 0, 0, 0, 0, 1384, 1386, 1386, 1386, 1386, 0, 0, 0, 0, 0, 0, 0, 1386, 1386, 1386, 0, 1386, 0, 1386, 1386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1386, 1386, 1387, 1387, 1387, 1387, 0, 0, 0, 0, 0, 0, 0, 1387, 1387, 1387, 0, 1387, 0, 1387, 1387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1387, 1387, 1388, 1388, 1388, 1388, 0, 1388, 0, 0, 0, 0, 0, 1388, 1388, 1388, 1388, 1388, 0, 1388, 1388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1388, 1388, 1389, 1389, 1389, 1389, 0, 1389, 0, 0, 0, 0, 0, 1389, 1389, 1389, 1389, 1389, 0, 1389, 1389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1389, 1389, 1390, 0, 0, 1390, 1390, 0, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1390, 1390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1390, 1391, 0, 0, 1391, 1391, 0, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1391, 1391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1391, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1392, 1392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1392, 1397, 1397, 1397, 1397, 0, 0, 0, 0, 0, 0, 0, 1397, 1397, 1397, 0, 1397, 0, 1397, 1397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1397, 1397, 1398, 1398, 1398, 1398, 0, 0, 0, 0, 0, 0, 0, 1398, 1398, 1398, 0, 1398, 0, 1398, 1398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1398, 1398, 1399, 1399, 1399, 1399, 0, 1399, 0, 0, 0, 0, 0, 1399, 1399, 1399, 1399, 1399, 0, 1399, 1399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1399, 1399, 1400, 1400, 1400, 1400, 0, 1400, 0, 0, 0, 0, 0, 1400, 1400, 1400, 1400, 1400, 0, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1400, 1400, 1401, 1401, 1401, 1401, 0, 0, 0, 0, 0, 0, 0, 1401, 1401, 1401, 0, 1401, 0, 1401, 1401, 0, 0, 0, 0, 0, 0, 1401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1401, 0, 0, 0, 0, 0, 0, 1401, 1401, 0, 0, 0, 0, 0, 1401, 0, 0, 0, 0, 0, 0, 0, 0, 1401, 1406, 1406, 1406, 1406, 0, 1406, 0, 0, 0, 0, 0, 1406, 1406, 1406, 1406, 0, 0, 1406, 1406, 1407, 1407, 1407, 1407, 0, 1407, 0, 0, 0, 0, 0, 1407, 1407, 1407, 1407, 0, 0, 1407, 1407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1407, 1409, 1409, 1409, 1409, 0, 1409, 0, 0, 0, 0, 0, 1409, 1409, 1409, 1409, 1409, 0, 1409, 1409, 0, 0, 0, 0, 0, 0, 1409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1409, 0, 0, 0, 0, 0, 0, 1409, 1409, 0, 0, 0, 0, 0, 1409, 0, 0, 0, 0, 0, 0, 0, 0, 1409, 1410, 1410, 1410, 1410, 1410, 0, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 1410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1410, 1410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1410, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1411, 0, 0, 0, 0, 0, 0, 1411, 1411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1411, 0, 0, 0, 0, 0, 0, 1411, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1412, 0, 0, 0, 0, 0, 1412, 1412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1412, 0, 0, 0, 0, 0, 1412, 1414, 1414, 1414, 1414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1414, 0, 0, 0, 0, 0, 0, 1414, 0, 1414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1414, 0, 0, 0, 0, 0, 1414, 0, 1414, 1426, 1426, 1426, 1426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1426, 0, 0, 0, 0, 0, 0, 0, 0, 1426, 0, 0, 0, 1426, 0, 0, 0, 0, 0, 0, 0, 0, 1426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1426, 0, 0, 0, 1426, 0, 0, 0, 0, 0, 0, 0, 1426, 1433, 1433, 1433, 1433, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1433, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1433, 0, 0, 0, 0, 0, 0, 0, 1433, 1433, 1433, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1433, 0, 0, 0, 0, 0, 0, 1433, 1433, 1433, 1437, 1437, 1437, 1437, 0, 1437, 0, 0, 0, 1437, 1437, 1437, 1437, 1437, 1437, 0, 1437, 0, 1437, 1441, 1441, 1441, 1441, 1441, 0, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1441, 0, 0, 0, 0, 0, 0, 1441, 1441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1441, 0, 0, 0, 0, 0, 0, 1441, 1443, 1443, 1443, 1443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1443, 0, 0, 0, 1443, 0, 0, 0, 0, 0, 0, 0, 0, 1443, 0, 1443, 0, 0, 0, 0, 0, 0, 1443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1443, 0, 1443, 0, 0, 0, 0, 0, 1443, 1444, 1444, 1444, 1444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1444, 0, 0, 0, 1444, 0, 0, 0, 0, 0, 0, 0, 0, 1444, 0, 0, 0, 0, 0, 1444, 0, 0, 1444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1444, 0, 0, 0, 0, 1444, 0, 0, 1444, 1446, 1446, 1446, 1446, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1446, 0, 0, 0, 1446, 0, 0, 1446, 0, 0, 0, 0, 0, 1446, 0, 0, 0, 0, 0, 0, 0, 0, 1446, 0, 0, 0, 0, 0, 0, 0, 0, 1446, 0, 0, 0, 0, 0, 1446, 0, 0, 0, 0, 0, 0, 0, 1446, 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447, 1447, 0, 0, 1447, 1447, 1447, 0, 0, 1447, 0, 1447, 1447, 0, 0, 0, 0, 0, 0, 1447, 0, 0, 0, 0, 0, 0, 0, 0, 1447, 0, 0, 1447, 0, 0, 0, 1447, 0, 0, 0, 0, 0, 0, 0, 1447, 0, 0, 0, 0, 0, 0, 0, 1447, 0, 0, 1447, 0, 0, 0, 1447, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 1448, 0, 0, 1448, 1448, 1448, 0, 0, 1448, 0, 1448, 1448, 1448, 0, 0, 0, 0, 0, 1448, 0, 0, 0, 0, 0, 0, 0, 0, 1448, 0, 0, 0, 0, 0, 0, 1448, 0, 1448, 0, 0, 0, 0, 0, 1448, 0, 0, 0, 0, 0, 0, 0, 1448, 0, 0, 0, 0, 0, 0, 1448, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 0, 0, 1449, 1449, 1449, 0, 0, 1449, 0, 1449, 1449, 0, 0, 0, 0, 0, 0, 1449, 0, 0, 0, 0, 0, 0, 0, 0, 1449, 0, 0, 0, 0, 0, 0, 1449, 0, 0, 0, 0, 0, 0, 0, 1449, 0, 0, 0, 0, 0, 0, 0, 1449, 0, 0, 0, 0, 0, 0, 1449, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 0, 0, 1450, 1450, 1450, 0, 0, 1450, 0, 1450, 1450, 0, 0, 0, 0, 0, 0, 1450, 0, 0, 0, 0, 0, 0, 0, 0, 1450, 0, 0, 0, 0, 0, 0, 1450, 0, 0, 0, 0, 0, 0, 0, 1450, 0, 0, 0, 0, 0, 0, 0, 1450, 0, 0, 0, 0, 0, 0, 1450, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 1457, 0, 0, 1457, 1457, 1457, 0, 0, 1457, 0, 1457, 1457, 0, 0, 0, 0, 0, 0, 1457, 0, 0, 0, 0, 0, 0, 0, 0, 1457, 0, 0, 0, 0, 0, 0, 1457, 0, 0, 0, 0, 0, 0, 0, 1457, 0, 0, 0, 0, 0, 0, 0, 1457, 0, 0, 0, 0, 0, 0, 1457, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 1458, 0, 0, 1458, 1458, 1458, 0, 0, 1458, 0, 1458, 1458, 0, 0, 0, 0, 0, 0, 1458, 0, 0, 0, 0, 0, 0, 1458, 0, 1458, 0, 0, 0, 0, 0, 0, 1458, 0, 0, 0, 0, 0, 0, 0, 1458, 0, 0, 0, 0, 0, 1458, 0, 1458, 0, 0, 0, 0, 0, 0, 1458, 1476, 1476, 1476, 1476, 0, 0, 0, 0, 0, 0, 0, 1476, 1476, 1476, 0, 1476, 0, 1476, 1476, 0, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 0, 0, 1476, 1476, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 0, 0, 0, 0, 1476, 1480, 1480, 1480, 1480, 0, 1480, 0, 0, 0, 0, 0, 1480, 1480, 1480, 1480, 0, 0, 1480, 1480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1480, 1481, 1481, 1481, 1481, 0, 1481, 0, 0, 0, 0, 0, 1481, 1481, 1481, 1481, 0, 0, 1481, 1481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1481, 0, 1481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1481, 0, 1481, 1482, 1482, 1482, 1482, 1482, 0, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 1482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 1482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 1483, 1483, 1483, 1483, 1483, 0, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 1483, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1483, 1483, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1483, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 1484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1484, 1484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1484, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 1485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1485, 1485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1485, 1490, 1490, 1490, 1490, 0, 0, 0, 0, 0, 0, 0, 1490, 1490, 1490, 0, 1490, 0, 1490, 1490, 0, 0, 0, 0, 0, 0, 1490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1490, 0, 0, 0, 0, 0, 0, 1490, 1490, 0, 0, 0, 0, 0, 1490, 0, 0, 0, 0, 0, 0, 0, 0, 1490, 1491, 1491, 1491, 1491, 1491, 0, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 1491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1491, 0, 0, 0, 0, 0, 0, 1491, 1491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1491, 0, 0, 0, 0, 0, 0, 1491, 1504, 1504, 1504, 1504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1504, 0, 0, 0, 0, 0, 1504, 0, 0, 1504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1504, 0, 0, 0, 0, 1504, 0, 0, 1504, 1508, 0, 0, 1508, 1508, 0, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 1508, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1508, 1508, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1508, 1517, 1517, 1517, 1517, 0, 0, 0, 0, 0, 1517, 1517, 0, 0, 0, 1517, 0, 1517, 1517, 0, 0, 0, 1517, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1517, 0, 0, 1517, 1519, 1519, 1519, 1519, 1519, 0, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0, 1519, 1519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1519, 0, 0, 0, 0, 0, 0, 1519, 1520, 1520, 1520, 1520, 1520, 0, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0, 0, 0, 1520, 1520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0, 0, 0, 0, 1520, 1522, 1522, 1522, 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0, 1522, 0, 0, 0, 0, 1522, 0, 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1522, 0, 0, 0, 1522, 0, 0, 0, 0, 0, 0, 0, 1522, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 1528, 0, 0, 1528, 1528, 1528, 0, 0, 1528, 0, 1528, 1528, 0, 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0, 1528, 1529, 1529, 1529, 1529, 1529, 1529, 1529, 1529, 1529, 1529, 0, 0, 1529, 1529, 1529, 0, 0, 1529, 0, 1529, 1529, 0, 0, 0, 0, 1529, 0, 1529, 0, 0, 0, 0, 0, 0, 0, 0, 1529, 0, 0, 0, 0, 0, 0, 1529, 0, 0, 0, 0, 0, 1529, 0, 1529, 0, 0, 0, 0, 0, 0, 0, 1529, 0, 0, 0, 0, 0, 0, 1529, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 0, 0, 1535, 1535, 1535, 0, 0, 1535, 0, 1535, 1535, 0, 0, 0, 0, 1535, 0, 1535, 0, 0, 0, 0, 0, 0, 0, 0, 1535, 0, 0, 0, 0, 0, 0, 1535, 0, 0, 0, 0, 0, 1535, 0, 1535, 0, 0, 0, 0, 0, 0, 0, 1535, 0, 0, 0, 0, 0, 0, 1535, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 0, 0, 1536, 1536, 1536, 0, 0, 1536, 0, 1536, 1536, 0, 0, 0, 0, 0, 0, 1536, 0, 0, 0, 0, 0, 0, 0, 0, 1536, 0, 0, 1536, 0, 0, 0, 1536, 0, 0, 0, 0, 0, 0, 0, 1536, 0, 0, 0, 0, 0, 0, 0, 1536, 0, 0, 1536, 0, 0, 0, 1536, 1550, 1550, 1550, 1550, 0, 1550, 0, 0, 0, 0, 0, 1550, 1550, 1550, 1550, 0, 0, 1550, 1550, 0, 0, 0, 1550, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1550, 1551, 1551, 1551, 1551, 0, 1551, 0, 0, 0, 0, 0, 1551, 1551, 1551, 1551, 0, 0, 1551, 1551, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1551, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1551, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 1552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1552, 1552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1552, 1555, 1555, 1555, 1555, 1555, 0, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 1555, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1555, 0, 0, 0, 0, 0, 0, 1555, 1555, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1555, 0, 0, 0, 0, 0, 0, 1555, 1563, 1563, 1563, 1563, 0, 0, 0, 0, 0, 1563, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1563, 0, 0, 0, 0, 0, 0, 0, 1563, 1563, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1563, 0, 0, 0, 0, 0, 0, 1563, 1563, 1573, 0, 0, 1573, 1573, 0, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1573, 1573, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1573, 1580, 1580, 1580, 1580, 0, 0, 0, 0, 0, 1580, 1580, 0, 0, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 1580, 1582, 0, 0, 1582, 1582, 0, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1582, 1582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1582, 1586, 0, 0, 1586, 1586, 0, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 1586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1586, 1586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1586, 1590, 1590, 1590, 1590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1590, 0, 0, 0, 1590, 0, 0, 0, 0, 0, 0, 0, 0, 1590, 0, 0, 0, 0, 0, 1590, 0, 0, 1590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1590, 0, 0, 0, 0, 1590, 0, 0, 1590, 1591, 1591, 1591, 1591, 0, 0, 0, 0, 0, 1591, 0, 0, 0, 1591, 0, 0, 0, 1591, 0, 0, 0, 0, 0, 0, 0, 0, 1591, 0, 0, 0, 0, 0, 0, 0, 1591, 1591, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1591, 0, 0, 0, 0, 0, 0, 1591, 1591, 1634, 0, 0, 1634, 1634, 0, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 1634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1634, 1634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1634, 1641, 1641, 1641, 1641, 0, 0, 0, 0, 0, 1641, 1641, 0, 0, 0, 0, 0, 1641, 0, 0, 0, 0, 0, 0, 0, 0, 1641, 0, 0, 0, 0, 0, 0, 0, 0, 1641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1641, 0, 0, 0, 0, 0, 0, 0, 1641, 1645, 0, 0, 1645, 1645, 0, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1645, 1645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1645, 1654, 1654, 1654, 1654, 0, 0, 0, 0, 0, 1654, 0, 0, 0, 1654, 0, 0, 0, 1654, 0, 0, 0, 0, 0, 0, 0, 0, 1654, 0, 0, 0, 0, 0, 0, 0, 0, 1654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1654, 0, 0, 0, 0, 0, 0, 0, 1654, 1667, 1667, 1667, 1667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1667, 0, 0, 0, 0, 0, 1667, 0, 0, 1667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1667, 0, 0, 0, 0, 1667, 0, 0, 1667, 1668, 1668, 1668, 1668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1668, 0, 0, 0, 0, 0, 1668, 0, 0, 1668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1668, 0, 0, 0, 0, 1668, 0, 0, 1668, 1728, 1728, 1728, 1728, 0, 0, 0, 0, 0, 1728, 1728, 0, 0, 0, 1728, 0, 1728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1728, 0, 0, 0, 0, 0, 0, 0, 1728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1728, 1753, 0, 0, 1753, 1753, 0, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 1753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1753, 1753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1753, 1754, 1754, 1754, 1754, 1754, 0, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1754, 1754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1754, 1782, 0, 0, 1782, 1782, 0, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1782, 1782, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1782, 1785, 1785, 1785, 1785, 1785, 0, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 1785, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1785, 1785, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1785, 1786, 1786, 1786, 1786, 1786, 0, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 1786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1786, 1786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1786, 1787, 1787, 1787, 1787, 1787, 0, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 1787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1787, 0, 0, 0, 0, 0, 0, 0, 1787, 1787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1787, 0, 0, 0, 0, 0, 0, 0, 1787, 1794, 0, 0, 1794, 1794, 0, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 1794, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1794, 1794, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1794, 1814, 1814, 1814, 1814, 1814, 0, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 1814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1814, 0, 0, 0, 0, 0, 0, 0, 1814, 1814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1814, 0, 0, 0, 0, 0, 0, 0, 1814, 1822, 1822, 1822, 1822, 0, 0, 0, 0, 0, 1822, 1822, 0, 0, 0, 1822, 0, 1822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1822, 1824, 0, 0, 1824, 1824, 0, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1824, 1824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1824, 1848, 1848, 1848, 1848, 1848, 0, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1848, 1848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1848, 1853, 1853, 1853, 1853, 1853, 0, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1853, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1853, 1853, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1853, 1854, 1854, 1854, 1854, 1854, 0, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 1854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1854, 1854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1854, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1861, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1867, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1872, 0, 0, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1873, 0, 0, 0, 0, 1873, 1873, 0, 0, 0, 0, 1873, 1873, 0, 1873, 1874, 0, 0, 1874, 1874, 0, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1874, 1875, 1875, 1875, 1875, 0, 1875, 0, 1875, 0, 0, 1875, 1875, 1875, 1875, 0, 0, 0, 1875, 1875, 1875, 1875, 1876, 0, 0, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1877, 1877, 1877, 1877, 0, 0, 0, 1877, 0, 0, 0, 1877, 1877, 1877, 0, 0, 0, 1877, 1877, 0, 1877, 1878, 1878, 1878, 1878, 0, 0, 1878, 1878, 0, 0, 0, 1878, 1878, 1878, 0, 0, 0, 1878, 1878, 0, 1878, 1879, 1879, 1879, 1879, 0, 0, 0, 1879, 0, 0, 1879, 1879, 1879, 0, 0, 0, 0, 1879, 1879, 0, 1879, 1880, 1880, 1880, 1880, 0, 1880, 0, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 0, 1880, 0, 1880, 1880, 0, 1880, 1881, 0, 0, 1881, 1881, 0, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1881, 1882, 1882, 1882, 1882, 0, 0, 1882, 0, 0, 0, 0, 1882, 1882, 0, 0, 0, 0, 1882, 1882, 0, 1882, 1883, 0, 0, 1883, 1883, 0, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1884, 1884, 0, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1885, 1885, 1885, 1885, 0, 0, 0, 0, 0, 0, 1885, 0, 0, 0, 0, 0, 0, 1885, 1885, 0, 1885, 1886, 1886, 0, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 0, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1887, 0, 0, 0, 0, 1887, 1887, 0, 0, 0, 0, 1887, 1887, 0, 1887, 1888, 0, 0, 1888, 1888, 0, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1889, 0, 0, 0, 0, 1889, 1889, 0, 0, 0, 0, 1889, 1889, 0, 1889, 1890, 0, 0, 1890, 1890, 0, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1892, 0, 0, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1893, 0, 0, 1893, 1893, 1893, 1893, 1893, 0, 0, 1893, 0, 1893, 1893, 0, 1893, 1894, 0, 0, 1894, 1894, 0, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1894, 1895, 1895, 0, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1896, 0, 1896, 1896, 0, 0, 0, 0, 1896, 0, 0, 1896, 1897, 0, 0, 1897, 0, 1897, 0, 0, 1897, 1897, 1897, 0, 1897, 1897, 0, 1897, 0, 1897, 1897, 0, 1897, 1898, 1898, 1898, 1898, 0, 0, 0, 1898, 0, 0, 0, 1898, 1898, 1898, 0, 0, 0, 1898, 1898, 0, 1898, 1899, 1899, 1899, 1899, 0, 0, 0, 1899, 0, 0, 1899, 1899, 1899, 0, 0, 0, 0, 1899, 1899, 0, 1899, 1900, 1900, 1900, 1900, 0, 1900, 0, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 0, 1900, 0, 1900, 1900, 0, 1900, 1901, 0, 0, 1901, 1901, 0, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1901, 1902, 0, 0, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1903, 1903, 1903, 1903, 0, 0, 0, 1903, 0, 0, 0, 1903, 1903, 1903, 0, 0, 0, 1903, 1903, 0, 1903, 1904, 1904, 1904, 1904, 0, 1904, 0, 1904, 1904, 1904, 1904, 1904, 1904, 1904, 0, 1904, 0, 1904, 1904, 0, 1904, 1905, 0, 0, 1905, 1905, 0, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1906, 1906, 1906, 1906, 0, 0, 0, 0, 0, 0, 0, 1906, 1906, 0, 0, 0, 0, 1906, 1906, 0, 1906, 1907, 0, 0, 1907, 1907, 0, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1907, 1908, 1908, 0, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1909, 1909, 0, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1910, 1910, 1910, 1910, 0, 0, 0, 0, 0, 0, 1910, 0, 0, 0, 0, 0, 0, 1910, 1910, 0, 1910, 1911, 1911, 0, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 0, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1912, 1912, 0, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 0, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1913, 1913, 0, 0, 0, 0, 1913, 1913, 0, 1913, 1914, 0, 0, 1914, 1914, 0, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1914, 1915, 1915, 0, 0, 0, 0, 1915, 1915, 0, 1915, 1916, 0, 0, 1916, 1916, 0, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1919, 0, 0, 1919, 1919, 1919, 0, 1919, 0, 0, 1919, 0, 1919, 1919, 0, 1919, 1920, 0, 0, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1920, 1921, 0, 0, 1921, 1921, 1921, 1921, 1921, 0, 0, 1921, 0, 1921, 1921, 0, 1921, 1922, 0, 0, 1922, 1922, 0, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1922, 1923, 1923, 0, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1924, 0, 0, 1924, 0, 1924, 1924, 0, 0, 0, 0, 1924, 0, 0, 1924, 1925, 1925, 1925, 1925, 0, 1925, 0, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 0, 1925, 0, 1925, 1925, 0, 1925, 1926, 0, 0, 1926, 1926, 0, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1928, 1928, 1928, 1928, 0, 0, 0, 1928, 0, 0, 0, 1928, 1928, 1928, 0, 0, 0, 1928, 1928, 0, 1928, 1929, 1929, 1929, 1929, 0, 0, 0, 1929, 0, 0, 1929, 1929, 1929, 0, 0, 0, 0, 1929, 1929, 0, 1929, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 0, 1930, 0, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 0, 1930, 1930, 1930, 1930, 1930, 1931, 1931, 1931, 1931, 0, 1931, 0, 1931, 1931, 1931, 1931, 1931, 1931, 1931, 0, 1931, 0, 1931, 1931, 0, 1931, 1932, 0, 0, 1932, 1932, 0, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1933, 1933, 0, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1933, 1934, 1934, 1934, 1934, 0, 0, 0, 0, 0, 0, 0, 1934, 1934, 0, 0, 0, 0, 1934, 1934, 0, 1934, 1935, 1935, 1935, 1935, 1935, 0, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1935, 1936, 1936, 1936, 1936, 0, 1936, 0, 0, 0, 0, 0, 1936, 1936, 0, 1936, 0, 0, 1936, 1936, 1936, 1936, 1937, 1937, 0, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1938, 1938, 0, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1938, 1939, 1939, 0, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 0, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1940, 1940, 0, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 0, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1941, 1941, 1941, 1941, 0, 1941, 0, 0, 0, 0, 0, 1941, 1941, 0, 1941, 0, 0, 1941, 1941, 1941, 1941, 1942, 1942, 0, 0, 0, 0, 1942, 1942, 0, 1942, 1943, 1943, 0, 0, 0, 0, 1943, 1943, 0, 1943, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1944, 1945, 0, 1945, 0, 0, 1945, 1945, 1945, 1945, 1945, 0, 0, 1945, 0, 1945, 1945, 0, 1945, 1946, 1946, 0, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1947, 1948, 1948, 0, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 0, 1949, 1949, 1949, 1949, 1949, 1949, 1949, 1950, 0, 0, 1950, 1950, 0, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1951, 0, 0, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1951, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1952, 1953, 1953, 1953, 1953, 0, 0, 0, 1953, 0, 0, 1953, 1953, 1953, 0, 0, 0, 0, 1953, 1953, 0, 1953, 1954, 1954, 1954, 1954, 0, 0, 0, 1954, 0, 0, 0, 1954, 1954, 1954, 0, 0, 0, 1954, 1954, 0, 1954, 1955, 1955, 1955, 1955, 1955, 0, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1955, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 0, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1957, 1957, 0, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1959, 1959, 0, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1960, 1960, 1960, 1960, 0, 1960, 0, 0, 0, 0, 0, 0, 0, 0, 1960, 0, 0, 1960, 1960, 1960, 1961, 1961, 1961, 1961, 0, 1961, 0, 0, 1961, 1961, 1961, 0, 1961, 0, 1961, 1961, 0, 1961, 1961, 0, 1961, 1962, 1962, 1962, 1962, 0, 1962, 0, 0, 1962, 1962, 1962, 1962, 1962, 0, 1962, 1962, 0, 1962, 1962, 0, 1962, 1963, 0, 0, 1963, 1963, 0, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1964, 1964, 0, 0, 0, 0, 1964, 1964, 0, 1964, 1965, 1965, 0, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1966, 1966, 0, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1966, 1967, 1967, 0, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1968, 1969, 1969, 0, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 0, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 0, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1971, 1971, 1971, 1971, 0, 1971, 0, 0, 0, 0, 0, 0, 0, 0, 1971, 0, 0, 1971, 1971, 1971, 1972, 1972, 1972, 1972, 0, 1972, 0, 0, 1972, 1972, 1972, 0, 1972, 0, 1972, 1972, 0, 1972, 1972, 0, 1972, 1973, 1973, 1973, 1973, 0, 1973, 0, 0, 1973, 1973, 1973, 1973, 1973, 0, 1973, 1973, 0, 1973, 1973, 0, 1973, 1974, 0, 0, 1974, 1974, 0, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1974, 1975, 1975, 0, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1975, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1976, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1978, 1979, 1979, 1979, 1979, 0, 1979, 0, 1979, 1979, 1979, 1979, 1979, 1979, 1979, 0, 1979, 0, 1979, 1979, 0, 1979, 1980, 1980, 1980, 1980, 1980, 0, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1981, 0, 0, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1982, 1983, 1983, 1983, 1983, 0, 0, 0, 1983, 0, 0, 1983, 1983, 1983, 0, 0, 0, 0, 1983, 1983, 0, 1983, 1984, 1984, 1984, 1984, 0, 1984, 0, 1984, 1984, 1984, 1984, 1984, 1984, 1984, 0, 1984, 0, 1984, 1984, 0, 1984, 1985, 1985, 1985, 1985, 0, 0, 0, 1985, 0, 0, 0, 1985, 1985, 1985, 0, 0, 0, 1985, 1985, 0, 1985, 1986, 0, 0, 1986, 1986, 0, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 0, 1987, 1987, 1987, 1987, 1987, 1987, 1987, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 0, 1988, 1988, 1988, 1988, 1988, 1988, 1988, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1989, 1990, 1990, 0, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1992, 1992, 1992, 1992, 0, 1992, 0, 0, 0, 0, 0, 0, 0, 0, 1992, 0, 0, 1992, 1992, 1992, 1993, 1993, 1993, 1993, 0, 1993, 0, 0, 1993, 1993, 1993, 0, 1993, 0, 1993, 1993, 0, 1993, 1993, 0, 1993, 1994, 1994, 1994, 1994, 0, 1994, 0, 0, 1994, 1994, 1994, 1994, 1994, 0, 1994, 1994, 0, 1994, 1994, 0, 1994, 1995, 0, 0, 1995, 1995, 0, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1996, 1996, 0, 0, 0, 0, 1996, 1996, 0, 1996, 1997, 1997, 0, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1998, 1998, 0, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1999, 1999, 0, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 0, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2002, 2002, 2002, 2002, 0, 2002, 0, 0, 2002, 2002, 2002, 0, 2002, 0, 2002, 2002, 0, 2002, 2002, 0, 2002, 2003, 2003, 2003, 2003, 0, 2003, 0, 0, 2003, 2003, 2003, 2003, 2003, 0, 2003, 2003, 0, 2003, 2003, 0, 2003, 2004, 0, 0, 2004, 2004, 0, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2005, 2005, 0, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2008, 2008, 2008, 2008, 0, 2008, 0, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 0, 2008, 0, 2008, 2008, 0, 2008, 2009, 0, 0, 2009, 2009, 0, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2010, 0, 0, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2013, 2013, 2013, 2013, 0, 0, 0, 2013, 0, 0, 2013, 2013, 2013, 0, 0, 0, 0, 2013, 2013, 0, 2013, 2014, 2014, 2014, 2014, 0, 2014, 0, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 0, 2014, 0, 2014, 2014, 0, 2014, 2015, 2015, 2015, 2015, 0, 0, 0, 2015, 0, 0, 0, 2015, 2015, 2015, 0, 0, 0, 2015, 2015, 0, 2015, 2016, 0, 0, 2016, 2016, 0, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 0, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 0, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 0, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2021, 2021, 2021, 2021, 0, 2021, 0, 0, 2021, 2021, 2021, 0, 2021, 0, 2021, 2021, 0, 2021, 2021, 0, 2021, 2022, 2022, 2022, 2022, 0, 2022, 0, 0, 2022, 2022, 2022, 2022, 2022, 0, 2022, 2022, 0, 2022, 2022, 0, 2022, 2023, 2023, 2023, 2023, 2023, 0, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2024, 2024, 0, 0, 0, 0, 2024, 2024, 0, 2024, 2025, 2025, 0, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2025, 2026, 2026, 0, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2026, 2027, 2027, 0, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2027, 2028, 2028, 2028, 2028, 0, 2028, 0, 0, 2028, 2028, 2028, 0, 2028, 0, 2028, 2028, 0, 2028, 2028, 0, 2028, 2029, 2029, 2029, 2029, 0, 2029, 0, 0, 2029, 2029, 2029, 2029, 2029, 0, 2029, 2029, 0, 2029, 2029, 0, 2029, 2030, 2030, 2030, 2030, 2030, 0, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2030, 2031, 2031, 0, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2032, 0, 0, 2032, 2032, 0, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2032, 2033, 0, 0, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2034, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2035, 2036, 2036, 2036, 2036, 0, 0, 0, 2036, 0, 0, 2036, 2036, 2036, 0, 0, 0, 0, 2036, 2036, 0, 2036, 2037, 2037, 2037, 2037, 0, 0, 0, 2037, 0, 0, 2037, 2037, 2037, 0, 0, 0, 0, 2037, 2037, 0, 2037, 2038, 0, 0, 2038, 2038, 0, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2038, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 0, 2039, 2039, 2039, 2039, 2039, 2039, 2039, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 0, 2040, 2040, 2040, 2040, 2040, 2040, 2040, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2041, 2042, 2042, 2042, 2042, 0, 2042, 0, 0, 2042, 2042, 2042, 0, 2042, 0, 2042, 2042, 0, 2042, 2042, 0, 2042, 2043, 2043, 2043, 2043, 0, 2043, 0, 0, 2043, 2043, 2043, 2043, 2043, 0, 2043, 2043, 0, 2043, 2043, 0, 2043, 2044, 2044, 0, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2044, 2045, 2045, 0, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2046, 2046, 2046, 2046, 0, 2046, 0, 0, 2046, 2046, 2046, 0, 2046, 0, 2046, 2046, 0, 2046, 2046, 0, 2046, 2047, 2047, 2047, 2047, 0, 2047, 0, 0, 2047, 2047, 2047, 2047, 2047, 0, 2047, 2047, 0, 2047, 2047, 0, 2047, 2048, 2048, 2048, 2048, 0, 0, 0, 2048, 0, 0, 2048, 2048, 2048, 0, 0, 0, 0, 2048, 2048, 0, 2048, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2050, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2052, 2052, 2052, 2052, 0, 2052, 0, 0, 2052, 2052, 2052, 2052, 2052, 0, 2052, 2052, 0, 2052, 2052, 2052, 2052, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2054, 2054, 2054, 2054, 0, 0, 0, 0, 0, 0, 0, 0, 2054, 0, 2054, 0, 0, 2054, 2054, 0, 2054, 2055, 2055, 2055, 2055, 0, 2055, 0, 0, 0, 0, 0, 2055, 2055, 0, 2055, 0, 0, 2055, 2055, 2055, 2055, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 0, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2057, 2057, 2057, 2057, 0, 2057, 0, 0, 2057, 2057, 2057, 0, 2057, 0, 2057, 2057, 0, 2057, 2057, 2057, 2057, 2058, 2058, 2058, 2058, 0, 2058, 0, 0, 2058, 2058, 2058, 2058, 2058, 0, 2058, 2058, 0, 2058, 2058, 2058, 2058, 2059, 2059, 2059, 2059, 0, 2059, 0, 0, 0, 0, 0, 0, 0, 0, 2059, 0, 0, 2059, 2059, 2059, 2060, 2060, 2060, 2060, 0, 2060, 0, 0, 2060, 2060, 2060, 0, 2060, 0, 2060, 2060, 0, 2060, 2060, 2060, 2060, 2061, 2061, 2061, 2061, 0, 2061, 0, 0, 2061, 2061, 2061, 2061, 2061, 0, 2061, 2061, 0, 2061, 2061, 2061, 2061, 2062, 0, 0, 2062, 2062, 0, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2062, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2063, 2064, 2064, 2064, 2064, 0, 0, 0, 0, 0, 0, 0, 0, 2064, 0, 2064, 0, 0, 2064, 2064, 0, 2064, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2065, 2066, 2066, 0, 0, 0, 0, 2066, 2066, 0, 2066, 2067, 2067, 2067, 2067, 0, 2067, 0, 0, 2067, 2067, 2067, 0, 2067, 0, 2067, 2067, 0, 2067, 2067, 2067, 2067, 2068, 2068, 2068, 2068, 0, 2068, 0, 0, 2068, 2068, 2068, 2068, 2068, 0, 2068, 2068, 0, 2068, 2068, 2068, 2068, 2069, 2069, 2069, 2069, 0, 2069, 0, 0, 2069, 2069, 2069, 0, 2069, 0, 2069, 2069, 0, 2069, 2069, 0, 2069, 2070, 2070, 2070, 2070, 0, 2070, 0, 0, 2070, 2070, 2070, 2070, 2070, 0, 2070, 2070, 0, 2070, 2070, 2070, 2070, 2071, 2071, 2071, 2071, 0, 2071, 0, 0, 2071, 2071, 2071, 2071, 2071, 0, 2071, 2071, 0, 2071, 2071, 0, 2071, 2072, 0, 0, 2072, 2072, 0, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2074, 2075, 2075, 2075, 2075, 0, 0, 0, 2075, 0, 0, 2075, 2075, 2075, 0, 0, 0, 0, 2075, 2075, 0, 2075, 2076, 2076, 2076, 2076, 0, 0, 0, 2076, 0, 0, 0, 2076, 2076, 0, 0, 0, 0, 2076, 2076, 0, 2076, 2077, 2077, 2077, 2077, 0, 0, 0, 2077, 0, 0, 2077, 2077, 2077, 0, 0, 0, 0, 2077, 2077, 0, 2077, 2078, 2078, 2078, 2078, 0, 2078, 0, 2078, 2078, 2078, 2078, 2078, 2078, 2078, 0, 2078, 0, 2078, 2078, 0, 2078, 2079, 2079, 2079, 2079, 2079, 0, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2079, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 0, 2080, 2080, 2080, 2080, 2080, 2080, 2080, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2081, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 0, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 0, 2083, 2083, 2083, 2083, 2083, 2083, 2083, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 0, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2085, 2085, 2085, 2085, 0, 2085, 0, 0, 2085, 2085, 2085, 0, 2085, 0, 2085, 2085, 0, 2085, 2085, 2085, 2085, 2086, 2086, 2086, 2086, 0, 2086, 0, 0, 2086, 2086, 2086, 0, 2086, 0, 2086, 2086, 0, 2086, 2086, 0, 2086, 2087, 2087, 2087, 2087, 0, 2087, 0, 0, 0, 0, 0, 0, 0, 0, 2087, 0, 0, 2087, 2087, 2087, 2088, 2088, 2088, 2088, 0, 2088, 0, 0, 2088, 2088, 2088, 2088, 2088, 0, 2088, 2088, 0, 2088, 2088, 0, 2088, 2089, 2089, 2089, 2089, 0, 2089, 0, 0, 2089, 2089, 2089, 2089, 2089, 0, 2089, 2089, 0, 2089, 2089, 2089, 2089, 2090, 2090, 2090, 2090, 0, 2090, 0, 0, 2090, 2090, 2090, 0, 2090, 0, 2090, 2090, 0, 2090, 2090, 2090, 2090, 2091, 2091, 2091, 2091, 0, 2091, 0, 0, 2091, 2091, 2091, 2091, 2091, 0, 2091, 2091, 0, 2091, 2091, 2091, 2091, 2092, 0, 0, 2092, 2092, 0, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2093, 2094, 2094, 0, 0, 0, 0, 2094, 2094, 0, 2094, 2095, 2095, 2095, 2095, 0, 2095, 0, 0, 2095, 2095, 2095, 0, 2095, 0, 2095, 2095, 0, 2095, 2095, 2095, 2095, 2096, 2096, 2096, 2096, 0, 2096, 0, 0, 2096, 2096, 2096, 2096, 2096, 0, 2096, 2096, 0, 2096, 2096, 2096, 2096, 2097, 2097, 2097, 2097, 0, 2097, 0, 0, 2097, 2097, 2097, 0, 2097, 0, 2097, 2097, 0, 2097, 2097, 2097, 2097, 2098, 2098, 2098, 2098, 0, 2098, 0, 0, 2098, 2098, 2098, 0, 2098, 0, 2098, 2098, 0, 2098, 2098, 0, 2098, 2099, 2099, 2099, 2099, 0, 2099, 0, 0, 0, 0, 0, 0, 0, 0, 2099, 0, 0, 2099, 2099, 2099, 2100, 2100, 2100, 2100, 0, 2100, 0, 0, 2100, 2100, 2100, 2100, 2100, 0, 2100, 2100, 0, 2100, 2100, 0, 2100, 2101, 2101, 2101, 2101, 0, 2101, 0, 0, 2101, 2101, 2101, 2101, 2101, 0, 2101, 2101, 0, 2101, 2101, 2101, 2101, 2102, 2102, 2102, 2102, 2102, 0, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2102, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2104, 2104, 2104, 2104, 0, 0, 0, 2104, 0, 0, 2104, 2104, 2104, 0, 0, 0, 0, 2104, 2104, 0, 2104, 2105, 2105, 2105, 2105, 0, 0, 0, 2105, 0, 0, 0, 2105, 2105, 0, 0, 0, 0, 2105, 2105, 0, 2105, 2106, 2106, 2106, 2106, 0, 0, 0, 2106, 0, 0, 2106, 2106, 2106, 0, 0, 0, 0, 2106, 2106, 0, 2106, 2107, 2107, 2107, 2107, 0, 0, 0, 0, 0, 0, 0, 0, 2107, 2107, 0, 0, 0, 2107, 2107, 2107, 2107, 2108, 2108, 2108, 2108, 0, 0, 0, 2108, 0, 0, 0, 2108, 2108, 2108, 0, 0, 0, 2108, 2108, 2108, 2108, 2109, 2109, 2109, 2109, 0, 2109, 0, 2109, 2109, 2109, 2109, 2109, 2109, 2109, 0, 2109, 0, 2109, 2109, 0, 2109, 2110, 2110, 2110, 2110, 0, 0, 0, 2110, 0, 0, 0, 2110, 2110, 2110, 2110, 0, 0, 2110, 2110, 0, 2110, 2111, 2111, 2111, 2111, 2111, 0, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2111, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 0, 2112, 2112, 2112, 2112, 2112, 2112, 2112, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2113, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 0, 2114, 2114, 2114, 2114, 2114, 2114, 2114, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 0, 2115, 2115, 2115, 2115, 2115, 2115, 2115, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 0, 2116, 2116, 2116, 2116, 2116, 2116, 2116, 2117, 2117, 2117, 2117, 0, 2117, 0, 0, 2117, 2117, 2117, 0, 2117, 0, 2117, 2117, 0, 2117, 2117, 0, 2117, 2118, 2118, 2118, 2118, 0, 2118, 0, 0, 2118, 2118, 2118, 0, 2118, 0, 2118, 2118, 0, 2118, 2118, 2118, 2118, 2119, 2119, 2119, 2119, 0, 2119, 0, 0, 2119, 2119, 2119, 2119, 2119, 0, 2119, 2119, 0, 2119, 2119, 0, 2119, 2120, 2120, 2120, 2120, 2120, 0, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2120, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2122, 2123, 2123, 2123, 2123, 0, 2123, 0, 0, 2123, 2123, 2123, 0, 2123, 0, 2123, 2123, 0, 2123, 2123, 0, 2123, 2124, 2124, 2124, 2124, 0, 2124, 0, 0, 2124, 2124, 2124, 0, 2124, 0, 2124, 2124, 0, 2124, 2124, 2124, 2124, 2125, 2125, 2125, 2125, 2125, 0, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2125, 2126, 2126, 2126, 2126, 0, 0, 0, 0, 0, 0, 0, 2126, 2126, 0, 0, 0, 0, 2126, 2126, 0, 2126, 2127, 0, 0, 2127, 2127, 0, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2128, 2128, 2128, 2128, 0, 0, 0, 2128, 0, 0, 0, 2128, 2128, 2128, 0, 0, 0, 2128, 2128, 0, 2128, 2129, 2129, 2129, 2129, 0, 0, 0, 0, 0, 0, 0, 0, 2129, 2129, 0, 0, 0, 2129, 2129, 2129, 2129, 2130, 2130, 2130, 2130, 0, 0, 0, 2130, 0, 0, 0, 2130, 2130, 2130, 0, 0, 0, 2130, 2130, 2130, 2130, 2131, 2131, 2131, 2131, 0, 0, 0, 0, 0, 0, 0, 0, 2131, 0, 2131, 0, 0, 2131, 2131, 2131, 2131, 2132, 2132, 2132, 2132, 0, 0, 0, 2132, 0, 0, 0, 2132, 2132, 2132, 2132, 0, 0, 2132, 2132, 2132, 2132, 2133, 2133, 2133, 2133, 2133, 0, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 0, 2135, 2135, 2135, 2135, 2135, 2135, 2135, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 0, 2136, 2136, 2136, 2136, 2136, 2136, 2136, 2137, 2137, 2137, 2137, 0, 2137, 0, 0, 2137, 2137, 2137, 0, 2137, 0, 2137, 2137, 0, 2137, 2137, 0, 2137, 2138, 2138, 2138, 2138, 0, 2138, 0, 0, 2138, 2138, 2138, 2138, 2138, 0, 2138, 2138, 0, 2138, 2138, 0, 2138, 2139, 2139, 2139, 2139, 0, 0, 0, 0, 0, 0, 0, 2139, 2139, 0, 0, 0, 0, 2139, 2139, 0, 2139, 2140, 0, 0, 2140, 2140, 0, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2140, 2141, 2141, 2141, 2141, 0, 0, 0, 2141, 0, 0, 0, 2141, 2141, 2141, 0, 0, 0, 2141, 2141, 0, 2141, 2142, 2142, 2142, 2142, 0, 0, 0, 0, 0, 0, 0, 2142, 2142, 0, 2142, 0, 0, 2142, 2142, 0, 2142, 2143, 0, 0, 2143, 2143, 0, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2143, 2144, 2144, 2144, 2144, 0, 0, 0, 2144, 0, 0, 0, 2144, 2144, 2144, 2144, 0, 0, 2144, 2144, 0, 2144, 2145, 2145, 2145, 2145, 0, 0, 0, 0, 0, 0, 0, 0, 2145, 0, 0, 0, 0, 2145, 2145, 2145, 2145, 2146, 2146, 2146, 2146, 0, 0, 0, 2146, 0, 0, 0, 2146, 2146, 2146, 0, 0, 0, 2146, 2146, 2146, 2146, 2147, 2147, 2147, 2147, 0, 0, 0, 0, 0, 0, 0, 2147, 2147, 0, 0, 0, 0, 2147, 2147, 0, 2147, 2148, 0, 0, 2148, 2148, 0, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2148, 2149, 2149, 2149, 2149, 2149, 0, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2150, 2150, 2150, 2150, 0, 0, 0, 2150, 0, 0, 0, 2150, 2150, 2150, 0, 0, 0, 2150, 2150, 0, 2150, 2151, 2151, 2151, 2151, 0, 0, 0, 0, 0, 0, 0, 0, 2151, 0, 2151, 0, 0, 2151, 2151, 2151, 2151, 2152, 2152, 2152, 2152, 0, 0, 0, 2152, 0, 0, 0, 2152, 2152, 2152, 2152, 0, 0, 2152, 2152, 2152, 2152, 2153, 2153, 2153, 2153, 2153, 0, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2153, 2154, 2154, 2154, 2154, 2154, 0, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2155, 2155, 0, 0, 0, 0, 2155, 2155, 0, 2155, 2156, 0, 0, 2156, 2156, 0, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2156, 2157, 2157, 2157, 2157, 0, 0, 0, 2157, 0, 0, 0, 2157, 2157, 2157, 0, 0, 0, 2157, 2157, 0, 2157, 2158, 2158, 2158, 2158, 2158, 0, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2158, 2159, 2159, 2159, 2159, 2159, 0, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 2159, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860 } ; extern int vhdlscanYY_flex_debug; int vhdlscanYY_flex_debug = 0; static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; static char *yy_full_match; static int yy_lp; static int yy_looking_for_trail_begin = 0; static int yy_full_lp; static int *yy_full_state; #define YY_TRAILING_MASK 0x2000 #define YY_TRAILING_HEAD_MASK 0x4000 #define REJECT \ { \ *yy_cp = (yy_hold_char); /* undo effects of setting up vhdlscanYYtext */ \ yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \ (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \ yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ ++(yy_lp); \ goto find_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *vhdlscanYYtext; #line 1 "vhdlscanner.l" /****************************************************************************** * * Copyright (C) 1997-2011 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * */ /****************************************************************************** * Parser for VHDL subset * written by M. Kreis * supports VHDL-87/93 * does not support VHDL-AMS ******************************************************************************/ #line 22 "vhdlscanner.l" // global includes #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> #include <qcstring.h> #include <qfileinfo.h> #include <qstringlist.h> /* --------------------------------------------------------------- */ // local includes #include "vhdlscanner.h" #include "vhdlcode.h" #include "vhdldocgen.h" #include "message.h" #include "config.h" #include "doxygen.h" #include "util.h" #include "language.h" #include "commentscan.h" #include "index.h" #include "definition.h" #include "searchindex.h" #include "outputlist.h" /* --------------------------------------------------------------- */ //#define theTranslator_vhdlType theTranslator->trVhdlType #define theTranslator_vhdlType VhdlDocGen::getVhdlType static QStringList qrl; static int openGroups; static ParserInterface *g_thisParser; static const char * inputString; static int inputPosition; static int inputLen; static int startComment = 0; static QFile inputFile; static QCString inbuf; static Entry* global_root = 0; static Entry* current_root = 0; static Entry* current = 0; static Entry* previous = 0; static Entry* functionEntry = 0; static Entry* lastEntity = 0; static Entry* lastCompound = 0; static int genPort = 0; static QCString yyFileName; static int iFuncLine = 1; static bool g_inputFromFile ; static bool g_lexInit = FALSE; static int isBody=0; static int isFunc=0; static int yyLineNr = 1; static char * g_buf = 0; static uint g_bufSize = 0; static int iTextCounter = 0; static int iCounter = 0; static int bropen = 0; static int scantype = 0; static int g_lastCommentContext = 0; static bool docBlockAutoBrief; static char docBlockTerm; static int iDocLine = -1; static Entry gBlock; static int num_chars; //#define YY_A_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1 //----------------------------------------------------------------------------- #define YY_USER_ACTION num_chars += vhdlscanYYleng; static void parserInit(); static void deleteSpecChars(char* str,char *buf); static void handleCommentBlock(const QCString &doc,bool brief); static void newEntry(); static void initEntry(Entry *e); static int iCodeLen; static void makeInline() { int diff=num_chars-iCodeLen; assert(inputLen>iCodeLen+diff); QCString par(&inputString[iCodeLen],diff); int index=par.findRev("\\endcode"); int tt=par.length()-par.find("\n",index); QCString qc(&inputString[iCodeLen-tt],diff); index=qc.findRev("--!"); if (index<=0) return; par=qc.left(index); /* fprintf(stderr,"\n-------------------------------------------------------------------------------- "); fprintf(stderr,"\n bytes since %d %d \n %s",num_chars,iCodeLen,par.data()); fprintf(stderr,"\n-------------------------------------------------------------------------------- "); */ gBlock.doc=par; gBlock.section=Entry::VARIABLE_SEC; gBlock.spec=VhdlDocGen::MISCELLANEOUS; gBlock.fileName = yyFileName; gBlock.endBodyLine=yyLineNr-1; Entry *temp=new Entry(gBlock); if (lastCompound) lastCompound->addSubEntry(temp); else if (lastEntity) lastEntity->addSubEntry(temp); else { temp->type="misc"; // global code current_root->addSubEntry(temp); } gBlock.reset(); }// makeInline static void addSubEntry(Entry* root, Entry* e) { if (e==0 || root==0) return; //if (isPrevDoc) //{ // e->brief=prevDocEntry.brief; // e->briefLine=prevDocEntry.briefLine; // prevDocEntry.reset(); // isPrevDoc=FALSE; //} root->addSubEntry(e); } static void bufferClear() { int j; for (j=0;j<iCounter+1;j++) { g_buf[j]=0; } iCounter=0; } static void addText (char *word, int llen) { if ((uint)(iCounter + llen) > g_bufSize) { char *pTmp = (char*)realloc(g_buf,iCounter+llen+2048); if (pTmp) { g_buf = pTmp; } else { fprintf(stderr,"\n not enough memory for realloc\n"); return; } } while (llen>0) { g_buf[iCounter]=*word++; iCounter++; llen--; } g_buf[iCounter]='\0'; } static void getBufText(QCString& qc,int start) { while (start < iCounter) { qc+=(g_buf[start]); start++; } } static void lineCount() { for ( const char* c = vhdlscanYYtext ; *c ; ++c ) { yyLineNr += (*c == '\n') ; } } static void deleteSpecChars(char* str,char *buf) { while (*str) {<|fim▁hole|> } else { *buf++ = *str++; } } *buf='\0'; } static void getType(Entry* p,char* text) { QCString name(text); name=name.stripWhiteSpace(); if (stricmp(name.data(),"signal" )==0) { p->spec=VhdlDocGen::SIGNAL; } else if (stricmp(name.data(),"type" )==0) { p->spec=VhdlDocGen::TYPE; } else if (stricmp(name.data(),"subtype" )==0) { p->spec=VhdlDocGen::SUBTYPE; } else if (stricmp(name.data(),"constant" )==0) { p->spec=VhdlDocGen::CONSTANT; } else if (stricmp(name.data(),"attribute" )==0) { p->spec=VhdlDocGen::ATTRIBUTE; } else if (stricmp(name.data(),"function" )==0) { p->spec=VhdlDocGen::FUNCTION; } else if (stricmp(name.data(),"procedure" )==0) { p->spec=VhdlDocGen::PROCEDURE; } else if (stricmp(name.data(),"units" )==0) { p->spec=VhdlDocGen::UNITS; } else if (name.contains("shared",false) && name.contains("variable",false)) { p->spec=VhdlDocGen::SHAREDVARIABLE; } else if (stricmp(name.data(),"file" )==0) { p->spec=VhdlDocGen::VFILE; } else if (stricmp(name.data(),"group" )==0) { p->spec=VhdlDocGen::GROUP; } else if (stricmp(name.data(),"alias" )==0) { p->spec=VhdlDocGen::ALIAS; } else { err("wrong type"); } p->section=Entry::VARIABLE_SEC; } //------------------------------------------------------------------------- /* * adds signals found in entities|records|units */ static void addSignals(const char* str,int line, Entry *e,const char *comment=0) { //printf("===> addSignals (%s) comment='%s'\n",str,comment); QList<QCString> ql; QCString bufio; ql.setAutoDelete(TRUE); VhdlDocGen::getSigName(ql,str,bufio); int count = ql.count(); QCString brief = current->brief; QCString doc = current->doc; Entry *tmpEntry = current; current = new Entry; initEntry(current); handleCommentBlock(comment,TRUE); if (!current->brief.isEmpty()) { if (doc.isEmpty()) { doc = brief; } else if (!brief.isEmpty()) { doc = brief + "<p>" + doc; } brief = current->brief; } delete current; current = tmpEntry; current->brief.resize(0); current->doc.resize(0); if (genPort!=3) // not a unit { for (int k=1;k<count;k++) { //printf("adding '%s' '%s'\n",ql.at(0)->data(),ql.at(k)->data()); Entry *pTemp=new Entry; initEntry(pTemp); pTemp->startLine = line; pTemp->bodyLine = line; pTemp->name = ql.at(k)->data(); pTemp->section = Entry::VARIABLE_SEC; pTemp->brief = brief; pTemp->doc = doc; pTemp->mGrpId = current->mGrpId; // copy member group id QCString stSpec = ql.at(0)->data(); if (genPort==1) // found port { pTemp->spec = VhdlDocGen::PORT; stSpec.stripPrefix(bufio.data()); stSpec=stSpec.stripWhiteSpace(); pTemp->args = stSpec; pTemp->type = bufio; addSubEntry(e,pTemp); } else if (genPort==2) // found record { pTemp->spec = VhdlDocGen::RECORD; pTemp->type = stSpec; pTemp->name.prepend(VhdlDocGen::getRecordNumber()); delete current; current = new Entry(*pTemp); // make a deep copy of pTemp newEntry(); // add it to lastCompound and make a new current delete pTemp; } else { pTemp->spec = VhdlDocGen::GENERIC; pTemp->type = stSpec; addSubEntry(e,pTemp); } }// for } else // found a unit { Entry *pTemp=new Entry; initEntry(pTemp); QCString tt(str); QStringList ql=QStringList::split("=",tt,FALSE); pTemp->spec = VhdlDocGen::UNITS; pTemp->section = Entry::VARIABLE_SEC; pTemp->startLine = line; pTemp->bodyLine = line; pTemp->brief = brief; // adds brief description to the unit member pTemp->doc = doc; // adds doc to the unit member pTemp->type = ql[1]; pTemp->name = ql[0].stripWhiteSpace(); pTemp->name.prepend(VhdlDocGen::getRecordNumber()); delete current; current = new Entry(*pTemp); // make a deep copy newEntry(); // add it to lastCompound delete pTemp; } } /* * this function parses a process prototype * and adds the signal to the process */ static void parseProcessProto() { QStringList ql; QCString qcs; bool sem=FALSE; //Entry* ppEntry=new Entry; //ppEntry->fileName=yyFileName; //processEntry=ppEntry; QCString name; scantype=0; getBufText(qcs,0); if (qcs.contains('(') != qcs.contains(')')) return; VhdlDocGen::deleteAllChars(qcs,'\n'); VhdlDocGen::parseProcessProto(qcs,name,ql); current->section=Entry::FUNCTION_SEC; //current->stat=TRUE; current->spec=VhdlDocGen::PROCESS; current->startLine=iFuncLine; current->bodyLine=iFuncLine; current->fileName=yyFileName; if (!name.isEmpty()) { current->name=name.stripWhiteSpace(); } else // found an anonymous process, so we add a generated name { current->name=VhdlDocGen::getProcessNumber(); } current->args+=" ( "; if (!ql.isEmpty()) { QValueList<QString>::Iterator iter = ql.begin(); for ( ; iter != ql.end(); ++iter) { if (sem) { current->args+=','; } Argument *arg=new Argument; arg->name=((QCString)*iter).stripWhiteSpace(); current->argList->append(arg); current->args+=(QCString)*iter; sem = TRUE; } } current->args+=" ) "; bufferClear(); }//parseProcessProto /* * parses a function|procedure protoype */ static void parseFunctionProto() { QCString name,ret,qcs,temp; bool sem=FALSE; QList<Argument> ql; ql.setAutoDelete(TRUE); getBufText(qcs,0); if (qcs.contains('(') != qcs.contains(')')) return; // function without a prototype if (qcs.contains("function",FALSE)==0 && qcs.contains("procedure",FALSE)==0) return; qcs=qcs.stripWhiteSpace(); temp=qcs.lower(); if (temp.stripPrefix("impure")) { current->exception="impure"; qcs=qcs.remove(0,6); } else if (temp.stripPrefix("pure")) { current->exception="pure"; qcs=qcs.remove(0,4); } VhdlDocGen::parseFuncProto(qcs.data(),ql,name,ret); //printf("parseFuncProto(%s)=%s,%s\n",qcs.data(),name.data(),ret.data()); VhdlDocGen::deleteAllChars(name,';'); current->name=name; current->startLine=iFuncLine; current->bodyLine=iFuncLine; int count = ql.count(); current->args+" ( "; for (int k=0;k<count;k++) { if (sem) { current->args+=","; } Argument *arg=new Argument; Argument *hh=(Argument*)ql.at(k); arg->name=hh->name; arg->type=hh->type; arg->defval=hh->defval; arg->attrib=hh->attrib; current->argList->append(arg); current->args+=hh->name; sem=TRUE; } current->args+" )"; if (!ret.isEmpty()) current->spec=VhdlDocGen::FUNCTION; else current->spec=VhdlDocGen::PROCEDURE; current->section=Entry::FUNCTION_SEC; current->type=ret; //addSubEntry(ee,ppEntry); if (lastCompound) { lastCompound->addSubEntry(current); current = new Entry; initEntry(current); } else { newEntry(); } bufferClear(); }//parseFunctionProto static Entry* getEntryAtLine(const Entry* ce,int line) { EntryListIterator eli(*ce->children()); Entry *found=0; Entry *rt; for (;(rt=eli.current());++eli) { if (rt->bodyLine==line) { found=rt; } // if if (!found) { found=getEntryAtLine(rt,line); } } return found; }// getEntryAtLine //------------------------------------------------------------------------- static void parserInit() { iCounter=0; iTextCounter=0; yyLineNr=1; current=0; previous=0; isFunc=0; isBody=0; scantype=0; lastCompound=0; lastEntity=0; bropen=0; openGroups=0; iDocLine=-1; qrl.clear(); num_chars=0; if (!g_lexInit) { VhdlDocGen::init(); } g_bufSize=inputFile.size()+1024; if (g_buf==0) free(g_buf); g_buf=(char*)(calloc(g_bufSize,sizeof(char))); if (g_buf==0) { fprintf(stderr,"\n not enough memory"); return; } g_buf[g_bufSize-1]='\0'; } bool VHDLLanguageScanner::needsPreprocessing(const QCString &) { return FALSE; } void VHDLLanguageScanner::resetCodeParserState() { } #undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); static int yyread(char *buf,int max_size) { int c=0; if (g_inputFromFile) { c = inputFile.readBlock(buf,max_size); if (c==-1) yy_fatal_error("input in flex scanner failed"); } else { while ( c < max_size && inputString[inputPosition] ) { *buf = inputString[inputPosition++] ; c++; buf++; } } return c; } /* start command character */ /* -------------- VHDL SECTION -----------------------------------*/ /* Removed due to bug 538239 POST "postponed" PROCESS ({BR}*{FUNCNAME}{B}*[:]{BR}*({POST}{BR}+)?("process"){BR}*{PROTO})|("process"){BR}*("("){BR}*{PROTO}|[^a-zA-Z]("process"){CR}|[^a-zA-Z]("process"){BR}+("is") */ /* VHDL 2001 */ /* language parsing states */ #line 7950 "<stdout>" #define INITIAL 0 #define Start 1 #define Comment 2 #define FindTypeName 3 #define ParseType 4 #define ParseRecord 5 #define ParseUnits 6 #define ParseProcess 7 #define ParseFunc 8 #define FindName 9 #define FindEntityName 10 #define FindGenPort 11 #define FindTypes 12 #define FindSigName 13 #define FindFuncName 14 #define FindBegin 15 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int vhdlscanYYlex_destroy (void ); int vhdlscanYYget_debug (void ); void vhdlscanYYset_debug (int debug_flag ); YY_EXTRA_TYPE vhdlscanYYget_extra (void ); void vhdlscanYYset_extra (YY_EXTRA_TYPE user_defined ); FILE *vhdlscanYYget_in (void ); void vhdlscanYYset_in (FILE * in_str ); FILE *vhdlscanYYget_out (void ); void vhdlscanYYset_out (FILE * out_str ); yy_size_t vhdlscanYYget_leng (void ); char *vhdlscanYYget_text (void ); int vhdlscanYYget_lineno (void ); void vhdlscanYYset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int vhdlscanYYwrap (void ); #else extern int vhdlscanYYwrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 262144 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO fwrite( vhdlscanYYtext, vhdlscanYYleng, 1, vhdlscanYYout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( vhdlscanYYin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( vhdlscanYYin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, vhdlscanYYin))==0 && ferror(vhdlscanYYin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(vhdlscanYYin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int vhdlscanYYlex (void); #define YY_DECL int vhdlscanYYlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after vhdlscanYYtext and vhdlscanYYleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( vhdlscanYYleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (vhdlscanYYtext[vhdlscanYYleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 691 "vhdlscanner.l" #line 8153 "<stdout>" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif /* Create the reject buffer large enough to save one state per allowed character. */ if ( ! (yy_state_buf) ) (yy_state_buf) = (yy_state_type *)vhdlscanYYalloc(YY_STATE_BUF_SIZE ); if ( ! (yy_state_buf) ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYYlex()" ); if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! vhdlscanYYin ) vhdlscanYYin = stdin; if ( ! vhdlscanYYout ) vhdlscanYYout = stdout; if ( ! YY_CURRENT_BUFFER ) { vhdlscanYYensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = vhdlscanYY_create_buffer(vhdlscanYYin,YY_BUF_SIZE ); } vhdlscanYY_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of vhdlscanYYtext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); (yy_state_ptr) = (yy_state_buf); *(yy_state_ptr)++ = yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 1861 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } while ( yy_base[yy_current_state] != 27243 ); yy_find_action: yy_current_state = *--(yy_state_ptr); (yy_lp) = yy_accept[yy_current_state]; goto find_rule; /* Shut up GCC warning -Wall */ find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[(yy_lp)]; if ( yy_act & YY_TRAILING_HEAD_MASK || (yy_looking_for_trail_begin) ) { if ( yy_act == (yy_looking_for_trail_begin) ) { (yy_looking_for_trail_begin) = 0; yy_act &= ~YY_TRAILING_HEAD_MASK; break; } } else if ( yy_act & YY_TRAILING_MASK ) { (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK; (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK; } else { (yy_full_match) = yy_cp; (yy_full_state) = (yy_state_ptr); (yy_full_lp) = (yy_lp); break; } ++(yy_lp); goto find_rule; } --yy_cp; yy_current_state = *--(yy_state_ptr); (yy_lp) = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 693 "vhdlscanner.l" { lineCount(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 699 "vhdlscanner.l" { // found configuration QCString qcs(vhdlscanYYtext); current->name=VhdlDocGen::getIndexWord(qcs,1); current->type=VhdlDocGen::getIndexWord(qcs,3); current->startLine=yyLineNr; current->bodyLine=yyLineNr; current->section=Entry::VARIABLE_SEC; current->spec=VhdlDocGen::CONFIG; current->args="configuration"; newEntry(); BEGIN(Start); } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP #line 713 "vhdlscanner.l" { // found type constant|type|attribute and so on.. bropen=0; lineCount(); bufferClear(); //pEntry=current; getType(current,vhdlscanYYtext); current->bodyLine=yyLineNr; if (current->spec==VhdlDocGen::UNITS) { //addSubEntry(current,pEntry); current->startLine=yyLineNr; current->bodyLine=yyLineNr; newEntry(); // adds the unit to the lastCompound genPort=3; BEGIN(ParseRecord); } else { BEGIN(FindTypeName); } } YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP #line 736 "vhdlscanner.l" { //found architecure lineCount(); bropen=0; bufferClear(); isBody=0; lastCompound = current; QCString curName=VhdlDocGen::getIndexWord(vhdlscanYYtext,1); current->section=Entry::CLASS_SEC; //Entry::CLASS_SEC; current->spec=VhdlDocGen::ARCHITECTURE; current->protection=Private; current->name=curName; current->fileName=yyFileName; current->startLine=yyLineNr; current->bodyLine=yyLineNr; //printf("-> Architecture at line %d\n",yyLineNr); BEGIN(FindName); } YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 755 "vhdlscanner.l" { //found process lineCount(); iFuncLine=yyLineNr; bropen=0; //printf("--> Process: line=%d\n",yyLineNr); bufferClear(); addText(vhdlscanYYtext,vhdlscanYYleng); QCString qcs(vhdlscanYYtext); if (qcs.contains('(')) { bropen=1; scantype=2; BEGIN(ParseType); } else { // iFuncLine--; parseProcessProto(); BEGIN(ParseProcess); } } YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP #line 777 "vhdlscanner.l" { // found library or package bropen=0; bufferClear(); isBody=0; QCString qcs=QCString(vhdlscanYYtext); // lowerString(qcs); qcs=qcs.stripWhiteSpace(); if (stricmp(qcs.data(),"use")==0) { current->spec=VhdlDocGen::USE; current->type="package"; } else { current->spec=VhdlDocGen::LIBRARY; current->type="library"; } current->section=Entry::VARIABLE_SEC; current->bodyLine=yyLineNr; lineCount(); BEGIN(FindName); } YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP #line 800 "vhdlscanner.l" { // found a new function|procedure lineCount(); iFuncLine=yyLineNr; bropen=0; bufferClear(); isFunc=1; addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(FindFuncName); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP #line 810 "vhdlscanner.l" { // found entity|component|package lineCount(); //printf("--> Entity at line %d\n",yyLineNr); bropen=0; bufferClear(); QCString word(vhdlscanYYtext); word=word.lower(); word=word.stripWhiteSpace(); if (strcmp(word.data(),"entity")==0) { isBody=0; scantype=0; lastCompound=0; current->section=Entry::CLASS_SEC; current->spec=VhdlDocGen::ENTITY; current->protection=Public; current->bodyLine=yyLineNr; current->fileName=yyFileName; lastEntity = current; } else if (strcmp(word.data(),"component")==0) { current->section=Entry::VARIABLE_SEC; // current->stat=TRUE; current->spec=VhdlDocGen::COMPONENT; current->bodyLine=yyLineNr; scantype=1; } else if (strcmp(word,"package")==0) { isBody=0; scantype=0; lastCompound = current; current->section=Entry::CLASS_SEC; current->spec=VhdlDocGen::PACKAGE; current->protection=Package; //VhdlDocGen::PACKAGE; current->bodyLine=yyLineNr; current->fileName=yyFileName; } else err("\n found wrong component at line [%d]",yyLineNr); BEGIN(FindEntityName); } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP #line 857 "vhdlscanner.l" { // found component instantiation // lineCount(); QCString type; QCString tt(vhdlscanYYtext); QRegExp regg("[\\s:.()-]"); QStringList qsl=QStringList::split(regg,tt,false); // consider upper/lower-case letters QStringList qsltemp=QStringList::split(regg,tt.lower(),false); int index=qsltemp.findIndex(QCString("entity"))+1; index+=qsltemp.findIndex(QCString("component"))+1; index+=qsltemp.findIndex(QCString("configuration"))+1; int len=qsltemp.count(); current->spec=VhdlDocGen::COMPONENT_INST; current->section=Entry::VARIABLE_SEC; current->startLine=yyLineNr; current->bodyLine=yyLineNr; if (index!=0 && tt.contains(')')==0) // found component instantiation xxx: configuration/component/entity yyy { current->type=(QCString)qsl[len-3]; } else if (index!=0 && tt.contains(')')) // found component instantiation xxx: entity www.yyy(zzz) { current->type=(QCString)qsl[len-4]; } else { current->type=(QCString)qsl[1]; // found component instantiation xxx:yyy } current->name=QCString(qsl[0]); if (lastCompound) { if (!VhdlDocGen::foundInsertedComponent(current->type,lastCompound)) { BaseInfo *bb=new BaseInfo(current->type,Public,Normal); lastCompound->extends->append(bb); } lastCompound->addSubEntry(current); current = new Entry; initEntry(current); } else { newEntry(); } lineCount(); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 910 "vhdlscanner.l" { lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(Start); } YY_BREAK case 11: /* rule 11 can match eol */ YY_RULE_SETUP #line 916 "vhdlscanner.l" { // eat process body lineCount(); BEGIN(ParseProcess); } YY_BREAK case 12: /* rule 12 can match eol */ YY_RULE_SETUP #line 922 "vhdlscanner.l" { // find end of process lineCount(); current->endBodyLine=yyLineNr; //printf("Process: start=%d end=%d\n",current->bodyLine,current->endBodyLine); if (lastCompound) { lastCompound->addSubEntry(current); current = new Entry; initEntry(current); } else { newEntry(); } BEGIN(Start); } YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP #line 940 "vhdlscanner.l" { lineCount(); } YY_BREAK case 14: YY_RULE_SETUP #line 944 "vhdlscanner.l" { // parse record|unit body lineCount(); QCString zz(vhdlscanYYtext); addSignals(zz.data(),yyLineNr,current); BEGIN(ParseUnits); } YY_BREAK case 15: YY_RULE_SETUP #line 951 "vhdlscanner.l" { // found entity|architecture|component name lineCount(); QCString qcs(vhdlscanYYtext); qcs=qcs.stripWhiteSpace(); if (current->spec==VhdlDocGen::USE || current->spec==VhdlDocGen::LIBRARY) { int j=qcs.length(); int i=qcs.find("."); if (i>0) qcs=qcs.right(j-i-1); i=qcs.find("."); if (i>0) qcs=qcs.left(i); /* -- Consider the case we have more than one entity in one file.Each entity has its own package/library -- declaration. In this case package yyy will be added [with newEntry()] to architecture aaa !! instead to entity -- bbb. We must place these constructs to current_root and the function mapLibPackage() will finish the rest. -- package xxx; -- entity aaa -- .... -- end entity aaa; -- architecture aaa -- ... -- end architecture aaa; -- package yyy; -- entity bbb; */ current->name=qcs; Entry *copy=new Entry(*current); current->reset(); addSubEntry(current_root,copy); // insert into entry list with mapLibPackage() } else if (current->spec==VhdlDocGen::ARCHITECTURE) { //current->name+=qcs.lower(); current->name.prepend(qcs+"::"); //if (lastEntity) //{ // inherit private inheritance relation between entity and architecture //if (!VhdlDocGen::foundInsertedComponent(current->name,lastEntity)) //{ // BaseInfo *bb=new BaseInfo(current->name,Private,Normal); // lastEntity->extends->append(bb); //} //} } else if (current->spec==VhdlDocGen::PACKAGE_BODY) { current->name+=qcs; } else { current->name+=qcs; } if (!(current->spec==VhdlDocGen::USE || current->spec==VhdlDocGen::LIBRARY)) newEntry(); BEGIN(Start); } YY_BREAK case 16: YY_RULE_SETUP #line 1016 "vhdlscanner.l" { // found name of a process|function|procedure lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(ParseType); } YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP #line 1023 "vhdlscanner.l" { lineCount(); current->name=QCString(vhdlscanYYtext); BEGIN(ParseType); } YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP #line 1030 "vhdlscanner.l" {lineCount(); BEGIN(Start); } YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP #line 1032 "vhdlscanner.l" { lineCount(); current->section=Entry::VARIABLE_SEC; current->spec=VhdlDocGen::TYPE; current->type="protected"; newEntry(); BEGIN(Start); } YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP #line 1044 "vhdlscanner.l" { // find record lineCount(); if (isFunc) { BEGIN(Start); } genPort=2; current->section=Entry::VARIABLE_SEC; current->spec=VhdlDocGen::RECORD; addText(vhdlscanYYtext,vhdlscanYYleng); newEntry(); // adds the record to the last compound BEGIN(ParseRecord); } YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 1059 "vhdlscanner.l" { lineCount(); } YY_BREAK case 22: /* rule 22 can match eol */ YY_RULE_SETUP #line 1063 "vhdlscanner.l" { lineCount(); genPort=0; bufferClear(); BEGIN(Start); } YY_BREAK case 23: YY_RULE_SETUP #line 1070 "vhdlscanner.l" { // parse record body lineCount(); QCString comment; QCString zz(vhdlscanYYtext); VhdlDocGen::deleteAllChars(zz,';'); //delete ; in unit construct if (zz.contains("--!")) { QStringList ql=QStringList::split("--!",zz,FALSE); comment = ql[1]; zz = ql[0]; } else if (zz.contains("--")) { QStringList ql=QStringList::split("--",zz,FALSE); zz = ql[0]; } initEntry(current); addSignals(zz,yyLineNr,current,comment); addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(ParseRecord); } YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 1092 "vhdlscanner.l" { // found a new function in an architecture ? addText(vhdlscanYYtext,vhdlscanYYleng); lineCount(); QCString ttt; bool bb=TRUE; getBufText(ttt,0); if (ttt.contains("--")) { unput('-');unput('-'); VhdlDocGen::deleteCharRev(ttt,'-'); VhdlDocGen::deleteCharRev(ttt,'-'); } if (ttt.contains('(') != ttt.contains(')')) { bb=FALSE; } bool ss = VhdlDocGen::isFunctionProto(ttt); //printf("VhdlDocGen::isFunctionProto(%s)=%d\n",ttt.data(),ss); if (ss && bb) { bufferClear(); addText(ttt.data(),ttt.length()); functionEntry=0; //eFuncBody=new Entry; ::parseFunctionProto(); } bufferClear(); BEGIN(ParseType); } YY_BREAK case 25: /* rule 25 can match eol */ YY_RULE_SETUP #line 1123 "vhdlscanner.l" { lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(ParseType); } YY_BREAK case 26: YY_RULE_SETUP #line 1129 "vhdlscanner.l" { lineCount(); bropen++; addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(ParseType); } YY_BREAK case 27: YY_RULE_SETUP #line 1136 "vhdlscanner.l" { lineCount(); bropen--; addText(vhdlscanYYtext,vhdlscanYYleng); if (bropen==0 && scantype==2) // process { ::parseProcessProto(); BEGIN(ParseProcess); } // if else { BEGIN(ParseType); } } YY_BREAK case 28: /* rule 28 can match eol */ YY_RULE_SETUP #line 1152 "vhdlscanner.l" { // found end of function|process QRegExp regg("[\\s;]"); lineCount(); QCString tt(vhdlscanYYtext); tt=tt.lower(); QStringList ql=QStringList::split(regg,tt,FALSE); int index=ql.findIndex(QCString("if"))+1; index+=ql.findIndex(QCString("case"))+1; index+=ql.findIndex(QCString("loop"))+1; index+=ql.findIndex(QCString("generate"))+1; bufferClear(); if (index==0) { if (isFunc) { Entry* pFunc=getEntryAtLine(current_root,iFuncLine); if (pFunc && pFunc->section==Entry::FUNCTION_SEC) { pFunc->endBodyLine=yyLineNr; } isFunc=0; BEGIN(Start); } } } YY_BREAK case 29: /* rule 29 can match eol */ YY_RULE_SETUP #line 1178 "vhdlscanner.l" { // eat process body lineCount(); BEGIN(ParseFunc); } YY_BREAK case 30: /* rule 30 can match eol */ YY_RULE_SETUP #line 1184 "vhdlscanner.l" { QRegExp regg("[\\s;]"); lineCount(); QCString tt(vhdlscanYYtext); tt=tt.lower(); QStringList ql=QStringList::split(regg,tt,FALSE); int index=ql.findIndex(QCString("if"))+1; index+=ql.findIndex(QCString("case"))+1; index+=ql.findIndex(QCString("loop"))+1; index+=ql.findIndex(QCString("generate"))+1; bufferClear(); if (index==0 && isFunc) { Entry* pFunc=getEntryAtLine(current_root,iFuncLine); if (pFunc && pFunc->section==Entry::FUNCTION_SEC) { pFunc->endBodyLine=yyLineNr; } isFunc=0; BEGIN(Start); } } YY_BREAK case 31: YY_RULE_SETUP #line 1207 "vhdlscanner.l" { lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); if (bropen==0 && !(isFunc==1 && isBody==1) ) { if (isFunc) { parseFunctionProto(); bufferClear(); if (lastCompound && lastCompound->spec==VhdlDocGen::PACKAGE) { isFunc=0; BEGIN(Start); } else { BEGIN(ParseFunc); } }//if else { QCString qcs; getBufText(qcs,0); qcs=qcs.stripWhiteSpace(); current->section=Entry::VARIABLE_SEC; current->type+=qcs.data(); if ((current->spec==VhdlDocGen::SIGNAL || current->spec==VhdlDocGen::CONSTANT || current->spec==VhdlDocGen::TYPE || current->spec==VhdlDocGen::SUBTYPE || current->spec==VhdlDocGen::SHAREDVARIABLE ) && qcs.stripPrefix(",")) { QList<QCString> ql; ql.setAutoDelete(TRUE); QCString buffer; if (current->spec==VhdlDocGen::SUBTYPE || current->spec==VhdlDocGen::TYPE ) { VhdlDocGen::getSigTypeName(ql,qcs.data(),buffer); } else { VhdlDocGen::getSigName(ql,qcs.data(),buffer); } QCString doc = current->doc; QCString brief = current->brief; if (ql.count()>0) { for (uint j=1;j<ql.count();j++) { Entry *ppt = new Entry; initEntry(ppt); ppt->type += ql.at(0)->data(); ppt->section = Entry::VARIABLE_SEC; ppt->spec = current->spec; ppt->name += ql.at(j)->data(); ppt->bodyLine = yyLineNr; ppt->startLine = yyLineNr; ppt->brief = brief; ppt->doc = doc; if (lastCompound) { lastCompound->addSubEntry(ppt); } else { current->addSubEntry(ppt); } } current->type=ql.at(0)->data(); ql.clear(); } } if (lastCompound) { lastCompound->addSubEntry(current); current = new Entry; initEntry(current); } else { newEntry(); } isFunc=0; bufferClear(); BEGIN(Start); } } else { BEGIN(ParseType); } } YY_BREAK case 32: /* rule 32 can match eol */ YY_RULE_SETUP #line 1305 "vhdlscanner.l" { lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); BEGIN(ParseType); } YY_BREAK case 33: YY_RULE_SETUP #line 1311 "vhdlscanner.l" { // found name of an entity/architecture/package lineCount(); QCString qcs(vhdlscanYYtext); qcs=qcs.stripWhiteSpace(); qcs=qcs.lower(); if (strcmp(qcs.data(),"body")==0) // found package body { current->spec=VhdlDocGen::PACKAGE_BODY; current->section=Entry::CLASS_SEC; current->protection=Protected; current->name+=QCString("_"); isBody=1; BEGIN(FindName); } else if (scantype==1) // found a component { QCString qq(vhdlscanYYtext); qq=qq.stripWhiteSpace(); //qq=qq.lower(); current->name=qq; qq=qq.lower(); if (lastCompound) { if (lastCompound->spec==VhdlDocGen::PACKAGE) { if (!VhdlDocGen::foundInsertedComponent(qq,lastCompound)) { BaseInfo *bb=new BaseInfo(qq,Private,Normal); lastCompound->extends->append(bb); } } lastCompound->addSubEntry(current); current = new Entry; initEntry(current); } else { newEntry(); } BEGIN(Start); } else { QCString qq(vhdlscanYYtext); qq=qq.stripWhiteSpace(); current->name=qq; newEntry(); //QCString qreal=QCString(vhdlscanYYtext); BEGIN(Start); } } YY_BREAK case 34: /* rule 34 can match eol */ YY_RULE_SETUP #line 1365 "vhdlscanner.l" { // found generic|port in entity QCString genp(vhdlscanYYleng+1); deleteSpecChars(vhdlscanYYtext,genp.data()); VhdlDocGen::deleteCharRev(genp,'('); if (stricmp(genp.data(),"port" )==0) { genPort=1; } else { genPort=0; } bropen=1; bufferClear(); lineCount(); BEGIN(FindSigName); } YY_BREAK case 35: YY_RULE_SETUP #line 1385 "vhdlscanner.l" { lineCount(); bropen--; addText(vhdlscanYYtext,vhdlscanYYleng); if (bropen==0) { bufferClear(); BEGIN(Start); } else { BEGIN(FindSigName); } } YY_BREAK case 36: /* rule 36 can match eol */ YY_RULE_SETUP #line 1400 "vhdlscanner.l" { // found signals in entity QCString line(vhdlscanYYtext); // note that line can be something like: // "var1, var2, var3 : in std_logic_vector(8 downto 0); --! Some comment" // but also // "var4 --! Some comment // );" // which marks the end of a port // and also // "-- Some comment // var1 : in std_logic;" //printf("--> labelid='%s'\n",line.data()); QStringList ql; QCString comment; int openCount=line.contains('('); int closeCount=line.contains(')'); int semi = line.find(';'); int pos = line.find("--"); int pos1 = line.find("--!"); if (pos!=-1 && pos<pos1) // strip normal comment before special one { line = line.remove(pos,pos1-pos); } //printf("=> signal: line='%s'\n",line.data()); if (semi!=-1 && pos!=-1) { int eol = line.findRev('\n'); //printf("pos=%d eol=%d\n",pos,eol); if (eol>=pos+2) { QRegExp re("\\n[\\s]*--!"); // comment continuation comment=line.mid(pos+2,eol-pos-2); //printf("Comment: '%s'\n",comment.data()); int p,l; while ((p=re.match(comment,0,&l))!=-1) { comment.remove(p,l); } line=line.left(pos)+line.right(line.length()-eol); } else { comment=line.mid(pos+2); line=line.left(pos); } comment.stripWhiteSpace(); // must subtract "(" and ")" in comments because they are used for determining the // end of a port/generic construct openCount-=comment.contains('('); closeCount-=comment.contains(')'); if (!comment.stripPrefix("!")) // not a special comment { comment.resize(0); } } else { //printf("no ; or --: pos=%d semi=%d\n",pos,semi); } int diff=openCount-closeCount; if (diff<0) { VhdlDocGen::deleteCharRev(line,')'); } if (scantype!=1) // not a component { addText(vhdlscanYYtext,vhdlscanYYleng); addSignals(line,yyLineNr,lastEntity,comment); } lineCount(); if ((bropen+openCount-closeCount)==0) { bufferClear(); BEGIN(Start); } } YY_BREAK case 37: YY_RULE_SETUP #line 1485 "vhdlscanner.l" { lineCount(); bropen++; addText(vhdlscanYYtext,vhdlscanYYleng); } YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP #line 1492 "vhdlscanner.l" { lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); //BEGIN(FindSigName); } YY_BREAK case 39: /* rule 39 can match eol */ YY_RULE_SETUP #line 1499 "vhdlscanner.l" { //printf("\n found for[%s] [%d]",vhdlscanYYtext,yyLineNr); lineCount(); } YY_BREAK case 40: YY_RULE_SETUP #line 1504 "vhdlscanner.l" { // found digit addText(vhdlscanYYtext,vhdlscanYYleng); lineCount(); } YY_BREAK case 41: YY_RULE_SETUP #line 1509 "vhdlscanner.l" { // Make sure string literals get transfered to the output // We have to match these because the comment characters (--) // can exist inside a string literal. // We shouldn't have to call lineCount because newlines // are not allowed inside string literals addText(vhdlscanYYtext,vhdlscanYYleng); } YY_BREAK /* <*>{BR}*"--!"{B}*"@}" { // end group if (current) { Entry *pg=new Entry; addSubEntry(current,pg); pg->startLine=yyLineNr; pg->name="endgroup"; } lineCount(); } <*>{BR}*"--!"{B}*"@{" { // start group if (current) { Entry *pg=new Entry; addSubEntry(current,pg); pg->startLine=yyLineNr; pg->name="startgroup"; } lineCount(); } */ case 42: /* rule 42 can match eol */ YY_RULE_SETUP #line 1542 "vhdlscanner.l" { // multi line comment if (iDocLine==-1) iDocLine=yyLineNr; // signal clk :in std_logic; --!@brief global clock // --!@brief global reset // signal reset:in std_logic; // these two comments are detected as a multi line comment QCString qc(vhdlscanYYtext); int len=qc.contains('\n')+yyLineNr-1; if (YY_START!=Comment) // Start of the comment block { bufferClear(); iTextCounter=0; startComment=yyLineNr; g_lastCommentContext=YY_START; } Entry* pTemp=getEntryAtLine(current_root,len); if (pTemp) { // found one line comment, add it to the entry on this line pTemp->briefLine=yyLineNr; pTemp->brief+=vhdlscanYYtext; VhdlDocGen::prepareComment(pTemp->brief); } else { addText(vhdlscanYYtext,vhdlscanYYleng); } lineCount(); BEGIN(Comment); } YY_BREAK case 43: YY_RULE_SETUP #line 1574 "vhdlscanner.l" { if (iDocLine==-1) iDocLine=yyLineNr; addText(vhdlscanYYtext,vhdlscanYYleng); lineCount(); } YY_BREAK case 44: /* rule 44 can match eol */ YY_RULE_SETUP #line 1580 "vhdlscanner.l" { // found end of comment block QCString qcs; getBufText(qcs,iTextCounter); VhdlDocGen::prepareComment(qcs); int ii =qcs.find("\\code"); if (ii>0) { iCodeLen=num_chars; gBlock.reset(); int len=qcs.length(); QCString name=qcs.right(len-ii); name=VhdlDocGen::getIndexWord(name.data(),1); if (!name) gBlock.name="misc"+ VhdlDocGen::getRecordNumber(); else gBlock.name=name; qcs=qcs.left(ii); gBlock.startLine=yyLineNr+1; gBlock.bodyLine=yyLineNr+1; gBlock.brief+=qcs; iTextCounter=0; } if (ii==-1) { handleCommentBlock(qcs,FALSE); } bufferClear(); unput(*vhdlscanYYtext); BEGIN(g_lastCommentContext); } YY_BREAK case 45: YY_RULE_SETUP #line 1614 "vhdlscanner.l" { // one line comment if (iDocLine==-1) iDocLine=yyLineNr; QCString qcs(vhdlscanYYtext); int j=qcs.find("--!"); qcs=qcs.right(qcs.length()-3-j); bool isEndCode=qcs.contains("\\endcode"); if (isEndCode) makeInline(); //printf("--> handleCommentBlock line %d\n",yyLineNr); Entry* pTemp=getEntryAtLine(current_root,yyLineNr); if (!isEndCode) { if (pTemp) { pTemp->briefLine=yyLineNr; pTemp->brief+=qcs; iDocLine=-1; } else { handleCommentBlock(qcs,TRUE); } } bufferClear(); }// one line YY_BREAK case 46: YY_RULE_SETUP #line 1644 "vhdlscanner.l" { } YY_BREAK case 47: /* rule 47 can match eol */ YY_RULE_SETUP #line 1647 "vhdlscanner.l" { lineCount(); addText(vhdlscanYYtext,vhdlscanYYleng); // printf("\n new-line [%d]",yyLineNr); BEGIN(Start); } YY_BREAK case 48: YY_RULE_SETUP #line 1654 "vhdlscanner.l" { addText(vhdlscanYYtext,vhdlscanYYleng); lineCount(); } YY_BREAK case 49: YY_RULE_SETUP #line 1659 "vhdlscanner.l" { addText(vhdlscanYYtext,vhdlscanYYleng); lineCount(); } YY_BREAK case 50: YY_RULE_SETUP #line 1664 "vhdlscanner.l" { addText(vhdlscanYYtext,vhdlscanYYleng); lineCount(); } YY_BREAK case 51: YY_RULE_SETUP #line 1670 "vhdlscanner.l" ECHO; YY_BREAK #line 9415 "<stdout>" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(Start): case YY_STATE_EOF(Comment): case YY_STATE_EOF(FindTypeName): case YY_STATE_EOF(ParseType): case YY_STATE_EOF(ParseRecord): case YY_STATE_EOF(ParseUnits): case YY_STATE_EOF(ParseProcess): case YY_STATE_EOF(ParseFunc): case YY_STATE_EOF(FindName): case YY_STATE_EOF(FindEntityName): case YY_STATE_EOF(FindGenPort): case YY_STATE_EOF(FindTypes): case YY_STATE_EOF(FindSigName): case YY_STATE_EOF(FindFuncName): case YY_STATE_EOF(FindBegin): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed vhdlscanYYin at a new source and called * vhdlscanYYlex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = vhdlscanYYin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( vhdlscanYYwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * vhdlscanYYtext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of vhdlscanYYlex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; vhdlscanYYrestart(vhdlscanYYin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) vhdlscanYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); (yy_state_ptr) = (yy_state_buf); *(yy_state_ptr)++ = yy_current_state; for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 1861 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *(yy_state_ptr)++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 1861 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 1860); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up vhdlscanYYtext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ vhdlscanYYrestart(vhdlscanYYin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( vhdlscanYYwrap( ) ) return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve vhdlscanYYtext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void vhdlscanYYrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ vhdlscanYYensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = vhdlscanYY_create_buffer(vhdlscanYYin,YY_BUF_SIZE ); } vhdlscanYY_init_buffer(YY_CURRENT_BUFFER,input_file ); vhdlscanYY_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void vhdlscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * vhdlscanYYpop_buffer_state(); * vhdlscanYYpush_buffer_state(new_buffer); */ vhdlscanYYensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; vhdlscanYY_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (vhdlscanYYwrap()) processing, but the only time this flag * is looked at is after vhdlscanYYwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void vhdlscanYY_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; vhdlscanYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE vhdlscanYY_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) vhdlscanYYalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYY_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) vhdlscanYYalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYY_create_buffer()" ); b->yy_is_our_buffer = 1; vhdlscanYY_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with vhdlscanYY_create_buffer() * */ void vhdlscanYY_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) vhdlscanYYfree((void *) b->yy_ch_buf ); vhdlscanYYfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a vhdlscanYYrestart() or at EOF. */ static void vhdlscanYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; vhdlscanYY_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then vhdlscanYY_init_buffer was _probably_ * called from vhdlscanYYrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void vhdlscanYY_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) vhdlscanYY_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void vhdlscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; vhdlscanYYensure_buffer_stack(); /* This block is copied from vhdlscanYY_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from vhdlscanYY_switch_to_buffer. */ vhdlscanYY_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void vhdlscanYYpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; vhdlscanYY_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { vhdlscanYY_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void vhdlscanYYensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)vhdlscanYYalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYYensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)vhdlscanYYrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYYensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE vhdlscanYY_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) vhdlscanYYalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYY_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; vhdlscanYY_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to vhdlscanYYlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * vhdlscanYY_scan_bytes() instead. */ YY_BUFFER_STATE vhdlscanYY_scan_string (yyconst char * yystr ) { return vhdlscanYY_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to vhdlscanYYlex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE vhdlscanYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n, i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) vhdlscanYYalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in vhdlscanYY_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = vhdlscanYY_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in vhdlscanYY_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up vhdlscanYYtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ vhdlscanYYtext[vhdlscanYYleng] = (yy_hold_char); \ (yy_c_buf_p) = vhdlscanYYtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ vhdlscanYYleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int vhdlscanYYget_lineno (void) { return vhdlscanYYlineno; } /** Get the input stream. * */ FILE *vhdlscanYYget_in (void) { return vhdlscanYYin; } /** Get the output stream. * */ FILE *vhdlscanYYget_out (void) { return vhdlscanYYout; } /** Get the length of the current token. * */ yy_size_t vhdlscanYYget_leng (void) { return vhdlscanYYleng; } /** Get the current token. * */ char *vhdlscanYYget_text (void) { return vhdlscanYYtext; } /** Set the current line number. * @param line_number * */ void vhdlscanYYset_lineno (int line_number ) { vhdlscanYYlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see vhdlscanYY_switch_to_buffer */ void vhdlscanYYset_in (FILE * in_str ) { vhdlscanYYin = in_str ; } void vhdlscanYYset_out (FILE * out_str ) { vhdlscanYYout = out_str ; } int vhdlscanYYget_debug (void) { return vhdlscanYY_flex_debug; } void vhdlscanYYset_debug (int bdebug ) { vhdlscanYY_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from vhdlscanYYlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; (yy_state_buf) = 0; (yy_state_ptr) = 0; (yy_full_match) = 0; (yy_lp) = 0; /* Defined in main.c */ #ifdef YY_STDINIT vhdlscanYYin = stdin; vhdlscanYYout = stdout; #else vhdlscanYYin = (FILE *) 0; vhdlscanYYout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * vhdlscanYYlex_init() */ return 0; } /* vhdlscanYYlex_destroy is for both reentrant and non-reentrant scanners. */ int vhdlscanYYlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ vhdlscanYY_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; vhdlscanYYpop_buffer_state(); } /* Destroy the stack itself. */ vhdlscanYYfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; vhdlscanYYfree ( (yy_state_buf) ); (yy_state_buf) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * vhdlscanYYlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *vhdlscanYYalloc (yy_size_t size ) { return (void *) malloc( size ); } void *vhdlscanYYrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void vhdlscanYYfree (void * ptr ) { free( (char *) ptr ); /* see vhdlscanYYrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 1670 "vhdlscanner.l" static void initEntry(Entry *e) { e->fileName = yyFileName; initGroupInfo(e); } static void newEntry() { // Add only enties/architectures/packages to root // and signals to classes where they were found // ENTITY dlatch_93 IS -- VHDL'93-Syntax !!! // PORT (d, clk : IN bit; // q, qbar : OUT bit); // GROUP path IS (SIGNAL, SIGNAL); // GROUP d_to_q : path (d, q); // ATTRIBUTE propagation : time; // END dlatch_93; if (current->spec==VhdlDocGen::ENTITY || current->spec==VhdlDocGen::PACKAGE || current->spec==VhdlDocGen::ARCHITECTURE || current->spec==VhdlDocGen::PACKAGE_BODY) { current_root->addSubEntry(current); } else { if (lastCompound) { lastCompound->addSubEntry(current); } else { if (lastEntity) { lastEntity->addSubEntry(current); } else { current_root->addSubEntry(current); // should not happen! } } } previous = current; current = new Entry ; initEntry(current); } static void handleCommentBlock(const QCString &doc,bool brief) { int position=0; bool needsEntry=FALSE; Protection protection=Public; int lineNr = iDocLine; if (brief) current->briefLine = iDocLine; else current->docLine = iDocLine; //printf("parseCommentBlock %p [%s]\n",current,doc.data()); while (parseCommentBlock( g_thisParser, current, doc, // text yyFileName, // file lineNr, // line of block start brief, docBlockAutoBrief, FALSE, protection, position, needsEntry ) ) { //printf("parseCommentBlock position=%d [%s]\n",position,doc.data()+position); if (needsEntry) newEntry(); } if (needsEntry) { newEntry(); } if (docBlockTerm) { unput(docBlockTerm); docBlockTerm=0; } iDocLine=-1; } #if 0 /*! * adds grouping to the entries */ static void mergeGrouping(const Entry* ce,int) { EntryListIterator eli(*ce->children()); Entry *rt; for (;(rt=eli.current());++eli) { if (rt->section==Entry::GROUPDOC_SEC) { if (openGroups) { QCString tt=(QCString)qrl.last(); if (!tt.isEmpty()) { rt->groups->append(new Grouping(tt.data(),Grouping::GROUPING_LOWEST)); } } qrl.append(rt->name); } if ((strcmp(rt->name.data(),"endgroup")==0) && !qrl.isEmpty()) { qrl.remove((QCString)qrl.last()); openGroups--; } if ((strcmp(rt->name.data(),"startgroup")==0)) { openGroups++; } if (rt->section!=Entry::GROUPDOC_SEC && openGroups && !qrl.isEmpty()) { rt->groups->append(new Grouping(qrl.last().data(),Grouping::GROUPING_LOWEST)); } mergeGrouping(rt,openGroups); } } #endif /* * adds the library|use statements to the next class (entity|package|architecture|package body * library ieee * entity xxx * ..... * library * package * enity zzz * ..... * and so on.. */ static void mapLibPackage(const Entry* ce) { Entry *lastComp=0; while (TRUE) { bool found = FALSE; Entry *rt=0; //const QList<Entry> *epp=ce->children(); EntryListIterator eli(*ce->children()); EntryListIterator eli1=eli; for (;(rt=eli.current()),eli1=eli;++eli) { if (rt->spec==VhdlDocGen::LIBRARY || rt->spec==VhdlDocGen::USE) // top level library or use statement { Entry *temp=0; for (;(temp=eli1.current());++eli1) // find next entity { if (temp->spec==VhdlDocGen::ENTITY || temp->spec==VhdlDocGen::PACKAGE || temp->spec==VhdlDocGen::ARCHITECTURE || temp->spec==VhdlDocGen::PACKAGE_BODY) { Entry *ee=new Entry(*rt); //append a copy to entries sublist temp->addSubEntry(ee); found=TRUE; rt->spec=-1; //nullify entry rt->section=0; lastComp=temp; break; } }//for if (lastComp && rt->spec!=-1) { Entry *ee=new Entry(*rt); //append a copy to entries sublist lastComp->addSubEntry(ee); found=TRUE; rt->spec=-1; //nullify entry rt->section=0; } }//if }//for if (!found) // nothing left to do { return; } }//while }//MapLib #if 0 /*! * merges a brief descriptions to the next entry */ void mergeBrief(const Entry* ce) { EntryListIterator eli(*ce->children()); Entry *rt; for (;(rt=eli.current());++eli) { if (found && (!eMerge.brief.isEmpty() || !eMerge.doc.isEmpty())) { rt->doc+=eMerge.doc.data(); rt->docLine=eMerge.docLine; rt->brief+=eMerge.brief.data(); rt->briefLine=eMerge.briefLine; found=FALSE; } if ((strcmp(rt->name.data(),"string")==0)) { eMerge.reset(); eMerge.doc+=rt->doc.data(); eMerge.docLine=rt->docLine; eMerge.brief+=rt->brief.data(); eMerge.briefLine=rt->briefLine; found=TRUE; } MergeBrief(rt); } } #endif void vhdlscanFreeScanner() { #if defined(YY_FLEX_SUBMINOR_VERSION) if (g_lexInit) { vhdlscanYYlex_destroy(); } if (g_buf) { free(g_buf); } g_buf=0; #endif } void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,Entry *root) { inputFile.setName(fileName); //uint jfile=inputFile.size(); ::parserInit(); yyFileName=QCString(fileName); groupEnterFile(fileName,yyLineNr); g_thisParser = this; g_inputFromFile = FALSE; inputPosition = 0; assert(root!=0); inputString=fileBuf; inputLen=strlen(fileBuf); current_root = root; global_root = root; current=new Entry; initEntry(current); //current_root->name=QCString("XXX"); // dummy name for root if (!inputFile.open(IO_ReadOnly)) { err("\n\n could not open file: %s !!\n\n",yyFileName.data()); return ; } if (g_lexInit) { vhdlscanYYrestart(vhdlscanYYin); unput(' '); BEGIN(Start); } vhdlscanYYlex(); g_lexInit=TRUE; free(g_buf); g_buf=0; delete current; current=0; groupLeaveFile(yyFileName,yyLineNr); inputFile.close(); //mergeBrief(current_root); //mergeGrouping(current_root,0); mapLibPackage(current_root); } void VHDLLanguageScanner::parsePrototype(const char *text) { // will be called when a \fn command is found in a comment block QCString ss,ret; bool sem=FALSE; bool func=FALSE; QList<Argument> qs; qs.setAutoDelete(TRUE); VhdlDocGen::parseFuncProto(text,qs,ss,ret,TRUE); int count=qs.count(); if (stricmp(ret.data(),"function")==0) { func=TRUE; } if (count<1 && !func) { return; } Entry *pp = new Entry; initEntry(pp); pp->name=ss.stripWhiteSpace(); pp->args+='('; for (int j=0;j<count;j++) { if (sem) { pp->args+=','; } Argument *ars=(Argument*)(qs.at(j)); Argument *arg=new Argument; arg->attrib = ars->attrib; arg->name = ars->name; arg->type = ars->type; pp->args+=ars->name.data(); pp->args+=" "; pp->args+=ars->type.data(); pp->argList->append(arg); sem=TRUE; } pp->args+=')'; if (!ret.isEmpty()) pp->spec=VhdlDocGen::FUNCTION; else pp->spec=VhdlDocGen::PROCEDURE; if (pp->section == Entry::MEMBERDOC_SEC && pp->args.isEmpty()) pp->section = Entry::VARIABLEDOC_SEC; pp->type=ret; current_root->addSubEntry(pp); } void VHDLLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, bool isExampleBlock, const char *exampleName, FileDef *fileDef, int startLine, int endLine, bool inlineFragment, MemberDef *memberDef, bool showLineNumbers ) { ::parseVhdlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName, fileDef,startLine,endLine,inlineFragment,memberDef, showLineNumbers); }<|fim▁end|>
if ((*str == '\t') || (*str == '\n') || (*str == '\r') || (*str == ' ')) { *str++;
<|file_name|>log2csv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Simple log converter for SOTA It inputs a simplified text log and converts it to SOTA CSV format. The input is a simplified version which allows most of the data field to be guessed by previous input. Example of input file: # lines starting with # are comments # first line contains information about the activation # multiple activations can be separated by a blank line # blank lines right after the first line and between comments are not considered [callsign] [date] SOTA-ref [YOFF-ref] [locator] [other notes] [...] # fields are optional, they must be specified for the first time in a file # after that thay will persist across activations # if chases are also included the SOTA-ref must be set to * # everything after the SOTA-ref is considered additional note # and will not persist to next section (not even YOFF ref) # one optional note is a type of contest if the SOTA operation was carried # out within the rules of contest (for example Field-day), the type of contest # should be specified in the format contes:_contest_type_ where _contest_type_ # will specify a rule file which determines the exchanges format and the # scoring method (this is still need to be expanded) # next lines hold qso data [time] [callsign] [freq] [mode] [RST-sent] [RST-rcvd] [SOTA-ref] [notes] # everything is optional, if not present the previous value will be reused # however if some fields cannot be differentiated uniquely than it needs to be # all present # field rules: # time will be in the format hhmm or hh:mm (numbers and optional colon) # hour part is optional and first 0 is also optional # examples # 0810 or 08:10 complete time {08:10} # 811 missing 0 {08:11} # 9:2 missing 0s {09:02}<|fim▁hole|># 4 missing hour part, minute less than previous, hour is incremented {10:04} # callsign any combination of letters and numbers # at least 1 number in the middle # frequency decimal number in MHz n[.nnn][MHz] # must be in a radio amateur band range # mode a valid amateur radio mode # RST's either RST or RS format based on mode # if not present it is considered to be 59 or 599 # SOTA-ref is in format assoc/region-nnn # anything else not fitting is considered notes # a line is not allowed to consist only of notes # further notes not meant for SOTA database can be commented out """ import sys import re from datetime import date import os.path import argparse import json from contest import Contest import country import qslinfo class LogException(Exception): def __init__(self, message, pos): self.message = message self.pos = pos # string matching functions call_prefix = r"(?:(?=.?[a-z])[0-9a-z]{1,2}(?:(?<=3d)a)?)" call = re.compile(r"(?:"+call_prefix+r"[0-9]?/)?("+call_prefix+r"[0-9][a-z0-9]*)(?:/[0-9a-z]+){0,2}", re.I) sota_ref = re.compile(r"[a-z0-9]{1,3}/[a-z]{2}-[0-9]{3}", re.I) wwff_ref = re.compile(r"[a-z0-9]{1,2}f{2}-[0-9]{3,4}", re.I) locator = re.compile(r"[a-x]{2}[0-9]{2}[a-x]{2}", re.I) date_reg = re.compile(r"([0-9]{4})(?P<sep>[.-])([0-9]{2})(?P=sep)([0-9]{2})") time_reg = re.compile(r"(?P<hour>0?[0-9]|1[0-9]|2[0-3])?((?(hour)[0-5]|[0-5]?)[0-9])") freq = re.compile(r"((?:[0-9]+\.)?[0-9]+)([kMG]?Hz|[mc]?m)?") rst = re.compile(r"[1-5][1-9][1-9]?") word = re.compile(r"\S+") contest = re.compile(r"contest:(\w+)\s*") annotation = re.compile(r"[@%$]{1,2}") def find_word(string, start=0): """Find the first word starting from `start` position Return the word and the position before and after the word """ while start < len(string) and string[start].isspace(): start += 1 end = start while end < len(string) and not string[end].isspace(): end += 1 return string[start:end], start, end bands = { '160m' : ( 1.8, 2.0 ), '80m' : ( 3.5, 4.0 ), '40m' : ( 7.0, 7.3 ), '30m' : ( 10.1, 10.15 ), '20m' : ( 14.0, 14.35 ), '17m' : ( 18.068, 18.168 ), '15m' : ( 21.0, 21.45 ), '12m' : ( 24.89, 24.99 ), '10m' : ( 28.0, 29.7 ), '6m' : ( 50.0, 54.0 ), '2m' : ( 144.0, 148.0 ), '1.25m' : ( 219.0, 225.0 ), '70cm' : ( 420.0, 450.0 ), '35cm' : ( 902.0, 928.0 ), '23cm' : ( 1240.0, 1300.0 ), '13cm' : ( 2300.0, 2450.0 ), '9cm' : ( 3400.0, 3475.0 ), '6cm' : ( 5650.0, 5850.0 ), '3cm' : ( 10000.0, 10500.0 ), '1.25cm' : ( 24000.0, 24250.0 ), '6mm' : ( 47000.0, 47200.0 ), '4mm' : ( 75500.0, 81500.0 ), '2.5mm' : ( 122250.0, 123000.0 ), '2mm' : ( 134000.0, 141000.0 ), '1mm' : ( 241000.0, 250000.0 ), } def match_freq(s): # check if the string s is a correct amateur band frequency # return the string if it is or False otherwise # the string can either specify the frequency or the band # specifying the band must contain the m unit as consacrated bands # frequency can either specify the unit, or be a single number # which is considered to be in MHz, if unit is not MHz if will # be converted, or if missing will be added to output string m = freq.fullmatch(s) if not m: return False mul = 1.0 if m.group(2): if s.endswith('m'): if s in bands: return s else: return False if m.group(2) == kHz: mul = 0.001 elif m.group(2) == GHz: mul = 1000.0 n = float(m.group(1)) * mul for f in bands.values(): if n >= f[0] and n <= f[1]: if mul == 1.0: return m.group(1) + 'MHz' else: return "{:.3f}MHz".format(n) return False def quote_text(string): """Quote a string by the CSV rules: if the text contains commas, newlines or quotes it will be quoted quotes inside the text will be doubled """ if not string: return string if ',' in string or '\n' in string or '"' in string: # check if already quoted if string[0] == '"' and string[-1] == '"': # check if every inner quote is doubled if '"' not in string[1:-1].replace('""', ''): return string # if not then inner part must be doubled string = string[1:-1] # double the inner quotes and quote string string = '"{}"'.format(string.replace('"','""')) return string class Activation: """Class holding information about an activation or a chase Activations contain information about the date and place of activation, callsign used and all qsos. Also a link to the previous activation is stored In a chase multiple qsos can be merged from a single day. """ def __init__(self, string, prev=None): """Initialize the activation from the string At least callsign, date, and sota reference are needed, other information is optional. If a previous activation is given then the callsign and date can be preserved from it, but new sota reference is mandatory. An asterisk instead of sota reference means a chase """ self.previous = prev # start splitting the string into words w, pos, end = find_word(string) # callsign m = call.fullmatch(w) if m: self.callsign = w.upper() w, pos, end = find_word(string, end) elif prev: self.callsign = prev.callsign else: raise LogException("Error in activation definition, missing callsign", pos) # date m = date_reg.fullmatch(w) if m: try: self.date = date(int(m.group(1)), int(m.group(3)), int(m.group(4))) except ValueError: raise LogException("Error in activation definition, invalid date format", pos) w, pos, end = find_word(string, end) elif prev: self.date = prev.date else: raise LogException("Error in activation definition, missing date", pos) # sota reference is mandatory m = sota_ref.fullmatch(w) if m: self.ref = w.upper() elif w == '*': self.ref = '' else: raise LogException("Error in activation definition, invalid SOTA reference detected", pos) notes = string[end:].strip() m = contest.search(notes) if m: self.contest = Contest(m.group(1)) notes = notes[:m.start()] + notes[m.end():] else: self.contest = None self.notes = notes self.qsos = [] # TODO: other information self.wwff = None self.locator = None def add_qso(self, string): """Add a QSO to list of qsos Consider the last qso as the previous one for the new qso """ prev_qso = self.qsos[-1] if self.qsos else None if self.contest: self.qsos.append(QSO(string, prev_qso, self.contest.exchange)) else: self.qsos.append(QSO(string, prev_qso)) def print_qsos(self, format='SOTA_v2', config=None, handle=None, qsl_info=None): if self.previous: self.previous.print_qsos(format, config, handle, qsl_info) # TODO: trace, remove it from final code #print("Processing {} from {} with callsign {}".format( # "chase" if not self.ref else "activation of {}".format(self.ref), # self.date.strftime("%Y-%m-%d"), self.callsign)) # TODO: only SOTA_v2 is understood as of now if format == 'SOTA_v2': sota_line = ['v2', self.callsign, self.ref, self.date.strftime("%d/%m/%Y")] + [''] * 6 for qso in self.qsos: sota_line[4] = '{:02}{:02}'.format(qso.time[0], qso.time[1]) sota_line[5] = qso.freq sota_line[6] = qso.mode sota_line[7] = qso.callsign sota_line[8] = getattr(qso, 'ref', '') sota_line[9] = quote_text(qso.notes) #sota_line[9] = quote_text(' '.join((qso.sent, qso.rcvd, qso.notes))) print(','.join(sota_line), file=handle) # contest format: if a contest was specified for an activation # use the contest rules to determine the output format elif format == 'contest' and self.contest: self.contest.configure(self, config) for qso in self.qsos: self.contest.add_qso(self.callsign, self.date, qso) print(self.contest, file=handle) # qsl status format: # group callsigns by country and add qsl marker: # * - sent, but not confirmed yet # ** - confirmed # an additional config parameter is a dictionary with previous qsl # information elif format == 'qsl': if not qsl_info: qsl_info = qslinfo.QSL() print_stat = True else: print_stat = False qsl_info.add_qsos(self.qsos, self.date) if print_stat: qsl_info.print_stat(handle) else: raise ValueError("Unrecognized output format") class QSO: """Class containing information about a qso It is initialized from a string and a previous qso object. Missing fields from the string are filled with data from previous qso """ def __init__(self, string, prev=None, exchange=None): """Initialize qso data with the following information: time callsign freq mode rst_sent rest_rcvd SOTA_ref notes """ words = [(m.group(), m.start(), {}) for m in word.finditer(string)] if not words: raise LogException("Empty QSO", 0) # try to match words into categories for i,w in enumerate(words): t = w[2] # time if i < 1: m = time_reg.fullmatch(w[0]) if m: t['time'] = (int(m.group(1)) if m.group(1) else None, int(m.group(2))) # callsign if i < 2: m = call.fullmatch(w[0]) if m: t['call'] = w[0].upper() # freq if i < 3: m = match_freq(w[0]) if m: t['freq'] = m # mode # TODO: add all possible modes and translations if i < 4: if w[0].lower() in ['cw', 'ssb', 'fm', 'am']: t['mode'] = w[0].upper() elif w[0].lower() in ['data', 'psk', 'psk31', 'psk63', 'rtty', 'fsk441', 'jt65', 'ft8']: t['mode'] = 'Data' elif w[0].lower() in ['other']: t['mode'] = 'Other' # rst if i < 6: m = rst.fullmatch(w[0]) if m: t['rst'] = w[0] # sota ref m = sota_ref.fullmatch(w[0]) if m: t['sota'] = w[0].upper() # optional contest exchange if exchange and i < 7: m = exchange.fullmatch(w[0]) if m: t['exch'] = w[0] # annotation about QSLing m = annotation.fullmatch(w[0]) if m: t['qsl'] = (w[0][0], w[0][1:]) # now filter the type list # print(words) typeorder = ['time', 'call', 'freq', 'mode', 'rst', 'rst', 'exch', 'sota'] wlist = [None, None, None, None, None, None, None, None] lastelem = -1 noteselem = 7 for i,w in enumerate(words): for e in range(lastelem + 1, len(typeorder)): if typeorder[e] in w[2]: lastelem = e wlist[e] = w break else: noteselem = i break # try to move back multiple mapped words felist = [(i+2,w) for i,w in enumerate(wlist[2:6]) if w] for i in range(6,3,-1): if wlist[i] is None and felist and typeorder[i] in felist[-1][1][2]: wlist[i] = felist[-1][1] wlist[felist[-1][0]] = None felist.pop() if felist and felist[-1][0] == i: felist.pop() # check for minimum change if wlist[1] is None and wlist[2] is None and wlist[3] is None: raise LogException("Invalid change from previous QSO", words[i][1]) # now recreate all elements # time if wlist[0] is None or wlist[0][2]['time'][0] is None: if prev is None: raise LogException("Missing time value", 0) if wlist[0] is not None: self.time = (prev.time[0], wlist[0][2]['time'][1]) if self.time[1] < prev.time[1]: hour = self.time[0] + 1 if hour == 24: hour = 0 self.time = (hour, self.time[1]) else: self.time = prev.time else: self.time = wlist[0][2]['time'] # call if wlist[1] is None: if prev is None: raise LogException("Missing callsign", 0) self.callsign = prev.callsign else: self.callsign = wlist[1][2]['call'] # freq if wlist[2] is None: if prev is None: raise LogException("Missing frequency", 0) self.freq = prev.freq else: self.freq = wlist[2][2]['freq'] # mode if wlist[3] is None: if prev is None: raise LogException("Missing mode", 0) self.mode = prev.mode else: self.mode = wlist[3][2]['mode'] # rst if self.mode == 'CW' or self.mode == 'Data': def_rst = '599' else: def_rst = '59' if wlist[4] is None: self.sent = def_rst else: if len(wlist[4][2]['rst']) != len(def_rst): raise LogException("Invalid RST for this mode", 0) self.sent = wlist[4][2]['rst'] if wlist[5] is None: self.rcvd = def_rst else: if len(wlist[5][2]['rst']) != len(def_rst): raise LogException("Invalid RST for this mode", 0) self.rcvd = wlist[5][2]['rst'] # optional exchange if wlist[6] is not None: self.exch = wlist[6][2]['exch'] # SOTA ref if wlist[7] is not None: self.ref = wlist[7][2]['sota'] # notes if noteselem < len(words): self.notes = ' '.join(x[0] for x in words[noteselem:] if 'qsl' not in x[2]) else: self.notes = '' # qsl info q = [x[2]['qsl'] for x in words[noteselem:] if 'qsl' in x[2]] if q: self.qsl_sent = q[0][0] self.qsl_rcvd = q[0][1] # day adjustment for multiple day activation if prev: if prev.time[0] * 60 + prev.time[1] > self.time[0] * self.time[1]: self.day = prev.day + 1 else: self.day = prev.day else: self.day = 0 def parse_input(input_handle, output_handle=None, output_name='', **params): comment_line = False blank_line = False possible_blank_line = False activation = None qso = None errors = [] cnt = 0 # go though the lines for line in input_handle: cnt += 1 s,d,c = line.partition('#') s = s.strip() if not s: if d: possible_blank_line = False comment_line = True elif activation and activation.qsos: if comment_line: possible_blank_line = True comment_line = False else: blank_line = True continue comment_line = False if possible_blank_line: blank_line = True possible_blank_line = False # normal line found # if previous line was a blank line try: if blank_line or not activation: activation = Activation(s, activation) blank_line = False else: activation.add_qso(s) except LogException as e: errors.append((cnt, str(e), s, e.pos)) # if any error found, print it on stderr if errors: for e in errors: print("{}:{}: {}\n {}\n {:>{}}".format( input_handle.name, e[0], e[1], e[2], '^', e[3] + 1), file=sys.stderr) else: if output_handle: activation.print_qsos(handle=output_handle, **params) elif output_name: filename = output_name.format( callsign = call.fullmatch(activation.callsign).group(1), file = os.path.splitext(os.path.basename(input_handle.name))[0], ext = activation.contest.output.ext if params.get('format') == 'contest' else 'csv' ) with open(filename, 'w', encoding='utf-8') as f: activation.print_qsos(handle=f, **params) else: activation.print_qsos(**params) if __name__ == '__main__': # parse arguments parser = argparse.ArgumentParser(description='Simple log converter for creating SOTA csv, Cabrillo, etc. from a simplified log file.') parser.add_argument('files', metavar='FILE', nargs='*', help='Log file to be processed. If no file is present the standard input is used. If both some files and the standard input is needed use `-` to add standard input to the list of files') format_group = parser.add_mutually_exclusive_group() format_group.add_argument('-c', '--contest', action='store_true', help='Create output for the contest specified in the processed file') format_group.add_argument('-q', '--qsl', action='store_true', help='Display QSL status of contacted OM') parser.add_argument('-o', '--output', help='Output file or directory. If not present, the generated output is printed to standard output. If the argument is a directory, then a file with the same name as the input file and a proper extension will be used.') args = parser.parse_args() params = {} if args.contest: params['format'] = 'contest' if args.qsl: params['format'] = 'qsl' params['qsl_info'] = qslinfo.QSL() if os.path.isfile('qsl.lst'): params['qsl_info'].load('qsl.lst') if not args.files: args.files.append('-') if args.output: if os.path.isdir(args.output): params['output_name'] = os.path.join(args.output, '{callsign} {file}.{ext}') elif len(args.files) != 1 or args.files[0] != '-': params['output_handle'] = open(args.output, 'w', encoding='utf-8') for file in args.files: if file == '-': parse_input(sys.stdin) else: if args.contest: config = os.path.splitext(handle.name)[0] + '.cts' if os.path.isfile(config): params['config'] = config elif 'config' in params: del params['config'] with open(file, 'r', encoding='utf-8') as f: parse_input(f, **params) if 'output_handle' in params: close(params['output_handle']) if 'qsl_info' in params: params['qsl_info'].save('qsl.lst') params['qsl_info'].print_stat()<|fim▁end|>
# 3 missing hour part {09:03} # 05 missing hour part {09:05} # 13 missing hour part {09:13}
<|file_name|>bitcoin_de.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Fellatio</source> <translation>Über Fellatio</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Fellatio&lt;/b&gt; version</source> <translation>&lt;b&gt;Fellatio&lt;/b&gt;-Version</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation> Dies ist experimentelle Software. Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder http://www.opensource.org/licenses/mit-license.php. Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit (http://www.openssl.org/) entwickelt wurde, sowie kryptographische Software geschrieben von Eric Young ([email protected]) und UPnP-Software geschrieben von Thomas Bernard.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation>Copyright</translation> </message> <message> <location line="+0"/> <source>The Fellatio developers</source> <translation>Die Fellatioentwickler</translation> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Adressbuch</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Doppelklicken, um die Adresse oder die Bezeichnung zu bearbeiten</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Eine neue Adresse erstellen</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Ausgewählte Adresse in die Zwischenablage kopieren</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;Neue Adresse</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Fellatio addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>Dies sind Ihre Fellatio-Adressen zum Empfangen von Zahlungen. Es steht Ihnen frei, jedem Absender eine Andere mitzuteilen, um einen besseren Überblick über eingehende Zahlungen zu erhalten.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>Adresse &amp;kopieren</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>&amp;QR-Code anzeigen</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Fellatio address</source> <translation>Eine Nachricht signieren, um den Besitz einer Fellatio-Adresse zu beweisen</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Nachricht &amp;signieren</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Die ausgewählte Adresse aus der Liste entfernen.</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation>E&amp;xportieren</translation> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Fellatio address</source> <translation>Eine Nachricht verifizieren, um sicherzustellen, dass diese mit einer angegebenen Fellatio-Adresse signiert wurde</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>Nachricht &amp;verifizieren</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Löschen</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Fellatio addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation>Dies sind Ihre Fellatio-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Fellatios überweisen.</translation> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>&amp;Bezeichnung kopieren</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Editieren</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation>Fellatios &amp;überweisen</translation> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>Adressbuch exportieren</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kommagetrennte-Datei (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Fehler beim Exportieren</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Konnte nicht in Datei %1 schreiben.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Bezeichnung</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresse</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(keine Bezeichnung)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Passphrasendialog</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Passphrase eingeben</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Neue Passphrase</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Neue Passphrase wiederholen</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Geben Sie die neue Passphrase für die Brieftasche ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;10 oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;8 oder mehr Wörtern&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Brieftasche verschlüsseln</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entsperren.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Brieftasche entsperren</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entschlüsseln.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Brieftasche entschlüsseln</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Passphrase ändern</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Geben Sie die alte und neue Passphrase der Brieftasche ein.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Verschlüsselung der Brieftasche bestätigen</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source> <translation>Warnung: Wenn Sie Ihre Brieftasche verschlüsseln und Ihre Passphrase verlieren, werden Sie &lt;b&gt;alle Ihre Fellatios verlieren&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation>WICHTIG: Alle vorherigen Sicherungen Ihrer Brieftasche sollten durch die neu erzeugte, verschlüsselte Brieftasche ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Brieftasche nutzlos, sobald Sie die neue, verschlüsselte Brieftasche verwenden.</translation> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Warnung: Die Feststelltaste ist aktiviert!</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Brieftasche verschlüsselt</translation> </message> <message> <location line="-56"/> <source>Fellatio will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your fellatios from being stolen by malware infecting your computer.</source> <translation>Fellatio wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer Fellatios durch Schadsoftware schützt, die Ihren Computer befällt.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Verschlüsselung der Brieftasche fehlgeschlagen</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Die Verschlüsselung der Brieftasche ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Brieftasche wurde nicht verschlüsselt.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>Die eingegebenen Passphrasen stimmen nicht überein.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Entsperrung der Brieftasche fehlgeschlagen</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Die eingegebene Passphrase zum Entschlüsseln der Brieftasche war nicht korrekt.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Entschlüsselung der Brieftasche fehlgeschlagen</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Die Passphrase der Brieftasche wurde erfolgreich geändert.</translation> </message> </context> <context> <name>FellatioGUI</name> <message> <location filename="../fellatiogui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Nachricht s&amp;ignieren...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Synchronisiere mit Netzwerk...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Übersicht</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Allgemeine Übersicht der Brieftasche anzeigen</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Transaktionen</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Transaktionsverlauf durchsehen</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>Liste der gespeicherten Zahlungsadressen und Bezeichnungen bearbeiten</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Liste der Empfangsadressen anzeigen</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>&amp;Beenden</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Anwendung beenden</translation> </message> <message> <location line="+4"/> <source>Show information about Fellatio</source> <translation>Informationen über Fellatio anzeigen</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Über &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Informationen über Qt anzeigen</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Konfiguration...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>Brieftasche &amp;verschlüsseln...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>Brieftasche &amp;sichern...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>Passphrase &amp;ändern...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>Importiere Blöcke von Laufwerk...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation>Reindiziere Blöcke auf Laufwerk...</translation> </message> <message> <location line="-347"/> <source>Send coins to a Fellatio address</source> <translation>Fellatios an eine Fellatio-Adresse überweisen</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Fellatio</source> <translation>Die Konfiguration des Clients bearbeiten</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Eine Sicherungskopie der Brieftasche erstellen und abspeichern</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Ändert die Passphrase, die für die Verschlüsselung der Brieftasche benutzt wird</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp;Debugfenster</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Debugging- und Diagnosekonsole öffnen</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>Nachricht &amp;verifizieren...</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>Fellatio</source> <translation>Fellatio</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Brieftasche</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation>Überweisen</translation> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation>&amp;Empfangen</translation> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation>&amp;Adressen</translation> </message> <message> <location line="+22"/> <source>&amp;About Fellatio</source> <translation>&amp;Über Fellatio</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;Anzeigen / Verstecken</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation>Das Hauptfenster anzeigen oder verstecken</translation> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation>Verschlüsselt die zu Ihrer Brieftasche gehörenden privaten Schlüssel</translation> </message> <message> <location line="+7"/> <source>Sign messages with your Fellatio addresses to prove you own them</source> <translation>Nachrichten signieren, um den Besitz Ihrer Fellatio-Adressen zu beweisen</translation> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Fellatio addresses</source> <translation>Nachrichten verifizieren, um sicherzustellen, dass diese mit den angegebenen Fellatio-Adressen signiert wurden</translation> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;Datei</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Einstellungen</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>&amp;Hilfe</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Registerkartenleiste</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[Testnetz]</translation> </message> <message> <location line="+47"/> <source>Fellatio client</source> <translation>Fellatio-Client</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Fellatio network</source> <translation><numerusform>%n aktive Verbindung zum Fellatio-Netzwerk</numerusform><numerusform>%n aktive Verbindungen zum Fellatio-Netzwerk</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation>Keine Blockquelle verfügbar...</translation> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation>%1 von (geschätzten) %2 Blöcken des Transaktionsverlaufs verarbeitet.</translation> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation>%1 Blöcke des Transaktionsverlaufs verarbeitet.</translation> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen</numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation>%1 im Rückstand</translation> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation>Der letzte empfangene Block ist %1 alt.</translation> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation>Transaktionen hiernach werden noch nicht angezeigt.</translation> </message> <message> <location line="+22"/> <source>Error</source> <translation>Fehler</translation> </message> <message> <location line="+3"/> <source>Warning</source> <translation>Warnung</translation> </message> <message> <location line="+3"/> <source>Information</source> <translation>Hinweis</translation> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation>Die Transaktion übersteigt das Größenlimit. Sie können sie trotzdem senden, wenn Sie eine zusätzliche Transaktionsgebühr in Höhe von %1 zahlen. Diese wird an die Knoten verteilt, die Ihre Transaktion bearbeiten und unterstützt damit das Fellatio-Netzwerk. Möchten Sie die Gebühr bezahlen?</translation> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Auf aktuellem Stand</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Hole auf...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Transaktionsgebühr bestätigen</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Gesendete Transaktion</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Eingehende Transaktion</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Datum: %1 Betrag: %2 Typ: %3 Adresse: %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>URI Verarbeitung</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Fellatio address or malformed URI parameters.</source> <translation>URI kann nicht analysiert werden! Dies kann durch eine ungültige Fellatio-Adresse oder fehlerhafte URI-Parameter verursacht werden.</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Brieftasche ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;entsperrt&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Brieftasche ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;gesperrt&lt;/b&gt;</translation> </message> <message> <location filename="../fellatio.cpp" line="+111"/> <source>A fatal error occurred. Fellatio can no longer continue safely and will quit.</source> <translation>Ein schwerer Fehler ist aufgetreten. Fellatio kann nicht stabil weiter ausgeführt werden und wird beendet.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Netzwerkalarm</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Adresse bearbeiten</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Bezeichnung</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Die Bezeichnung dieses Adressbuchseintrags</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adresse</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>Die Adresse des Adressbucheintrags. Diese kann nur für Zahlungsadressen bearbeitet werden.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>Neue Empfangsadresse</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Neue Zahlungsadresse</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Empfangsadresse bearbeiten</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Zahlungsadresse bearbeiten</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Die eingegebene Adresse &quot;%1&quot; befindet sich bereits im Adressbuch.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Fellatio address.</source> <translation>Die eingegebene Adresse &quot;%1&quot; ist keine gültige Fellatio-Adresse.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Die Brieftasche konnte nicht entsperrt werden.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Generierung eines neuen Schlüssels fehlgeschlagen.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Fellatio-Qt</source> <translation>Fellatio-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>Version</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Benutzung:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>Kommandozeilenoptionen</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI-Optionen</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Sprache festlegen, z.B. &quot;de_DE&quot; (Standard: System Locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Minimiert starten</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Startbildschirm beim Starten anzeigen (Standard: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Erweiterte Einstellungen</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Allgemein</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation>Optionale Transaktionsgebühr pro KB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Transaktions&amp;gebühr bezahlen</translation> </message> <message> <location line="+31"/> <source>Automatically start Fellatio after logging in to the system.</source> <translation>Fellatio nach der Anmeldung am System automatisch ausführen.</translation> </message> <message> <location line="+3"/> <source>&amp;Start Fellatio on system login</source> <translation>&amp;Starte Fellatio nach Systemanmeldung</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation>Setzt die Clientkonfiguration auf Standardwerte zurück.</translation> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation>Konfiguration &amp;zurücksetzen</translation> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>&amp;Netzwerk</translation> </message> <message> <location line="+6"/> <source>Automatically open the Fellatio client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Automatisch den Fellatio-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn Ihr Router UPnP unterstützt und dies aktiviert ist.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Portweiterleitung via &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the Fellatio network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Über einen SOCKS-Proxy mit dem Fellatio-Netzwerk verbinden (z.B. beim Verbinden über Tor).</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>Über einen SOCKS-Proxy &amp;verbinden:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy-&amp;IP:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>IP-Adresse des Proxies (z.B. 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Port des Proxies (z.B. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS-&amp;Version:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>SOCKS-Version des Proxies (z.B. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Programmfenster</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Nur ein Symbol im Infobereich anzeigen, nachdem das Programmfenster minimiert wurde.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>In den Infobereich anstatt in die Taskleiste &amp;minimieren</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über &quot;Beenden&quot; im Menü schließen.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>Beim Schließen m&amp;inimieren</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Anzeige</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>&amp;Sprache der Benutzeroberfläche:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Fellatio.</source> <translation>Legt die Sprache der Benutzeroberfläche fest. Diese Einstellung wird erst nach einem Neustart von Fellatio aktiv.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Einheit der Beträge:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Wählen Sie die Standarduntereinheit, die in der Benutzeroberfläche und beim Überweisen von Fellatios angezeigt werden soll.</translation> </message> <message> <location line="+9"/> <source>Whether to show Fellatio addresses in the transaction list or not.</source> <translation>Legt fest, ob Fellatio-Adressen in der Transaktionsliste angezeigt werden.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>Adressen in der Transaktionsliste &amp;anzeigen</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Abbrechen</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>&amp;Übernehmen</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>Standard</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation>Zurücksetzen der Konfiguration bestätigen</translation> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation>Einige Einstellungen benötigen möglicherweise einen Clientneustart, um aktiv zu werden.</translation> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation>Wollen Sie fortfahren?</translation> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>Warnung</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Fellatio.</source> <translation>Diese Einstellung wird erst nach einem Neustart von Fellatio aktiv.</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Die eingegebene Proxyadresse ist ungültig.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Fellatio network after a connection is established, but this process has not completed yet.</source> <translation>Die angezeigten Informationen sind möglicherweise nicht mehr aktuell. Ihre Brieftasche wird automatisch synchronisiert, nachdem eine Verbindung zum Fellatio-Netzwerk hergestellt wurde. Dieser Prozess ist jedoch derzeit noch nicht abgeschlossen.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Kontostand:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Unbestätigt:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Brieftasche</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>Unreif:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Erarbeiteter Betrag der noch nicht gereift ist</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Letzte Transaktionen&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Ihr aktueller Kontostand</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>Betrag aus unbestätigten Transaktionen, der noch nicht im aktuellen Kontostand enthalten ist</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>nicht synchron</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start fellatio: click-to-pay handler</source> <translation>&quot;fellatio: Klicken-zum-Bezahlen&quot;-Handler konnte nicht gestartet werden</translation> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>QR-Code-Dialog</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Zahlung anfordern</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Betrag:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Bezeichnung:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Nachricht:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;Speichern unter...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Fehler beim Kodieren der URI in den QR-Code.</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>Der eingegebene Betrag ist ungültig, bitte überprüfen.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>Resultierende URI zu lang, bitte den Text für Bezeichnung / Nachricht kürzen.</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>QR-Code abspeichern</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>PNG-Bild (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Clientname</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>n.v.</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Clientversion</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Information</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Verwendete OpenSSL-Version</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Startzeit</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Netzwerk</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Anzahl Verbindungen</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>Im Testnetz</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Blockkette</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Aktuelle Anzahl Blöcke</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Geschätzte Gesamtzahl Blöcke</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Letzte Blockzeit</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Öffnen</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Kommandozeilenoptionen</translation> </message> <message> <location line="+7"/> <source>Show the Fellatio-Qt help message to get a list with possible Fellatio command-line options.</source> <translation>Zeige die Fellatio-Qt-Hilfsnachricht, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten.</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp;Anzeigen</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konsole</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Erstellungsdatum</translation> </message> <message> <location line="-104"/> <source>Fellatio - Debug window</source> <translation>Fellatio - Debugfenster</translation> </message> <message> <location line="+25"/> <source>Fellatio Core</source> <translation>Fellatio-Kern</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Debugprotokolldatei</translation> </message> <message> <location line="+7"/> <source>Open the Fellatio debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Öffnet die Fellatio-Debugprotokolldatei aus dem aktuellen Datenverzeichnis. Dies kann bei großen Protokolldateien einige Sekunden dauern.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Konsole zurücksetzen</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Fellatio RPC console.</source> <translation>Willkommen in der Fellatio-RPC-Konsole.</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Pfeiltaste hoch und runter, um die Historie durchzublättern und &lt;b&gt;Strg-L&lt;/b&gt;, um die Konsole zurückzusetzen.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Bitte &lt;b&gt;help&lt;/b&gt; eingeben, um eine Übersicht verfügbarer Befehle zu erhalten.</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Fellatios überweisen</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>In einer Transaktion an mehrere Empfänger auf einmal überweisen</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Empfänger &amp;hinzufügen</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Alle Überweisungsfelder zurücksetzen</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>&amp;Zurücksetzen</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Kontostand:</translation> </message> <message> <location line="+10"/> <source>123.456 BLO</source> <translation>123.456 BLO</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Überweisung bestätigen</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Überweisen</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; an %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Überweisung bestätigen</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Sind Sie sich sicher, dass Sie die folgende Überweisung ausführen möchten?&lt;br&gt;%1</translation> </message> <message> <location line="+0"/> <source> and </source> <translation> und </translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Der zu zahlende Betrag muss größer als 0 sein.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Doppelte Adresse gefunden, pro Überweisung kann an jede Adresse nur einmalig etwas überwiesen werden.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation>Fehler: Transaktionserstellung fehlgeschlagen!</translation> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Fehler: Die Transaktion wurde abgelehnt. Dies kann passieren, wenn einige Fellatios aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Fellatios dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Formular</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>&amp;Betrag:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>&amp;Empfänger:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>Die Zahlungsadresse der Überweisung (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt)</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;Bezeichnung:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Adresse aus Adressbuch wählen</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Adresse aus der Zwischenablage einfügen</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>Diesen Empfänger entfernen</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Fellatio address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>Fellatio-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Signaturen - eine Nachricht signieren / verifizieren</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>Nachricht &amp;signieren</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>Sie können Nachrichten mit Ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>Die Adresse mit der die Nachricht signiert wird (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Eine Adresse aus dem Adressbuch wählen</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>Adresse aus der Zwischenablage einfügen</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>Zu signierende Nachricht hier eingeben</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation>Signatur</translation> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>Aktuelle Signatur in die Zwischenablage kopieren</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Fellatio address</source> <translation>Die Nachricht signieren, um den Besitz dieser Fellatio-Adresse zu beweisen</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>&amp;Nachricht signieren</translation> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>Alle &quot;Nachricht signieren&quot;-Felder zurücksetzen</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>&amp;Zurücksetzen</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>Nachricht &amp;verifizieren</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>Geben Sie die signierende Adresse, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur, als in der signierten Nachricht selber enthalten ist, um nicht von einerm Man-in-the-middle-Angriff hinters Licht geführt zu werden.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>Die Adresse mit der die Nachricht signiert wurde (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Fellatio address</source> <translation>Die Nachricht verifizieren, um sicherzustellen, dass diese mit der angegebenen Fellatio-Adresse signiert wurde</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation>&amp;Nachricht verifizieren</translation> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>Alle &quot;Nachricht verifizieren&quot;-Felder zurücksetzen</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Fellatio address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation>Fellatio-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Auf &quot;Nachricht signieren&quot; klicken, um die Signatur zu erzeugen</translation> </message> <message> <location line="+3"/> <source>Enter Fellatio signature</source> <translation>Fellatio-Signatur eingeben</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Die eingegebene Adresse ist ungültig.</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>Bitte überprüfen Sie die Adresse und versuchen Sie es erneut.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Die eingegebene Adresse verweist nicht auf einen Schlüssel.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Entsperrung der Brieftasche wurde abgebrochen.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Signierung der Nachricht fehlgeschlagen.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Nachricht signiert.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Die Signatur konnte nicht dekodiert werden.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Bitte überprüfen Sie die Signatur und versuchen Sie es erneut.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Die Signatur entspricht nicht dem Message Digest.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Verifikation der Nachricht fehlgeschlagen.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Nachricht verifiziert.</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Fellatio developers</source> <translation>Die Fellatioentwickler</translation> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[Testnetz]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Offen bis %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1/offline</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/unbestätigt</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 Bestätigungen</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Status</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, über %n Knoten übertragen</numerusform><numerusform>, über %n Knoten übertragen</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Quelle</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generiert</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>Von</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>An</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>eigene Adresse</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>Bezeichnung</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Gutschrift</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>reift noch %n weiteren Block</numerusform><numerusform>reift noch %n weitere Blöcke</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>nicht angenommen</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Belastung</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Transaktionsgebühr</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Nettobetrag</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Nachricht signieren</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Kommentar</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>Transaktions-ID</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>Generierte Fellatios müssen 120 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block generierten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in &quot;nicht angenommen&quot; geändert und der Betrag wird nicht verfügbar werden. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich generiert.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Debuginformationen</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transaktion</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>Eingaben</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Betrag</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>wahr</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>falsch</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, wurde noch nicht erfolgreich übertragen</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>unbekannt</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Transaktionsdetails</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresse</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Betrag</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Offen bis %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Offline (%1 Bestätigungen)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>Unbestätigt (%1 von %2 Bestätigungen)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Bestätigt (%1 Bestätigungen)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation><numerusform>Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weiteren Block reift</numerusform><numerusform>Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weitere Blöcke reift</numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Dieser Block wurde von keinem anderen Knoten empfangen und wird wahrscheinlich nicht angenommen werden!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generiert, jedoch nicht angenommen</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Empfangen über</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Empfangen von</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Überwiesen an</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Eigenüberweisung</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Erarbeitet</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(k.A.)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Transaktionsstatus. Fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Datum und Uhrzeit als die Transaktion empfangen wurde.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Art der Transaktion</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Zieladresse der Transaktion</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>Alle</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Heute</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Diese Woche</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Diesen Monat</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Letzten Monat</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Dieses Jahr</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Zeitraum...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Empfangen über</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Überwiesen an</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Eigenüberweisung</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Erarbeitet</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Andere</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Zu suchende Adresse oder Bezeichnung eingeben</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Minimaler Betrag</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Adresse kopieren</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Bezeichnung kopieren</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Betrag kopieren</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Transaktions-ID kopieren</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Bezeichnung bearbeiten</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Transaktionsdetails anzeigen</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Transaktionen exportieren</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Kommagetrennte-Datei (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Bestätigt</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Typ</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Bezeichnung</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adresse</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Betrag</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Fehler beim Exportieren</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Konnte nicht in Datei %1 schreiben.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Zeitraum:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>bis</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>Fellatios überweisen</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation>E&amp;xportieren</translation> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation>Brieftasche sichern</translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Brieftaschendaten (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Sicherung fehlgeschlagen</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>Beim Speichern der Brieftaschendaten an die neue Position ist ein Fehler aufgetreten.</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation>Sicherung erfolgreich</translation> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation>Speichern der Brieftaschendaten an die neue Position war erfolgreich.</translation> </message> </context> <context> <name>fellatio-core</name> <message> <location filename="../fellatiostrings.cpp" line="+94"/> <source>Fellatio version</source> <translation>Fellatio-Version</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Benutzung:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or fellatiod</source> <translation>Befehl an -server oder fellatiod senden</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>Befehle auflisten</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Hilfe zu einem Befehl erhalten</translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Optionen:</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: fellatio.conf)</source> <translation>Konfigurationsdatei festlegen (Standard: fellatio.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: fellatiod.pid)</source> <translation>PID-Datei festlegen (Standard: fellatiod.pid)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Datenverzeichnis festlegen</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Größe des Datenbankcaches in MB festlegen (Standard: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 49105 or testnet: 149105)</source> <translation>&lt;port&gt; nach Verbindungen abhören (Standard: 49105 oder Testnetz: 149105)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Maximal &lt;n&gt; Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Mit dem Knoten verbinden um Adressen von Gegenstellen abzufragen, danach trennen</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>Die eigene öffentliche Adresse angeben</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv4 ist ein Fehler aufgetreten: %s</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 49104 or testnet: 149104)</source> <translation>&lt;port&gt; nach JSON-RPC-Verbindungen abhören (Standard: 49104 oder Testnetz: 149104)</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Kommandozeilenbefehle und JSON-RPC-Befehle annehmen</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Als Hintergrunddienst starten und Befehle annehmen</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Das Testnetz verwenden</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect)</translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=fellatiorpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Fellatio Alert&quot; [email protected] </source> <translation>%s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben: %s Es wird empfohlen das folgende Zufallspasswort zu verwenden: rpcuser=fellatiorpc rpcpassword=%s (Sie müssen sich dieses Passwort nicht merken!) Der Benutzername und das Passwort dürfen NICHT identisch sein. Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer. Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtig zu werden; zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Fellatio Alert\&quot; [email protected] </translation> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation>Beim Einrichten des abzuhörenden RPC-Ports %u für IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %s</translation> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 [Host]:Port-Schreibweise verwenden</translation> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Fellatio is probably already running.</source> <translation>Datenverzeichnis %s kann nicht gesperrt werden. Evtl. wurde Fellatio bereits gestartet.</translation> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Fellatios aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Fellatios dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation>Fehler: Diese Transaktion benötigt aufgrund ihres Betrags, ihrer Komplexität oder der Nutzung kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>Kommando ausführen wenn ein relevanter Alarm empfangen wird (%s im Kommando wird durch die Nachricht ersetzt)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Kommando ausführen wenn sich eine Transaktion der Briefrasche verändert (%s im Kommando wird durch die TxID ersetzt)</translation> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Maximale Größe von &quot;high-priority/low-fee&quot;-Transaktionen in Byte festlegen (Standard: 27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation>Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen!</translation> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>Warnung: Angezeigte Transaktionen sind evtl. nicht korrekt! Sie oder die anderen Knoten müssen unter Umständen (den Client) aktualisieren.</translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Fellatio will not work properly.</source> <translation>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Fellatio ansonsten nicht ordnungsgemäß funktionieren wird!</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Warnung: Lesen von wallet.dat fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt.</translation> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation>Warnung: wallet.dat beschädigt, Rettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls Ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Versucht private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>Blockerzeugungsoptionen:</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Nur mit dem/den angegebenen Knoten verbinden</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation>Beschädigte Blockdatenbank erkannt</translation> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation>Möchten Sie die Blockdatenbank nun neu aufbauen?</translation> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation>Fehler beim Initialisieren der Blockdatenbank</translation> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation>Fehler beim Initialisieren der Brieftaschen-Datenbankumgebung %s!</translation> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation>Fehler beim Laden der Blockdatenbank</translation> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation>Fehler beim Öffnen der Blockdatenbank</translation> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation>Fehler: Zu wenig freier Laufwerksspeicherplatz!</translation> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation>Fehler: Brieftasche gesperrt, Transaktion kann nicht erstellt werden!</translation> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation>Fehler: Systemfehler: </translation> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation>Lesen der Blockinformationen fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation>Lesen des Blocks fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation>Synchronisation des Blockindex fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation>Schreiben des Blockindex fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation>Schreiben der Blockinformationen fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation>Schreiben des Blocks fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation>Schreiben der Dateiinformationen fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation>Schreiben in die Münzendatenbank fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation>Schreiben des Transaktionsindex fehlgeschlagen</translation> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation>Schreiben der Rücksetzdaten fehlgeschlagen</translation> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>Gegenstellen via DNS-Namensauflösung finden (Standard: 1, außer bei -connect)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation>Fellatios generieren (Standard: 0)</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation>Wieviele Blöcke sollen beim Starten geprüft werden (Standard: 288, 0 = alle)</translation> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation>Wie gründlich soll die Blockprüfung sein (0-4, Standard: 3)</translation> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation>Nicht genügend File-Deskriptoren verfügbar.</translation> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen</translation> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: 4)</translation> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation>Verifiziere Blöcke...</translation> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation>Verifiziere Brieftasche...</translation> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation>Blöcke aus externer Datei blk000??.dat importieren</translation> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation>Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (bis zu 16, 0 = automatisch, &lt;0 = soviele Kerne frei lassen, Standard: 0)</translation> </message> <message> <location line="+77"/> <source>Information</source> <translation>Hinweis</translation> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Ungültige Adresse in -tor: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Ungültiger Betrag für -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Ungültiger Betrag für -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation>Einen vollständigen Transaktionsindex pflegen (Standard: 0)</translation> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Maximale Größe, &lt;n&gt; * 1000 Byte, des Empfangspuffers pro Verbindung (Standard: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Maximale Größe, &lt;n&gt; * 1000 Byte, des Sendepuffers pro Verbindung (Standard: 1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation>Blockkette nur akzeptieren, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1)</translation> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Verbinde nur zu Knoten des Netztyps &lt;net&gt; (IPv4, IPv6 oder Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Ausgabe zusätzlicher Debugginginformationen. Beinhaltet alle anderen &quot;-debug*&quot;-Parameter</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Ausgabe zusätzlicher Netzwerk-Debugginginformationen</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>Der Debugausgabe einen Zeitstempel voranstellen</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the Fellatio Wiki for SSL setup instructions)</source> <translation>SSL-Optionen: (siehe Fellatio-Wiki für SSL-Installationsanweisungen)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>SOCKS-Version des Proxies festlegen (4-5, Standard: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Rückverfolgungs- und Debuginformationen an die Konsole senden anstatt sie in die Datei debug.log zu schreiben</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Rückverfolgungs- und Debuginformationen an den Debugger senden</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>Maximale Blockgröße in Byte festlegen (Standard: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Minimale Blockgröße in Byte festlegen (Standard: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Verkleinere Datei debug.log beim Start des Clients (Standard: 1, wenn kein -debug)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation>Signierung der Transaktion fehlgeschlagen</translation> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Verbindungstimeout in Millisekunden festlegen (Standard: 5000)</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation>Systemfehler: </translation> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation>Transaktionsbetrag zu gering</translation> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation>Transaktionsbeträge müssen positiv sein</translation> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation>Transaktion zu groß</translation> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>Proxy verwenden, um versteckte Tor-Dienste zu erreichen (Standard: identisch mit -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Benutzername für JSON-RPC-Verbindungen</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation>Warnung</translation> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Warnung: Diese Version is veraltet, Aktualisierung erforderlich!</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern.</translation> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat beschädigt, Rettung fehlgeschlagen</translation> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Passwort für JSON-RPC-Verbindungen</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Sende Befehle an Knoten &lt;ip&gt; (Standard: 127.0.0.1)</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Kommando ausführen wenn der beste Block wechselt (%s im Kommando wird durch den Hash des Blocks ersetzt)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Brieftasche auf das neueste Format aktualisieren</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: 100)</translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Blockkette erneut nach fehlenden Transaktionen der Brieftasche durchsuchen</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>OpenSSL (https) für JSON-RPC-Verbindungen verwenden</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Serverzertifikat (Standard: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Privater Serverschlüssel (Standard: server.pem)</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Akzeptierte Chiffren (Standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>Dieser Hilfetext</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Verbindung über SOCKS-Proxy herstellen</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Erlaube DNS-Namensauflösung für -addnode, -seednode und -connect</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Lade Adressen...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Fehler beim Laden von wallet.dat: Brieftasche beschädigt</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Fellatio</source> <translation>Fehler beim Laden von wallet.dat: Brieftasche benötigt neuere Version von Fellatio</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Fellatio to complete</source> <translation>Brieftasche musste neu geschrieben werden: Starten Sie Fellatio zur Fertigstellung neu</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>Fehler beim Laden von wallet.dat (Brieftasche)</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Ungültige Adresse in -proxy: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source><|fim▁hole|> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Unbekannte Proxyversion in -socks angefordert: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Kann Adresse in -bind nicht auflösen: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Kann Adresse in -externalip nicht auflösen: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Ungültiger Betrag</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Unzureichender Kontostand</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Lade Blockindex...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Mit dem Knoten verbinden und versuchen die Verbindung aufrecht zu halten</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Fellatio is probably already running.</source> <translation>Kann auf diesem Computer nicht an %s binden. Evtl. wurde Fellatio bereits gestartet.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Gebühr pro KB, die gesendeten Transaktionen hinzugefügt wird</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Lade Brieftasche...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>Brieftasche kann nicht auf eine ältere Version herabgestuft werden</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>Standardadresse kann nicht geschrieben werden</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Durchsuche erneut...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Laden abgeschlossen</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>Zur Nutzung der %s Option</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>Fehler</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>Sie müssen den Wert rpcpassword=&lt;passwort&gt; in der Konfigurationsdatei angeben: %s Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.</translation> </message> </context> </TS><|fim▁end|>
<translation>Unbekannter Netztyp in -onlynet angegeben: &apos;%s&apos;</translation> </message>
<|file_name|>items.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html<|fim▁hole|> import scrapy class PictureItem(scrapy.Item): # define the fields for your item here like: image_urls = scrapy.Field() images = scrapy.Field()<|fim▁end|>
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Asynchronous I/O //! //! This crate contains the `AsyncRead`, `AsyncWrite`, `AsyncSeek`, and //! `AsyncBufRead` traits, the asynchronous analogs to //! `std::io::{Read, Write, Seek, BufRead}`. The primary difference is //! that these traits integrate with the asynchronous task system. //! //! All items of this library are only available when the `std` feature of this //! library is activated, and it is activated by default. #![cfg_attr(all(feature = "read-initializer", feature = "std"), feature(read_initializer))] #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)] // It cannot be included in the published code because this lints have false positives in the minimum required version. #![cfg_attr(test, warn(single_use_lifetimes))] #![doc(test( no_crate_inject, attr( deny(warnings, rust_2018_idioms, single_use_lifetimes), allow(dead_code, unused_assignments, unused_variables) ) ))] #![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(all(feature = "read-initializer", not(feature = "unstable")))] compile_error!("The `read-initializer` feature requires the `unstable` feature as an explicit opt-in to unstable features"); #[cfg(feature = "std")] mod if_std { use std::io; use std::ops::DerefMut; use std::pin::Pin; use std::task::{Context, Poll}; // Re-export some types from `std::io` so that users don't have to deal // with conflicts when `use`ing `futures::io` and `std::io`. #[cfg(feature = "read-initializer")] #[cfg_attr(docsrs, doc(cfg(feature = "read-initializer")))] #[doc(no_inline)] #[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411 pub use io::Initializer; #[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411 #[doc(no_inline)] pub use io::{Error, ErrorKind, IoSlice, IoSliceMut, Result, SeekFrom}; /// Read bytes asynchronously. /// /// This trait is analogous to the `std::io::Read` trait, but integrates /// with the asynchronous task system. In particular, the `poll_read` /// method, unlike `Read::read`, will automatically queue the current task /// for wakeup and return if data is not yet available, rather than blocking /// the calling thread. pub trait AsyncRead { /// Determines if this `AsyncRead`er can work with buffers of /// uninitialized memory. /// /// The default implementation returns an initializer which will zero /// buffers. /// /// This method is only available when the `read-initializer` feature of this /// library is activated. /// /// # Safety /// /// This method is `unsafe` because an `AsyncRead`er could otherwise /// return a non-zeroing `Initializer` from another `AsyncRead` type /// without an `unsafe` block. #[cfg(feature = "read-initializer")] #[cfg_attr(docsrs, doc(cfg(feature = "read-initializer")))] #[inline] unsafe fn initializer(&self) -> Initializer { Initializer::zeroing() } /// Attempt to read from the `AsyncRead` into `buf`. /// /// On success, returns `Poll::Ready(Ok(num_bytes_read))`. /// /// If no data is available for reading, the method returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object becomes /// readable or is closed. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>>; /// Attempt to read from the `AsyncRead` into `bufs` using vectored /// IO operations. /// /// This method is similar to `poll_read`, but allows data to be read /// into multiple buffers using a single operation. /// /// On success, returns `Poll::Ready(Ok(num_bytes_read))`. /// /// If no data is available for reading, the method returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object becomes /// readable or is closed. /// By default, this method delegates to using `poll_read` on the first /// nonempty buffer in `bufs`, or an empty one if none exists. Objects which /// support vectored IO should override this method. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. fn poll_read_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize>> { for b in bufs { if !b.is_empty() { return self.poll_read(cx, b); } } self.poll_read(cx, &mut []) } } /// Write bytes asynchronously. /// /// This trait is analogous to the `std::io::Write` trait, but integrates /// with the asynchronous task system. In particular, the `poll_write` /// method, unlike `Write::write`, will automatically queue the current task /// for wakeup and return if the writer cannot take more data, rather than blocking /// the calling thread. pub trait AsyncWrite { /// Attempt to write bytes from `buf` into the object. /// /// On success, returns `Poll::Ready(Ok(num_bytes_written))`. /// /// If the object is not ready for writing, the method returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object becomes /// writable or is closed. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. /// /// `poll_write` must try to make progress by flushing the underlying object if /// that is the only way the underlying object can become writable again. fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>; /// Attempt to write bytes from `bufs` into the object using vectored /// IO operations. /// /// This method is similar to `poll_write`, but allows data from multiple buffers to be written /// using a single operation. /// /// On success, returns `Poll::Ready(Ok(num_bytes_written))`. /// /// If the object is not ready for writing, the method returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object becomes /// writable or is closed. /// /// By default, this method delegates to using `poll_write` on the first /// nonempty buffer in `bufs`, or an empty one if none exists. Objects which /// support vectored IO should override this method. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>> { for b in bufs { if !b.is_empty() { return self.poll_write(cx, b); } } self.poll_write(cx, &[]) } /// Attempt to flush the object, ensuring that any buffered data reach /// their destination. /// /// On success, returns `Poll::Ready(Ok(()))`. /// /// If flushing cannot immediately complete, this method returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object can make /// progress towards flushing. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. /// /// It only makes sense to do anything here if you actually buffer data. fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>; /// Attempt to close the object. /// /// On success, returns `Poll::Ready(Ok(()))`. /// /// If closing cannot immediately complete, this function returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object can make /// progress towards closing. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>; } /// Seek bytes asynchronously. /// /// This trait is analogous to the `std::io::Seek` trait, but integrates /// with the asynchronous task system. In particular, the `poll_seek` /// method, unlike `Seek::seek`, will automatically queue the current task /// for wakeup and return if data is not yet available, rather than blocking /// the calling thread. pub trait AsyncSeek { /// Attempt to seek to an offset, in bytes, in a stream. /// /// A seek beyond the end of a stream is allowed, but behavior is defined /// by the implementation. /// /// If the seek operation completed successfully, /// this method returns the new position from the start of the stream. /// That position can be used later with [`SeekFrom::Start`]. /// /// # Errors /// /// Seeking to a negative offset is considered an error. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. fn poll_seek( self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom, ) -> Poll<Result<u64>>; } /// Read bytes asynchronously. /// /// This trait is analogous to the `std::io::BufRead` trait, but integrates /// with the asynchronous task system. In particular, the `poll_fill_buf` /// method, unlike `BufRead::fill_buf`, will automatically queue the current task /// for wakeup and return if data is not yet available, rather than blocking /// the calling thread. pub trait AsyncBufRead: AsyncRead { /// Attempt to return the contents of the internal buffer, filling it with more data /// from the inner reader if it is empty. /// /// On success, returns `Poll::Ready(Ok(buf))`. /// /// If no data is available for reading, the method returns /// `Poll::Pending` and arranges for the current task (via /// `cx.waker().wake_by_ref()`) to receive a notification when the object becomes /// readable or is closed. /// /// This function is a lower-level call. It needs to be paired with the /// [`consume`] method to function properly. When calling this /// method, none of the contents will be "read" in the sense that later /// calling [`poll_read`] may return the same contents. As such, [`consume`] must /// be called with the number of bytes that are consumed from this buffer to /// ensure that the bytes are never returned twice. /// /// [`poll_read`]: AsyncRead::poll_read /// [`consume`]: AsyncBufRead::consume /// /// An empty buffer returned indicates that the stream has reached EOF. /// /// # Implementation /// /// This function may not return errors of kind `WouldBlock` or /// `Interrupted`. Implementations must convert `WouldBlock` into /// `Poll::Pending` and either internally retry or convert /// `Interrupted` into another error kind. fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>>; /// Tells this buffer that `amt` bytes have been consumed from the buffer, /// so they should no longer be returned in calls to [`poll_read`]. /// /// This function is a lower-level call. It needs to be paired with the /// [`poll_fill_buf`] method to function properly. This function does /// not perform any I/O, it simply informs this object that some amount of /// its buffer, returned from [`poll_fill_buf`], has been consumed and should /// no longer be returned. As such, this function may do odd things if /// [`poll_fill_buf`] isn't called before calling it. /// /// The `amt` must be `<=` the number of bytes in the buffer returned by /// [`poll_fill_buf`]. /// /// [`poll_read`]: AsyncRead::poll_read /// [`poll_fill_buf`]: AsyncBufRead::poll_fill_buf fn consume(self: Pin<&mut Self>, amt: usize); } macro_rules! deref_async_read { () => { #[cfg(feature = "read-initializer")] unsafe fn initializer(&self) -> Initializer { (**self).initializer() } fn poll_read( mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>> { Pin::new(&mut **self).poll_read(cx, buf) } fn poll_read_vectored( mut self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize>> { Pin::new(&mut **self).poll_read_vectored(cx, bufs) } }; } impl<T: ?Sized + AsyncRead + Unpin> AsyncRead for Box<T> { deref_async_read!(); } impl<T: ?Sized + AsyncRead + Unpin> AsyncRead for &mut T { deref_async_read!(); } impl<P> AsyncRead for Pin<P> where P: DerefMut + Unpin, P::Target: AsyncRead, { #[cfg(feature = "read-initializer")] unsafe fn initializer(&self) -> Initializer { (**self).initializer() } fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>> { self.get_mut().as_mut().poll_read(cx, buf) } fn poll_read_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize>> { self.get_mut().as_mut().poll_read_vectored(cx, bufs) } } macro_rules! delegate_async_read_to_stdio { () => { #[cfg(feature = "read-initializer")] unsafe fn initializer(&self) -> Initializer { io::Read::initializer(self) } fn poll_read( mut self: Pin<&mut Self>, _: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>> { Poll::Ready(io::Read::read(&mut *self, buf)) } fn poll_read_vectored( mut self: Pin<&mut Self>, _: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize>> { Poll::Ready(io::Read::read_vectored(&mut *self, bufs)) } }; } impl AsyncRead for &[u8] { delegate_async_read_to_stdio!(); } macro_rules! deref_async_write { () => { fn poll_write( mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>> { Pin::new(&mut **self).poll_write(cx, buf) } fn poll_write_vectored( mut self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>> { Pin::new(&mut **self).poll_write_vectored(cx, bufs) } fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> { Pin::new(&mut **self).poll_flush(cx)<|fim▁hole|> Pin::new(&mut **self).poll_close(cx) } }; } impl<T: ?Sized + AsyncWrite + Unpin> AsyncWrite for Box<T> { deref_async_write!(); } impl<T: ?Sized + AsyncWrite + Unpin> AsyncWrite for &mut T { deref_async_write!(); } impl<P> AsyncWrite for Pin<P> where P: DerefMut + Unpin, P::Target: AsyncWrite, { fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>> { self.get_mut().as_mut().poll_write(cx, buf) } fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>> { self.get_mut().as_mut().poll_write_vectored(cx, bufs) } fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> { self.get_mut().as_mut().poll_flush(cx) } fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> { self.get_mut().as_mut().poll_close(cx) } } macro_rules! delegate_async_write_to_stdio { () => { fn poll_write( mut self: Pin<&mut Self>, _: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>> { Poll::Ready(io::Write::write(&mut *self, buf)) } fn poll_write_vectored( mut self: Pin<&mut Self>, _: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>> { Poll::Ready(io::Write::write_vectored(&mut *self, bufs)) } fn poll_flush(mut self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<()>> { Poll::Ready(io::Write::flush(&mut *self)) } fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> { self.poll_flush(cx) } }; } impl AsyncWrite for Vec<u8> { delegate_async_write_to_stdio!(); } macro_rules! deref_async_seek { () => { fn poll_seek( mut self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom, ) -> Poll<Result<u64>> { Pin::new(&mut **self).poll_seek(cx, pos) } }; } impl<T: ?Sized + AsyncSeek + Unpin> AsyncSeek for Box<T> { deref_async_seek!(); } impl<T: ?Sized + AsyncSeek + Unpin> AsyncSeek for &mut T { deref_async_seek!(); } impl<P> AsyncSeek for Pin<P> where P: DerefMut + Unpin, P::Target: AsyncSeek, { fn poll_seek( self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom, ) -> Poll<Result<u64>> { self.get_mut().as_mut().poll_seek(cx, pos) } } macro_rules! deref_async_buf_read { () => { fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>> { Pin::new(&mut **self.get_mut()).poll_fill_buf(cx) } fn consume(mut self: Pin<&mut Self>, amt: usize) { Pin::new(&mut **self).consume(amt) } }; } impl<T: ?Sized + AsyncBufRead + Unpin> AsyncBufRead for Box<T> { deref_async_buf_read!(); } impl<T: ?Sized + AsyncBufRead + Unpin> AsyncBufRead for &mut T { deref_async_buf_read!(); } impl<P> AsyncBufRead for Pin<P> where P: DerefMut + Unpin, P::Target: AsyncBufRead, { fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>> { self.get_mut().as_mut().poll_fill_buf(cx) } fn consume(self: Pin<&mut Self>, amt: usize) { self.get_mut().as_mut().consume(amt) } } macro_rules! delegate_async_buf_read_to_stdio { () => { fn poll_fill_buf(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<&[u8]>> { Poll::Ready(io::BufRead::fill_buf(self.get_mut())) } fn consume(self: Pin<&mut Self>, amt: usize) { io::BufRead::consume(self.get_mut(), amt) } }; } impl AsyncBufRead for &[u8] { delegate_async_buf_read_to_stdio!(); } } #[cfg(feature = "std")] pub use self::if_std::*;<|fim▁end|>
} fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
<|file_name|>AbstractLoggerTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache license, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the license for the specific language governing permissions and * limitations under the license. */ package org.apache.logging.log4j; import org.apache.logging.log4j.message.Message; import org.apache.logging.log4j.message.ObjectMessage; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.message.SimpleMessage; import org.apache.logging.log4j.spi.AbstractLogger; import org.junit.Test; import static org.junit.Assert.*; /** * */ public class AbstractLoggerTest extends AbstractLogger { private static class LogEvent { String markerName; Message data; Throwable t; public LogEvent(final String markerName, final Message data, final Throwable t) { this.markerName = markerName; this.data = data; this.t = t; } } private static final long serialVersionUID = 1L; private static Level currentLevel; private LogEvent currentEvent; private static Throwable t = new UnsupportedOperationException("Test"); private static Class<AbstractLogger> obj = AbstractLogger.class; private static String pattern = "{}, {}"; private static String p1 = "Long Beach"; private static String p2 = "California"; private static Message simple = new SimpleMessage("Hello"); private static Message object = new ObjectMessage(obj); private static Message param = new ParameterizedMessage(pattern, p1, p2); private static String marker = "TEST"; private static LogEvent[] events = new LogEvent[] { new LogEvent(null, simple, null), new LogEvent(marker, simple, null), new LogEvent(null, simple, t), new LogEvent(marker, simple, t), new LogEvent(null, object, null), new LogEvent(marker, object, null), new LogEvent(null, object, t), new LogEvent(marker, object, t), new LogEvent(null, param, null), new LogEvent(marker, param, null), new LogEvent(null, simple, null), new LogEvent(null, simple, t), new LogEvent(marker, simple, null), new LogEvent(marker, simple, t), new LogEvent(marker, simple, null), }; @Override public Level getLevel() { return currentLevel; } @Override public boolean isEnabled(final Level level, final Marker marker, final Message data, final Throwable t) { assertTrue("Incorrect Level. Expected " + currentLevel + ", actual " + level, level.equals(currentLevel)); if (marker == null) { if (currentEvent.markerName != null) { fail("Incorrect marker. Expected " + currentEvent.markerName + ", actual is null"); } } else { if (currentEvent.markerName == null) { fail("Incorrect marker. Expected null. Actual is " + marker.getName()); } else { assertTrue("Incorrect marker. Expected " + currentEvent.markerName + ", actual " + marker.getName(), currentEvent.markerName.equals(marker.getName())); } } if (data == null) { if (currentEvent.data != null) { fail("Incorrect message. Expected " + currentEvent.data + ", actual is null"); } } else { if (currentEvent.data == null) { fail("Incorrect message. Expected null. Actual is " + data.getFormattedMessage()); } else { assertTrue("Incorrect message type. Expected " + currentEvent.data + ", actual " + data, data.getClass().isAssignableFrom(currentEvent.data.getClass())); assertTrue("Incorrect message. Expected " + currentEvent.data.getFormattedMessage() + ", actual " + data.getFormattedMessage(), currentEvent.data.getFormattedMessage().equals(data.getFormattedMessage())); } } if (t == null) { if (currentEvent.t != null) { fail("Incorrect Throwable. Expected " + currentEvent.t + ", actual is null"); } } else { if (currentEvent.t == null) { fail("Incorrect Throwable. Expected null. Actual is " + t); } else { assertTrue("Incorrect Throwable. Expected " + currentEvent.t + ", actual " + t, currentEvent.t.equals(t)); } } return true; } @Override public boolean isEnabled(final Level level, final Marker marker, final Object data, final Throwable t) { return isEnabled(level, marker, new ObjectMessage(data), t); } @Override public boolean isEnabled(final Level level, final Marker marker, final String data) { return isEnabled(level, marker, new SimpleMessage(data), null); } @Override public boolean isEnabled(final Level level, final Marker marker, final String data, final Object... p1) { return isEnabled(level, marker, new ParameterizedMessage(data, p1), null); } @Override public boolean isEnabled(final Level level, final Marker marker, final String data, final Throwable t) { return isEnabled(level, marker, new SimpleMessage(data), t); } @Override public void logMessage(final String fqcn, final Level level, final Marker marker, final Message data, final Throwable t) { assertTrue("Incorrect Level. Expected " + currentLevel + ", actual " + level, level.equals(currentLevel)); if (marker == null) { if (currentEvent.markerName != null) { fail("Incorrect marker. Expected " + currentEvent.markerName + ", actual is null"); } } else { if (currentEvent.markerName == null) { fail("Incorrect marker. Expected null. Actual is " + marker.getName()); } else { assertTrue("Incorrect marker. Expected " + currentEvent.markerName + ", actual " + marker.getName(), currentEvent.markerName.equals(marker.getName())); } } if (data == null) { if (currentEvent.data != null) { fail("Incorrect message. Expected " + currentEvent.data + ", actual is null"); } } else { if (currentEvent.data == null) { fail("Incorrect message. Expected null. Actual is " + data.getFormattedMessage()); } else { assertTrue("Incorrect message type. Expected " + currentEvent.data + ", actual " + data, data.getClass().isAssignableFrom(currentEvent.data.getClass())); assertTrue("Incorrect message. Expected " + currentEvent.data.getFormattedMessage() + ", actual " + data.getFormattedMessage(), currentEvent.data.getFormattedMessage().equals(data.getFormattedMessage())); } } if (t == null) { if (currentEvent.t != null) { fail("Incorrect Throwable. Expected " + currentEvent.t + ", actual is null"); } } else { if (currentEvent.t == null) { fail("Incorrect Throwable. Expected null. Actual is " + t); } else { assertTrue("Incorrect Throwable. Expected " + currentEvent.t + ", actual " + t, currentEvent.t.equals(t)); } } } @Test public void testDebug() { currentLevel = Level.DEBUG; currentEvent = events[0]; debug("Hello"); debug(null, "Hello"); currentEvent = events[1]; debug(MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; debug("Hello", t); debug(null, "Hello", t); currentEvent = events[3]; debug(MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; debug(obj); currentEvent = events[5]; debug(MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; debug(obj, t); debug(null, obj, t); currentEvent = events[7]; debug(MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; debug(pattern, p1, p2); currentEvent = events[9]; debug(MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; debug(simple); debug(null, simple); debug(null, simple, null); currentEvent = events[11]; debug(simple, t); debug(null, simple, t); currentEvent = events[12]; debug(MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; debug(MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; debug(MarkerManager.getMarker("TEST"), simple); } @Test public void testError() { currentLevel = Level.ERROR; currentEvent = events[0]; error("Hello"); error(null, "Hello"); currentEvent = events[1]; error(MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; error("Hello", t); error(null, "Hello", t); currentEvent = events[3]; error(MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; error(obj); currentEvent = events[5]; error(MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; error(obj, t); error(null, obj, t); currentEvent = events[7]; error(MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; error(pattern, p1, p2); currentEvent = events[9]; error(MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; error(simple); error(null, simple); error(null, simple, null); currentEvent = events[11]; error(simple, t); error(null, simple, t); currentEvent = events[12]; error(MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; error(MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; error(MarkerManager.getMarker("TEST"), simple); } @Test public void testFatal() { currentLevel = Level.FATAL; currentEvent = events[0]; fatal("Hello"); fatal(null, "Hello"); currentEvent = events[1]; fatal(MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; fatal("Hello", t); fatal(null, "Hello", t); currentEvent = events[3]; fatal(MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; fatal(obj); currentEvent = events[5]; fatal(MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; fatal(obj, t); fatal(null, obj, t); currentEvent = events[7]; fatal(MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; fatal(pattern, p1, p2); currentEvent = events[9]; fatal(MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; fatal(simple); fatal(null, simple); fatal(null, simple, null); currentEvent = events[11]; fatal(simple, t); fatal(null, simple, t); currentEvent = events[12]; fatal(MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; fatal(MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; fatal(MarkerManager.getMarker("TEST"), simple); } @Test public void testInfo() { currentLevel = Level.INFO; currentEvent = events[0]; info("Hello"); info(null, "Hello"); currentEvent = events[1]; info(MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; info("Hello", t); info(null, "Hello", t); currentEvent = events[3]; info(MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; info(obj); currentEvent = events[5]; info(MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; info(obj, t); info(null, obj, t); currentEvent = events[7]; info(MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; info(pattern, p1, p2); currentEvent = events[9]; info(MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; info(simple); info(null, simple); info(null, simple, null); currentEvent = events[11]; info(simple, t); info(null, simple, t); currentEvent = events[12]; info(MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; info(MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; info(MarkerManager.getMarker("TEST"), simple); } @Test public void testLogDebug() { currentLevel = Level.DEBUG; currentEvent = events[0];<|fim▁hole|> log(Level.DEBUG, MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; log(Level.DEBUG, "Hello", t); log(Level.DEBUG, null, "Hello", t); currentEvent = events[3]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; log(Level.DEBUG, obj); currentEvent = events[5]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; log(Level.DEBUG, obj, t); log(Level.DEBUG, null, obj, t); currentEvent = events[7]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; log(Level.DEBUG, pattern, p1, p2); currentEvent = events[9]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; log(Level.DEBUG, simple); log(Level.DEBUG, null, simple); log(Level.DEBUG, null, simple, null); currentEvent = events[11]; log(Level.DEBUG, simple, t); log(Level.DEBUG, null, simple, t); currentEvent = events[12]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; log(Level.DEBUG, MarkerManager.getMarker("TEST"), simple); } @Test public void testLogError() { currentLevel = Level.ERROR; currentEvent = events[0]; log(Level.ERROR, "Hello"); log(Level.ERROR, null, "Hello"); currentEvent = events[1]; log(Level.ERROR, MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; log(Level.ERROR, "Hello", t); log(Level.ERROR, null, "Hello", t); currentEvent = events[3]; log(Level.ERROR, MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; log(Level.ERROR, obj); currentEvent = events[5]; log(Level.ERROR, MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; log(Level.ERROR, obj, t); log(Level.ERROR, null, obj, t); currentEvent = events[7]; log(Level.ERROR, MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; log(Level.ERROR, pattern, p1, p2); currentEvent = events[9]; log(Level.ERROR, MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; log(Level.ERROR, simple); log(Level.ERROR, null, simple); log(Level.ERROR, null, simple, null); currentEvent = events[11]; log(Level.ERROR, simple, t); log(Level.ERROR, null, simple, t); currentEvent = events[12]; log(Level.ERROR, MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; log(Level.ERROR, MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; log(Level.ERROR, MarkerManager.getMarker("TEST"), simple); } @Test public void testLogFatal() { currentLevel = Level.FATAL; currentEvent = events[0]; log(Level.FATAL, "Hello"); log(Level.FATAL, null, "Hello"); currentEvent = events[1]; log(Level.FATAL, MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; log(Level.FATAL, "Hello", t); log(Level.FATAL, null, "Hello", t); currentEvent = events[3]; log(Level.FATAL, MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; log(Level.FATAL, obj); currentEvent = events[5]; log(Level.FATAL, MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; log(Level.FATAL, obj, t); log(Level.FATAL, null, obj, t); currentEvent = events[7]; log(Level.FATAL, MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; log(Level.FATAL, pattern, p1, p2); currentEvent = events[9]; log(Level.FATAL, MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; log(Level.FATAL, simple); log(Level.FATAL, null, simple); log(Level.FATAL, null, simple, null); currentEvent = events[11]; log(Level.FATAL, simple, t); log(Level.FATAL, null, simple, t); currentEvent = events[12]; log(Level.FATAL, MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; log(Level.FATAL, MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; log(Level.FATAL, MarkerManager.getMarker("TEST"), simple); } @Test public void testLogInfo() { currentLevel = Level.INFO; currentEvent = events[0]; log(Level.INFO, "Hello"); log(Level.INFO, null, "Hello"); currentEvent = events[1]; log(Level.INFO, MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; log(Level.INFO, "Hello", t); log(Level.INFO, null, "Hello", t); currentEvent = events[3]; log(Level.INFO, MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; log(Level.INFO, obj); currentEvent = events[5]; log(Level.INFO, MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; log(Level.INFO, obj, t); log(Level.INFO, null, obj, t); currentEvent = events[7]; log(Level.INFO, MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; log(Level.INFO, pattern, p1, p2); currentEvent = events[9]; log(Level.INFO, MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; log(Level.INFO, simple); log(Level.INFO, null, simple); log(Level.INFO, null, simple, null); currentEvent = events[11]; log(Level.INFO, simple, t); log(Level.INFO, null, simple, t); currentEvent = events[12]; log(Level.INFO, MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; log(Level.INFO, MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; log(Level.INFO, MarkerManager.getMarker("TEST"), simple); } @Test public void testLogTrace() { currentLevel = Level.TRACE; currentEvent = events[0]; log(Level.TRACE, "Hello"); log(Level.TRACE, null, "Hello"); currentEvent = events[1]; log(Level.TRACE, MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; log(Level.TRACE, "Hello", t); log(Level.TRACE, null, "Hello", t); currentEvent = events[3]; log(Level.TRACE, MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; log(Level.TRACE, obj); currentEvent = events[5]; log(Level.TRACE, MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; log(Level.TRACE, obj, t); log(Level.TRACE, null, obj, t); currentEvent = events[7]; log(Level.TRACE, MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; log(Level.TRACE, pattern, p1, p2); currentEvent = events[9]; log(Level.TRACE, MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; log(Level.TRACE, simple); log(Level.TRACE, null, simple); log(Level.TRACE, null, simple, null); currentEvent = events[11]; log(Level.TRACE, simple, t); log(Level.TRACE, null, simple, t); currentEvent = events[12]; log(Level.TRACE, MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; log(Level.TRACE, MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; log(Level.TRACE, MarkerManager.getMarker("TEST"), simple); } @Test public void testLogWarn() { currentLevel = Level.WARN; currentEvent = events[0]; log(Level.WARN, "Hello"); log(Level.WARN, null, "Hello"); currentEvent = events[1]; log(Level.WARN, MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; log(Level.WARN, "Hello", t); log(Level.WARN, null, "Hello", t); currentEvent = events[3]; log(Level.WARN, MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; log(Level.WARN, obj); currentEvent = events[5]; log(Level.WARN, MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; log(Level.WARN, obj, t); log(Level.WARN, null, obj, t); currentEvent = events[7]; log(Level.WARN, MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; log(Level.WARN, pattern, p1, p2); currentEvent = events[9]; log(Level.WARN, MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; log(Level.WARN, simple); log(Level.WARN, null, simple); log(Level.WARN, null, simple, null); currentEvent = events[11]; log(Level.WARN, simple, t); log(Level.WARN, null, simple, t); currentEvent = events[12]; log(Level.WARN, MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; log(Level.WARN, MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; log(Level.WARN, MarkerManager.getMarker("TEST"), simple); } @Test public void testTrace() { currentLevel = Level.TRACE; currentEvent = events[0]; trace("Hello"); trace(null, "Hello"); currentEvent = events[1]; trace(MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; trace("Hello", t); trace(null, "Hello", t); currentEvent = events[3]; trace(MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; trace(obj); currentEvent = events[5]; trace(MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; trace(obj, t); trace(null, obj, t); currentEvent = events[7]; trace(MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; trace(pattern, p1, p2); currentEvent = events[9]; trace(MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; trace(simple); trace(null, simple); trace(null, simple, null); currentEvent = events[11]; trace(simple, t); trace(null, simple, t); currentEvent = events[12]; trace(MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; trace(MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; trace(MarkerManager.getMarker("TEST"), simple); } @Test public void testWarn() { currentLevel = Level.WARN; currentEvent = events[0]; warn("Hello"); warn(null, "Hello"); currentEvent = events[1]; warn(MarkerManager.getMarker("TEST"), "Hello"); currentEvent = events[2]; warn("Hello", t); warn(null, "Hello", t); currentEvent = events[3]; warn(MarkerManager.getMarker("TEST"), "Hello", t); currentEvent = events[4]; warn(obj); currentEvent = events[5]; warn(MarkerManager.getMarker("TEST"), obj); currentEvent = events[6]; warn(obj, t); warn(null, obj, t); currentEvent = events[7]; warn(MarkerManager.getMarker("TEST"), obj, t); currentEvent = events[8]; warn(pattern, p1, p2); currentEvent = events[9]; warn(MarkerManager.getMarker("TEST"), pattern, p1, p2); currentEvent = events[10]; warn(simple); warn(null, simple); warn(null, simple, null); currentEvent = events[11]; warn(simple, t); warn(null, simple, t); currentEvent = events[12]; warn(MarkerManager.getMarker("TEST"), simple, null); currentEvent = events[13]; warn(MarkerManager.getMarker("TEST"), simple, t); currentEvent = events[14]; warn(MarkerManager.getMarker("TEST"), simple); } }<|fim▁end|>
log(Level.DEBUG, "Hello"); log(Level.DEBUG, null, "Hello"); currentEvent = events[1];
<|file_name|>context.js<|end_file_name|><|fim▁begin|>'use strict'; const Hoek = require('hoek'); exports.plugin = { register: async (plugin, options) => { plugin.ext('onPreResponse', (request, h) => { try { var internals = { devEnv: (process.env.NODE_ENV === 'development'), meta: options.meta, credentials: request.auth.isAuthenticated ? request.auth.credentials : null }; var response = request.response; if (response.variety && response.variety === 'view') { response.source.context = Hoek.merge(internals, request.response.source.context); } return h.continue; } catch (error) { throw error;<|fim▁hole|> name: 'context' };<|fim▁end|>
} }); }, pkg: require('../package.json'),
<|file_name|>test_glusterfs.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Unit tests for the GlusterFS driver module.""" import contextlib import errno import mock import os import tempfile import time import traceback import mox as mox_lib from mox import IgnoreArg from mox import IsA from mox import stubout from oslo.config import cfg from cinder import brick from cinder import compute from cinder import context from cinder import db from cinder import exception from cinder.image import image_utils from cinder.openstack.common.gettextutils import _ from cinder.openstack.common import imageutils from cinder.openstack.common import processutils as putils from cinder.openstack.common import units from cinder import test from cinder import utils from cinder.volume import configuration as conf from cinder.volume import driver as base_driver from cinder.volume.drivers import glusterfs CONF = cfg.CONF class DumbVolume(object): fields = {} def __setitem__(self, key, value): self.fields[key] = value def __getitem__(self, item): return self.fields[item] class FakeDb(object): msg = "Tests are broken: mock this out." def volume_get(self, *a, **kw): raise Exception(self.msg) def snapshot_get_all_for_volume(self, *a, **kw): """Mock this if you want results from it.""" return [] class GlusterFsDriverTestCase(test.TestCase): """Test case for GlusterFS driver.""" TEST_EXPORT1 = 'glusterfs-host1:/export' TEST_EXPORT2 = 'glusterfs-host2:/export' TEST_EXPORT2_OPTIONS = '-o backupvolfile-server=glusterfs-backup1' TEST_SIZE_IN_GB = 1 TEST_MNT_POINT = '/mnt/glusterfs' TEST_MNT_POINT_BASE = '/mnt/test' TEST_LOCAL_PATH = '/mnt/glusterfs/volume-123' TEST_FILE_NAME = 'test.txt' TEST_SHARES_CONFIG_FILE = '/etc/cinder/test-shares.conf' VOLUME_UUID = 'abcdefab-cdef-abcd-efab-cdefabcdefab' SNAP_UUID = 'bacadaca-baca-daca-baca-dacadacadaca' SNAP_UUID_2 = 'bebedede-bebe-dede-bebe-dedebebedede' def setUp(self): super(GlusterFsDriverTestCase, self).setUp() self._mox = mox_lib.Mox() self._configuration = mox_lib.MockObject(conf.Configuration) self._configuration.append_config_values(mox_lib.IgnoreArg()) self._configuration.glusterfs_shares_config = \ self.TEST_SHARES_CONFIG_FILE self._configuration.glusterfs_mount_point_base = \ self.TEST_MNT_POINT_BASE self._configuration.glusterfs_sparsed_volumes = True self._configuration.glusterfs_qcow2_volumes = False self.stubs = stubout.StubOutForTesting() self._driver =\ glusterfs.GlusterfsDriver(configuration=self._configuration, db=FakeDb()) self._driver.shares = {} compute.API = mock.MagicMock() self.addCleanup(self._mox.UnsetStubs) def stub_out_not_replaying(self, obj, attr_name): attr_to_replace = getattr(obj, attr_name) stub = mox_lib.MockObject(attr_to_replace) self.stubs.Set(obj, attr_name, stub) def assertRaisesAndMessageMatches( self, excClass, msg, callableObj, *args, **kwargs): """Ensure that 'excClass' was raised and its message contains 'msg'.""" caught = False try: callableObj(*args, **kwargs) except Exception as exc: caught = True self.assertEqual(excClass, type(exc), 'Wrong exception caught: %s Stacktrace: %s' % (exc, traceback.print_exc())) self.assertIn(msg, str(exc)) if not caught: self.fail('Expected raised exception but nothing caught.') def test_set_execute(self): mox = self._mox drv = self._driver rfsclient = brick.remotefs.remotefs.RemoteFsClient mox.StubOutWithMock(rfsclient, 'set_execute') def my_execute(*a, **k): pass rfsclient.set_execute(my_execute) mox.ReplayAll() drv.set_execute(my_execute) mox.VerifyAll() def test_local_path(self): """local_path common use case.""" CONF.set_override("glusterfs_mount_point_base", self.TEST_MNT_POINT_BASE) drv = self._driver volume = DumbVolume() volume['provider_location'] = self.TEST_EXPORT1 volume['name'] = 'volume-123' self.assertEqual( '/mnt/test/ab03ab34eaca46a5fb81878f7e9b91fc/volume-123', drv.local_path(volume)) def test_mount_glusterfs_should_mount_correctly(self): """_mount_glusterfs common case usage.""" mox = self._mox drv = self._driver mox.StubOutWithMock(drv, '_execute') drv._execute('mkdir', '-p', self.TEST_MNT_POINT) drv._execute('mount', '-t', 'glusterfs', self.TEST_EXPORT1, self.TEST_MNT_POINT, run_as_root=True) mox.ReplayAll() drv._mount_glusterfs(self.TEST_EXPORT1, self.TEST_MNT_POINT) mox.VerifyAll() def test_mount_glusterfs_should_suppress_already_mounted_error(self): """_mount_glusterfs should suppress already mounted error if ensure=True """ mox = self._mox drv = self._driver mox.StubOutWithMock(drv, '_execute') drv._execute('mkdir', '-p', self.TEST_MNT_POINT) drv._execute('mount', '-t', 'glusterfs', self.TEST_EXPORT1, self.TEST_MNT_POINT, run_as_root=True).\ AndRaise(putils.ProcessExecutionError( stderr='is busy or already mounted')) mox.ReplayAll() drv._mount_glusterfs(self.TEST_EXPORT1, self.TEST_MNT_POINT, ensure=True) mox.VerifyAll() def test_mount_glusterfs_should_reraise_already_mounted_error(self): """_mount_glusterfs should not suppress already mounted error if ensure=False """ mox = self._mox drv = self._driver mox.StubOutWithMock(drv, '_execute') drv._execute('mkdir', '-p', self.TEST_MNT_POINT) drv._execute( 'mount', '-t', 'glusterfs', self.TEST_EXPORT1, self.TEST_MNT_POINT, run_as_root=True). \ AndRaise(putils.ProcessExecutionError(stderr='is busy or ' 'already mounted')) mox.ReplayAll() self.assertRaises(putils.ProcessExecutionError, drv._mount_glusterfs, self.TEST_EXPORT1, self.TEST_MNT_POINT, ensure=False) mox.VerifyAll() def test_mount_glusterfs_should_create_mountpoint_if_not_yet(self): """_mount_glusterfs should create mountpoint if it doesn't exist.""" mox = self._mox drv = self._driver mox.StubOutWithMock(drv, '_execute') drv._execute('mkdir', '-p', self.TEST_MNT_POINT) drv._execute(*([IgnoreArg()] * 5), run_as_root=IgnoreArg()) mox.ReplayAll() drv._mount_glusterfs(self.TEST_EXPORT1, self.TEST_MNT_POINT) mox.VerifyAll() def test_get_hash_str(self): """_get_hash_str should calculation correct value.""" drv = self._driver self.assertEqual('ab03ab34eaca46a5fb81878f7e9b91fc', drv._get_hash_str(self.TEST_EXPORT1)) def test_get_mount_point_for_share(self): """_get_mount_point_for_share should call RemoteFsClient.""" mox = self._mox drv = self._driver hashed_path = '/mnt/test/abcdefabcdef' mox.StubOutWithMock(brick.remotefs.remotefs.RemoteFsClient, 'get_mount_point') CONF.set_override("glusterfs_mount_point_base", self.TEST_MNT_POINT_BASE) brick.remotefs.remotefs.RemoteFsClient.\ get_mount_point(self.TEST_EXPORT1).AndReturn(hashed_path) mox.ReplayAll() drv._get_mount_point_for_share(self.TEST_EXPORT1) mox.VerifyAll() def test_get_available_capacity_with_df(self): """_get_available_capacity should calculate correct value.""" mox = self._mox drv = self._driver df_total_size = 2620544 df_avail = 1490560 df_head = 'Filesystem 1K-blocks Used Available Use% Mounted on\n' df_data = 'glusterfs-host:/export %d 996864 %d 41%% /mnt' % \ (df_total_size, df_avail) df_output = df_head + df_data mox.StubOutWithMock(drv, '_get_mount_point_for_share') drv._get_mount_point_for_share(self.TEST_EXPORT1).\ AndReturn(self.TEST_MNT_POINT) mox.StubOutWithMock(drv, '_execute') drv._execute('df', '--portability', '--block-size', '1', self.TEST_MNT_POINT, run_as_root=True).AndReturn((df_output, None)) mox.ReplayAll() self.assertEqual((df_avail, df_total_size), drv._get_available_capacity(self.TEST_EXPORT1)) mox.VerifyAll() def test_load_shares_config(self): mox = self._mox drv = self._driver drv.configuration.glusterfs_shares_config = ( self.TEST_SHARES_CONFIG_FILE) mox.StubOutWithMock(drv, '_read_config_file') config_data = [] config_data.append(self.TEST_EXPORT1) config_data.append('#' + self.TEST_EXPORT2) config_data.append(self.TEST_EXPORT2 + ' ' + self.TEST_EXPORT2_OPTIONS) config_data.append('broken:share_format') config_data.append('') drv._read_config_file(self.TEST_SHARES_CONFIG_FILE).\ AndReturn(config_data) mox.ReplayAll() drv._load_shares_config(drv.configuration.glusterfs_shares_config) self.assertIn(self.TEST_EXPORT1, drv.shares) self.assertIn(self.TEST_EXPORT2, drv.shares) self.assertEqual(len(drv.shares), 2) self.assertEqual(drv.shares[self.TEST_EXPORT2], self.TEST_EXPORT2_OPTIONS) mox.VerifyAll() def test_ensure_share_mounted(self): """_ensure_share_mounted simple use case.""" mox = self._mox drv = self._driver mox.StubOutWithMock(utils, 'get_file_mode') mox.StubOutWithMock(utils, 'get_file_gid') mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_ensure_share_writable') mox.StubOutWithMock(drv, '_get_mount_point_for_share') drv._get_mount_point_for_share(self.TEST_EXPORT1).\ AndReturn(self.TEST_MNT_POINT) mox.StubOutWithMock(drv, '_mount_glusterfs') drv._mount_glusterfs(self.TEST_EXPORT1, self.TEST_MNT_POINT, ensure=True) utils.get_file_gid(self.TEST_MNT_POINT).AndReturn(333333) utils.get_file_mode(self.TEST_MNT_POINT).AndReturn(0o777) drv._ensure_share_writable(self.TEST_MNT_POINT) drv._execute('chgrp', IgnoreArg(), self.TEST_MNT_POINT, run_as_root=True) mox.ReplayAll() drv._ensure_share_mounted(self.TEST_EXPORT1) mox.VerifyAll() def test_ensure_shares_mounted_should_save_mounting_successfully(self): """_ensure_shares_mounted should save share if mounted with success.""" mox = self._mox drv = self._driver mox.StubOutWithMock(drv, '_read_config_file') config_data = [] config_data.append(self.TEST_EXPORT1) drv._read_config_file(self.TEST_SHARES_CONFIG_FILE).\ AndReturn(config_data) mox.StubOutWithMock(drv, '_ensure_share_mounted') drv._ensure_share_mounted(self.TEST_EXPORT1) mox.ReplayAll() drv._ensure_shares_mounted() self.assertEqual(1, len(drv._mounted_shares)) self.assertEqual(self.TEST_EXPORT1, drv._mounted_shares[0]) mox.VerifyAll() def test_ensure_shares_mounted_should_not_save_mounting_with_error(self): """_ensure_shares_mounted should not save share if failed to mount.""" mox = self._mox drv = self._driver mox.StubOutWithMock(drv, '_read_config_file') config_data = [] config_data.append(self.TEST_EXPORT1) drv._read_config_file(self.TEST_SHARES_CONFIG_FILE).\ AndReturn(config_data) mox.StubOutWithMock(drv, '_ensure_share_mounted') drv._ensure_share_mounted(self.TEST_EXPORT1).AndRaise(Exception()) mox.ReplayAll() drv._ensure_shares_mounted() self.assertEqual(0, len(drv._mounted_shares)) mox.VerifyAll() def test_setup_should_throw_error_if_shares_config_not_configured(self): """do_setup should throw error if shares config is not configured.""" drv = self._driver drv.configuration.glusterfs_shares_config = None self.assertRaisesAndMessageMatches(exception.GlusterfsException, 'no Gluster config file configured', drv.do_setup, IsA(context.RequestContext)) def test_setup_should_throw_exception_if_client_is_not_installed(self): """do_setup should throw exception if client is not installed.""" mox = self._mox drv = self._driver CONF.set_override("glusterfs_shares_config", self.TEST_SHARES_CONFIG_FILE) mox.StubOutWithMock(os.path, 'exists') os.path.exists(self.TEST_SHARES_CONFIG_FILE).AndReturn(True) mox.StubOutWithMock(drv, '_execute') drv._execute('mount.glusterfs', check_exit_code=False).\ AndRaise(OSError(errno.ENOENT, 'No such file or directory')) mox.ReplayAll() self.assertRaisesAndMessageMatches(exception.GlusterfsException, 'mount.glusterfs is not installed', drv.do_setup, IsA(context.RequestContext)) mox.VerifyAll() def _fake_load_shares_config(self, conf): self._driver.shares = {'127.7.7.7:/gluster1': None} def _fake_NamedTemporaryFile(self, prefix=None, dir=None): raise OSError('Permission denied!') def test_setup_set_share_permissions(self): mox = self._mox drv = self._driver CONF.set_override("glusterfs_shares_config", self.TEST_SHARES_CONFIG_FILE) self.stubs.Set(drv, '_load_shares_config', self._fake_load_shares_config) self.stubs.Set(tempfile, 'NamedTemporaryFile', self._fake_NamedTemporaryFile) mox.StubOutWithMock(os.path, 'exists') mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(utils, 'get_file_gid') mox.StubOutWithMock(utils, 'get_file_mode') mox.StubOutWithMock(os, 'getegid') drv._execute('mount.glusterfs', check_exit_code=False) drv._execute('umount', '/mnt/test/8f0473c9ad824b8b6a27264b9cacb005', run_as_root=True) drv._execute('mkdir', '-p', mox_lib.IgnoreArg()) os.path.exists(self.TEST_SHARES_CONFIG_FILE).AndReturn(True) drv._execute('mount', '-t', 'glusterfs', '127.7.7.7:/gluster1', mox_lib.IgnoreArg(), run_as_root=True) utils.get_file_gid(mox_lib.IgnoreArg()).AndReturn(33333) # perms not writable utils.get_file_mode(mox_lib.IgnoreArg()).AndReturn(0o000) os.getegid().AndReturn(888) drv._execute('chgrp', 888, mox_lib.IgnoreArg(), run_as_root=True) drv._execute('chmod', 'g+w', mox_lib.IgnoreArg(), run_as_root=True) mox.ReplayAll() drv.do_setup(IsA(context.RequestContext)) mox.VerifyAll() def test_find_share_should_throw_error_if_there_is_no_mounted_shares(self): """_find_share should throw error if there is no mounted shares.""" drv = self._driver <|fim▁hole|> drv._find_share, self.TEST_SIZE_IN_GB) def test_find_share(self): """_find_share simple use case.""" mox = self._mox drv = self._driver drv._mounted_shares = [self.TEST_EXPORT1, self.TEST_EXPORT2] mox.StubOutWithMock(drv, '_get_available_capacity') drv._get_available_capacity(self.TEST_EXPORT1).\ AndReturn((2 * units.Gi, 5 * units.Gi)) drv._get_available_capacity(self.TEST_EXPORT2).\ AndReturn((3 * units.Gi, 10 * units.Gi)) mox.ReplayAll() self.assertEqual(self.TEST_EXPORT2, drv._find_share(self.TEST_SIZE_IN_GB)) mox.VerifyAll() def test_find_share_should_throw_error_if_there_is_no_enough_place(self): """_find_share should throw error if there is no share to host vol.""" mox = self._mox drv = self._driver drv._mounted_shares = [self.TEST_EXPORT1, self.TEST_EXPORT2] mox.StubOutWithMock(drv, '_get_available_capacity') drv._get_available_capacity(self.TEST_EXPORT1).\ AndReturn((0, 5 * units.Gi)) drv._get_available_capacity(self.TEST_EXPORT2).\ AndReturn((0, 10 * units.Gi)) mox.ReplayAll() self.assertRaises(exception.GlusterfsNoSuitableShareFound, drv._find_share, self.TEST_SIZE_IN_GB) mox.VerifyAll() def _simple_volume(self, id=None): volume = DumbVolume() volume['provider_location'] = self.TEST_EXPORT1 if id is None: volume['id'] = self.VOLUME_UUID else: volume['id'] = id # volume['name'] mirrors format from db/sqlalchemy/models.py volume['name'] = 'volume-%s' % volume['id'] volume['size'] = 10 volume['status'] = 'available' return volume def test_create_sparsed_volume(self): mox = self._mox drv = self._driver volume = self._simple_volume() CONF.set_override('glusterfs_sparsed_volumes', True) mox.StubOutWithMock(drv, '_create_sparsed_file') mox.StubOutWithMock(drv, '_set_rw_permissions_for_all') drv._create_sparsed_file(IgnoreArg(), IgnoreArg()) drv._set_rw_permissions_for_all(IgnoreArg()) mox.ReplayAll() drv._do_create_volume(volume) mox.VerifyAll() def test_create_nonsparsed_volume(self): mox = self._mox drv = self._driver volume = self._simple_volume() old_value = self._configuration.glusterfs_sparsed_volumes self._configuration.glusterfs_sparsed_volumes = False mox.StubOutWithMock(drv, '_create_regular_file') mox.StubOutWithMock(drv, '_set_rw_permissions_for_all') drv._create_regular_file(IgnoreArg(), IgnoreArg()) drv._set_rw_permissions_for_all(IgnoreArg()) mox.ReplayAll() drv._do_create_volume(volume) mox.VerifyAll() self._configuration.glusterfs_sparsed_volumes = old_value def test_create_qcow2_volume(self): (mox, drv) = self._mox, self._driver volume = self._simple_volume() old_value = self._configuration.glusterfs_qcow2_volumes self._configuration.glusterfs_qcow2_volumes = True mox.StubOutWithMock(drv, '_execute') hashed = drv._get_hash_str(volume['provider_location']) path = '%s/%s/volume-%s' % (self.TEST_MNT_POINT_BASE, hashed, self.VOLUME_UUID) drv._execute('qemu-img', 'create', '-f', 'qcow2', '-o', 'preallocation=metadata', path, str(volume['size'] * units.Gi), run_as_root=True) drv._execute('chmod', 'ugo+rw', path, run_as_root=True) mox.ReplayAll() drv._do_create_volume(volume) mox.VerifyAll() self._configuration.glusterfs_qcow2_volumes = old_value def test_create_volume_should_ensure_glusterfs_mounted(self): """create_volume ensures shares provided in config are mounted.""" mox = self._mox drv = self._driver self.stub_out_not_replaying(glusterfs, 'LOG') self.stub_out_not_replaying(drv, '_find_share') self.stub_out_not_replaying(drv, '_do_create_volume') mox.StubOutWithMock(drv, '_ensure_shares_mounted') drv._ensure_shares_mounted() mox.ReplayAll() volume = DumbVolume() volume['size'] = self.TEST_SIZE_IN_GB drv.create_volume(volume) mox.VerifyAll() def test_create_volume_should_return_provider_location(self): """create_volume should return provider_location with found share.""" mox = self._mox drv = self._driver self.stub_out_not_replaying(glusterfs, 'LOG') self.stub_out_not_replaying(drv, '_ensure_shares_mounted') self.stub_out_not_replaying(drv, '_do_create_volume') mox.StubOutWithMock(drv, '_find_share') drv._find_share(self.TEST_SIZE_IN_GB).AndReturn(self.TEST_EXPORT1) mox.ReplayAll() volume = DumbVolume() volume['size'] = self.TEST_SIZE_IN_GB result = drv.create_volume(volume) self.assertEqual(self.TEST_EXPORT1, result['provider_location']) mox.VerifyAll() def test_create_cloned_volume(self): (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv, '_create_snapshot') mox.StubOutWithMock(drv, '_delete_snapshot') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(image_utils, 'convert_image') mox.StubOutWithMock(drv, '_copy_volume_from_snapshot') volume = self._simple_volume() src_vref = self._simple_volume() src_vref['id'] = '375e32b2-804a-49f2-b282-85d1d5a5b9e1' src_vref['name'] = 'volume-%s' % src_vref['id'] volume_ref = {'id': volume['id'], 'name': volume['name'], 'status': volume['status'], 'provider_location': volume['provider_location'], 'size': volume['size']} snap_ref = {'volume_name': src_vref['name'], 'name': 'clone-snap-%s' % src_vref['id'], 'size': src_vref['size'], 'volume_size': src_vref['size'], 'volume_id': src_vref['id'], 'id': 'tmp-snap-%s' % src_vref['id'], 'volume': src_vref} drv._create_snapshot(snap_ref) drv._copy_volume_from_snapshot(snap_ref, volume_ref, volume['size']) drv._delete_snapshot(mox_lib.IgnoreArg()) mox.ReplayAll() drv.create_cloned_volume(volume, src_vref) mox.VerifyAll() @mock.patch('cinder.openstack.common.fileutils.delete_if_exists') def test_delete_volume(self, mock_delete_if_exists): volume = self._simple_volume() volume_filename = 'volume-%s' % self.VOLUME_UUID volume_path = '%s/%s' % (self.TEST_MNT_POINT, volume_filename) info_file = volume_path + '.info' with contextlib.nested( mock.patch.object(self._driver, '_ensure_share_mounted'), mock.patch.object(self._driver, '_local_volume_dir'), mock.patch.object(self._driver, 'get_active_image_from_info'), mock.patch.object(self._driver, '_execute'), mock.patch.object(self._driver, '_local_path_volume'), mock.patch.object(self._driver, '_local_path_volume_info') ) as (mock_ensure_share_mounted, mock_local_volume_dir, mock_active_image_from_info, mock_execute, mock_local_path_volume, mock_local_path_volume_info): mock_local_volume_dir.return_value = self.TEST_MNT_POINT mock_active_image_from_info.return_value = volume_filename mock_local_path_volume.return_value = volume_path mock_local_path_volume_info.return_value = info_file self._driver.delete_volume(volume) mock_ensure_share_mounted.assert_called_once_with( volume['provider_location']) mock_local_volume_dir.assert_called_once_with(volume) mock_active_image_from_info.assert_called_once_with(volume) mock_execute.assert_called_once_with('rm', '-f', volume_path, run_as_root=True) mock_local_path_volume_info.assert_called_once_with(volume) mock_local_path_volume.assert_called_once_with(volume) mock_delete_if_exists.assert_any_call(volume_path) mock_delete_if_exists.assert_any_call(info_file) def test_refresh_mounts(self): with contextlib.nested( mock.patch.object(self._driver, '_unmount_shares'), mock.patch.object(self._driver, '_ensure_shares_mounted') ) as (mock_unmount_shares, mock_ensure_shares_mounted): self._driver._refresh_mounts() self.assertTrue(mock_unmount_shares.called) self.assertTrue(mock_ensure_shares_mounted.called) def test_refresh_mounts_with_excp(self): with contextlib.nested( mock.patch.object(self._driver, '_unmount_shares'), mock.patch.object(self._driver, '_ensure_shares_mounted'), mock.patch.object(glusterfs, 'LOG') ) as (mock_unmount_shares, mock_ensure_shares_mounted, mock_logger): mock_stderr = _("umount: <mnt_path>: target is busy") mock_unmount_shares.side_effect = \ putils.ProcessExecutionError(stderr=mock_stderr) self._driver._refresh_mounts() self.assertTrue(mock_unmount_shares.called) self.assertTrue(mock_logger.warn.called) self.assertTrue(mock_ensure_shares_mounted.called) mock_unmount_shares.reset_mock() mock_ensure_shares_mounted.reset_mock() mock_logger.reset_mock() mock_logger.warn.reset_mock() mock_stderr = _("umount: <mnt_path>: some other error") mock_unmount_shares.side_effect = \ putils.ProcessExecutionError(stderr=mock_stderr) self.assertRaises(putils.ProcessExecutionError, self._driver._refresh_mounts) self.assertTrue(mock_unmount_shares.called) self.assertFalse(mock_ensure_shares_mounted.called) def test_unmount_shares_with_excp(self): self._driver.shares = {'127.7.7.7:/gluster1': None} with contextlib.nested( mock.patch.object(self._driver, '_load_shares_config'), mock.patch.object(self._driver, '_do_umount'), mock.patch.object(glusterfs, 'LOG') ) as (mock_load_shares_config, mock_do_umount, mock_logger): mock_do_umount.side_effect = Exception() self._driver._unmount_shares() self.assertTrue(mock_do_umount.called) self.assertTrue(mock_logger.warning.called) mock_logger.debug.assert_not_called() def test_unmount_shares_1share(self): self._driver.shares = {'127.7.7.7:/gluster1': None} with contextlib.nested( mock.patch.object(self._driver, '_load_shares_config'), mock.patch.object(self._driver, '_do_umount') ) as (mock_load_shares_config, mock_do_umount): self._driver._unmount_shares() self.assertTrue(mock_do_umount.called) mock_do_umount.assert_called_once_with(True, '127.7.7.7:/gluster1') def test_unmount_shares_2share(self): self._driver.shares = {'127.7.7.7:/gluster1': None, '127.7.7.8:/gluster2': None} with contextlib.nested( mock.patch.object(self._driver, '_load_shares_config'), mock.patch.object(self._driver, '_do_umount') ) as (mock_load_shares_config, mock_do_umount): self._driver._unmount_shares() mock_do_umount.assert_any_call(True, '127.7.7.7:/gluster1') mock_do_umount.assert_any_call(True, '127.7.7.8:/gluster2') def test_do_umount(self): test_share = '127.7.7.7:/gluster1' test_hashpath = '/hashed/mnt/path' with contextlib.nested( mock.patch.object(self._driver, '_get_mount_point_for_share'), mock.patch.object(putils, 'execute') ) as (mock_get_mntp_share, mock_execute): mock_get_mntp_share.return_value = test_hashpath self._driver._do_umount(True, test_share) self.assertTrue(mock_get_mntp_share.called) self.assertTrue(mock_execute.called) mock_get_mntp_share.assert_called_once_with(test_share) cmd = ['umount', test_hashpath] self.assertEqual(cmd[0], mock_execute.call_args[0][0]) self.assertEqual(cmd[1], mock_execute.call_args[0][1]) self.assertEqual(True, mock_execute.call_args[1]['run_as_root']) mock_get_mntp_share.reset_mock() mock_get_mntp_share.return_value = test_hashpath mock_execute.reset_mock() self._driver._do_umount(False, test_share) self.assertTrue(mock_get_mntp_share.called) self.assertTrue(mock_execute.called) mock_get_mntp_share.assert_called_once_with(test_share) cmd = ['umount', test_hashpath] self.assertEqual(cmd[0], mock_execute.call_args[0][0]) self.assertEqual(cmd[1], mock_execute.call_args[0][1]) self.assertEqual(True, mock_execute.call_args[1]['run_as_root']) def test_do_umount_with_excp1(self): test_share = '127.7.7.7:/gluster1' test_hashpath = '/hashed/mnt/path' with contextlib.nested( mock.patch.object(self._driver, '_get_mount_point_for_share'), mock.patch.object(putils, 'execute'), mock.patch.object(glusterfs, 'LOG') ) as (mock_get_mntp_share, mock_execute, mock_logger): mock_get_mntp_share.return_value = test_hashpath mock_execute.side_effect = putils.ProcessExecutionError self.assertRaises(putils.ProcessExecutionError, self._driver._do_umount, False, test_share) mock_logger.reset_mock() mock_logger.info.reset_mock() mock_logger.error.reset_mock() mock_execute.side_effect = putils.ProcessExecutionError try: self._driver._do_umount(False, test_share) except putils.ProcessExecutionError: self.assertFalse(mock_logger.info.called) self.assertTrue(mock_logger.error.called) except Exception as e: self.fail('Unexpected exception thrown:', e) else: self.fail('putils.ProcessExecutionError not thrown') def test_do_umount_with_excp2(self): test_share = '127.7.7.7:/gluster1' test_hashpath = '/hashed/mnt/path' with contextlib.nested( mock.patch.object(self._driver, '_get_mount_point_for_share'), mock.patch.object(putils, 'execute'), mock.patch.object(glusterfs, 'LOG') ) as (mock_get_mntp_share, mock_execute, mock_logger): mock_get_mntp_share.return_value = test_hashpath mock_stderr = _("umount: %s: not mounted") % test_hashpath mock_execute.side_effect = putils.ProcessExecutionError( stderr=mock_stderr) self._driver._do_umount(True, test_share) self.assertTrue(mock_logger.info.called) self.assertFalse(mock_logger.error.called) mock_logger.reset_mock() mock_logger.info.reset_mock() mock_logger.error.reset_mock() mock_stderr = _("umount: %s: target is busy") %\ (test_hashpath) mock_execute.side_effect = putils.ProcessExecutionError( stderr=mock_stderr) self.assertRaises(putils.ProcessExecutionError, self._driver._do_umount, True, test_share) mock_logger.reset_mock() mock_logger.info.reset_mock() mock_logger.error.reset_mock() mock_stderr = _('umount: %s: target is busy') %\ (test_hashpath) mock_execute.side_effect = putils.ProcessExecutionError( stderr=mock_stderr) try: self._driver._do_umount(True, test_share) except putils.ProcessExecutionError: mock_logger.info.assert_not_called() self.assertTrue(mock_logger.error.called) except Exception as e: self.fail('Unexpected exception thrown:', e) else: self.fail('putils.ProcessExecutionError not thrown') def test_delete_should_ensure_share_mounted(self): """delete_volume should ensure that corresponding share is mounted.""" mox = self._mox drv = self._driver self.stub_out_not_replaying(drv, '_execute') volume = DumbVolume() volume['name'] = 'volume-123' volume['provider_location'] = self.TEST_EXPORT1 mox.StubOutWithMock(drv, '_ensure_share_mounted') drv._ensure_share_mounted(self.TEST_EXPORT1) mox.ReplayAll() drv.delete_volume(volume) mox.VerifyAll() def test_delete_should_not_delete_if_provider_location_not_provided(self): """delete_volume shouldn't delete if provider_location missed.""" mox = self._mox drv = self._driver self.stub_out_not_replaying(drv, '_ensure_share_mounted') volume = DumbVolume() volume['name'] = 'volume-123' volume['provider_location'] = None mox.StubOutWithMock(drv, '_execute') mox.ReplayAll() drv.delete_volume(volume) mox.VerifyAll() def test_create_snapshot(self): (mox, drv) = self._mox, self._driver self.stub_out_not_replaying(drv, '_ensure_share_mounted') mox.StubOutWithMock(drv, '_create_qcow2_snap_file') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(drv, '_write_info_file') volume = self._simple_volume() snap_ref = {'name': 'test snap', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID} mox.StubOutWithMock(drv, '_execute') vol_filename = 'volume-%s' % self.VOLUME_UUID hashed = drv._get_hash_str(self.TEST_EXPORT1) vol_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, vol_filename) snap_path = '%s.%s' % (vol_path, self.SNAP_UUID) info_path = '%s%s' % (vol_path, '.info') info_dict = {'active': vol_filename} drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(info_dict) drv._create_qcow2_snap_file(snap_ref, vol_filename, snap_path) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(info_dict) # SNAP_UUID_2 has been removed from dict. info_file_dict = {'active': 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID), self.SNAP_UUID: 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID)} drv._write_info_file(info_path, info_file_dict) mox.ReplayAll() drv.create_snapshot(snap_ref) mox.VerifyAll() def test_delete_snapshot_bottom(self): """Multiple snapshots exist. In this test, path (volume-<uuid>) is backed by snap_path (volume-<uuid>.<snap_uuid>) which is backed by snap_path_2 (volume-<uuid>.<snap_uuid_2>). Delete the snapshot identified by SNAP_UUID_2. Chain goes from (SNAP_UUID) (SNAP_UUID_2) volume-abc -> volume-abc.baca -> volume-abc.bebe to (SNAP_UUID) volume-abc -> volume-abc.baca """ (mox, drv) = self._mox, self._driver hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_dir = os.path.join(self.TEST_MNT_POINT_BASE, hashed) volume_path = '%s/%s/volume-%s' % (self.TEST_MNT_POINT_BASE, hashed, self.VOLUME_UUID) volume_filename = 'volume-%s' % self.VOLUME_UUID snap_path_2 = '%s.%s' % (volume_path, self.SNAP_UUID_2) snap_file = '%s.%s' % (volume_filename, self.SNAP_UUID) snap_file_2 = '%s.%s' % (volume_filename, self.SNAP_UUID_2) info_path = '%s%s' % (volume_path, '.info') qemu_img_info_output = """image: volume-%s.%s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %s """ % (self.VOLUME_UUID, self.SNAP_UUID, volume_filename) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_read_file') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(drv, '_get_backing_chain_for_path') mox.StubOutWithMock(drv, '_get_matching_backing_file') mox.StubOutWithMock(drv, '_write_info_file') mox.StubOutWithMock(drv, '_ensure_share_writable') mox.StubOutWithMock(image_utils, 'qemu_img_info') drv._ensure_share_writable(volume_dir) img_info = imageutils.QemuImgInfo(qemu_img_info_output) image_utils.qemu_img_info(snap_path_2).AndReturn(img_info) info_file_dict = {'active': snap_file_2, self.SNAP_UUID_2: snap_file_2, self.SNAP_UUID: snap_file} snap_ref = {'name': 'test snap', 'volume_id': self.VOLUME_UUID, 'volume': self._simple_volume(), 'id': self.SNAP_UUID_2} drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(info_file_dict) drv._execute('qemu-img', 'commit', snap_path_2, run_as_root=True) drv._execute('rm', '-f', snap_path_2, run_as_root=True) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(info_file_dict) drv._read_info_file(info_path).AndReturn(info_file_dict) drv._write_info_file(info_path, info_file_dict) mox.ReplayAll() drv.delete_snapshot(snap_ref) mox.VerifyAll() def test_delete_snapshot_middle(self): """Multiple snapshots exist. In this test, path (volume-<uuid>) is backed by snap_path (volume-<uuid>.<snap_uuid>) which is backed by snap_path_2 (volume-<uuid>.<snap_uuid_2>). Delete the snapshot identified with SNAP_UUID. Chain goes from (SNAP_UUID) (SNAP_UUID_2) volume-abc -> volume-abc.baca -> volume-abc.bebe to (SNAP_UUID_2) volume-abc -> volume-abc.bebe """ (mox, drv) = self._mox, self._driver volume = self._simple_volume() hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_file = 'volume-%s' % self.VOLUME_UUID volume_dir = os.path.join(self.TEST_MNT_POINT_BASE, hashed) volume_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, volume_file) snap_path = '%s.%s' % (volume_path, self.SNAP_UUID) snap_file = 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID) snap_path_2 = '%s.%s' % (volume_path, self.SNAP_UUID_2) snap_file_2 = 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID_2) qemu_img_info_output_snap_1 = """image: volume-%s.%s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 122K backing file: %s """ % (self.VOLUME_UUID, self.SNAP_UUID, 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID)) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(drv, '_write_info_file') mox.StubOutWithMock(drv, '_get_backing_chain_for_path') mox.StubOutWithMock(drv, 'get_active_image_from_info') mox.StubOutWithMock(drv, '_ensure_share_writable') mox.StubOutWithMock(image_utils, 'qemu_img_info') info_file_dict = {self.SNAP_UUID_2: 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID_2), self.SNAP_UUID: 'volume-%s.%s' % (self.VOLUME_UUID, self.SNAP_UUID)} drv._ensure_share_writable(volume_dir) info_path = drv._local_path_volume(volume) + '.info' drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(info_file_dict) img_info = imageutils.QemuImgInfo(qemu_img_info_output_snap_1) image_utils.qemu_img_info(snap_path).AndReturn(img_info) snap_ref = {'name': 'test snap', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID} snap_path_chain = [{'filename': snap_file_2, 'backing-filename': snap_file}, {'filename': snap_file, 'backing-filename': volume_file}] drv.get_active_image_from_info(volume).AndReturn(snap_file_2) drv._get_backing_chain_for_path(volume, snap_path_2).\ AndReturn(snap_path_chain) drv._read_info_file(info_path).AndReturn(info_file_dict) drv._execute('qemu-img', 'commit', snap_path_2, run_as_root=True) drv._execute('rm', '-f', snap_path_2, run_as_root=True) drv._read_info_file(info_path).AndReturn(info_file_dict) drv._write_info_file(info_path, info_file_dict) mox.ReplayAll() drv.delete_snapshot(snap_ref) mox.VerifyAll() def test_delete_snapshot_not_in_info(self): """Snapshot not in info file / info file doesn't exist. Snapshot creation failed so nothing is on-disk. Driver should allow operation to succeed so the manager can remove the snapshot record. (Scenario: Snapshot object created in Cinder db but not on backing storage.) """ (mox, drv) = self._mox, self._driver hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_dir = os.path.join(self.TEST_MNT_POINT_BASE, hashed) volume_filename = 'volume-%s' % self.VOLUME_UUID volume_path = os.path.join(volume_dir, volume_filename) info_path = '%s%s' % (volume_path, '.info') mox.StubOutWithMock(drv, '_read_file') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(drv, '_ensure_share_writable') snap_ref = {'name': 'test snap', 'volume_id': self.VOLUME_UUID, 'volume': self._simple_volume(), 'id': self.SNAP_UUID_2} drv._ensure_share_writable(volume_dir) drv._read_info_file(info_path, empty_if_missing=True).AndReturn({}) mox.ReplayAll() drv.delete_snapshot(snap_ref) mox.VerifyAll() def test_read_info_file(self): (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv, '_read_file') hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_path = '%s/%s/volume-%s' % (self.TEST_MNT_POINT_BASE, hashed, self.VOLUME_UUID) info_path = '%s%s' % (volume_path, '.info') drv._read_file(info_path).AndReturn('{"%(id)s": "volume-%(id)s"}' % {'id': self.VOLUME_UUID}) mox.ReplayAll() volume = DumbVolume() volume['id'] = self.VOLUME_UUID volume['name'] = 'volume-%s' % self.VOLUME_UUID info = drv._read_info_file(info_path) self.assertEqual(info[self.VOLUME_UUID], 'volume-%s' % self.VOLUME_UUID) mox.VerifyAll() def test_extend_volume(self): (mox, drv) = self._mox, self._driver volume = self._simple_volume() volume_path = '%s/%s/volume-%s' % (self.TEST_MNT_POINT_BASE, drv._get_hash_str( self.TEST_EXPORT1), self.VOLUME_UUID) qemu_img_info_output = """image: volume-%s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 473K """ % self.VOLUME_UUID img_info = imageutils.QemuImgInfo(qemu_img_info_output) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, 'get_active_image_from_info') mox.StubOutWithMock(image_utils, 'qemu_img_info') mox.StubOutWithMock(image_utils, 'resize_image') drv.get_active_image_from_info(volume).AndReturn(volume['name']) image_utils.qemu_img_info(volume_path).AndReturn(img_info) image_utils.resize_image(volume_path, 3) mox.ReplayAll() drv.extend_volume(volume, 3) mox.VerifyAll() def test_create_snapshot_online(self): (mox, drv) = self._mox, self._driver volume = self._simple_volume() volume['status'] = 'in-use' hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_file = 'volume-%s' % self.VOLUME_UUID volume_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, volume_file) info_path = '%s.info' % volume_path ctxt = context.RequestContext('fake_user', 'fake_project') snap_ref = {'name': 'test snap (online)', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID, 'context': ctxt, 'status': 'asdf', 'progress': 'asdf'} snap_path = '%s.%s' % (volume_path, self.SNAP_UUID) snap_file = '%s.%s' % (volume_file, self.SNAP_UUID) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_create_qcow2_snap_file') mox.StubOutWithMock(db, 'snapshot_get') mox.StubOutWithMock(drv, '_write_info_file') mox.StubOutWithMock(drv, '_nova') # Stub out the busy wait. self.stub_out_not_replaying(time, 'sleep') drv._create_qcow2_snap_file(snap_ref, volume_file, snap_path) create_info = {'snapshot_id': snap_ref['id'], 'type': 'qcow2', 'new_file': snap_file} drv._nova.create_volume_snapshot(ctxt, self.VOLUME_UUID, create_info) snap_ref_progress = snap_ref.copy() snap_ref_progress['status'] = 'creating' snap_ref_progress_0p = snap_ref_progress.copy() snap_ref_progress_0p['progress'] = '0%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_0p) snap_ref_progress_50p = snap_ref_progress.copy() snap_ref_progress_50p['progress'] = '50%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_50p) snap_ref_progress_90p = snap_ref_progress.copy() snap_ref_progress_90p['progress'] = '90%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_90p) snap_info = {'active': snap_file, self.SNAP_UUID: snap_file} drv._write_info_file(info_path, snap_info) mox.ReplayAll() drv.create_snapshot(snap_ref) mox.VerifyAll() def test_create_snapshot_online_novafailure(self): (mox, drv) = self._mox, self._driver volume = self._simple_volume() volume['status'] = 'in-use' hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_file = 'volume-%s' % self.VOLUME_UUID volume_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, volume_file) ctxt = context.RequestContext('fake_user', 'fake_project') snap_ref = {'name': 'test snap (online)', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID, 'context': ctxt} snap_path = '%s.%s' % (volume_path, self.SNAP_UUID) snap_file = '%s.%s' % (volume_file, self.SNAP_UUID) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_create_qcow2_snap_file') mox.StubOutWithMock(drv, '_nova') # Stub out the busy wait. self.stub_out_not_replaying(time, 'sleep') mox.StubOutWithMock(db, 'snapshot_get') mox.StubOutWithMock(drv, '_write_info_file') drv._create_qcow2_snap_file(snap_ref, volume_file, snap_path) create_info = {'snapshot_id': snap_ref['id'], 'type': 'qcow2', 'new_file': snap_file} drv._nova.create_volume_snapshot(ctxt, self.VOLUME_UUID, create_info) snap_ref_progress = snap_ref.copy() snap_ref_progress['status'] = 'creating' snap_ref_progress_0p = snap_ref_progress.copy() snap_ref_progress_0p['progress'] = '0%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_0p) snap_ref_progress_50p = snap_ref_progress.copy() snap_ref_progress_50p['progress'] = '50%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_50p) snap_ref_progress_99p = snap_ref_progress.copy() snap_ref_progress_99p['progress'] = '99%' snap_ref_progress_99p['status'] = 'error' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_99p) mox.ReplayAll() self.assertRaisesAndMessageMatches( exception.GlusterfsException, 'Nova returned "error" status while creating snapshot.', drv.create_snapshot, snap_ref) mox.VerifyAll() def test_delete_snapshot_online_1(self): """Delete the newest snapshot, with only one snap present.""" (mox, drv) = self._mox, self._driver volume = self._simple_volume() volume['status'] = 'in-use' ctxt = context.RequestContext('fake_user', 'fake_project') snap_ref = {'name': 'test snap to delete (online)', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID, 'context': ctxt} hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_file = 'volume-%s' % self.VOLUME_UUID volume_dir = os.path.join(self.TEST_MNT_POINT_BASE, hashed) volume_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, volume_file) info_path = '%s.info' % volume_path snap_path = '%s.%s' % (volume_path, self.SNAP_UUID) snap_file = '%s.%s' % (volume_file, self.SNAP_UUID) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_nova') # Stub out the busy wait. self.stub_out_not_replaying(time, 'sleep') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(drv, '_write_info_file') mox.StubOutWithMock(db, 'snapshot_get') mox.StubOutWithMock(image_utils, 'qemu_img_info') mox.StubOutWithMock(drv, '_ensure_share_writable') snap_info = {'active': snap_file, self.SNAP_UUID: snap_file} drv._ensure_share_writable(volume_dir) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(snap_info) qemu_img_info_output = """image: %s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %s """ % (snap_file, volume_file) img_info = imageutils.QemuImgInfo(qemu_img_info_output) vol_qemu_img_info_output = """image: %s file format: raw virtual size: 1.0G (1073741824 bytes) disk size: 173K """ % volume_file volume_img_info = imageutils.QemuImgInfo(vol_qemu_img_info_output) image_utils.qemu_img_info(snap_path).AndReturn(img_info) image_utils.qemu_img_info(volume_path).AndReturn(volume_img_info) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(snap_info) delete_info = { 'type': 'qcow2', 'merge_target_file': None, 'file_to_merge': None, 'volume_id': self.VOLUME_UUID } drv._nova.delete_volume_snapshot(ctxt, self.SNAP_UUID, delete_info) drv._read_info_file(info_path).AndReturn(snap_info) drv._read_info_file(info_path).AndReturn(snap_info) snap_ref_progress = snap_ref.copy() snap_ref_progress['status'] = 'deleting' snap_ref_progress_0p = snap_ref_progress.copy() snap_ref_progress_0p['progress'] = '0%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_0p) snap_ref_progress_50p = snap_ref_progress.copy() snap_ref_progress_50p['progress'] = '50%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_50p) snap_ref_progress_90p = snap_ref_progress.copy() snap_ref_progress_90p['progress'] = '90%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_90p) drv._write_info_file(info_path, snap_info) drv._execute('rm', '-f', volume_path, run_as_root=True) mox.ReplayAll() drv.delete_snapshot(snap_ref) mox.VerifyAll() def test_delete_snapshot_online_2(self): """Delete the middle of 3 snapshots.""" (mox, drv) = self._mox, self._driver volume = self._simple_volume() volume['status'] = 'in-use' ctxt = context.RequestContext('fake_user', 'fake_project') snap_ref = {'name': 'test snap to delete (online)', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID, 'context': ctxt} hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_file = 'volume-%s' % self.VOLUME_UUID volume_dir = os.path.join(self.TEST_MNT_POINT_BASE, hashed) volume_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, volume_file) info_path = '%s.info' % volume_path snap_path = '%s.%s' % (volume_path, self.SNAP_UUID) snap_file = '%s.%s' % (volume_file, self.SNAP_UUID) snap_file_2 = '%s.%s' % (volume_file, self.SNAP_UUID_2) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_nova') # Stub out the busy wait. self.stub_out_not_replaying(time, 'sleep') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(drv, '_write_info_file') mox.StubOutWithMock(db, 'snapshot_get') mox.StubOutWithMock(image_utils, 'qemu_img_info') mox.StubOutWithMock(drv, '_ensure_share_writable') snap_info = {'active': snap_file_2, self.SNAP_UUID: snap_file, self.SNAP_UUID_2: snap_file_2} drv._ensure_share_writable(volume_dir) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(snap_info) qemu_img_info_output = """image: %s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %s """ % (snap_file, volume_file) img_info = imageutils.QemuImgInfo(qemu_img_info_output) vol_qemu_img_info_output = """image: %s file format: raw virtual size: 1.0G (1073741824 bytes) disk size: 173K """ % volume_file volume_img_info = imageutils.QemuImgInfo(vol_qemu_img_info_output) image_utils.qemu_img_info(snap_path).AndReturn(img_info) image_utils.qemu_img_info(volume_path).AndReturn(volume_img_info) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(snap_info) delete_info = {'type': 'qcow2', 'merge_target_file': volume_file, 'file_to_merge': snap_file, 'volume_id': self.VOLUME_UUID} drv._nova.delete_volume_snapshot(ctxt, self.SNAP_UUID, delete_info) drv._read_info_file(info_path).AndReturn(snap_info) drv._read_info_file(info_path).AndReturn(snap_info) snap_ref_progress = snap_ref.copy() snap_ref_progress['status'] = 'deleting' snap_ref_progress_0p = snap_ref_progress.copy() snap_ref_progress_0p['progress'] = '0%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_0p) snap_ref_progress_50p = snap_ref_progress.copy() snap_ref_progress_50p['progress'] = '50%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_50p) snap_ref_progress_90p = snap_ref_progress.copy() snap_ref_progress_90p['progress'] = '90%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_90p) drv._write_info_file(info_path, snap_info) drv._execute('rm', '-f', snap_path, run_as_root=True) mox.ReplayAll() drv.delete_snapshot(snap_ref) mox.VerifyAll() def test_delete_snapshot_online_novafailure(self): """Delete the newest snapshot.""" (mox, drv) = self._mox, self._driver volume = self._simple_volume() volume['status'] = 'in-use' ctxt = context.RequestContext('fake_user', 'fake_project') snap_ref = {'name': 'test snap to delete (online)', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID, 'context': ctxt} hashed = drv._get_hash_str(self.TEST_EXPORT1) volume_file = 'volume-%s' % self.VOLUME_UUID volume_dir = os.path.join(self.TEST_MNT_POINT_BASE, hashed) volume_path = '%s/%s/%s' % (self.TEST_MNT_POINT_BASE, hashed, volume_file) info_path = '%s.info' % volume_path snap_path = '%s.%s' % (volume_path, self.SNAP_UUID) snap_file = '%s.%s' % (volume_file, self.SNAP_UUID) mox.StubOutWithMock(drv, '_execute') mox.StubOutWithMock(drv, '_nova') # Stub out the busy wait. self.stub_out_not_replaying(time, 'sleep') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(db, 'snapshot_get') mox.StubOutWithMock(image_utils, 'qemu_img_info') mox.StubOutWithMock(drv, '_ensure_share_writable') snap_info = {'active': snap_file, self.SNAP_UUID: snap_file} drv._ensure_share_writable(volume_dir) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(snap_info) qemu_img_info_output = """image: %s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %s """ % (snap_file, volume_file) img_info = imageutils.QemuImgInfo(qemu_img_info_output) vol_qemu_img_info_output = """image: %s file format: raw virtual size: 1.0G (1073741824 bytes) disk size: 173K """ % volume_file volume_img_info = imageutils.QemuImgInfo(vol_qemu_img_info_output) image_utils.qemu_img_info(snap_path).AndReturn(img_info) image_utils.qemu_img_info(volume_path).AndReturn(volume_img_info) drv._read_info_file(info_path, empty_if_missing=True).\ AndReturn(snap_info) delete_info = { 'type': 'qcow2', 'merge_target_file': None, 'file_to_merge': None, 'volume_id': self.VOLUME_UUID } drv._nova.delete_volume_snapshot(ctxt, self.SNAP_UUID, delete_info) drv._read_info_file(info_path).AndReturn(snap_info) drv._read_info_file(info_path).AndReturn(snap_info) snap_ref_progress = snap_ref.copy() snap_ref_progress['status'] = 'deleting' snap_ref_progress_0p = snap_ref_progress.copy() snap_ref_progress_0p['progress'] = '0%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_0p) snap_ref_progress_50p = snap_ref_progress.copy() snap_ref_progress_50p['progress'] = '50%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_50p) snap_ref_progress_90p = snap_ref_progress.copy() snap_ref_progress_90p['status'] = 'error_deleting' snap_ref_progress_90p['progress'] = '90%' db.snapshot_get(ctxt, self.SNAP_UUID).AndReturn(snap_ref_progress_90p) mox.ReplayAll() self.assertRaisesAndMessageMatches(exception.GlusterfsException, 'Unable to delete snapshot', drv.delete_snapshot, snap_ref) mox.VerifyAll() @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_delete_stale_snapshot') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' 'get_active_image_from_info') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_qemu_img_info') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_read_info_file') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_local_path_volume') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_local_volume_dir') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_ensure_share_writable') def test_delete_snapshot_online_stale_snapshot(self, mock_ensure_share_writable, mock_local_volume_dir, mock_local_path_volume, mock_read_info_file, mock_qemu_img_info, mock_get_active_image, mock_delete_stale_snap): volume = self._simple_volume() ctxt = context.RequestContext('fake_user', 'fake_project') volume['status'] = 'in-use' volume_filename = 'volume-%s' % self.VOLUME_UUID volume_path = '%s/%s' % (self.TEST_MNT_POINT, volume_filename) info_path = volume_path + '.info' stale_snapshot = {'name': 'fake-volume', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID_2, 'context': ctxt} active_snap_file = volume['name'] + '.' + self.SNAP_UUID_2 stale_snap_file = volume['name'] + '.' + stale_snapshot['id'] stale_snap_path = '%s/%s' % (self.TEST_MNT_POINT, stale_snap_file) snap_info = {'active': active_snap_file, stale_snapshot['id']: stale_snap_file} qemu_img_info = imageutils.QemuImgInfo() qemu_img_info.file_format = 'qcow2' mock_local_path_volume.return_value = volume_path mock_read_info_file.return_value = snap_info mock_local_volume_dir.return_value = self.TEST_MNT_POINT mock_qemu_img_info.return_value = qemu_img_info mock_get_active_image.return_value = active_snap_file self._driver.delete_snapshot(stale_snapshot) mock_ensure_share_writable.assert_called_once_with( self.TEST_MNT_POINT) mock_local_path_volume.assert_called_once_with( stale_snapshot['volume']) mock_read_info_file.assert_called_once_with(info_path, empty_if_missing=True) mock_qemu_img_info.assert_called_once_with(stale_snap_path) mock_get_active_image.assert_called_once_with( stale_snapshot['volume']) mock_delete_stale_snap.assert_called_once_with(stale_snapshot) @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_write_info_file') @mock.patch('cinder.openstack.common.fileutils.delete_if_exists') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' 'get_active_image_from_info') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_local_volume_dir') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_read_info_file') @mock.patch('cinder.volume.drivers.glusterfs.GlusterfsDriver.' '_local_path_volume') def test_delete_stale_snapshot(self, mock_local_path_volume, mock_read_info_file, mock_local_volume_dir, mock_get_active_image, mock_delete_if_exists, mock_write_info_file): volume = self._simple_volume() volume['status'] = 'in-use' volume_filename = 'volume-%s' % self.VOLUME_UUID volume_path = '%s/%s' % (self.TEST_MNT_POINT, volume_filename) info_path = volume_path + '.info' # Test case where snapshot_file = active_file snapshot = {'name': 'fake-volume', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID_2} active_snap_file = volume['name'] + '.' + self.SNAP_UUID_2 stale_snap_file = volume['name'] + '.' + snapshot['id'] stale_snap_path = '%s/%s' % (self.TEST_MNT_POINT, stale_snap_file) snap_info = {'active': active_snap_file, snapshot['id']: stale_snap_file} mock_local_path_volume.return_value = volume_path mock_read_info_file.return_value = snap_info mock_get_active_image.return_value = active_snap_file mock_local_volume_dir.return_value = self.TEST_MNT_POINT self._driver._delete_stale_snapshot(snapshot) mock_local_path_volume.assert_called_with(snapshot['volume']) mock_read_info_file.assert_called_with(info_path) mock_delete_if_exists.assert_not_called() mock_write_info_file.assert_not_called() # Test case where snapshot_file != active_file snapshot = {'name': 'fake-volume', 'volume_id': self.VOLUME_UUID, 'volume': volume, 'id': self.SNAP_UUID} active_snap_file = volume['name'] + '.' + self.SNAP_UUID_2 stale_snap_file = volume['name'] + '.' + snapshot['id'] stale_snap_path = '%s/%s' % (self.TEST_MNT_POINT, stale_snap_file) snap_info = {'active': active_snap_file, snapshot['id']: stale_snap_file} mock_local_path_volume.return_value = volume_path mock_read_info_file.return_value = snap_info mock_get_active_image.return_value = active_snap_file mock_local_volume_dir.return_value = self.TEST_MNT_POINT self._driver._delete_stale_snapshot(snapshot) mock_local_path_volume.assert_called_with(snapshot['volume']) mock_read_info_file.assert_called_with(info_path) mock_delete_if_exists.assert_called_once_with(stale_snap_path) snap_info.pop(snapshot['id'], None) mock_write_info_file.assert_called_once_with(info_path, snap_info) def test_get_backing_chain_for_path(self): (mox, drv) = self._mox, self._driver CONF.set_override('glusterfs_mount_point_base', self.TEST_MNT_POINT_BASE) volume = self._simple_volume() vol_filename = volume['name'] vol_filename_2 = volume['name'] + '.asdfjkl' vol_filename_3 = volume['name'] + 'qwertyuiop' hashed = drv._get_hash_str(self.TEST_EXPORT1) vol_dir = '%s/%s' % (self.TEST_MNT_POINT_BASE, hashed) vol_path = '%s/%s' % (vol_dir, vol_filename) vol_path_2 = '%s/%s' % (vol_dir, vol_filename_2) vol_path_3 = '%s/%s' % (vol_dir, vol_filename_3) mox.StubOutWithMock(drv, '_local_volume_dir') mox.StubOutWithMock(image_utils, 'qemu_img_info') qemu_img_output_base = """image: %(image_name)s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K """ qemu_img_output = """image: %(image_name)s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %(backing_file)s """ qemu_img_output_1 = qemu_img_output_base % {'image_name': vol_filename} qemu_img_output_2 = qemu_img_output % {'image_name': vol_filename_2, 'backing_file': vol_filename} qemu_img_output_3 = qemu_img_output % {'image_name': vol_filename_3, 'backing_file': vol_filename_2} info_1 = imageutils.QemuImgInfo(qemu_img_output_1) info_2 = imageutils.QemuImgInfo(qemu_img_output_2) info_3 = imageutils.QemuImgInfo(qemu_img_output_3) image_utils.qemu_img_info(vol_path_3).\ AndReturn(info_3) drv._local_volume_dir(volume).AndReturn(vol_dir) image_utils.qemu_img_info(vol_path_2).\ AndReturn(info_2) drv._local_volume_dir(volume).AndReturn(vol_dir) image_utils.qemu_img_info(vol_path).\ AndReturn(info_1) mox.ReplayAll() chain = drv._get_backing_chain_for_path(volume, vol_path_3) mox.VerifyAll() # Verify chain contains all expected data item_1 = drv._get_matching_backing_file(chain, vol_filename) self.assertEqual(item_1['filename'], vol_filename_2) chain.remove(item_1) item_2 = drv._get_matching_backing_file(chain, vol_filename_2) self.assertEqual(item_2['filename'], vol_filename_3) chain.remove(item_2) self.assertEqual(len(chain), 1) self.assertEqual(chain[0]['filename'], vol_filename) def test_copy_volume_from_snapshot(self): (mox, drv) = self._mox, self._driver mox.StubOutWithMock(image_utils, 'convert_image') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(image_utils, 'qemu_img_info') mox.StubOutWithMock(drv, '_set_rw_permissions_for_all') dest_volume = self._simple_volume( 'c1073000-0000-0000-0000-0000000c1073') src_volume = self._simple_volume() vol_dir = os.path.join(self.TEST_MNT_POINT_BASE, drv._get_hash_str(self.TEST_EXPORT1)) src_vol_path = os.path.join(vol_dir, src_volume['name']) dest_vol_path = os.path.join(vol_dir, dest_volume['name']) info_path = os.path.join(vol_dir, src_volume['name']) + '.info' snapshot = {'volume_name': src_volume['name'], 'name': 'clone-snap-%s' % src_volume['id'], 'size': src_volume['size'], 'volume_size': src_volume['size'], 'volume_id': src_volume['id'], 'id': 'tmp-snap-%s' % src_volume['id'], 'volume': src_volume} snap_file = dest_volume['name'] + '.' + snapshot['id'] snap_path = os.path.join(vol_dir, snap_file) size = dest_volume['size'] drv._read_info_file(info_path).AndReturn( {'active': snap_file, snapshot['id']: snap_file} ) qemu_img_output = """image: %s file format: raw virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %s """ % (snap_file, src_volume['name']) img_info = imageutils.QemuImgInfo(qemu_img_output) image_utils.qemu_img_info(snap_path).AndReturn(img_info) image_utils.convert_image(src_vol_path, dest_vol_path, 'raw') drv._set_rw_permissions_for_all(dest_vol_path) mox.ReplayAll() drv._copy_volume_from_snapshot(snapshot, dest_volume, size) mox.VerifyAll() def test_create_volume_from_snapshot(self): (mox, drv) = self._mox, self._driver src_volume = self._simple_volume() snap_ref = {'volume_name': src_volume['name'], 'name': 'clone-snap-%s' % src_volume['id'], 'size': src_volume['size'], 'volume_size': src_volume['size'], 'volume_id': src_volume['id'], 'id': 'tmp-snap-%s' % src_volume['id'], 'volume': src_volume, 'status': 'available'} new_volume = DumbVolume() new_volume['size'] = snap_ref['size'] mox.StubOutWithMock(drv, '_ensure_shares_mounted') mox.StubOutWithMock(drv, '_find_share') mox.StubOutWithMock(drv, '_do_create_volume') mox.StubOutWithMock(drv, '_copy_volume_from_snapshot') drv._ensure_shares_mounted() drv._find_share(new_volume['size']).AndReturn(self.TEST_EXPORT1) drv._do_create_volume(new_volume) drv._copy_volume_from_snapshot(snap_ref, new_volume, new_volume['size']) mox.ReplayAll() drv.create_volume_from_snapshot(new_volume, snap_ref) mox.VerifyAll() def test_initialize_connection(self): (mox, drv) = self._mox, self._driver volume = self._simple_volume() vol_dir = os.path.join(self.TEST_MNT_POINT_BASE, drv._get_hash_str(self.TEST_EXPORT1)) vol_path = os.path.join(vol_dir, volume['name']) qemu_img_output = """image: %s file format: raw virtual size: 1.0G (1073741824 bytes) disk size: 173K """ % volume['name'] img_info = imageutils.QemuImgInfo(qemu_img_output) mox.StubOutWithMock(drv, 'get_active_image_from_info') mox.StubOutWithMock(image_utils, 'qemu_img_info') drv.get_active_image_from_info(volume).AndReturn(volume['name']) image_utils.qemu_img_info(vol_path).AndReturn(img_info) mox.ReplayAll() conn_info = drv.initialize_connection(volume, None) mox.VerifyAll() self.assertEqual(conn_info['data']['format'], 'raw') self.assertEqual(conn_info['driver_volume_type'], 'glusterfs') self.assertEqual(conn_info['data']['name'], volume['name']) self.assertEqual(conn_info['mount_point_base'], self.TEST_MNT_POINT_BASE) def test_get_mount_point_base(self): (mox, drv) = self._mox, self._driver self.assertEqual(drv._get_mount_point_base(), self.TEST_MNT_POINT_BASE) def test_backup_volume(self): """Backup a volume with no snapshots.""" (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv.db, 'volume_get') mox.StubOutWithMock(drv, 'get_active_image_from_info') mox.StubOutWithMock(drv, '_qemu_img_info') mox.StubOutWithMock(base_driver.VolumeDriver, 'backup_volume') ctxt = context.RequestContext('fake_user', 'fake_project') volume = self._simple_volume() backup = {'volume_id': volume['id']} drv.db.volume_get(ctxt, volume['id']).AndReturn(volume) drv.get_active_image_from_info(IgnoreArg()).AndReturn('/some/path') info = imageutils.QemuImgInfo() info.file_format = 'raw' drv._qemu_img_info(IgnoreArg()).AndReturn(info) base_driver.VolumeDriver.backup_volume(IgnoreArg(), IgnoreArg(), IgnoreArg()) mox.ReplayAll() drv.backup_volume(ctxt, backup, IgnoreArg()) mox.VerifyAll() def test_backup_volume_previous_snap(self): """Backup a volume that previously had a snapshot. Snapshot was deleted, snap_info is different from above. """ (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv.db, 'volume_get') mox.StubOutWithMock(drv, 'get_active_image_from_info') mox.StubOutWithMock(drv, '_qemu_img_info') mox.StubOutWithMock(base_driver.VolumeDriver, 'backup_volume') ctxt = context.RequestContext('fake_user', 'fake_project') volume = self._simple_volume() backup = {'volume_id': volume['id']} drv.db.volume_get(ctxt, volume['id']).AndReturn(volume) drv.get_active_image_from_info(IgnoreArg()).AndReturn('/some/file2') info = imageutils.QemuImgInfo() info.file_format = 'raw' drv._qemu_img_info(IgnoreArg()).AndReturn(info) base_driver.VolumeDriver.backup_volume(IgnoreArg(), IgnoreArg(), IgnoreArg()) mox.ReplayAll() drv.backup_volume(ctxt, backup, IgnoreArg()) mox.VerifyAll() def test_backup_snap_failure_1(self): """Backup fails if snapshot exists (database).""" (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv.db, 'snapshot_get_all_for_volume') ctxt = context.RequestContext('fake_user', 'fake_project') volume = self._simple_volume() backup = {'volume_id': volume['id']} drv.db.snapshot_get_all_for_volume(ctxt, volume['id']).AndReturn( [{'snap1': 'a'}, {'snap2': 'b'}]) mox.ReplayAll() self.assertRaises(exception.InvalidVolume, drv.backup_volume, ctxt, backup, IgnoreArg()) mox.VerifyAll() def test_backup_snap_failure_2(self): """Backup fails if snapshot exists (on-disk).""" (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv.db, 'volume_get') mox.StubOutWithMock(drv, 'get_active_image_from_info') mox.StubOutWithMock(drv, '_qemu_img_info') ctxt = context.RequestContext('fake_user', 'fake_project') volume = self._simple_volume() backup = {'volume_id': volume['id']} drv.db.volume_get(ctxt, volume['id']).AndReturn(volume) drv.get_active_image_from_info(IgnoreArg()).\ AndReturn('/some/path/file2') info = imageutils.QemuImgInfo() info.file_format = 'raw' info.backing_file = 'file1' drv._qemu_img_info(IgnoreArg()).AndReturn(info) mox.ReplayAll() self.assertRaises(exception.InvalidVolume, drv.backup_volume, ctxt, backup, IgnoreArg()) mox.VerifyAll() def test_backup_failure_unsupported_format(self): """Attempt to backup a volume with a qcow2 base.""" (mox, drv) = self._mox, self._driver mox.StubOutWithMock(drv, '_qemu_img_info') mox.StubOutWithMock(drv.db, 'volume_get') mox.StubOutWithMock(drv, 'get_active_image_from_info') ctxt = context.RequestContext('fake_user', 'fake_project') volume = self._simple_volume() backup = {'volume_id': volume['id']} drv.get_active_image_from_info(IgnoreArg()).AndReturn('/some/path') info = imageutils.QemuImgInfo() info.file_format = 'qcow2' drv.db.volume_get(ctxt, volume['id']).AndReturn(volume) drv._qemu_img_info(IgnoreArg()).AndReturn(info) mox.ReplayAll() self.assertRaises(exception.InvalidVolume, drv.backup_volume, ctxt, backup, IgnoreArg()) mox.VerifyAll() def test_copy_volume_to_image_raw_image(self): drv = self._driver volume = self._simple_volume() volume_path = '%s/%s' % (self.TEST_MNT_POINT, volume['name']) with contextlib.nested( mock.patch.object(drv, 'get_active_image_from_info'), mock.patch.object(drv, '_local_volume_dir'), mock.patch.object(image_utils, 'qemu_img_info'), mock.patch.object(image_utils, 'upload_volume') ) as (mock_get_active_image_from_info, mock_local_volume_dir, mock_qemu_img_info, mock_upload_volume): mock_get_active_image_from_info.return_value = volume['name'] mock_local_volume_dir.return_value = self.TEST_MNT_POINT qemu_img_output = """image: %s file format: raw virtual size: 1.0G (1073741824 bytes) disk size: 173K """ % volume['name'] img_info = imageutils.QemuImgInfo(qemu_img_output) mock_qemu_img_info.return_value = img_info upload_path = volume_path drv.copy_volume_to_image(mock.ANY, volume, mock.ANY, mock.ANY) mock_get_active_image_from_info.assert_called_once_with(volume) mock_local_volume_dir.assert_called_once_with(volume) mock_qemu_img_info.assert_called_once_with(volume_path) mock_upload_volume.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, upload_path) def test_copy_volume_to_image_qcow2_image(self): """Upload a qcow2 image file which has to be converted to raw first.""" drv = self._driver volume = self._simple_volume() volume_path = '%s/%s' % (self.TEST_MNT_POINT, volume['name']) image_meta = {'id': '10958016-e196-42e3-9e7f-5d8927ae3099'} with contextlib.nested( mock.patch.object(drv, 'get_active_image_from_info'), mock.patch.object(drv, '_local_volume_dir'), mock.patch.object(image_utils, 'qemu_img_info'), mock.patch.object(image_utils, 'convert_image'), mock.patch.object(image_utils, 'upload_volume'), mock.patch.object(drv, '_execute') ) as (mock_get_active_image_from_info, mock_local_volume_dir, mock_qemu_img_info, mock_convert_image, mock_upload_volume, mock_execute): mock_get_active_image_from_info.return_value = volume['name'] mock_local_volume_dir.return_value = self.TEST_MNT_POINT qemu_img_output = """image: %s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K """ % volume['name'] img_info = imageutils.QemuImgInfo(qemu_img_output) mock_qemu_img_info.return_value = img_info upload_path = '%s/%s.temp_image.%s' % (self.TEST_MNT_POINT, volume['id'], image_meta['id']) drv.copy_volume_to_image(mock.ANY, volume, mock.ANY, image_meta) mock_get_active_image_from_info.assert_called_once_with(volume) mock_local_volume_dir.assert_called_with(volume) mock_qemu_img_info.assert_called_once_with(volume_path) mock_convert_image.assert_called_once_with( volume_path, upload_path, 'raw') mock_upload_volume.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, upload_path) mock_execute.assert_called_once_with('rm', '-f', upload_path) def test_copy_volume_to_image_snapshot_exists(self): """Upload an active snapshot which has to be converted to raw first.""" drv = self._driver volume = self._simple_volume() volume_path = '%s/volume-%s' % (self.TEST_MNT_POINT, self.VOLUME_UUID) volume_filename = 'volume-%s' % self.VOLUME_UUID image_meta = {'id': '10958016-e196-42e3-9e7f-5d8927ae3099'} with contextlib.nested( mock.patch.object(drv, 'get_active_image_from_info'), mock.patch.object(drv, '_local_volume_dir'), mock.patch.object(image_utils, 'qemu_img_info'), mock.patch.object(image_utils, 'convert_image'), mock.patch.object(image_utils, 'upload_volume'), mock.patch.object(drv, '_execute') ) as (mock_get_active_image_from_info, mock_local_volume_dir, mock_qemu_img_info, mock_convert_image, mock_upload_volume, mock_execute): mock_get_active_image_from_info.return_value = volume['name'] mock_local_volume_dir.return_value = self.TEST_MNT_POINT qemu_img_output = """image: volume-%s.%s file format: qcow2 virtual size: 1.0G (1073741824 bytes) disk size: 173K backing file: %s """ % (self.VOLUME_UUID, self.SNAP_UUID, volume_filename) img_info = imageutils.QemuImgInfo(qemu_img_output) mock_qemu_img_info.return_value = img_info upload_path = '%s/%s.temp_image.%s' % (self.TEST_MNT_POINT, volume['id'], image_meta['id']) drv.copy_volume_to_image(mock.ANY, volume, mock.ANY, image_meta) mock_get_active_image_from_info.assert_called_once_with(volume) mock_local_volume_dir.assert_called_with(volume) mock_qemu_img_info.assert_called_once_with(volume_path) mock_convert_image.assert_called_once_with( volume_path, upload_path, 'raw') mock_upload_volume.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, upload_path) mock_execute.assert_called_once_with('rm', '-f', upload_path)<|fim▁end|>
drv._mounted_shares = [] self.assertRaises(exception.GlusterfsNoSharesMounted,
<|file_name|>cl_LF_max.cc<|end_file_name|><|fim▁begin|>// max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. namespace cln { <|fim▁hole|> return (x >= y ? x : y); } } // namespace cln<|fim▁end|>
const cl_LF max (const cl_LF& x, const cl_LF& y) {
<|file_name|>main.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from backup.api import api as api_backup from backup.api import api_restore # Blueprints registration app.register_blueprint(api_backup, url_prefix='/api/backup') app.register_blueprint(api_restore, url_prefix='/api/restore') @app.route('/api/help', methods = ['GET']) def help(): """Print available functions.""" func_list = {} for rule in app.url_map.iter_rules(): if rule.endpoint != 'static': func_list[rule.rule] = app.view_functions[rule.endpoint].__doc__ return jsonify(func_list) if __name__ == '__main__': app.run('0.0.0.0')<|fim▁end|>
from app import app from flask import jsonify
<|file_name|>GKEventDispatcher.cpp<|end_file_name|><|fim▁begin|>/* * Copyright(c), All rights reserved. * Author: [email protected] * Filename: GKEventCenter.cpp * Created Time: 2014/11/15 16:02:33 * Description: 事件分发器 * Revision: * License:<|fim▁hole|> /* -------------------------------------------------- */ /* cocso2d framework */ GKEventDispatcher::GKEventDispatcher() { } GKEventDispatcher::~GKEventDispatcher() { } bool GKEventDispatcher::init() { } /* -------------------------------------------------- */ /* application logic */<|fim▁end|>
*/ USING_NS_CC;
<|file_name|>inspector.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "inspector")] extern crate rusoto; use rusoto::inspector::{Inspector, InspectorClient, ListAssessmentRunsRequest}; use rusoto::{DefaultCredentialsProvider, Region}; use rusoto::default_tls_client; #[test] fn should_list_assessment_runs() { let credentials = DefaultCredentialsProvider::new().unwrap(); let client = InspectorClient::new(default_tls_client().unwrap(), credentials, Region::UsEast1); let request = ListAssessmentRunsRequest::default(); <|fim▁hole|> client.list_assessment_runs(&request).unwrap(); }<|fim▁end|>
<|file_name|>core.py<|end_file_name|><|fim▁begin|>import os import re import sys import json import shlex import logging import inspect import functools import importlib from pprint import pformat from collections import namedtuple from traceback import format_tb from requests.exceptions import RequestException import strutil from cachely.loader import Loader from .lib import library, interpreter_library, DataProxy from . import utils from . import core from . import exceptions logger = logging.getLogger(__name__) BASE_LIBS = ['snagit.lib.text', 'snagit.lib.lines', 'snagit.lib.soup'] ReType = type(re.compile('')) class Instruction(namedtuple('Instruction', 'cmd args kws line lineno')): ''' ``Instruction``'s take the form:: command [arg [arg ...]] [key=arg [key=arg ...]] Where ``arg`` can be one of: single quoted string, double quoted string, digit, True, False, None, or a simple, unquoted string. ''' values_pat = r''' [rj]?'(?:(\'|[^'])*?)' | [r]?"(?:(\"|[^"])*?)" | (\d+) | (True|False|None) | ([^\s,]+) ''' args_re = re.compile( r'''^( (?P<kwd>\w[\w\d-]*)=(?P<val>{0}) | (?P<arg>{0}|([\s,]+)) )\s*'''.format(values_pat), re.VERBOSE ) value_dict = {'True': True, 'False': False, 'None': None} def __str__(self): def _repr(w): if isinstance(w, ReType): return 'r"{}"'.format(str(w.pattern)) return repr(w) return '{}{}{}'.format( self.cmd.upper(), ' {}'.format( ' '.join([_repr(c) for c in self.args]) if self.args else '' ), ' {}'.format(' '.join( '{}={}'.format(k, _repr(v)) for k, v in self.kws.items() ) if self.kws else '') ) @classmethod def get_value(cls, s): if s.isdigit(): return int(s) elif s in cls.value_dict: return cls.value_dict[s] elif s.startswith(('r"', "r'")): return re.compile(utils.escaped(s[2:-1])) elif s.startswith("j'"): return json.loads(utils.escaped(s[2:-1])) elif s.startswith(('"', "'")): return utils.escaped(s[1:-1]) else: return s.strip() @classmethod def parse(cls, line, lineno): args = [] kws = {} cmd, text = strutil.splitter(line, expected=2, strip=True) cmd = cmd.lower() while text: m = cls.args_re.search(text) if not m: break gdict = m.groupdict() kwd = gdict.get('kwd') if kwd: kws[kwd] = cls.get_value(gdict.get('val', '')) else: arg = gdict.get('arg', '').strip() if arg != ',': args.append(cls.get_value(arg)) text = text[len(m.group()):] if text: raise SyntaxError( 'Syntax error: "{}" (line {})'.format(text, lineno) ) return cls(cmd, args, kws, line, lineno) def lexer(code, lineno=0): ''' Takes the script source code, scans it, and lexes it into ``Instructions`` ''' for chars in code.splitlines(): lineno += 1 line = chars.rstrip() if not line or line.lstrip().startswith('#'): continue logger.debug('Lexed {} byte(s) line {}'.format(len(line), chars)) yield Instruction.parse(line, lineno)<|fim▁hole|> def load_libraries(extensions=None): if isinstance(extensions, str): extensions = [extensions] libs = BASE_LIBS + (extensions or []) for lib in libs: importlib.import_module(lib) class Interpreter: def __init__( self, contents=None, loader=None, use_cache=False, do_pm=False, extensions=None ): self.use_cache = use_cache self.loader = loader if loader else Loader(use_cache=use_cache) self.contents = Contents(contents) self.do_debug = False self.do_pm = do_pm self.instructions = [] load_libraries(extensions) def load_sources(self, sources, use_cache=None): use_cache = self.use_cache if use_cache is None else bool(use_cache) contents = self.loader.load_sources(sources) self.contents.update([ ct.decode() if isinstance(ct, bytes) else ct for ct in contents ]) def listing(self, linenos=False): items = [] for instr in self.instructions: items.append('{}{}'.format( '{} '.format(instr.lineno) if linenos else '', instr.line )) return items def lex(self, code): lineno = self.instructions[-1].lineno if self.instructions else 0 instructions = list(lexer(code, lineno)) self.instructions.extend(instructions) return instructions def execute(self, code): for instr in self.lex(code): try: self._execute_instruction(instr) except exceptions.ProgramWarning as why: print(why) return self.contents def _load_handler(self, instr): if instr.cmd in library.registry: func = library.registry[instr.cmd] return self.contents, (func, instr.args, instr.kws) elif instr.cmd in interpreter_library.registry: func = interpreter_library.registry[instr.cmd] return func, (self, instr.args, instr.kws) raise exceptions.ProgramWarning( 'Unknown instruction (line {}): {}'.format(instr.lineno, instr.cmd) ) def _execute_instruction(self, instr): logger.debug('Executing {}'.format(instr.cmd)) handler, args = self._load_handler(instr) do_debug, self.do_debug = self.do_debug, False if do_debug: utils.pdb.set_trace() try: handler(*args) except Exception: exc, value, tb = sys.exc_info() if self.do_pm: logger.error( 'Script exception, line {}: {} (Entering post_mortem)'.format( # noqa instr.lineno, value ) ) utils.pdb.post_mortem(tb) else: raise def execute_script(filename, contents=''): code = utils.read_file(filename) return execute_code(code, contents) def execute_code(code, contents=''): intrep = Interpreter(contents) return str(intrep.execute(code)) class Contents: def __init__(self, contents=None): self.stack = [] self.set_contents(contents) def __iter__(self): return iter(self.contents) def __len__(self): return len(self.contents) def __str__(self): return '\n'.join(str(c) for c in self) # def __getitem__(self, index): # return self.contents[index] def pop(self): if self.stack: self.contents = self.stack.pop() def __call__(self, func, args, kws): contents = [] for data in self: result = func(data, args, kws) contents.append(result) self.update(contents) def merge(self): if self.contents: first = self.contents[0] data = first.merge(self.contents) self.update([data]) def update(self, contents): if self.contents: self.stack.append(self.contents) self.set_contents(contents) def set_contents(self, contents): self.contents = [] if isinstance(contents, (str, bytes)): contents = [contents] contents = contents or [] for ct in contents: if isinstance(ct, (str, bytes)): ct = DataProxy(ct) self.contents.append(ct)<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import unittest<|fim▁hole|>import threading from electrum import constants # Set this locally to make the test suite run faster. # If set, unit tests that would normally test functions with multiple implementations, # will only be run once, using the fastest implementation. # e.g. libsecp256k1 vs python-ecdsa. pycryptodomex vs pyaes. FAST_TESTS = False # some unit tests are modifying globals; sorry. class SequentialTestCase(unittest.TestCase): test_lock = threading.Lock() def setUp(self): super().setUp() self.test_lock.acquire() def tearDown(self): super().tearDown() self.test_lock.release() class TestCaseForTestnet(SequentialTestCase): @classmethod def setUpClass(cls): super().setUpClass() constants.set_testnet() @classmethod def tearDownClass(cls): super().tearDownClass() constants.set_mainnet()<|fim▁end|>
<|file_name|>logtest.py<|end_file_name|><|fim▁begin|>import logging logging.basicConfig(filename='test-logfile.log', level=logging.DEBUG) top = 50 for i in range(top): print(i)<|fim▁hole|><|fim▁end|>
logging.info('Loop completed, reached %s' % top)
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import sys from fabric.api import env, task, local __author__ = 'flat' __version__ = '1.0' env.hosts = ['localhost'] env.colorize_errors = 'True' env.disable_known_hosts = 'True' args = sys.argv[1:] if not args: print("Usage: fab { git | add | commmit | push | pull | status} \n") print("Description:") print("* git: add + commit + push") print("* add: track all files") print("* commit: commit files tracked and write a commment on VI") print("* push: push the code on the GIT server") print("* pull: pull new code from the GIT server") print("* status: check the status of the local repository \n") sys.exit(1) @task def add(): local('/usr/bin/git add -A .') @task def commit(): local('/usr/bin/git commit') @task def push(): local('/usr/bin/git push') @task def pull(): local('/usr/bin/git pull') @task def status(): local('/usr/bin/git status') @task def git():<|fim▁hole|> commit() push()<|fim▁end|>
add()
<|file_name|>background.go<|end_file_name|><|fim▁begin|>package hugot import "context" // BackgroundHandler gets run when the bot starts listening. They are // intended for publishing messages that are not in response to any // specific incoming message. type BackgroundHandler interface { Describer StartBackground(ctx context.Context, w ResponseWriter) } type baseBackgroundHandler struct { name string desc string bhf BackgroundFunc } // BackgroundFunc describes the calling convention for Background handlers type BackgroundFunc func(ctx context.Context, w ResponseWriter) // NewBackgroundHandler wraps f up as a BackgroundHandler with the name and<|fim▁hole|> return &baseBackgroundHandler{ name: name, desc: desc, bhf: f, } } func (bbh *baseBackgroundHandler) Describe() (string, string) { return bbh.name, bbh.desc } func (bbh *baseBackgroundHandler) StartBackground(ctx context.Context, w ResponseWriter) { bbh.bhf(ctx, w) }<|fim▁end|>
// description provided. func NewBackgroundHandler(name, desc string, f BackgroundFunc) BackgroundHandler {
<|file_name|>compiler.py<|end_file_name|><|fim▁begin|>from django.db.backends.mysql.compiler import SQLCompiler as BaseSQLCompiler from django.db.backends.mysql.compiler import SQLInsertCompiler, \ SQLDeleteCompiler, SQLUpdateCompiler, SQLAggregateCompiler, \ SQLDateCompiler, SQLDateTimeCompiler class SQLCompiler(BaseSQLCompiler): STRAIGHT_INNER = 'STRAIGHT_JOIN' def get_ordering(self): """ Returns a tuple containing a list representing the SQL elements in the "order by" clause, and the list of SQL elements that need to be added to the GROUP BY clause as a result of the ordering. Also sets the ordering_aliases attribute on this instance to a list of extra aliases needed in the select. Determining the ordering SQL can change the tables we need to include, so this should be run *before* get_from_clause(). The method is overrided to save the result to reuse it in get_from_clause(). """ # We might want to notify people to not order by columns from different # tables as there is no index across tables. They may create proxy # model to do filtering with subquery. result, params, group_by = super(SQLCompiler, self).get_ordering() self.__ordering_group_by = group_by return result, params, group_by def get_from_clause(self): """ Returns a list of strings that are joined together to go after the "FROM" part of the query, as well as a list any extra parameters that need to be included. Sub-classes, can override this to create a from-clause via a "select". <|fim▁hole|> might change the tables we need. This means the select columns, ordering and distinct must be done first. Patch query with STRAIGHT_JOIN if there is ordering and all joins in query are INNER joins. """ straight_join_patch_applied = False if self.__ordering_group_by \ and len(self.query.tables) > 1 \ and all(join_info.join_type is None \ or join_info.join_type == self.query.INNER for join_info in self.query.alias_map.itervalues()): # Get ordering table name from get_ordering() # XXX: let's pretend that we believe in luck! :) ordering_table = self.__ordering_group_by[0][0].split('.', 1)[0][1:-1] # Save query tables and alias mapping to patch and restore them. query_tables = _query_tables = self.query.tables query_alias_map = self.query.alias_map _query_alias_map = query_alias_map.copy() try: ordering_table_index = query_tables.index(ordering_table) except ValueError: # Is this possible? Fallback without patching pass else: # STRAIGHT_JOIN forces MySQL read from the first table in # a query, thus we must be sure that the first table is that # we apply ordering to. if ordering_table_index > 0: _first_table = query_tables[0] # Move ordering table to the begining _query_tables = [ordering_table] \ + [table for table in query_tables if table != ordering_table] _ordering_join_info = _query_alias_map[ordering_table] # Fix JoinInfo # XXX: It's unsufficient, it recreates objects. _query_alias_map[_first_table] = _query_alias_map[_first_table]\ ._replace( join_type=self.STRAIGHT_INNER, join_cols=[join_cols[::-1] for join_cols in _ordering_join_info.join_cols], join_field=_ordering_join_info.join_field, lhs_alias=ordering_table ) _query_alias_map[ordering_table] = _ordering_join_info._replace( join_type=None, join_cols=((None, None), ), join_field=None, lhs_alias=None ) # Replace INNER joins with STRAIGHT joins # XXX: It's unsufficient, it recreates objects. for table in _query_tables[1:]: _query_alias_map[table] = _query_alias_map[table]\ ._replace(join_type=self.STRAIGHT_INNER) # Patch query self.query.tables = _query_tables self.query.alias_map = _query_alias_map straight_join_patch_applied = True result, from_params = super(SQLCompiler, self).get_from_clause() # Restore patched query if patched if straight_join_patch_applied: self.query.tables = query_tables if ordering_table_index > 0: self.query.alias_map = query_alias_map return result, from_params<|fim▁end|>
This should only be called after any SQL construction methods that
<|file_name|>2.10_conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed # automatically). # # All configuration values have a default value; values that are commented out # serve to show the default value. from __future__ import (absolute_import, division, print_function) __metaclass__ = type import sys import os # pip install sphinx_rtd_theme # import sphinx_rtd_theme # html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. # sys.path.append(os.path.abspath('some/directory')) # sys.path.insert(0, os.path.join('ansible', 'lib')) sys.path.append(os.path.abspath(os.path.join('..', '_extensions'))) # We want sphinx to document the ansible modules contained in this repository, # not those that may happen to be installed in the version # of Python used to run sphinx. When sphinx loads in order to document, # the repository version needs to be the one that is loaded: sys.path.insert(0, os.path.abspath(os.path.join('..', '..', '..', 'lib'))) VERSION = '2.10' AUTHOR = 'Ansible, Inc' # General configuration # --------------------- # Add any Sphinx extension module names here, as strings. # They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # TEST: 'sphinxcontrib.fulltoc' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'pygments_lexer', 'notfound.extension'] # Later on, add 'sphinx.ext.viewcode' to the list if you want to have # colorized code generated too for references. # Add any paths that contain templates here, relative to this directory. templates_path = ['.templates'] # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General substitutions. project = 'Ansible' copyright = "2021 Red Hat, Inc." # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # # The short X.Y version. version = VERSION # The full version, including alpha/beta/rc tags. release = VERSION # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. # unused_docs = [] # List of directories, relative to source directories, that shouldn't be # searched for source files. # exclude_dirs = [] # A list of glob-style patterns that should be excluded when looking # for source files. exclude_patterns = [ '2.10_index.rst', 'ansible_index.rst', 'core_index.rst', 'porting_guides/core_porting_guides', ] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' highlight_language = 'YAML+Jinja' # Substitutions, variables, entities, & shortcuts for text which do not need to link to anything. # For titles which should be a link, use the intersphinx anchors set at the index, chapter, and section levels, such as qi_start_: # |br| is useful for formatting fields inside of tables # |_| is a nonbreaking space; similarly useful inside of tables rst_epilog = """ .. |br| raw:: html <br> .. |_| unicode:: 0xA0 :trim: """ # Options for HTML output # ----------------------- html_theme_path = ['../_themes'] html_theme = 'sphinx_rtd_theme' html_short_title = 'Ansible Documentation' html_show_sphinx = False html_theme_options = { 'canonical_url': "https://docs.ansible.com/ansible/latest/", 'vcs_pageview_mode': 'edit' } html_context = { 'display_github': 'True', 'github_user': 'ansible', 'github_repo': 'ansible',<|fim▁hole|> 'github_module_version': 'devel/lib/ansible/modules/', 'github_root_dir': 'devel/lib/ansible', 'github_cli_version': 'devel/lib/ansible/cli/', 'current_version': version, 'latest_version': '2.10', # list specifically out of order to make latest work 'available_versions': ('latest', '2.9', '2.9_ja', '2.8', 'devel'), 'css_files': ('_static/ansible.css', # overrides to the standard theme ), } # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. # html_style = 'solar.css' # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". html_title = 'Ansible Documentation' # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (within the static path) to place at the top of # the sidebar. # html_logo = # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = 'favicon.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['../_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_use_modindex = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, the reST sources are included in the HTML build as _sources/<name>. html_copy_source = False # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = 'https://docs.ansible.com/ansible/latest' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'Poseidodoc' # Configuration for sphinx-notfound-pages # with no 'notfound_template' and no 'notfound_context' set, # the extension builds 404.rst into a location-agnostic 404 page # # default is `en` - using this for the sub-site: notfound_default_language = "ansible" # default is `latest`: # setting explicitly - docsite serves up /ansible/latest/404.html # so keep this set to `latest` even on the `devel` branch # then no maintenance is needed when we branch a new stable_x.x notfound_default_version = "latest" # makes default setting explicit: notfound_no_urls_prefix = False # Options for LaTeX output # ------------------------ # The paper size ('letter' or 'a4'). # latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). # latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class # [howto/manual]). latex_documents = [ ('index', 'ansible.tex', 'Ansible 2.2 Documentation', AUTHOR, 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # Additional stuff for the LaTeX preamble. # latex_preamble = '' # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_use_modindex = True autoclass_content = 'both' # Note: Our strategy for intersphinx mappings is to have the upstream build location as the # canonical source and then cached copies of the mapping stored locally in case someone is building # when disconnected from the internet. We then have a script to update the cached copies. # # Because of that, each entry in this mapping should have this format: # name: ('http://UPSTREAM_URL', (None, 'path/to/local/cache.inv')) # # The update script depends on this format so deviating from this (for instance, adding a third # location for the mappning to live) will confuse it. intersphinx_mapping = {'python': ('https://docs.python.org/2/', (None, '../python2.inv')), 'python3': ('https://docs.python.org/3/', (None, '../python3.inv')), 'jinja2': ('http://jinja.palletsprojects.com/', (None, '../jinja2.inv')), 'ansible_2_10': ('https://docs.ansible.com/ansible/2.10/', (None, '../ansible_2_10.inv')), 'ansible_2_9': ('https://docs.ansible.com/ansible/2.9/', (None, '../ansible_2_9.inv')), 'ansible_2_8': ('https://docs.ansible.com/ansible/2.8/', (None, '../ansible_2_8.inv')), 'ansible_2_7': ('https://docs.ansible.com/ansible/2.7/', (None, '../ansible_2_7.inv')), 'ansible_2_6': ('https://docs.ansible.com/ansible/2.6/', (None, '../ansible_2_6.inv')), 'ansible_2_5': ('https://docs.ansible.com/ansible/2.5/', (None, '../ansible_2_5.inv')), } # linckchecker settings linkcheck_ignore = [ r'http://irc\.freenode\.net', ] linkcheck_workers = 25 # linkcheck_anchors = False<|fim▁end|>
'github_version': 'devel/docs/docsite/rst/',
<|file_name|>infinite-tag-type-recursion.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license<|fim▁hole|>enum mlist { cons(isize, mlist), nil, } //~^ ERROR recursive type `mlist` has infinite size fn main() { let a = mlist::cons(10, mlist::cons(11, mlist::nil)); }<|fim▁end|>
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/** * configuration for grunt tasks * @module Gruntfile */ module.exports = function(grunt) { /** load tasks */ require('load-grunt-tasks')(grunt); /** config for build paths */ var config = { dist: {<|fim▁hole|> StoreFactory: 'dist/StoreFactory.js', ngStoreFactory: 'dist/ngStore.js' }, src: { dir: 'src/' }, tmp: { dir: 'tmp/' } }; /** paths to files */ var files = { /** src files */ Factory: [ 'StoreFactory.js' ], /** src files */ Store: [ 'Store.js' ], }; /* # # # # # # # # # # # # # # # # # # # # */ /* # # # # # # # # # # # # # # # # # # # # */ /* # # # # # # # # # # # # # # # # # # # # */ /* # # # # # # # # # # # # # # # # # # # # */ /** config for grunt tasks */ var taskConfig = { /** concatentation tasks for building the source files */ concat: { StoreFactory: { options: { // stripBanners: true banner: '', footer: '', }, src: (function() { var cwd = config.src.dir, queue = [].concat(files.Factory, files.Store); return queue.map(function(path) { return cwd + path; }); })(), dest: config.dist.StoreFactory, }, ngSession: { options: { banner: 'angular.module("ngStore", [])\n' + '.service("ngStore", [\n' + 'function() {\n\n', footer: '\n\n' + 'return new StoreFactory();\n\n}' + '\n]);' }, src: (function() { return [ config.dist.StoreFactory, ]; })(), dest: config.dist.ngStoreFactory } }, /** uglify (javascript minification) config */ uglify: { StoreFactory: { options: {}, files: [ { src: config.dist.StoreFactory, dest: (function() { var split = config.dist.StoreFactory.split('.'); split.pop(); // removes `js` extension split.push('min'); // adds `min` extension split.push('js'); // adds `js` extension return split.join('.'); })() } ] }, ngStoreFactory: { options: {}, files: [ { src: config.dist.ngStoreFactory, dest: (function() { var split = config.dist.ngStoreFactory.split('.'); split.pop(); // removes `js` extension split.push('min'); // adds `min` extension split.push('js'); // adds `js` extension return split.join('.'); })() } ] } } }; /* # # # # # # # # # # # # # # # # # # # # */ /* # # # # # # # # # # # # # # # # # # # # */ /* # # # # # # # # # # # # # # # # # # # # */ /* # # # # # # # # # # # # # # # # # # # # */ // register default & custom tasks grunt.initConfig(taskConfig); grunt.registerTask('default', [ 'build' ]); grunt.registerTask('build', [ 'concat', 'uglify' ]); };<|fim▁end|>
dir: 'dist/',
<|file_name|>Polygon.py<|end_file_name|><|fim▁begin|># CS4243: Computer Vision and Pattern Recognition # Zhou Bin # 29th, Oct, 2014 import numpy as np from Vertex import Vertex class Polygon: def __init__(self, newVertexList, newTexelList): # Create list to store all vertex self.Vertex = [] for i in newVertexList: self.Vertex.append(i) <|fim▁hole|> for i in newTexelList: self.Texel.append(i)<|fim▁end|>
# Create list to store all texel value self.Texel = []
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/* ======================================================================== * Bootstrap: alert.js v3.0.3 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ +function($) { "use strict"; // TOOLTIP PUBLIC CLASS DEFINITION // =============================== var Tooltip = function(element, options) { this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null this.init('tooltip', element, options) } Tooltip.DEFAULTS = { animation: true , placement: 'top' , selector: false , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' , trigger: 'hover focus' , title: '' , delay: 0 , html: false , container: false } Tooltip.prototype.init = function(type, element, options) { this.enabled = true this.type = type this.$element = $(element) this.options = this.getOptions(options) var triggers = this.options.trigger.split(' ') for (var i = triggers.length; i--; ) { var trigger = triggers[i] if (trigger == 'click') { this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) } else if (trigger != 'manual') { var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) } } this.options.selector ? (this._options = $.extend({}, this.options, {trigger: 'manual', selector: ''})) : this.fixTitle() } Tooltip.prototype.getDefaults = function() { return Tooltip.DEFAULTS } Tooltip.prototype.getOptions = function(options) { options = $.extend({}, this.getDefaults(), this.$element.data(), options) if (options.delay && typeof options.delay == 'number') { options.delay = { show: options.delay , hide: options.delay } } return options } Tooltip.prototype.getDelegateOptions = function() { var options = {} var defaults = this.getDefaults() this._options && $.each(this._options, function(key, value) { if (defaults[key] != value) options[key] = value }) return options } Tooltip.prototype.enter = function(obj) { var self = obj instanceof this.constructor ? obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) clearTimeout(self.timeout) self.hoverState = 'in' if (!self.options.delay || !self.options.delay.show) return self.show() self.timeout = setTimeout(function() { if (self.hoverState == 'in') self.show() }, self.options.delay.show) } Tooltip.prototype.leave = function(obj) { var self = obj instanceof this.constructor ? obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) clearTimeout(self.timeout) self.hoverState = 'out' if (!self.options.delay || !self.options.delay.hide) return self.hide() self.timeout = setTimeout(function() { if (self.hoverState == 'out') self.hide() }, self.options.delay.hide) } Tooltip.prototype.show = function() { var e = $.Event('show.bs.' + this.type) if (this.hasContent() && this.enabled) { this.$element.trigger(e) if (e.isDefaultPrevented()) return var $tip = this.tip() this.setContent() if (this.options.animation) $tip.addClass('fade') var placement = typeof this.options.placement == 'function' ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement var autoToken = /\s?auto?\s?/i var autoPlace = autoToken.test(placement) if (autoPlace) placement = placement.replace(autoToken, '') || 'top' $tip .detach() .css({top: 0, left: 0, display: 'block'}) .addClass(placement) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) var pos = this.getPosition() var actualWidth = $tip[0].offsetWidth var actualHeight = $tip[0].offsetHeight if (autoPlace) { var $parent = this.$element.parent() var orgPlacement = placement var docScroll = document.documentElement.scrollTop || document.body.scrollTop var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' : placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' : placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' : placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' : placement $tip .removeClass(orgPlacement) .addClass(placement) } var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) this.applyPlacement(calculatedOffset, placement) this.$element.trigger('shown.bs.' + this.type) } } Tooltip.prototype.applyPlacement = function(offset, placement) { var replace var $tip = this.tip() var width = $tip[0].offsetWidth var height = $tip[0].offsetHeight // manually read margins because getBoundingClientRect includes difference var marginTop = parseInt($tip.css('margin-top'), 10) var marginLeft = parseInt($tip.css('margin-left'), 10) // we must check for NaN for ie 8/9 if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginLeft)) marginLeft = 0 offset.top = offset.top + marginTop offset.left = offset.left + marginLeft $tip .offset(offset) .addClass('in') // check to see if placing tip in new offset caused the tip to resize itself var actualWidth = $tip[0].offsetWidth var actualHeight = $tip[0].offsetHeight if (placement == 'top' && actualHeight != height) { replace = true offset.top = offset.top + height - actualHeight } if (/bottom|top/.test(placement)) { var delta = 0 if (offset.left < 0) { delta = offset.left * -2 offset.left = 0 $tip.offset(offset) actualWidth = $tip[0].offsetWidth actualHeight = $tip[0].offsetHeight } this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') } else { this.replaceArrow(actualHeight - height, actualHeight, 'top') } if (replace) $tip.offset(offset) } Tooltip.prototype.replaceArrow = function(delta, dimension, position) { this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') } Tooltip.prototype.setContent = function() { var $tip = this.tip() var title = this.getTitle() $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) $tip.removeClass('fade in top bottom left right') } Tooltip.prototype.hide = function() { var that = this var $tip = this.tip() var e = $.Event('hide.bs.' + this.type) function complete() { if (that.hoverState != 'in') $tip.detach() } this.$element.trigger(e) if (e.isDefaultPrevented()) return $tip.removeClass('in') $.support.transition && this.$tip.hasClass('fade') ? $tip .one($.support.transition.end, complete) .emulateTransitionEnd(150) : complete() this.$element.trigger('hidden.bs.' + this.type) return this } Tooltip.prototype.fixTitle = function() { var $e = this.$element if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') } } Tooltip.prototype.hasContent = function() { return this.getTitle() } Tooltip.prototype.getPosition = function() { var el = this.$element[0] return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { width: el.offsetWidth , height: el.offsetHeight }, this.$element.offset()) } Tooltip.prototype.getCalculatedOffset = function(placement, pos, actualWidth, actualHeight) { return placement == 'bottom' ? {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} : placement == 'top' ? {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} : placement == 'left' ? {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} : /* placement == 'right' */ {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} } Tooltip.prototype.getTitle = function() { var title var $e = this.$element var o = this.options title = $e.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) return title } Tooltip.prototype.tip = function() { return this.$tip = this.$tip || $(this.options.template) } Tooltip.prototype.arrow = function() { return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow') } Tooltip.prototype.validate = function() { if (!this.$element[0].parentNode) { this.hide() this.$element = null this.options = null } } Tooltip.prototype.enable = function() { this.enabled = true } Tooltip.prototype.disable = function() { this.enabled = false } Tooltip.prototype.toggleEnabled = function() { this.enabled = !this.enabled } Tooltip.prototype.toggle = function(e) { var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this self.tip().hasClass('in') ? self.leave(self) : self.enter(self) } Tooltip.prototype.destroy = function() { this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) } // TOOLTIP PLUGIN DEFINITION // ========================= var old = $.fn.tooltip $.fn.tooltip = function(option) { return this.each(function() { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) } $.fn.tooltip.Constructor = Tooltip // TOOLTIP NO CONFLICT // =================== $.fn.tooltip.noConflict = function() { $.fn.tooltip = old return this } // ALERT CLASS DEFINITION // ====================== var dismiss = '[data-dismiss="alert"]' var Alert = function(el) { $(el).on('click', dismiss, this.close) } Alert.prototype.close = function(e) { var $this = $(this) var selector = $this.attr('data-target') if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } var $parent = $(selector) if (e) e.preventDefault() if (!$parent.length) { $parent = $this.hasClass('alert') ? $this : $this.parent() } $parent.trigger(e = $.Event('close.bs.alert')) if (e.isDefaultPrevented()) return $parent.removeClass('in') function removeElement() { $parent.trigger('closed.bs.alert').remove() } $.support.transition && $parent.hasClass('fade') ? $parent .one($.support.transition.end, removeElement) .emulateTransitionEnd(150) : removeElement() } // ALERT PLUGIN DEFINITION // ======================= var old = $.fn.alert $.fn.alert = function(option) { return this.each(function() { var $this = $(this) var data = $this.data('bs.alert') if (!data) $this.data('bs.alert', (data = new Alert(this))) if (typeof option == 'string') data[option].call($this) }) } $.fn.alert.Constructor = Alert // ALERT NO CONFLICT // ================= $.fn.alert.noConflict = function() { $.fn.alert = old return this } // ALERT DATA-API // ============== $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) }(jQuery); /* ======================================================================== * Bootstrap: tab.js v3.0.3 * http://getbootstrap.com/javascript/#tabs * ======================================================================== * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ +function($) { "use strict"; // TAB CLASS DEFINITION // ==================== var Tab = function(element) { this.element = $(element) } Tab.prototype.show = function() { var $this = this.element var $ul = $this.closest('ul:not(.dropdown-menu)') var selector = $this.data('target') if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } if ($this.parent('li').hasClass('active')) return var previous = $ul.find('.active:last a')[0] var e = $.Event('show.bs.tab', { relatedTarget: previous }) $this.trigger(e) if (e.isDefaultPrevented()) return var $target = $(selector) this.activate($this.parent('li'), $ul) this.activate($target, $target.parent(), function() { $this.trigger({ type: 'shown.bs.tab' , relatedTarget: previous }) }) } Tab.prototype.activate = function(element, container, callback) { var $active = container.find('> .active') var transition = callback && $.support.transition && $active.hasClass('fade') function next() { $active .removeClass('active') .find('> .dropdown-menu > .active') .removeClass('active') element.addClass('active') if (transition) { element[0].offsetWidth // reflow for transition element.addClass('in') } else { element.removeClass('fade') } if (element.parent('.dropdown-menu')) { element.closest('li.dropdown').addClass('active') } callback && callback() } transition ? $active .one($.support.transition.end, next) .emulateTransitionEnd(150) : next() $active.removeClass('in') } // TAB PLUGIN DEFINITION // ===================== var old = $.fn.tab $.fn.tab = function(option) { return this.each(function() { var $this = $(this) var data = $this.data('bs.tab') if (!data) $this.data('bs.tab', (data = new Tab(this))) if (typeof option == 'string') data[option]() }) } $.fn.tab.Constructor = Tab // TAB NO CONFLICT // =============== $.fn.tab.noConflict = function() { $.fn.tab = old return this } // TAB DATA-API // ============ $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function(e) { e.preventDefault() $(this).tab('show') }) }(jQuery); /* ======================================================================== * Bootstrap: affix.js v3.0.3 * http://getbootstrap.com/javascript/#affix * ======================================================================== * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ +function($) { "use strict"; // AFFIX CLASS DEFINITION // ====================== var Affix = function(element, options) { this.options = $.extend({}, Affix.DEFAULTS, options) this.$window = $(window) .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) this.$element = $(element) this.affixed = this.unpin = null this.checkPosition() } Affix.RESET = 'affix affix-top affix-bottom' Affix.DEFAULTS = { offset: 0 } Affix.prototype.checkPositionWithEventLoop = function() { setTimeout($.proxy(this.checkPosition, this), 1) } Affix.prototype.checkPosition = function() { if (!this.$element.is(':visible')) return var scrollHeight = $(document).height() var scrollTop = this.$window.scrollTop() var position = this.$element.offset() var offset = this.options.offset var offsetTop = offset.top var offsetBottom = offset.bottom if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offsetTop == 'function') offsetTop = offset.top() if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false if (this.affixed === affix) return if (this.unpin) this.$element.css('top', '') this.affixed = affix this.unpin = affix == 'bottom' ? position.top - scrollTop : null this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : '')) if (affix == 'bottom') { this.$element.offset({top: document.body.offsetHeight - offsetBottom - this.$element.height()}) } } // AFFIX PLUGIN DEFINITION // ======================= var old = $.fn.affix $.fn.affix = function(option) { return this.each(function() { var $this = $(this) var data = $this.data('bs.affix') var options = typeof option == 'object' && option if (!data) $this.data('bs.affix', (data = new Affix(this, options))) if (typeof option == 'string') data[option]() }) } $.fn.affix.Constructor = Affix // AFFIX NO CONFLICT // ================= $.fn.affix.noConflict = function() { $.fn.affix = old return this } // AFFIX DATA-API // ============== $(window).on('load', function() { $('[data-spy="affix"]').each(function() { var $spy = $(this) var data = $spy.data() data.offset = data.offset || {} if (data.offsetBottom) data.offset.bottom = data.offsetBottom if (data.offsetTop) data.offset.top = data.offsetTop $spy.affix(data) }) }) }(jQuery); /* ======================================================================== * Bootstrap: collapse.js v3.0.3 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ +function($) { "use strict"; // COLLAPSE PUBLIC CLASS DEFINITION // ================================ var Collapse = function(element, options) { this.$element = $(element) this.options = $.extend({}, Collapse.DEFAULTS, options) this.transitioning = null if (this.options.parent) this.$parent = $(this.options.parent) if (this.options.toggle) this.toggle() } Collapse.DEFAULTS = { toggle: true } Collapse.prototype.dimension = function() { var hasWidth = this.$element.hasClass('width') return hasWidth ? 'width' : 'height' } Collapse.prototype.show = function() { if (this.transitioning || this.$element.hasClass('in')) return var startEvent = $.Event('show.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return var actives = this.$parent && this.$parent.find('> .panel > .in') if (actives && actives.length) { var hasData = actives.data('bs.collapse') if (hasData && hasData.transitioning) return actives.collapse('hide') hasData || actives.data('bs.collapse', null) } var dimension = this.dimension() this.$element .removeClass('collapse') .addClass('collapsing') [dimension](0) this.transitioning = 1 var complete = function() { this.$element .removeClass('collapsing') .addClass('in') [dimension]('auto') this.transitioning = 0 this.$element.trigger('shown.bs.collapse') } if (!$.support.transition) return complete.call(this) var scrollSize = $.camelCase(['scroll', dimension].join('-')) this.$element .one($.support.transition.end, $.proxy(complete, this)) .emulateTransitionEnd(350) [dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide = function() { if (this.transitioning || !this.$element.hasClass('in')) return var startEvent = $.Event('hide.bs.collapse') this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return var dimension = this.dimension() this.$element [dimension](this.$element[dimension]()) [0].offsetHeight<|fim▁hole|> this.$element .addClass('collapsing') .removeClass('collapse') .removeClass('in') this.transitioning = 1 var complete = function() { this.transitioning = 0 this.$element .trigger('hidden.bs.collapse') .removeClass('collapsing') .addClass('collapse') } if (!$.support.transition) return complete.call(this) this.$element [dimension](0) .one($.support.transition.end, $.proxy(complete, this)) .emulateTransitionEnd(350) } Collapse.prototype.toggle = function() { this[this.$element.hasClass('in') ? 'hide' : 'show']() } // COLLAPSE PLUGIN DEFINITION // ========================== var old = $.fn.collapse $.fn.collapse = function(option) { return this.each(function() { var $this = $(this) var data = $this.data('bs.collapse') var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) } $.fn.collapse.Constructor = Collapse // COLLAPSE NO CONFLICT // ==================== $.fn.collapse.noConflict = function() { $.fn.collapse = old return this } // COLLAPSE DATA-API // ================= $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function(e) { var $this = $(this), href var target = $this.attr('data-target') || e.preventDefault() || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 var $target = $(target) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() var parent = $this.attr('data-parent') var $parent = parent && $(parent) if (!data || !data.transitioning) { if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') } $target.collapse(option) }) }(jQuery); /* ======================================================================== * Bootstrap: scrollspy.js v3.0.3 * http://getbootstrap.com/javascript/#scrollspy * ======================================================================== * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ +function($) { "use strict"; // SCROLLSPY CLASS DEFINITION // ========================== function ScrollSpy(element, options) { var href var process = $.proxy(this.process, this) this.$element = $(element).is('body') ? $(window) : $(element) this.$body = $('body') this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process) this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.selector = (this.options.target || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 || '') + ' .nav li > a' this.offsets = $([]) this.targets = $([]) this.activeTarget = null this.refresh() this.process() } ScrollSpy.DEFAULTS = { offset: 10 } ScrollSpy.prototype.refresh = function() { var offsetMethod = this.$element[0] == window ? 'offset' : 'position' this.offsets = $([]) this.targets = $([]) var self = this var $targets = this.$body .find(this.selector) .map(function() { var $el = $(this) var href = $el.data('target') || $el.attr('href') var $href = /^#\w/.test(href) && $(href) return ($href && $href.length && [[$href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href]]) || null }) .sort(function(a, b) { return a[0] - b[0] }) .each(function() { self.offsets.push(this[0]) self.targets.push(this[1]) }) } ScrollSpy.prototype.process = function() { var scrollTop = this.$scrollElement.scrollTop() + this.options.offset var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight var maxScroll = scrollHeight - this.$scrollElement.height() var offsets = this.offsets var targets = this.targets var activeTarget = this.activeTarget var i if (scrollTop >= maxScroll) { return activeTarget != (i = targets.last()[0]) && this.activate(i) } for (i = offsets.length; i--; ) { activeTarget != targets[i] && scrollTop >= offsets[i] && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) && this.activate(targets[i]) } } ScrollSpy.prototype.activate = function(target) { this.activeTarget = target $(this.selector) .parents('.active') .removeClass('active') var selector = this.selector + '[data-target="' + target + '"],' + this.selector + '[href="' + target + '"]' var active = $(selector) .parents('li') .addClass('active') if (active.parent('.dropdown-menu').length) { active = active .closest('li.dropdown') .addClass('active') } active.trigger('activate.bs.scrollspy') } // SCROLLSPY PLUGIN DEFINITION // =========================== var old = $.fn.scrollspy $.fn.scrollspy = function(option) { return this.each(function() { var $this = $(this) var data = $this.data('bs.scrollspy') var options = typeof option == 'object' && option if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) if (typeof option == 'string') data[option]() }) } $.fn.scrollspy.Constructor = ScrollSpy // SCROLLSPY NO CONFLICT // ===================== $.fn.scrollspy.noConflict = function() { $.fn.scrollspy = old return this } // SCROLLSPY DATA-API // ================== $(window).on('load', function() { $('[data-spy="scroll"]').each(function() { var $spy = $(this) $spy.scrollspy($spy.data()) }) }) }(jQuery); /* ======================================================================== * Bootstrap: transition.js v3.0.3 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ +function($) { "use strict"; // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) // ============================================================ function transitionEnd() { var el = document.createElement('bootstrap') var transEndEventNames = { 'WebkitTransition': 'webkitTransitionEnd' , 'MozTransition': 'transitionend' , 'OTransition': 'oTransitionEnd otransitionend' , 'transition': 'transitionend' } for (var name in transEndEventNames) { if (el.style[name] !== undefined) { return {end: transEndEventNames[name]} } } } // http://blog.alexmaccaw.com/css-transitions $.fn.emulateTransitionEnd = function(duration) { var called = false, $el = this $(this).one($.support.transition.end, function() { called = true }) var callback = function() { if (!called) $($el).trigger($.support.transition.end) } setTimeout(callback, duration) return this } $(function() { $.support.transition = transitionEnd() }) }(jQuery);<|fim▁end|>
<|file_name|>signal.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 use libc::c_int; pub use vmm_sys_util::signal::*; extern "C" { fn __libc_current_sigrtmin() -> c_int; fn __libc_current_sigrtmax() -> c_int; } pub fn sigrtmin() -> c_int { unsafe { __libc_current_sigrtmin() } } pub fn sigrtmax() -> c_int { unsafe { __libc_current_sigrtmax() } }<|fim▁end|>
<|file_name|>webpack.config.babel.js<|end_file_name|><|fim▁begin|>/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import path from 'path'; import webpack from 'webpack'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; export default { context: __dirname, entry: './index.jsx', output: { path: `${__dirname}/__dev__`, publicPath: '/', filename: 'bundle.js', }, module: { loaders: [ { test: /\.(jpe?g|png|gif|svg)$/i, loaders: [ 'file?hash=sha512&digest=hex&name=[hash].[ext]', 'image-webpack?bypassOnDebug&optimizationLevel=7&interlaced=false' ] }, { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader' }, { test: /\.json$/, loader: 'json-loader' }, { test: /\.scss$/, loaders: [<|fim▁hole|> 'style-loader', 'css-loader', 'sass-loader?includePaths[]=' + path.resolve(__dirname, './node_modules/compass-mixins/lib') ]}, ], }, resolve: { extensions: ['.js', '.jsx'], }, plugins: [ new CopyWebpackPlugin([ { from: '404.html' }, { from: 'img', to: 'img' }, { from: 'fonts', to: 'fonts' } ]), new HtmlWebpackPlugin({ template: 'index.template.ejs', inject: 'body' }), ], };<|fim▁end|>
<|file_name|>SocketClient.js<|end_file_name|><|fim▁begin|>//-------------------------------------------------------------------------------------------------- $.SocketClient = $.CT.extend( /*-------------------------------------------------------------------------------------------------- | | -> Конструктор | |-------------------------------------------------------------------------------------------------*/ {private: {constructor: function(id, ws) { this.id = id;// ID соединения this.ws = ws;// Экземпляр соединения }}}, /*-------------------------------------------------------------------------------------------------- | | -> Возвращает UserID | |-------------------------------------------------------------------------------------------------*/ {public: {getUserID: function() { return this.userid; }}}, /*--------------------------------------------------------------------------------------------------<|fim▁hole|>| | -> Задает UserID | |-------------------------------------------------------------------------------------------------*/ {public: {setUserID: function(userid) { this.userid = userid; }}}, /*-------------------------------------------------------------------------------------------------- | | -> Возвращает информацию о юзере | |-------------------------------------------------------------------------------------------------*/ {public: {getData: function() { return this.data; }}}, /*-------------------------------------------------------------------------------------------------- | | -> Задает информацию о юзере | |-------------------------------------------------------------------------------------------------*/ {public: {setData: function(data) { this.data = data; }}}, /*-------------------------------------------------------------------------------------------------- | | -> Отправляет сообщение об ошибке и закрывает соединение | |-------------------------------------------------------------------------------------------------*/ {public: {error: function(error_msg) { // Отправляем сообщение this.send('Error', {'error_msg': error_msg}); // Закрываем соединение this.close(); }}}, /*-------------------------------------------------------------------------------------------------- | | -> Отправляет сообщение | |-------------------------------------------------------------------------------------------------*/ {public: {send: function() { // Создаем запрос var r = []; // Переводим аргументы в массив var args = Array.prototype.slice.call(arguments, 0); // Удаляем первый элемент args.shift(); // Добавляем заголовок r.push(arguments[0]); // Добавляем тело запроса (по умолчанию пустой массив) r.push(args); // Конвертируем в JSON var json = JSON.stringify(r); // Отправляем сообщение try { this.ws.send(json); } catch(e) { } // Записываем в консоль $.SocketConsole['<-'](arguments[0], ($.Socket.isConsole == 'body' ? JSON.stringify(r[1]) : json)); }}}, /*-------------------------------------------------------------------------------------------------- | | -> Закрывает соединение | |-------------------------------------------------------------------------------------------------*/ {public: {close: function() { // Закрываем соединение try { this.ws.close(); } catch(e) { } }}} ); //--------------------------------------------------------------------------------------------------<|fim▁end|>
<|file_name|>login.ts<|end_file_name|><|fim▁begin|>import { Component, View } from 'angular2/core'; import { Router, RouterLink } from 'angular2/router'; import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common'; import { Http, Headers } from 'angular2/http'; import { contentHeaders } from '../common/headers'; let styles = require('./login.css'); let template = require('./login.html'); @Component({ selector: 'login' }) @View({ directives: [RouterLink, CORE_DIRECTIVES, FORM_DIRECTIVES ], template: template, styles: [ styles ] }) export class Login { constructor(public router: Router, public http: Http) { } <|fim▁hole|> this.http.post('http://localhost:8080/kouponify/users/authenticate', body, { headers: contentHeaders }) .subscribe( response => { localStorage.setItem('jwt', response.json().token); this.router.parent.navigateByUrl('/home'); }, error => { console.log(error.text()); } ); } signup(event) { event.preventDefault(); this.router.parent.navigateByUrl('/signup'); } }<|fim▁end|>
login(event, username, password) { let body = JSON.stringify({ username, password });
<|file_name|>boss_the_beast.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the<|fim▁hole|> * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "ScriptMgr.h" #include "blackrock_spire.h" #include "ScriptedCreature.h" enum Spells { SPELL_FLAMEBREAK = 16785, SPELL_IMMOLATE = 20294, SPELL_TERRIFYINGROAR = 14100, }; enum Events { EVENT_FLAME_BREAK = 1, EVENT_IMMOLATE = 2, EVENT_TERRIFYING_ROAR = 3, }; class boss_the_beast : public CreatureScript { public: boss_the_beast() : CreatureScript("boss_the_beast") { } CreatureAI* GetAI(Creature* creature) const override { return GetBlackrockSpireAI<boss_thebeastAI>(creature); } struct boss_thebeastAI : public BossAI { boss_thebeastAI(Creature* creature) : BossAI(creature, DATA_THE_BEAST) { } void Reset() override { _Reset(); } void EnterCombat(Unit* /*who*/) override { _EnterCombat(); events.ScheduleEvent(EVENT_FLAME_BREAK, 12 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_IMMOLATE, 3 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 23 * IN_MILLISECONDS); } void JustDied(Unit* /*killer*/) override { _JustDied(); } void UpdateAI(uint32 diff) override { if (!UpdateVictim()) return; events.Update(diff); if (me->HasUnitState(UNIT_STATE_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_FLAME_BREAK: DoCastVictim(SPELL_FLAMEBREAK); events.ScheduleEvent(EVENT_FLAME_BREAK, 10 * IN_MILLISECONDS); break; case EVENT_IMMOLATE: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(target, SPELL_IMMOLATE); events.ScheduleEvent(EVENT_IMMOLATE, 8 * IN_MILLISECONDS); break; case EVENT_TERRIFYING_ROAR: DoCastVictim(SPELL_TERRIFYINGROAR); events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20 * IN_MILLISECONDS); break; } if (me->HasUnitState(UNIT_STATE_CASTING)) return; } DoMeleeAttackIfReady(); } }; }; void AddSC_boss_thebeast() { new boss_the_beast(); }<|fim▁end|>
* Free Software Foundation; either version 2 of the License, or (at your
<|file_name|>compat.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2013-2017 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import absolute_import import os import re import sys try: import ssl except ImportError: # pragma: no cover ssl = None if sys.version_info[0] < 3: # pragma: no cover from StringIO import StringIO string_types = basestring, text_type = unicode from types import FileType as file_type import __builtin__ as builtins import ConfigParser as configparser from ._backport import shutil from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit from urllib import (urlretrieve, quote as _quote, unquote, url2pathname, pathname2url, ContentTooShortError, splittype) def quote(s): if isinstance(s, unicode): s = s.encode('utf-8') return _quote(s) import urllib2 from urllib2 import (Request, urlopen, URLError, HTTPError, HTTPBasicAuthHandler, HTTPPasswordMgr, HTTPHandler, HTTPRedirectHandler, build_opener) if ssl: from urllib2 import HTTPSHandler import httplib import xmlrpclib import Queue as queue from HTMLParser import HTMLParser import htmlentitydefs raw_input = raw_input from itertools import ifilter as filter from itertools import ifilterfalse as filterfalse _userprog = None def splituser(host): """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.""" global _userprog if _userprog is None: import re _userprog = re.compile('^(.*)@(.*)$') match = _userprog.match(host) if match: return match.group(1, 2) return None, host else: # pragma: no cover from io import StringIO string_types = str, text_type = str from io import TextIOWrapper as file_type import builtins import configparser import shutil from urllib.parse import (urlparse, urlunparse, urljoin, splituser, quote, unquote, urlsplit, urlunsplit, splittype) from urllib.request import (urlopen, urlretrieve, Request, url2pathname, pathname2url, HTTPBasicAuthHandler, HTTPPasswordMgr, HTTPHandler, HTTPRedirectHandler, build_opener) if ssl: from urllib.request import HTTPSHandler from urllib.error import HTTPError, URLError, ContentTooShortError import http.client as httplib import urllib.request as urllib2 import xmlrpc.client as xmlrpclib import queue from html.parser import HTMLParser import html.entities as htmlentitydefs raw_input = input from itertools import filterfalse filter = filter try: from ssl import match_hostname, CertificateError except ImportError: # pragma: no cover class CertificateError(ValueError): pass def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 http://tools.ietf.org/html/rfc6125#section-6.4.3 """ pats = [] if not dn: return False parts = dn.split('.') leftmost, remainder = parts[0], parts[1:] wildcards = leftmost.count('*') if wildcards > max_wildcards: # Issue #17980: avoid denials of service by refusing more # than one wildcard per fragment. A survey of established # policy among SSL implementations showed it to be a # reasonable choice. raise CertificateError( "too many wildcards in certificate DNS name: " + repr(dn)) # speed up common case w/o wildcards if not wildcards: return dn.lower() == hostname.lower() # RFC 6125, section 6.4.3, subitem 1. # The client SHOULD NOT attempt to match a presented identifier in which # the wildcard character comprises a label other than the left-most label. if leftmost == '*': # When '*' is a fragment by itself, it matches a non-empty dotless # fragment. pats.append('[^.]+') elif leftmost.startswith('xn--') or hostname.startswith('xn--'): # RFC 6125, section 6.4.3, subitem 3. # The client SHOULD NOT attempt to match a presented identifier # where the wildcard character is embedded within an A-label or # U-label of an internationalized domain name. pats.append(re.escape(leftmost)) else: # Otherwise, '*' matches any dotless string, e.g. www* pats.append(re.escape(leftmost).replace(r'\*', '[^.]*')) # add the remaining fragments, ignore any wildcards for frag in remainder: pats.append(re.escape(frag)) pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) return pat.match(hostname) def match_hostname(cert, hostname): """Verify that *cert* (in decoded format as returned by SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 and RFC 6125 rules are followed, but IP addresses are not accepted for *hostname*. CertificateError is raised on failure. On success, the function returns nothing. """ if not cert: raise ValueError("empty or no certificate, match_hostname needs a " "SSL socket or SSL context with either " "CERT_OPTIONAL or CERT_REQUIRED") dnsnames = [] san = cert.get('subjectAltName', ()) for key, value in san: if key == 'DNS': if _dnsname_match(value, hostname): return dnsnames.append(value) if not dnsnames: # The subject is only checked when there is no dNSName entry # in subjectAltName for sub in cert.get('subject', ()): for key, value in sub: # XXX according to RFC 2818, the most specific Common Name # must be used. if key == 'commonName': if _dnsname_match(value, hostname): return dnsnames.append(value) if len(dnsnames) > 1: raise CertificateError("hostname %r " "doesn't match either of %s" % (hostname, ', '.join(map(repr, dnsnames)))) elif len(dnsnames) == 1: raise CertificateError("hostname %r " "doesn't match %r" % (hostname, dnsnames[0])) else: raise CertificateError("no appropriate commonName or " "subjectAltName fields were found") try: from types import SimpleNamespace as Container except ImportError: # pragma: no cover class Container(object): """ A generic container for when multiple values need to be returned """ def __init__(self, **kwargs): self.__dict__.update(kwargs) try: from shutil import which except ImportError: # pragma: no cover # Implementation from Python 3.3 def which(cmd, mode=os.F_OK | os.X_OK, path=None): """Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of os.environ.get("PATH"), or can be overridden with a custom search path. """ # Check that a given file can be accessed with the correct mode. # Additionally check that `file` is not a directory, as on Windows # directories pass the os.access check. def _access_check(fn, mode): return (os.path.exists(fn) and os.access(fn, mode) and not os.path.isdir(fn)) # If we're given a path with a directory part, look it up directly rather # than referring to PATH directories. This includes checking relative to the # current directory, e.g. ./script if os.path.dirname(cmd): if _access_check(cmd, mode): return cmd return None if path is None: path = os.environ.get("PATH", os.defpath) if not path: return None path = path.split(os.pathsep) if sys.platform == "win32": # The current directory takes precedence on Windows. if not os.curdir in path: path.insert(0, os.curdir) # PATHEXT is necessary to check on Windows. pathext = os.environ.get("PATHEXT", "").split(os.pathsep) # See if the given file matches any of the expected path extensions. # This will allow us to short circuit when given "python.exe". # If it does match, only test that one, otherwise we have to try # others. if any(cmd.lower().endswith(ext.lower()) for ext in pathext): files = [cmd] else: files = [cmd + ext for ext in pathext] else: # On other platforms you don't have things like PATHEXT to tell you # what file suffixes are executable, so just pass on cmd as-is. files = [cmd] seen = set() for dir in path: normdir = os.path.normcase(dir) if not normdir in seen: seen.add(normdir) for thefile in files: name = os.path.join(dir, thefile) if _access_check(name, mode): return name return None # ZipFile is a context manager in 2.7, but not in 2.6 from zipfile import ZipFile as BaseZipFile if hasattr(BaseZipFile, '__enter__'): # pragma: no cover ZipFile = BaseZipFile else: # pragma: no cover from zipfile import ZipExtFile as BaseZipExtFile class ZipExtFile(BaseZipExtFile): def __init__(self, base): self.__dict__.update(base.__dict__) def __enter__(self): return self def __exit__(self, *exc_info): self.close() # return None, so if an exception occurred, it will propagate class ZipFile(BaseZipFile): def __enter__(self): return self def __exit__(self, *exc_info): self.close() # return None, so if an exception occurred, it will propagate def open(self, *args, **kwargs): base = BaseZipFile.open(self, *args, **kwargs) return ZipExtFile(base) try: from platform import python_implementation except ImportError: # pragma: no cover def python_implementation(): """Return a string identifying the Python implementation.""" if 'PyPy' in sys.version: return 'PyPy' if os.name == 'java': return 'Jython' if sys.version.startswith('IronPython'): return 'IronPython' return 'CPython' try: import sysconfig except ImportError: # pragma: no cover from ._backport import sysconfig try: callable = callable except NameError: # pragma: no cover from collections.abc import Callable def callable(obj): return isinstance(obj, Callable) try: fsencode = os.fsencode fsdecode = os.fsdecode except AttributeError: # pragma: no cover # Issue #99: on some systems (e.g. containerised), # sys.getfilesystemencoding() returns None, and we need a real value, # so fall back to utf-8. From the CPython 2.7 docs relating to Unix and # sys.getfilesystemencoding(): the return value is "the user’s preference # according to the result of nl_langinfo(CODESET), or None if the # nl_langinfo(CODESET) failed." _fsencoding = sys.getfilesystemencoding() or 'utf-8' if _fsencoding == 'mbcs': _fserrors = 'strict' else: _fserrors = 'surrogateescape' def fsencode(filename): if isinstance(filename, bytes): return filename elif isinstance(filename, text_type): return filename.encode(_fsencoding, _fserrors) else: raise TypeError("expect bytes or str, not %s" % type(filename).__name__) def fsdecode(filename): if isinstance(filename, text_type): return filename elif isinstance(filename, bytes): return filename.decode(_fsencoding, _fserrors) else: raise TypeError("expect bytes or str, not %s" % type(filename).__name__) try: from tokenize import detect_encoding except ImportError: # pragma: no cover from codecs import BOM_UTF8, lookup import re cookie_re = re.compile(r"coding[:=]\s*([-\w.]+)") def _get_normal_name(orig_enc): """Imitates get_normal_name in tokenizer.c.""" # Only care about the first 12 characters. enc = orig_enc[:12].lower().replace("_", "-") if enc == "utf-8" or enc.startswith("utf-8-"): return "utf-8" if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \ enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")): return "iso-8859-1" return orig_enc def detect_encoding(readline): """ The detect_encoding() function is used to detect the encoding that should be used to decode a Python source file. It requires one argument, readline, in the same way as the tokenize() generator. It will call readline a maximum of twice, and return the encoding used (as a string) and a list of any lines (left as bytes) it has read in. It detects the encoding from the presence of a utf-8 bom or an encoding cookie as specified in pep-0263. If both a bom and a cookie are present, but disagree, a SyntaxError will be raised. If the encoding cookie is an invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found, 'utf-8-sig' is returned. If no encoding is specified, then the default of 'utf-8' will be returned. """ try: filename = readline.__self__.name except AttributeError: filename = None bom_found = False encoding = None default = 'utf-8' def read_or_stop(): try: return readline() except StopIteration: return b'' def find_cookie(line): try: # Decode as UTF-8. Either the line is an encoding declaration, # in which case it should be pure ASCII, or it must be UTF-8 # per default encoding. line_string = line.decode('utf-8') except UnicodeDecodeError: msg = "invalid or missing encoding declaration" if filename is not None: msg = '{} for {!r}'.format(msg, filename) raise SyntaxError(msg) matches = cookie_re.findall(line_string) if not matches: return None encoding = _get_normal_name(matches[0]) try: codec = lookup(encoding) except LookupError: # This behaviour mimics the Python interpreter if filename is None: msg = "unknown encoding: " + encoding else: msg = "unknown encoding for {!r}: {}".format(filename, encoding) raise SyntaxError(msg) if bom_found: if codec.name != 'utf-8': # This behaviour mimics the Python interpreter if filename is None: msg = 'encoding problem: utf-8' else: msg = 'encoding problem for {!r}: utf-8'.format(filename) raise SyntaxError(msg) encoding += '-sig' return encoding first = read_or_stop() if first.startswith(BOM_UTF8): bom_found = True first = first[3:] default = 'utf-8-sig' if not first: return default, [] encoding = find_cookie(first) if encoding: return encoding, [first] second = read_or_stop() if not second: return default, [first] encoding = find_cookie(second) if encoding: return encoding, [first, second] return default, [first, second] # For converting & <-> &amp; etc. try: from html import escape except ImportError: from cgi import escape if sys.version_info[:2] < (3, 4): unescape = HTMLParser().unescape else: from html import unescape try: from collections import ChainMap except ImportError: # pragma: no cover from collections import MutableMapping try: from reprlib import recursive_repr as _recursive_repr except ImportError: def _recursive_repr(fillvalue='...'): ''' Decorator to make a repr function return fillvalue for a recursive call ''' def decorating_function(user_function): repr_running = set() def wrapper(self): key = id(self), get_ident() if key in repr_running: return fillvalue repr_running.add(key) try: result = user_function(self) finally: repr_running.discard(key) return result # Can't use functools.wraps() here because of bootstrap issues wrapper.__module__ = getattr(user_function, '__module__') wrapper.__doc__ = getattr(user_function, '__doc__') wrapper.__name__ = getattr(user_function, '__name__') wrapper.__annotations__ = getattr(user_function, '__annotations__', {}) return wrapper return decorating_function class ChainMap(MutableMapping): ''' A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. ''' def __init__(self, *maps): '''Initialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. ''' self.maps = list(maps) or [{}] # always at least one map def __missing__(self, key): raise KeyError(key) def __getitem__(self, key): for mapping in self.maps: try: return mapping[key] # can't use 'key in mapping' with defaultdict except KeyError: pass return self.__missing__(key) # support subclasses that define __missing__ def get(self, key, default=None): return self[key] if key in self else default def __len__(self): return len(set().union(*self.maps)) # reuses stored hash values if possible def __iter__(self): return iter(set().union(*self.maps)) def __contains__(self, key): return any(key in m for m in self.maps) def __bool__(self): return any(self.maps) @_recursive_repr() def __repr__(self): return '{0.__class__.__name__}({1})'.format( self, ', '.join(map(repr, self.maps))) @classmethod def fromkeys(cls, iterable, *args): 'Create a ChainMap with a single dict created from the iterable.' return cls(dict.fromkeys(iterable, *args)) def copy(self): 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]' return self.__class__(self.maps[0].copy(), *self.maps[1:]) __copy__ = copy def new_child(self): # like Django's Context.push() 'New ChainMap with a new dict followed by all previous maps.' return self.__class__({}, *self.maps) @property def parents(self): # like Django's Context.pop() 'New ChainMap from maps[1:].' return self.__class__(*self.maps[1:]) def __setitem__(self, key, value): self.maps[0][key] = value def __delitem__(self, key): try: del self.maps[0][key] except KeyError: raise KeyError('Key not found in the first mapping: {!r}'.format(key)) def popitem(self): 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' try: return self.maps[0].popitem() except KeyError: raise KeyError('No keys found in the first mapping.') def pop(self, key, *args): 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].' try: return self.maps[0].pop(key, *args) except KeyError: raise KeyError('Key not found in the first mapping: {!r}'.format(key)) def clear(self): 'Clear maps[0], leaving maps[1:] intact.' self.maps[0].clear() try: from importlib.util import cache_from_source # Python >= 3.4 except ImportError: # pragma: no cover try: from imp import cache_from_source except ImportError: # pragma: no cover def cache_from_source(path, debug_override=None): assert path.endswith('.py') if debug_override is None: debug_override = __debug__ if debug_override: suffix = 'c' else: suffix = 'o' return path + suffix try: from collections import OrderedDict except ImportError: # pragma: no cover ## {{{ http://code.activestate.com/recipes/576693/ (r9) # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. try: from thread import get_ident as _get_ident except ImportError: from dummy_thread import get_ident as _get_ident try: from _abcoll import KeysView, ValuesView, ItemsView except ImportError: pass class OrderedDict(dict): 'Dictionary that remembers insertion order' # An inherited dict maps keys to values. # The inherited dict provides __getitem__, __len__, __contains__, and get. # The remaining methods are order-aware. # Big-O running times for all methods are the same as for regular dictionaries. # The internal self.__map dictionary maps keys to links in a doubly linked list. # The circular doubly linked list starts and ends with a sentinel element. # The sentinel element never gets deleted (this simplifies the algorithm). # Each link is stored as a list of length three: [PREV, NEXT, KEY]. def __init__(self, *args, **kwds): '''Initialize an ordered dictionary. Signature is the same as for regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary. ''' if len(args) > 1: raise TypeError('expected at most 1 arguments, got %d' % len(args)) try: self.__root except AttributeError: self.__root = root = [] # sentinel node root[:] = [root, root, None] self.__map = {} self.__update(*args, **kwds) def __setitem__(self, key, value, dict_setitem=dict.__setitem__): 'od.__setitem__(i, y) <==> od[i]=y' # Setting a new item creates a new link which goes at the end of the linked # list, and the inherited dictionary is updated with the new key/value pair. if key not in self: root = self.__root last = root[0] last[1] = root[0] = self.__map[key] = [last, root, key] dict_setitem(self, key, value) def __delitem__(self, key, dict_delitem=dict.__delitem__): 'od.__delitem__(y) <==> del od[y]' # Deleting an existing item uses self.__map to find the link which is # then removed by updating the links in the predecessor and successor nodes. dict_delitem(self, key) link_prev, link_next, key = self.__map.pop(key) link_prev[1] = link_next link_next[0] = link_prev def __iter__(self): 'od.__iter__() <==> iter(od)' root = self.__root curr = root[1] while curr is not root: yield curr[2] curr = curr[1] def __reversed__(self): 'od.__reversed__() <==> reversed(od)' root = self.__root curr = root[0] while curr is not root: yield curr[2] curr = curr[0] def clear(self): 'od.clear() -> None. Remove all items from od.' try: for node in self.__map.itervalues(): del node[:] root = self.__root root[:] = [root, root, None] self.__map.clear() except AttributeError: pass dict.clear(self) def popitem(self, last=True): '''od.popitem() -> (k, v), return and remove a (key, value) pair. Pairs are returned in LIFO order if last is true or FIFO order if false. ''' if not self: raise KeyError('dictionary is empty') root = self.__root if last: link = root[0] link_prev = link[0] link_prev[1] = root root[0] = link_prev else: link = root[1] link_next = link[1] root[1] = link_next link_next[0] = root key = link[2] del self.__map[key] value = dict.pop(self, key) return key, value # -- the following methods do not depend on the internal structure -- def keys(self): 'od.keys() -> list of keys in od' return list(self) def values(self): 'od.values() -> list of values in od' return [self[key] for key in self] def items(self): 'od.items() -> list of (key, value) pairs in od' return [(key, self[key]) for key in self] def iterkeys(self): 'od.iterkeys() -> an iterator over the keys in od' return iter(self) def itervalues(self): 'od.itervalues -> an iterator over the values in od' for k in self: yield self[k] def iteritems(self): 'od.iteritems -> an iterator over the (key, value) items in od' for k in self: yield (k, self[k]) def update(*args, **kwds): '''od.update(E, **F) -> None. Update od from dict/iterable E and F. If E is a dict instance, does: for k in E: od[k] = E[k] If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] Or if E is an iterable of items, does: for k, v in E: od[k] = v In either case, this is followed by: for k, v in F.items(): od[k] = v ''' if len(args) > 2: raise TypeError('update() takes at most 2 positional ' 'arguments (%d given)' % (len(args),)) elif not args: raise TypeError('update() takes at least 1 argument (0 given)') self = args[0] # Make progressively weaker assumptions about "other" other = () if len(args) == 2: other = args[1] if isinstance(other, dict): for key in other: self[key] = other[key] elif hasattr(other, 'keys'): for key in other.keys(): self[key] = other[key] else: for key, value in other: self[key] = value for key, value in kwds.items(): self[key] = value __update = update # let subclasses override update without breaking __init__ __marker = object() def pop(self, key, default=__marker): '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. ''' if key in self: result = self[key] del self[key] return result if default is self.__marker: raise KeyError(key) return default def setdefault(self, key, default=None): 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od' if key in self: return self[key] self[key] = default return default def __repr__(self, _repr_running=None): 'od.__repr__() <==> repr(od)' if not _repr_running: _repr_running = {} call_key = id(self), _get_ident() if call_key in _repr_running: return '...' _repr_running[call_key] = 1 try: if not self: return '%s()' % (self.__class__.__name__,) return '%s(%r)' % (self.__class__.__name__, self.items()) finally: del _repr_running[call_key] def __reduce__(self): 'Return state information for pickling' items = [[k, self[k]] for k in self] inst_dict = vars(self).copy() for k in vars(OrderedDict()): inst_dict.pop(k, None) if inst_dict: return (self.__class__, (items,), inst_dict) return self.__class__, (items,) def copy(self): 'od.copy() -> a shallow copy of od' return self.__class__(self) @classmethod def fromkeys(cls, iterable, value=None): '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None). ''' d = cls() for key in iterable: d[key] = value return d def __eq__(self, other): '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. ''' if isinstance(other, OrderedDict): return len(self)==len(other) and self.items() == other.items() return dict.__eq__(self, other) def __ne__(self, other): return not self == other # -- the following methods are only used in Python 2.7 -- def viewkeys(self): "od.viewkeys() -> a set-like object providing a view on od's keys" return KeysView(self) def viewvalues(self): "od.viewvalues() -> an object providing a view on od's values" return ValuesView(self) def viewitems(self): "od.viewitems() -> a set-like object providing a view on od's items" return ItemsView(self) try: from logging.config import BaseConfigurator, valid_ident except ImportError: # pragma: no cover IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I) def valid_ident(s): m = IDENTIFIER.match(s) if not m: raise ValueError('Not a valid Python identifier: %r' % s) return True # The ConvertingXXX classes are wrappers around standard Python containers, # and they serve to convert any suitable values in the container. The # conversion converts base dicts, lists and tuples to their wrapped # equivalents, whereas strings which match a conversion format are converted # appropriately. # # Each wrapper should have a configurator attribute holding the actual # configurator to use for conversion. class ConvertingDict(dict): """A converting dictionary wrapper.""" def __getitem__(self, key): value = dict.__getitem__(self, key) result = self.configurator.convert(value) #If the converted value is different, save for next time if value is not result: self[key] = result if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple): result.parent = self result.key = key return result def get(self, key, default=None): value = dict.get(self, key, default) result = self.configurator.convert(value) #If the converted value is different, save for next time if value is not result: self[key] = result if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple): result.parent = self result.key = key return result def pop(self, key, default=None): value = dict.pop(self, key, default) result = self.configurator.convert(value) if value is not result: if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple): result.parent = self result.key = key return result class ConvertingList(list): """A converting list wrapper.""" def __getitem__(self, key): value = list.__getitem__(self, key) result = self.configurator.convert(value) #If the converted value is different, save for next time if value is not result: self[key] = result if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple): result.parent = self result.key = key return result def pop(self, idx=-1): value = list.pop(self, idx) result = self.configurator.convert(value) if value is not result: if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple): result.parent = self return result class ConvertingTuple(tuple): """A converting tuple wrapper.""" def __getitem__(self, key): value = tuple.__getitem__(self, key) result = self.configurator.convert(value) if value is not result: if type(result) in (ConvertingDict, ConvertingList, ConvertingTuple): result.parent = self result.key = key return result class BaseConfigurator(object): """ The configurator base class which defines some useful defaults. """ CONVERT_PATTERN = re.compile(r'^(?P<prefix>[a-z]+)://(?P<suffix>.*)$') WORD_PATTERN = re.compile(r'^\s*(\w+)\s*') DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*') INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*') DIGIT_PATTERN = re.compile(r'^\d+$') value_converters = { 'ext' : 'ext_convert', 'cfg' : 'cfg_convert', } # We might want to use a different one, e.g. importlib importer = staticmethod(__import__) def __init__(self, config): self.config = ConvertingDict(config) self.config.configurator = self def resolve(self, s): """ Resolve strings to objects using standard import and attribute syntax. """ name = s.split('.') used = name.pop(0) try: found = self.importer(used) for frag in name: used += '.' + frag try: found = getattr(found, frag) except AttributeError: self.importer(used) found = getattr(found, frag) return found except ImportError: e, tb = sys.exc_info()[1:] v = ValueError('Cannot resolve %r: %s' % (s, e)) v.__cause__, v.__traceback__ = e, tb raise v def ext_convert(self, value): """Default converter for the ext:// protocol.""" return self.resolve(value) def cfg_convert(self, value): """Default converter for the cfg:// protocol.""" rest = value m = self.WORD_PATTERN.match(rest) if m is None: raise ValueError("Unable to convert %r" % value) else: rest = rest[m.end():] d = self.config[m.groups()[0]] #print d, rest while rest: m = self.DOT_PATTERN.match(rest) if m: d = d[m.groups()[0]] else: m = self.INDEX_PATTERN.match(rest) if m: idx = m.groups()[0] if not self.DIGIT_PATTERN.match(idx): d = d[idx] else: try: n = int(idx) # try as number first (most likely) d = d[n] except TypeError: d = d[idx] if m: rest = rest[m.end():] else: raise ValueError('Unable to convert ' '%r at %r' % (value, rest)) #rest should be empty return d def convert(self, value): """ Convert values to an appropriate type. dicts, lists and tuples are replaced by their converting alternatives. Strings are checked to see if they have a conversion format and are converted if they do. """ if not isinstance(value, ConvertingDict) and isinstance(value, dict): value = ConvertingDict(value) value.configurator = self elif not isinstance(value, ConvertingList) and isinstance(value, list): value = ConvertingList(value) value.configurator = self elif not isinstance(value, ConvertingTuple) and\ isinstance(value, tuple): value = ConvertingTuple(value) value.configurator = self elif isinstance(value, string_types): m = self.CONVERT_PATTERN.match(value) if m: d = m.groupdict() prefix = d['prefix'] converter = self.value_converters.get(prefix, None) if converter: suffix = d['suffix'] converter = getattr(self, converter) value = converter(suffix)<|fim▁hole|> return value def configure_custom(self, config): """Configure an object with a user-supplied factory.""" c = config.pop('()') if not callable(c): c = self.resolve(c) props = config.pop('.', None) # Check for valid identifiers kwargs = dict([(k, config[k]) for k in config if valid_ident(k)]) result = c(**kwargs) if props: for name, value in props.items(): setattr(result, name, value) return result def as_tuple(self, value): """Utility function which converts lists to tuples.""" if isinstance(value, list): value = tuple(value) return value<|fim▁end|>
<|file_name|>WorkflowNavigationButtonPanel.java<|end_file_name|><|fim▁begin|>package org.sahsu.rif.generic.presentation; import java.awt.BorderLayout; import java.awt.GridBagConstraints; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; import org.sahsu.rif.generic.system.Messages; /** * * A generic button control panel that supports navigation through a work flow. Only buttons that * can be pressed appear in any state. For example, if the work flow is set on the first state, * the previous and first button will not show. It also suggests the distinction between "First" and * "Start Again" buttons. The "First" button is meant to move the work flow to the first step in the * work flow. In a workflow, it is meant to suggest that if you go back to the first step, you will * preserve the work you've done in that step. "Start Again" suggests that when the work flow moves * to the first step, but all changed all the work done before will be discarded. * * <hr> * Copyright 2017 Imperial College London, developed by the Small Area * Health Statistics Unit. * * <pre> * This file is part of the Rapid Inquiry Facility (RIF) project. * RIF is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * RIF is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with RIF. If not, see <http://www.gnu.org/licenses/>. * </pre> * * <hr> * Kevin Garwood * @author kgarwood */ /* * Code Road Map: * -------------- * Code is organised into the following sections. Wherever possible, * methods are classified based on an order of precedence described in * parentheses (..). For example, if you're trying to find a method * 'getName(...)' that is both an interface method and an accessor * method, the order tells you it should appear under interface. * * Order of * Precedence Section * ========== ====== * (1) Section Constants * (2) Section Properties * (3) Section Construction * (7) Section Accessors and Mutators * (6) Section Errors and Validation * (5) Section Interfaces * (4) Section Override * */ public final class WorkflowNavigationButtonPanel extends AbstractNavigationPanel { // ========================================== // Section Constants // ========================================== private static final Messages GENERIC_MESSAGES = Messages.genericMessages(); // ========================================== // Section Properties // ========================================== private JPanel panel; private JButton startAgainButton; private JButton submitButton; private JButton quitButton; // ========================================== // Section Construction // ========================================== public WorkflowNavigationButtonPanel( final UserInterfaceFactory userInterfaceFactory) { super(userInterfaceFactory); String submitButtonText = GENERIC_MESSAGES.getMessage("buttons.submit.label"); submitButton = userInterfaceFactory.createButton(submitButtonText); String quitButtonText = GENERIC_MESSAGES.getMessage("buttons.quit.label"); quitButton = userInterfaceFactory.createButton(quitButtonText); panel = userInterfaceFactory.createBorderLayoutPanel(); } public void startAgainButton(JButton startAgainButton) { this.startAgainButton = startAgainButton; } public boolean isStartAgainButton(Object item) { if (startAgainButton == null) { return false; } return startAgainButton.equals(item); } // ========================================== // Section Accessors and Mutators // ========================================== public boolean isQuitButton( final Object item) { if (item == null) { return false; } return quitButton.equals(item); } public boolean isSubmitButton( final Object item) { if (item == null) { return false; } return submitButton.equals(item); } public void showStartState() { panel.removeAll(); JPanel rightPanel = userInterfaceFactory.createPanel(); GridBagConstraints rightPanelGC = userInterfaceFactory.createGridBagConstraints(); rightPanel.add(nextButton, rightPanelGC); rightPanelGC.gridx++; rightPanel.add(quitButton, rightPanelGC); rightPanelGC.anchor = GridBagConstraints.SOUTHEAST; panel.add(rightPanel, BorderLayout.EAST); panel.updateUI(); } public void showMiddleState() { panel.removeAll(); panel.add(createLeftPanel(), BorderLayout.WEST); JPanel rightPanel = userInterfaceFactory.createPanel(); GridBagConstraints rightPanelGC = userInterfaceFactory.createGridBagConstraints(); rightPanel.add(firstButton, rightPanelGC); rightPanelGC.gridx++; rightPanel.add(previousButton, rightPanelGC); rightPanelGC.gridx++; rightPanel.add(nextButton, rightPanelGC); rightPanelGC.gridx++; rightPanel.add(quitButton, rightPanelGC); rightPanelGC.anchor = GridBagConstraints.SOUTHEAST; panel.add(rightPanel, BorderLayout.EAST); panel.updateUI(); } public void showEndState() { panel.removeAll(); panel.add(createLeftPanel(), BorderLayout.WEST); JPanel rightPanel = userInterfaceFactory.createPanel();<|fim▁hole|> rightPanel.add(previousButton, rightPanelGC); rightPanelGC.gridx++; rightPanel.add(submitButton, rightPanelGC); panel.add(rightPanel, BorderLayout.EAST); panel.updateUI(); } private JPanel createLeftPanel() { JPanel panel = userInterfaceFactory.createPanel(); if (startAgainButton != null) { GridBagConstraints panelGC = userInterfaceFactory.createGridBagConstraints(); panelGC.anchor = GridBagConstraints.SOUTHWEST; panel.add(startAgainButton, panelGC); } return panel; } public JPanel getPanel() { return panel; } public void addActionListener( final ActionListener actionListener) { super.addActionListener(actionListener); startAgainButton.addActionListener(actionListener); submitButton.addActionListener(actionListener); quitButton.addActionListener(actionListener); } // ========================================== // Section Errors and Validation // ========================================== // ========================================== // Section Interfaces // ========================================== // ========================================== // Section Override // ========================================== }<|fim▁end|>
GridBagConstraints rightPanelGC = userInterfaceFactory.createGridBagConstraints(); rightPanelGC.anchor = GridBagConstraints.SOUTHEAST; rightPanel.add(firstButton, rightPanelGC); rightPanelGC.gridx++;
<|file_name|>MockFilesystem.test.ts<|end_file_name|><|fim▁begin|>import {IFilesystem} from './Filesystem'; <|fim▁hole|> files: Directory = {}; constructor(files?: Directory) { this.files = files || {}; } private get(path: string, create?: boolean): [Directory | undefined, string] { if (!path.startsWith('/')) throw new Error(`Path not absolute: '${path}'`); let ret: string[] | undefined; let node: Node = this.files; const names = path.substr(1).split('/'); for (let i = 0; i < names.length - 1; i ++) { let nextNode: Node | string; if (names[i] in node) { nextNode = node[names[i]]; if (typeof nextNode == 'string') return [undefined, '']; } else if (create) { nextNode = node[names[i]] = {} as Directory; } else { return [undefined, '']; } node = nextNode; } return [node, names[names.length-1]]; } private getNode(path: string) { let [dir, name] = this.get(path); if (typeof dir == 'undefined' || !(name in dir)) return undefined; return dir[name]; } listFolders(path: string) { let node = this.getNode(path); if (typeof node == 'undefined' || typeof node == 'string') return Promise.resolve(undefined); const ret: string[] = []; for (let name in node) { if (typeof node[name] != 'string') ret.push(name); } return Promise.resolve(ret); } // exists(path: string) { // const node = this.getNode(path); // return Promise.resolve(typeof node != 'undefined'); // } read(path: string) { const node = this.getNode(path); if (typeof node == 'string') return Promise.resolve(node); if (typeof node == 'undefined') return Promise.resolve(undefined); return Promise.reject(new Error('cannot read folder')); } write(path: string, data: string) { const [dir, name] = this.get(path, true); if (typeof dir == 'undefined') return Promise.reject(new Error('cannot make parents')); dir[name] = data; return Promise.resolve(); } moveFolder(oldPath: string, newPath: string) { const [oldDir, oldName] = this.get(oldPath); if (typeof oldDir == 'undefined' || !(oldName in oldDir)) return Promise.reject(new Error('no such node')); const [newDir, newName] = this.get(newPath, true); if (typeof newDir == 'undefined') return Promise.reject(new Error('cannot make parents')); if (newName in newDir) return Promise.reject(new Error('target already exists')); newDir[newName] = oldDir[oldName]; delete oldDir[oldName]; return Promise.resolve(); } delete(path: string) { const [dir, name] = this.get(path); if (typeof dir == 'undefined' || !(name in dir)) return Promise.reject(new Error('no such node')); delete dir[name]; return Promise.resolve(); } }<|fim▁end|>
export type Node = Directory | string; export type Directory = {[name: string]: Node}; export class MockFilesystem implements IFilesystem {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""core URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views<|fim▁hole|>Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.contrib import admin from test_app import views as test_app_views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^test_app/companies/', test_app_views.companies_list_view), ]<|fim▁end|>
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
<|file_name|>group_api_urls.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import<|fim▁hole|>import re from django.core.urlresolvers import RegexURLResolver, RegexURLPattern from django.conf.urls import patterns, include, url from sentry.plugins import plugins logger = logging.getLogger("sentry.plugins") def ensure_url(u): if isinstance(u, (tuple, list)): return url(*u) elif not isinstance(u, (RegexURLResolver, RegexURLPattern)): raise TypeError( "url must be RegexURLResolver or RegexURLPattern, not %r: %r" % (type(u).__name__, u) ) return u def load_plugin_urls(plugins): urlpatterns = patterns("") for plugin in plugins: try: urls = plugin.get_group_urls() if not urls: continue urls = [ensure_url(u) for u in urls] except Exception: logger.exception("routes.failed", extra={"plugin": type(plugin).__name__}) else: urlpatterns.append(url(r"^%s/" % re.escape(plugin.slug), include(urls))) return urlpatterns urlpatterns = load_plugin_urls(plugins.all())<|fim▁end|>
import logging
<|file_name|>contact-us.js<|end_file_name|><|fim▁begin|>var ContactUs = function () { return { //main function to initiate the module init: function () { var map; $(document).ready(function(){ map = new GMaps({ div: '#map', lat: -13.004333, lng: -38.494333, }); var marker = map.addMarker({ <|fim▁hole|> lng: -38.494333, title: 'Loop, Inc.', infoWindow: { content: "<b>Loop, Inc.</b> 795 Park Ave, Suite 120<br>San Francisco, CA 94107" } }); marker.infoWindow.open(map, marker); }); } }; }();<|fim▁end|>
lat: -13.004333,
<|file_name|>FBODebugger.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////// // Copyright 2004-2014, SenseGraphics AB // // This file is part of H3D API. // // H3D API is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // H3D API is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with H3D API; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // A commercial license is also available. Please contact us at // www.sensegraphics.com for more information. // // /// \file FBODebugger.cpp /// \brief CPP file for FBODebugger, X3D scene-graph node /// // // ////////////////////////////////////////////////////////////////////////////// #include <H3D/FBODebugger.h> #include <H3D/FrameBufferTextureGenerator.h> #include <H3D/Appearance.h> using namespace H3D; // Add this node to the H3DNodeDatabase system. H3DNodeDatabase FBODebugger::database( "FBODebugger", &(newInstance<FBODebugger>), typeid( FBODebugger ), &X3DChildNode::database ); namespace FBODebuggerInternals { FIELDDB_ELEMENT( FBODebugger, fbo, INPUT_OUTPUT ); FIELDDB_ELEMENT( FBODebugger, buffer, INPUT_OUTPUT ); const string x3d_fbo = "<Group> \n" " <Shape> \n" " <Appearance DEF=\"APP\" > \n" " <Material/> \n" " <RenderProperties depthTestEnabled=\"FALSE\" blendEnabled=\"FALSE\" /> \n" " </Appearance> \n" " <FullscreenRectangle zValue=\"0.99\"/> \n" " </Shape> \n" "</Group>\n"; } FBODebugger::FBODebugger( Inst< SFNode> _metadata, Inst< SFString > _fbo, Inst< SFString > _buffer ) : X3DChildNode( _metadata ), fbo( _fbo ), buffer( _buffer ), render_target_texture( new RenderTargetTexture ) { type_name = "FBODebugger"; database.initFields( this ); fbo->addValidValue( "NONE" ); fbo->setValue( "NONE" ); buffer->addValidValue( "DEPTH" ); buffer->addValidValue( "COLOR0" ); buffer->addValidValue( "COLOR1" ); buffer->setValue( "COLOR0" ); current_fbo = "NONE"; current_buffer = "COLOR0"; texture_scene.reset( X3D::createX3DFromString( FBODebuggerInternals::x3d_fbo, &texture_scene_dn ) ); } void FBODebugger::traverseSG( TraverseInfo &ti ) { // add the valid values for the fbo field if( FrameBufferTextureGenerator::fbo_nodes.size() != fbo->getValidValues().size() ) { fbo->clearValidValues(); fbo->addValidValue( "NONE" ); for( set< FrameBufferTextureGenerator * >::const_iterator i = FrameBufferTextureGenerator::fbo_nodes.begin(); i != FrameBufferTextureGenerator::fbo_nodes.end(); i++ ) { FrameBufferTextureGenerator *fbo_node = *i; fbo->addValidValue( fbo_node->getName() ); } } // find the FrameBufferTextureGenerator that matches the name in the fbo field FrameBufferTextureGenerator *selected_fbo_node = NULL; for( set< FrameBufferTextureGenerator * >::const_iterator i = FrameBufferTextureGenerator::fbo_nodes.begin(); i != FrameBufferTextureGenerator::fbo_nodes.end(); i++ ) {<|fim▁hole|> break; } } if( selected_fbo_node ) { // choose the texture to be shown based on the buffer field. string selected_fbo_name = selected_fbo_node->getName(); if( selected_fbo_name != current_fbo || buffer->getValue() != current_buffer ) { Appearance *app; texture_scene_dn.getNode( "APP", app ); if( app ) { const string &selected_buffer = buffer->getValue(); if( selected_buffer == "DEPTH" ) { app->texture->setValue( selected_fbo_node->depthTexture->getValue() ); if( !selected_fbo_node->generateDepthTexture->getValue() ) { Console(4) << "Warning (FBODebugger): Cannot show DEPTH texture as no depth texture is generated by \"" << selected_fbo_name << "\" fbo" << endl; } } else if( selected_buffer == "COLOR0" ) { if( selected_fbo_node->colorTextures->size() > 0 ) { app->texture->setValue( render_target_texture ); render_target_texture->generator->setValue( selected_fbo_node ); render_target_texture->index->setValue( 0 ); } else { Console(4) << "Warning (FBODebugger): Cannot show COLOR0 texture as no color textures is generated by \"" << selected_fbo_name << "\" fbo" << endl; app->texture->setValue( NULL ); } } else if( selected_buffer == "COLOR1" ) { if( selected_fbo_node->colorTextures->size() > 1 ) { app->texture->setValue( render_target_texture.get() ); render_target_texture->generator->setValue( selected_fbo_node ); render_target_texture->index->setValue( 1 ); } else { Console(4) << "Warning (FBODebugger): Cannot show COLOR1 texture as no such color texture is generated by \"" << selected_fbo_name << "\" fbo" << endl; app->texture->setValue( NULL ); } } } } } // save the values of the currently selected fbo and buffer current_fbo = fbo->getValue(); current_buffer = buffer->getValue(); } void FBODebugger::render() { if( fbo->getValue() != "NONE" ) { texture_scene->render(); } }<|fim▁end|>
FrameBufferTextureGenerator *fbo_node = *i; if( fbo_node->getName() == fbo->getValue() ) { selected_fbo_node = *i;
<|file_name|>ArtifactRequestProcessor.java<|end_file_name|><|fim▁begin|>/* * Copyright 2022 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.thoughtworks.go.remote.work.artifact; import com.thoughtworks.go.plugin.access.artifact.ArtifactExtensionConstants; import com.thoughtworks.go.plugin.api.request.GoApiRequest; import com.thoughtworks.go.plugin.api.response.DefaultGoApiResponse; import com.thoughtworks.go.plugin.api.response.GoApiResponse; import com.thoughtworks.go.plugin.infra.GoPluginApiRequestProcessor; import com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor; import com.thoughtworks.go.remote.work.artifact.ConsoleLogMessage.LogLevel; import com.thoughtworks.go.util.command.*; import com.thoughtworks.go.work.GoPublisher;<|fim▁hole|> import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import static java.lang.String.format; public class ArtifactRequestProcessor implements GoPluginApiRequestProcessor { private static final List<String> goSupportedVersions = ArtifactExtensionConstants.SUPPORTED_VERSIONS; private final SafeOutputStreamConsumer safeOutputStreamConsumer; private final ProcessType processType; private enum ProcessType { FETCH, PUBLISH } private static final Map<LogLevel, String> FETCH_ARTIFACT_LOG_LEVEL_TAG = new HashMap<LogLevel, String>() {{ put(LogLevel.INFO, TaggedStreamConsumer.OUT); put(LogLevel.ERROR, TaggedStreamConsumer.ERR); }}; private static final Map<LogLevel, String> PUBLISH_ARTIFACT_LOG_LEVEL_TAG = new HashMap<LogLevel, String>() {{ put(LogLevel.INFO, TaggedStreamConsumer.PUBLISH); put(LogLevel.ERROR, TaggedStreamConsumer.PUBLISH_ERR); }}; private ArtifactRequestProcessor(GoPublisher publisher, ProcessType processType, EnvironmentVariableContext environmentVariableContext) { CompositeConsumer errorStreamConsumer = new CompositeConsumer(CompositeConsumer.ERR, publisher); CompositeConsumer outputStreamConsumer = new CompositeConsumer(CompositeConsumer.OUT, publisher); this.safeOutputStreamConsumer = new SafeOutputStreamConsumer(new ProcessOutputStreamConsumer(errorStreamConsumer, outputStreamConsumer)); safeOutputStreamConsumer.addSecrets(environmentVariableContext.secrets()); this.processType = processType; } public static ArtifactRequestProcessor forFetchArtifact(GoPublisher goPublisher, EnvironmentVariableContext environmentVariableContext) { return new ArtifactRequestProcessor(goPublisher, ProcessType.FETCH, environmentVariableContext); } public static ArtifactRequestProcessor forPublishArtifact(GoPublisher goPublisher, EnvironmentVariableContext environmentVariableContext) { return new ArtifactRequestProcessor(goPublisher, ProcessType.PUBLISH, environmentVariableContext); } @Override public GoApiResponse process(GoPluginDescriptor pluginDescriptor, GoApiRequest request) { validatePluginRequest(request); switch (Request.fromString(request.api())) { case CONSOLE_LOG: return processConsoleLogRequest(pluginDescriptor, request); default: return DefaultGoApiResponse.error("Illegal api request"); } } private GoApiResponse processConsoleLogRequest(GoPluginDescriptor pluginDescriptor, GoApiRequest request) { final ConsoleLogMessage consoleLogMessage = ConsoleLogMessage.fromJSON(request.requestBody()); final String message = format("[%s] %s", pluginDescriptor.id(), consoleLogMessage.getMessage()); Optional<String> parsedTag = parseTag(processType, consoleLogMessage.getLogLevel()); if (parsedTag.isPresent()) { safeOutputStreamConsumer.taggedStdOutput(parsedTag.get(), message); return DefaultGoApiResponse.success(null); } return DefaultGoApiResponse.error(format("Unsupported log level `%s`.", consoleLogMessage.getLogLevel())); } private Optional<String> parseTag(ProcessType requestType, LogLevel logLevel) { switch (requestType) { case FETCH: return Optional.ofNullable(FETCH_ARTIFACT_LOG_LEVEL_TAG.get(logLevel)); case PUBLISH: return Optional.ofNullable(PUBLISH_ARTIFACT_LOG_LEVEL_TAG.get(logLevel)); } return Optional.empty(); } private void validatePluginRequest(GoApiRequest goPluginApiRequest) { if (!goSupportedVersions.contains(goPluginApiRequest.apiVersion())) { throw new RuntimeException(format("Unsupported '%s' API version: %s. Supported versions: %s", goPluginApiRequest.api(), goPluginApiRequest.apiVersion(), goSupportedVersions)); } } public enum Request { CONSOLE_LOG("go.processor.artifact.console-log"); private final String requestName; Request(String requestName) { this.requestName = requestName; } public static Request fromString(String requestName) { if (requestName != null) { for (Request request : Request.values()) { if (requestName.equalsIgnoreCase(request.requestName)) { return request; } } } return null; } public String requestName() { return requestName; } } }<|fim▁end|>
<|file_name|>selectnav.js<|end_file_name|><|fim▁begin|>/** * @preserve SelectNav.js (v. 0.1) * Converts your <ul>/<ol> navigation into a dropdown list for small screens * https://github.com/lukaszfiszer/selectnav.js */ window.selectnav = (function(){ "use strict"; var selectnav = function(element,options){ element = document.getElementById(element); // return immediately if element doesn't exist if( ! element){ return; } // return immediately if element is not a list if( ! islist(element) ){ return; } // return immediately if no support for insertAdjacentHTML (Firefox 7 and under) if( ! ('insertAdjacentHTML' in window.document.documentElement) ){ return; } // add a js class to <html> tag document.documentElement.className += " js"; // retreive options and set defaults var o = options || {}, activeclass = o.activeclass || 'active', autoselect = typeof(o.autoselect) === "boolean" ? o.autoselect : true, nested = typeof(o.nested) === "boolean" ? o.nested : true, indent = o.indent || "→", label = o.label || "- Navigation -", // helper variables level = 0, selected = " selected "; // insert the freshly created dropdown navigation after the existing navigation element.insertAdjacentHTML('afterend', parselist(element) ); var nav = document.getElementById(id()); // autoforward on click if (nav.addEventListener) { nav.addEventListener('change',goTo); } if (nav.attachEvent) { nav.attachEvent('onchange', goTo); } return nav; function goTo(e){ // Crossbrowser issues - http://www.quirksmode.org/js/events_properties.html var targ; if (!e) e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType === 3) // defeat Safari bug targ = targ.parentNode; if(targ.value) window.location.href = targ.value; } function islist(list){ var n = list.nodeName.toLowerCase(); return (n === 'ul' || n === 'ol'); } function id(nextId){ for(var j=1; document.getElementById('selectnav'+j);j++); return (nextId) ? 'selectnav'+j : 'selectnav'+(j-1); } function parselist(list){ // go one level down level++; var length = list.children.length, html = '', prefix = '', k = level-1 ; // return immediately if has no children if (!length) { return; } if(k) { while(k--){ prefix += indent; } prefix += " "; } for(var i=0; i < length; i++){ var link = list.children[i].children[0]; if(typeof(link) !== 'undefined'){ var text = link.innerText || link.textContent; var isselected = ''; if(activeclass){ isselected = link.className.search(activeclass) !== -1 || link.parentNode.className.search(activeclass) !== -1 ? selected : ''; } if(autoselect && !isselected){ isselected = link.href === document.URL ? selected : ''; } html += '<option value="' + link.href + '" ' + isselected + '>' + prefix + text +'</option>'; <|fim▁hole|> } } } } // adds label if(level === 1 && label) { html = '<option value="">' + label + '</option>' + html; } // add <select> tag to the top level of the list if(level === 1) { html = '<select class="selectnav" id="'+id(true)+'">' + html + '</select>'; } // go 1 level up level--; return html; } }; return function (element,options) { selectnav(element,options); }; })();<|fim▁end|>
if(nested){ var subElement = list.children[i].children[1]; if( subElement && islist(subElement) ){ html += parselist(subElement);
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>### EXESOFT PYIGNITION ### # Copyright David Barker 2010 # # Global constants module # Which version is this? PYIGNITION_VERSION = 1.0 <|fim▁hole|> # Drawtype constants DRAWTYPE_POINT = 100 DRAWTYPE_CIRCLE = 101 DRAWTYPE_LINE = 102 DRAWTYPE_SCALELINE = 103 DRAWTYPE_BUBBLE = 104 DRAWTYPE_IMAGE = 105 # Interpolation type constants INTERPOLATIONTYPE_LINEAR = 200 INTERPOLATIONTYPE_COSINE = 201 # Gravity constants UNIVERSAL_CONSTANT_OF_MAKE_GRAVITY_LESS_STUPIDLY_SMALL = 1000.0 # Well, Newton got one to make it less stupidly large. VORTEX_ACCELERATION = 0.01 # A tiny value added to the centripetal force exerted by vortex gravities to draw in particles VORTEX_SWALLOWDIST = 20.0 # Particles closer than this will be swallowed up and regurgitated in the bit bucket # Fraction of radius which can go inside an object RADIUS_PERMITTIVITY = 0.3<|fim▁end|>
<|file_name|>cron.py<|end_file_name|><|fim▁begin|>import asyncio import asyncio.subprocess import datetime import logging from collections import OrderedDict, defaultdict from typing import Any, Awaitable, Dict, List, Optional, Union # noqa from urllib.parse import urlparse from aiohttp import web import yacron.version from yacron.config import ( JobConfig, parse_config, ConfigError, parse_config_string, WebConfig, ) from yacron.job import RunningJob, JobRetryState from crontab import CronTab # noqa logger = logging.getLogger("yacron") WAKEUP_INTERVAL = datetime.timedelta(minutes=1) def naturaltime(seconds: float, future=False) -> str: assert future if seconds < 120: return "in {} second{}".format( int(seconds), "s" if seconds >= 2 else "" ) minutes = seconds / 60 if minutes < 120: return "in {} minute{}".format( int(minutes), "s" if minutes >= 2 else "" ) hours = minutes / 60 if hours < 48: return "in {} hour{}".format(int(hours), "s" if hours >= 2 else "") days = hours / 24 return "in {} day{}".format(int(days), "s" if days >= 2 else "") def get_now(timezone: Optional[datetime.tzinfo]) -> datetime.datetime: return datetime.datetime.now(timezone) def next_sleep_interval() -> float: now = get_now(datetime.timezone.utc) target = now.replace(second=0) + WAKEUP_INTERVAL return (target - now).total_seconds() def create_task(coro: Awaitable) -> asyncio.Task: return asyncio.get_event_loop().create_task(coro) def web_site_from_url(runner: web.AppRunner, url: str) -> web.BaseSite: parsed = urlparse(url) if parsed.scheme == "http": assert parsed.hostname is not None assert parsed.port is not None return web.TCPSite(runner, parsed.hostname, parsed.port) elif parsed.scheme == "unix": return web.UnixSite(runner, parsed.path) else: logger.warning( "Ignoring web listen url %s: scheme %r not supported", url, parsed.scheme, ) raise ValueError(url) class Cron: def __init__( self, config_arg: Optional[str], *, config_yaml: Optional[str] = None ) -> None: # list of cron jobs we /want/ to run self.cron_jobs = OrderedDict() # type: Dict[str, JobConfig] # list of cron jobs already running # name -> list of RunningJob self.running_jobs = defaultdict( list ) # type: Dict[str, List[RunningJob]] self.config_arg = config_arg if config_arg is not None: self.update_config() if config_yaml is not None: # config_yaml is for unit testing config, _, _ = parse_config_string(config_yaml, "") self.cron_jobs = OrderedDict((job.name, job) for job in config) self._wait_for_running_jobs_task = None # type: Optional[asyncio.Task] self._stop_event = asyncio.Event() self._jobs_running = asyncio.Event() self.retry_state = {} # type: Dict[str, JobRetryState] self.web_runner = None # type: Optional[web.AppRunner] self.web_config = None # type: Optional[WebConfig] async def run(self) -> None: self._wait_for_running_jobs_task = create_task( self._wait_for_running_jobs() ) startup = True while not self._stop_event.is_set(): try: web_config = self.update_config() await self.start_stop_web_app(web_config) except ConfigError as err: logger.error( "Error in configuration file(s), so not updating " "any of the config.:\n%s", str(err), ) except Exception: # pragma: nocover logger.exception("please report this as a bug (1)") await self.spawn_jobs(startup) startup = False sleep_interval = next_sleep_interval() logger.debug("Will sleep for %.1f seconds", sleep_interval) try: await asyncio.wait_for(self._stop_event.wait(), sleep_interval) except asyncio.TimeoutError: pass logger.info("Shutting down (after currently running jobs finish)...") while self.retry_state: cancel_all = [ self.cancel_job_retries(name) for name in self.retry_state ] await asyncio.gather(*cancel_all) await self._wait_for_running_jobs_task if self.web_runner is not None: logger.info("Stopping http server") await self.web_runner.cleanup() def signal_shutdown(self) -> None: logger.debug("Signalling shutdown") self._stop_event.set() def update_config(self) -> Optional[WebConfig]: if self.config_arg is None: return None config, web_config = parse_config(self.config_arg) self.cron_jobs = OrderedDict((job.name, job) for job in config) return web_config async def _web_get_version(self, request: web.Request) -> web.Response: return web.Response(text=yacron.version.version) async def _web_get_status(self, request: web.Request) -> web.Response: out = [] for name, job in self.cron_jobs.items(): running = self.running_jobs.get(name, None) if running: out.append( { "job": name, "status": "running", "pid": [ runjob.proc.pid for runjob in running if runjob.proc is not None ], } ) else: crontab = job.schedule # type: Union[CronTab, str] now = get_now(job.timezone) out.append( { "job": name, "status": "scheduled", "scheduled_in": ( crontab.next(now=now, default_utc=job.utc) if isinstance(crontab, CronTab) else str(crontab) ), } ) if request.headers.get("Accept") == "application/json": return web.json_response(out) else: lines = [] for jobstat in out: # type: Dict[str, Any] if jobstat["status"] == "running": status = "running (pid: {pid})".format( pid=", ".join(str(pid) for pid in jobstat["pid"]) ) else: status = "scheduled ({})".format( ( jobstat["scheduled_in"] if type(jobstat["scheduled_in"]) is str else naturaltime( jobstat["scheduled_in"], future=True ) ) ) lines.append( "{name}: {status}".format( name=jobstat["job"], status=status ) ) return web.Response(text="\n".join(lines)) async def _web_start_job(self, request: web.Request) -> web.Response: name = request.match_info["name"] try: job = self.cron_jobs[name] except KeyError: raise web.HTTPNotFound() await self.maybe_launch_job(job) return web.Response() async def start_stop_web_app(self, web_config: Optional[WebConfig]): if self.web_runner is not None and ( web_config is None or web_config != self.web_config ): # assert self.web_runner is not None logger.info("Stopping http server") await self.web_runner.cleanup() self.web_runner = None if ( web_config is not None and web_config["listen"] and self.web_runner is None ): app = web.Application() app.add_routes( [ web.get("/version", self._web_get_version), web.get("/status", self._web_get_status), web.post("/jobs/{name}/start", self._web_start_job), ] ) self.web_runner = web.AppRunner(app) await self.web_runner.setup() for addr in web_config["listen"]: site = web_site_from_url(self.web_runner, addr) logger.info("web: started listening on %s", addr) try: await site.start() except ValueError: pass self.web_config = web_config async def spawn_jobs(self, startup: bool) -> None: for job in self.cron_jobs.values(): if self.job_should_run(startup, job): await self.launch_scheduled_job(job) @staticmethod def job_should_run(startup: bool, job: JobConfig) -> bool: if ( startup and isinstance(job.schedule, str) and job.schedule == "@reboot" ): logger.debug( "Job %s (%s) is scheduled for startup (@reboot)", job.name, job.schedule_unparsed, ) return True elif isinstance(job.schedule, CronTab): crontab = job.schedule # type: CronTab if crontab.test(get_now(job.timezone).replace(second=0)): logger.debug( "Job %s (%s) is scheduled for now", job.name, job.schedule_unparsed, ) return True else: logger.debug( "Job %s (%s) not scheduled for now", job.name, job.schedule_unparsed, ) return False else: return False async def launch_scheduled_job(self, job: JobConfig) -> None: await self.cancel_job_retries(job.name) assert job.name not in self.retry_state retry = job.onFailure["retry"] logger.debug("Job %s retry config: %s", job.name, retry) if retry["maximumRetries"]: retry_state = JobRetryState( retry["initialDelay"],<|fim▁hole|> await self.maybe_launch_job(job) async def maybe_launch_job(self, job: JobConfig) -> None: if self.running_jobs[job.name]: logger.warning( "Job %s: still running and concurrencyPolicy is %s", job.name, job.concurrencyPolicy, ) if job.concurrencyPolicy == "Allow": pass elif job.concurrencyPolicy == "Forbid": return elif job.concurrencyPolicy == "Replace": for running_job in self.running_jobs[job.name]: await running_job.cancel() else: raise AssertionError # pragma: no cover logger.info("Starting job %s", job.name) running_job = RunningJob(job, self.retry_state.get(job.name)) await running_job.start() self.running_jobs[job.name].append(running_job) logger.info("Job %s spawned", job.name) self._jobs_running.set() # continually watches for the running jobs, clean them up when they exit async def _wait_for_running_jobs(self) -> None: # job -> wait task wait_tasks = {} # type: Dict[RunningJob, asyncio.Task] while self.running_jobs or not self._stop_event.is_set(): try: for jobs in self.running_jobs.values(): for job in jobs: if job not in wait_tasks: wait_tasks[job] = create_task(job.wait()) if not wait_tasks: try: await asyncio.wait_for(self._jobs_running.wait(), 1) except asyncio.TimeoutError: pass continue self._jobs_running.clear() # wait for at least one task with timeout done_tasks, _ = await asyncio.wait( wait_tasks.values(), timeout=1.0, return_when=asyncio.FIRST_COMPLETED, ) done_jobs = set() for job, task in list(wait_tasks.items()): if task in done_tasks: done_jobs.add(job) for job in done_jobs: task = wait_tasks.pop(job) try: task.result() except Exception: # pragma: no cover logger.exception("please report this as a bug (2)") jobs_list = self.running_jobs[job.config.name] jobs_list.remove(job) if not jobs_list: del self.running_jobs[job.config.name] fail_reason = job.fail_reason logger.info( "Job %s exit code %s; has stdout: %s, " "has stderr: %s; fail_reason: %r", job.config.name, job.retcode, str(bool(job.stdout)).lower(), str(bool(job.stderr)).lower(), fail_reason, ) if fail_reason is not None: await self.handle_job_failure(job) else: await self.handle_job_success(job) except asyncio.CancelledError: raise except Exception: # pragma: no cover logger.exception("please report this as a bug (3)") await asyncio.sleep(1) async def handle_job_failure(self, job: RunningJob) -> None: if self._stop_event.is_set(): return if job.stdout: logger.info( "Job %s STDOUT:\n%s", job.config.name, job.stdout.rstrip() ) if job.stderr: logger.info( "Job %s STDERR:\n%s", job.config.name, job.stderr.rstrip() ) await job.report_failure() # Handle retries... state = job.retry_state if state is None or state.cancelled: await job.report_permanent_failure() return logger.debug( "Job %s has been retried %i times", job.config.name, state.count ) if state.task is not None: if state.task.done(): await state.task else: state.task.cancel() retry = job.config.onFailure["retry"] if ( state.count >= retry["maximumRetries"] and retry["maximumRetries"] != -1 ): await self.cancel_job_retries(job.config.name) await job.report_permanent_failure() else: retry_delay = state.next_delay() state.task = create_task( self.schedule_retry_job( job.config.name, retry_delay, state.count ) ) async def schedule_retry_job( self, job_name: str, delay: float, retry_num: int ) -> None: logger.info( "Cron job %s scheduled to be retried (#%i) " "in %.1f seconds", job_name, retry_num, delay, ) await asyncio.sleep(delay) try: job = self.cron_jobs[job_name] except KeyError: logger.warning( "Cron job %s was scheduled for retry, but " "disappeared from the configuration", job_name, ) await self.maybe_launch_job(job) async def handle_job_success(self, job: RunningJob) -> None: await self.cancel_job_retries(job.config.name) await job.report_success() async def cancel_job_retries(self, name: str) -> None: try: state = self.retry_state.pop(name) except KeyError: return state.cancelled = True if state.task is not None: if state.task.done(): await state.task else: state.task.cancel()<|fim▁end|>
retry["backoffMultiplier"], retry["maximumDelay"], ) self.retry_state[job.name] = retry_state
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" ================================================== Sparse linear algebra (:mod:`scipy.sparse.linalg`) ================================================== .. currentmodule:: scipy.sparse.linalg Abstract linear operators ------------------------- .. autosummary:: :toctree: generated/ LinearOperator -- abstract representation of a linear operator aslinearoperator -- convert an object to an abstract linear operator Matrix Operations ----------------- .. autosummary:: :toctree: generated/ inv -- compute the sparse matrix inverse expm -- compute the sparse matrix exponential expm_multiply -- compute the product of a matrix exponential and a matrix Matrix norms ------------ .. autosummary:: :toctree: generated/ norm -- Norm of a sparse matrix onenormest -- Estimate the 1-norm of a sparse matrix Solving linear problems ----------------------- Direct methods for linear equation systems: .. autosummary:: :toctree: generated/ spsolve -- Solve the sparse linear system Ax=b factorized -- Pre-factorize matrix to a function solving a linear system MatrixRankWarning -- Warning on exactly singular matrices use_solver -- Select direct solver to use Iterative methods for linear equation systems: .. autosummary:: :toctree: generated/ bicg -- Use BIConjugate Gradient iteration to solve A x = b bicgstab -- Use BIConjugate Gradient STABilized iteration to solve A x = b cg -- Use Conjugate Gradient iteration to solve A x = b cgs -- Use Conjugate Gradient Squared iteration to solve A x = b gmres -- Use Generalized Minimal RESidual iteration to solve A x = b lgmres -- Solve a matrix equation using the LGMRES algorithm minres -- Use MINimum RESidual iteration to solve Ax = b qmr -- Use Quasi-Minimal Residual iteration to solve A x = b Iterative methods for least-squares problems: .. autosummary:: :toctree: generated/ lsqr -- Find the least-squares solution to a sparse linear equation system lsmr -- Find the least-squares solution to a sparse linear equation system Matrix factorizations --------------------- Eigenvalue problems: .. autosummary:: :toctree: generated/ eigs -- Find k eigenvalues and eigenvectors of the square matrix A eigsh -- Find k eigenvalues and eigenvectors of a symmetric matrix lobpcg -- Solve symmetric partial eigenproblems with optional preconditioning Singular values problems: .. autosummary:: :toctree: generated/ svds -- Compute k singular values/vectors for a sparse matrix Complete or incomplete LU factorizations .. autosummary:: :toctree: generated/ splu -- Compute a LU decomposition for a sparse matrix spilu -- Compute an incomplete LU decomposition for a sparse matrix SuperLU -- Object representing an LU factorization Exceptions ---------- .. autosummary::<|fim▁hole|> ArpackNoConvergence ArpackError """ from __future__ import division, print_function, absolute_import __all__ = [s for s in dir() if not s.startswith('_')] from numpy.testing import Tester test = Tester().test<|fim▁end|>
:toctree: generated/
<|file_name|>test_tf_nn_moments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Author: violinsolo # Created on 08/03/2018 import tensorflow as tf import numpy as np x_shape = [5, 3, 3, 2] x = np.arange(reduce(lambda t, s: t*s, list(x_shape), 1)) print x x = x.reshape([5, 3, 3, -1]) <|fim▁hole|> X = tf.Variable(x) with tf.Session() as sess: m = tf.nn.moments(X, axes=[0]) # m = tf.nn.moments(X, axes=[0,1]) # m = tf.nn.moments(X, axes=np.arange(len(x_shape)-1)) mean, variance = m print(sess.run(m, feed_dict={X: x})) # print(sess.run(m, feed_dict={X: x}))<|fim▁end|>
print x.shape
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from article import views urlpatterns = [<|fim▁hole|><|fim▁end|>
url(r'^$', views.articles, name='articles'), url(r'^add/?$', views.add_articles, name='add-articles'), ]
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from api.models import UsernameSnippet class TestUsernameSnippet(TestCase): @classmethod<|fim▁hole|> def test_existence(self): u = UsernameSnippet.objects.first() self.assertIsInstance(u, UsernameSnippet) self.assertEqual(u.available, True) def test_field_types(self): u = UsernameSnippet.objects.first() self.assertIsInstance(u.available, bool)<|fim▁end|>
def setUpTestData(cls): UsernameSnippet.objects.create(available=True)
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use actix::prelude::*; use actors::forward_agent::ForwardAgent; use actors::ForwardA2AMsg; use actors::agent::Agent; use dirs; use base64; use domain::a2a::*; use domain::a2connection::*; use domain::config::*; use domain::key_deligation_proof::*; use domain::invite::*; use domain::status::*; use env_logger; use failure::{err_msg, Error, Fail}; use futures::*; use indy::{self, did, wallet, crypto}; use std::env; use std::fs; use std::path::PathBuf; use tokio_core::reactor::Core; use utils::futures::*; pub const EDGE_AGENT_WALLET_ID: &'static str = "edge_agent_wallet_id"; pub const EDGE_AGENT_WALLET_CONFIG: &'static str = "{\"id\": \"edge_agent_wallet_id\"}"; pub const EDGE_AGENT_WALLET_PASSPHRASE: &'static str = "edge_agent_wallet_passphrase"; pub const EDGE_AGENT_WALLET_CREDENTIALS: &'static str = "{\"key\": \"edge_agent_wallet_passphrase\"}"; pub const EDGE_AGENT_DID: &'static str = "NcYxiDXkpYi6ov5FcYDi1e"; pub const EDGE_AGENT_DID_INFO: &'static str = "{\"did\": \"NcYxiDXkpYi6ov5FcYDi1e\", \"seed\": \"0000000000000000000000000000Edge\"}"; pub const EDGE_AGENT_DID_VERKEY: &'static str = "B4aUxMQdPFkwBtcNUgs4fAbJhLSbXjQmrXByzL6gfDEq"; pub const EDGE_PAIRWISE_DID: &'static str = "BJ8T5EQm8QoVopUR2sd5L2"; pub const EDGE_PAIRWISE_DID_INFO: &'static str = "{\"did\": \"BJ8T5EQm8QoVopUR2sd5L2\", \"seed\": \"00000000000000000000EdgePairwise\"}"; pub const EDGE_PAIRWISE_DID_VERKEY: &'static str = "6cTQci8sG8CEr3pNz71yqxbEch8CiNwoNhoUE7unpWkS"; pub const FORWARD_AGENT_ENDPOINT: &'static str = "http://localhost:8080"; pub const EDGE_PAIRWISE_DID_2: &'static str = "WNnf2uJPZNmvMmA6LkdVAp"; pub const EDGE_PAIRWISE_DID_INFO_2: &'static str = "{\"did\": \"WNnf2uJPZNmvMmA6LkdVAp\", \"seed\": \"0000000000000000000EdgePairwise2\"}"; pub const EDGE_PAIRWISE_DID_VERKEY_2: &'static str = "H1d58X25s91rTXdd46hTfn7mhtPmohQFYRHD379UtytR"; pub static mut FORWARD_AGENT_WALLET_HANDLE: i32 = 0; pub const FORWARD_AGENT_WALLET_ID: &'static str = "forward_agent_wallet_id"; pub const FORWARD_AGENT_WALLET_CONFIG: &'static str = "{\"id\": \"forward_agent_wallet_id\"}"; pub const FORWARD_AGENT_WALLET_PASSPHRASE: &'static str = "forward_agent_wallet_passphrase"; pub const FORWARD_AGENT_WALLET_CREDENTIALS: &'static str = "{\"key\": \"forward_agent_wallet_passphrase\"}"; pub const FORWARD_AGENT_DID: &'static str = "VsKV7grR1BUE29mG2Fm2kX"; pub const FORWARD_AGENT_DID_SEED: &'static str = "0000000000000000000000000Forward"; pub const FORWARD_AGENT_DID_INFO: &'static str = "{\"did\": \"VsKV7grR1BUE29mG2Fm2kX\", \"seed\": \"0000000000000000000000000Forward\"}"; pub const FORWARD_AGENT_DID_VERKEY: &'static str = "Hezce2UWMZ3wUhVkh2LfKSs8nDzWwzs2Win7EzNN3YaR"; pub const PHONE_NO: &'static str = "80000000000"; pub const PAYLOAD: [u8; 8] = [1, 2, 3, 4, 5, 6, 7, 8]; pub fn indy_home_path() -> PathBuf { // TODO: FIXME: Provide better handling for the unknown home path case!!! let mut path = dirs::home_dir().unwrap_or(PathBuf::from("/home/indy")); path.push(if cfg!(target_os = "ios") { "Documents/.indy_client" } else { ".indy_client" }); path } pub fn wallet_home_path() -> PathBuf { let mut path = indy_home_path(); path.push("wallet"); path } pub fn wallet_path(wallet_name: &str) -> PathBuf { let mut path = wallet_home_path(); path.push(wallet_name); path } pub fn tmp_path() -> PathBuf { let mut path = env::temp_dir(); path.push("indy_client"); path } pub fn tmp_file_path(file_name: &str) -> PathBuf { let mut path = tmp_path(); path.push(file_name); path } pub fn cleanup_indy_home() { let path = indy_home_path(); if path.exists() { fs::remove_dir_all(path).unwrap(); } } pub fn cleanup_temp() { let path = tmp_path(); if path.exists() { fs::remove_dir_all(path).unwrap(); } } pub fn cleanup_storage() { cleanup_indy_home(); cleanup_temp(); } pub fn run_test<F, B>(f: F) where F: FnOnce(Addr<ForwardAgent>) -> B + 'static, B: IntoFuture<Item=(), Error=Error> + 'static { indy::logger::set_default_logger(None).ok(); env_logger::try_init().ok(); cleanup_storage(); System::run(|| { Arbiter::spawn_fn(move || { future::ok(()) .and_then(move |_| { ForwardAgent::create_or_restore(forward_agent_config(), wallet_storage_config()) }) .and_then(f) .and_then(|wallet_handle| unsafe { wallet::close_wallet(FORWARD_AGENT_WALLET_HANDLE) .map_err(|err| err.context("Can't close Forward Agent wallet.`").into()) } ) .map(move |_| { System::current().stop() }) .map_err(|err| panic!("Test error: {}!", err)) }) }); } pub fn run_agent_test<F, B>(f: F) where F: FnOnce((i32, String, String, String, String, Addr<ForwardAgent>)) -> B + 'static, B: IntoFuture<Item=i32, Error=Error> + 'static { run_test(|forward_agent| { future::ok(()) .and_then(|()| { setup_agent(forward_agent) }) .and_then(f) .map(|wallet_handle| wallet::close_wallet(wallet_handle).wait().unwrap()) }) } pub fn setup_agent(forward_agent: Addr<ForwardAgent>) -> ResponseFuture<(i32, String, String, String, String, Addr<ForwardAgent>), Error> { future::ok(()) .and_then(|()| { let e_wallet_handle = edge_wallet_setup().wait().unwrap(); let connect_msg = compose_connect(e_wallet_handle).wait().unwrap(); forward_agent .send(ForwardA2AMsg(connect_msg)) .from_err() .and_then(|res| res) .map(move |connected_msg| (forward_agent, e_wallet_handle, connected_msg)) }) .and_then(|(forward_agent, e_wallet_handle, connected_msg)| { let (sender_verkey, pairwise_did, pairwise_verkey) = decompose_connected(e_wallet_handle, &connected_msg).wait().unwrap(); let signup_msg = compose_signup(e_wallet_handle, &pairwise_did, &pairwise_verkey).wait().unwrap(); forward_agent .send(ForwardA2AMsg(signup_msg)) .from_err() .and_then(|res| res) .map(move |signedup_msg| (forward_agent, e_wallet_handle, signedup_msg, pairwise_did, pairwise_verkey)) }) .and_then(move |(forward_agent, e_wallet_handle, signedup_msg, pairwise_did, pairwise_verkey)| { let sender_verkey = decompose_signedup(e_wallet_handle, &signedup_msg).wait().unwrap(); let create_agent_msg = compose_create_agent(e_wallet_handle, &pairwise_did, &pairwise_verkey).wait().unwrap(); forward_agent .send(ForwardA2AMsg(create_agent_msg)) .from_err() .and_then(|res| res) .map(move |agent_created_msg| (e_wallet_handle, agent_created_msg, pairwise_verkey, forward_agent)) }) .and_then(|(e_wallet_handle, agent_created_msg, pairwise_verkey, forward_agent)| { let (_, agent_did, agent_verkey) = decompose_agent_created(e_wallet_handle, &agent_created_msg).wait().unwrap(); let create_key_msg = compose_create_key(e_wallet_handle, &agent_did, &agent_verkey, EDGE_PAIRWISE_DID, EDGE_PAIRWISE_DID_VERKEY).wait().unwrap(); forward_agent .send(ForwardA2AMsg(create_key_msg)) .from_err() .and_then(|res| res) .map(move |key_created_msg| (e_wallet_handle, key_created_msg, agent_did, agent_verkey, forward_agent)) }) .map(|(e_wallet_handle, key_created_msg, agent_did, agent_verkey, forward_agent)| { let (_, key) = decompose_key_created(e_wallet_handle, &key_created_msg).wait().unwrap(); (e_wallet_handle, agent_did, agent_verkey, key.with_pairwise_did, key.with_pairwise_did_verkey, forward_agent) }) .into_box() } pub fn forward_agent_config() -> ForwardAgentConfig { ForwardAgentConfig { wallet_id: FORWARD_AGENT_WALLET_ID.into(), wallet_passphrase: FORWARD_AGENT_WALLET_PASSPHRASE.into(), did: FORWARD_AGENT_DID.into(), did_seed: Some(FORWARD_AGENT_DID_SEED.into()), endpoint: FORWARD_AGENT_ENDPOINT.into(), } } pub fn wallet_storage_config() -> WalletStorageConfig { WalletStorageConfig { xtype: None, config: None, credentials: None, } } pub fn edge_wallet_setup() -> BoxedFuture<i32, Error> { future::ok(()) .and_then(|_| { wallet::create_wallet(EDGE_AGENT_WALLET_CONFIG, EDGE_AGENT_WALLET_CREDENTIALS) .map_err(|err| err.context("Can't create edge agent wallet.").into()) }) .and_then(|_| { wallet::open_wallet(EDGE_AGENT_WALLET_CONFIG, EDGE_AGENT_WALLET_CREDENTIALS) .map_err(|err| err.context("Can't open edge agent wallet.").into()) }) .and_then(|wallet_handle| { did::create_and_store_my_did(wallet_handle, EDGE_AGENT_DID_INFO) .map(move |_| wallet_handle) .map_err(|err| err.context("Can't create edge agent did.").into()) }) .and_then(|wallet_handle| { did::create_and_store_my_did(wallet_handle, EDGE_PAIRWISE_DID_INFO) .map(move |_| wallet_handle) .map_err(|err| err.context("Can't create edge agent did.").into()) }) .into_box() } pub fn compose_connect(wallet_handle: i32) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::Connect( Connect { from_did: EDGE_AGENT_DID.into(), from_did_verkey: EDGE_AGENT_DID_VERKEY.into(), }))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, FORWARD_AGENT_DID_VERKEY, &msgs).wait().unwrap(); compose_forward(wallet_handle, FORWARD_AGENT_DID, FORWARD_AGENT_DID_VERKEY, msg) } pub fn decompose_connected(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, String, String), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { if let Some(A2AMessage::Version1(A2AMessageV1::Connected(msg))) = msgs.pop() { let Connected { with_pairwise_did: pairwise_did, with_pairwise_did_verkey: pairwise_verkey } = msg; Ok((sender_verkey, pairwise_did, pairwise_verkey)) } else { Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_signup(wallet_handle: i32, pairwise_did: &str, pairwise_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::SignUp(SignUp {}))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, pairwise_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle,&pairwise_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn decompose_signedup(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<String, Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { if let Some(A2AMessage::Version1(A2AMessageV1::SignedUp(_))) = msgs.pop() { Ok(sender_verkey) } else { Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_create_agent(wallet_handle: i32, pairwise_did: &str, pairwise_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = vec![A2AMessage::Version1(A2AMessageV1::CreateAgent(CreateAgent {}))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, pairwise_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle,pairwise_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn decompose_agent_created(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, String, String), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { if let Some(A2AMessage::Version1(A2AMessageV1::AgentCreated(agent_created))) = msgs.pop() { let AgentCreated { with_pairwise_did: pw_did, with_pairwise_did_verkey: pw_vk } = agent_created; Ok((sender_verkey, pw_did, pw_vk)) } else { Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_create_key(wallet_handle: i32, agent_did: &str, agent_verkey: &str, for_did: &str, for_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::CreateKey( CreateKey { for_did: for_did.into(), for_did_verkey: for_verkey.into() }))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, agent_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle,agent_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn decompose_key_created(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, KeyCreated), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { if let Some(A2AMessage::Version1(A2AMessageV1::KeyCreated(key_created))) = msgs.pop() { Ok((sender_verkey, key_created)) } else { Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_create_connection_request(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let create_msg = build_create_message_request(RemoteMessageType::ConnReq, None); let msg_details = A2AMessage::Version1(A2AMessageV1::MessageDetail( MessageDetail::ConnectionRequest( ConnectionRequestMessageDetail { key_dlg_proof: gen_key_delegated_proof(wallet_handle, EDGE_PAIRWISE_DID_VERKEY, &agent_pairwise_did, &agent_pairwise_verkey), target_name: None, phone_no: Some(PHONE_NO.to_string()), use_public_did: Some(true), thread_id: None, }))); let msgs = [create_msg, msg_details]; compose_message(wallet_handle, &msgs, agent_pairwise_did, agent_pairwise_verkey, agent_did, agent_verkey) } pub fn decompose_connection_request_created(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, String, InviteDetail), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(2, msgs.len()); match (msgs.remove(0), msgs.remove(0)) { (A2AMessage::Version1(A2AMessageV1::MessageCreated(msg_created)), A2AMessage::Version1(A2AMessageV1::MessageDetail(MessageDetail::ConnectionRequestResp(msg_details)))) => Ok((sender_verkey, msg_created.uid, msg_details.invite_detail)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_create_connection_request_answer(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str, reply_to_msg_id: &str) -> BoxedFuture<Vec<u8>, Error> { let (remote_user_pw_did, remote_user_pw_verkey) = did::create_and_store_my_did(wallet_handle, "{}").wait().unwrap(); let (remote_agent_pw_did, remote_agent_pw_verkey) = did::create_and_store_my_did(wallet_handle, "{}").wait().unwrap(); let create_msg = build_create_message_request(RemoteMessageType::ConnReqAnswer, Some(reply_to_msg_id.to_string())); let msg_details: A2AMessage = A2AMessage::Version1(A2AMessageV1::MessageDetail( MessageDetail::ConnectionRequestAnswer( ConnectionRequestAnswerMessageDetail { key_dlg_proof: Some(gen_key_delegated_proof(wallet_handle, EDGE_PAIRWISE_DID_VERKEY, &agent_pairwise_did, &agent_pairwise_verkey)), sender_detail: SenderDetail { did: remote_user_pw_did, verkey: remote_user_pw_verkey.clone(), agent_key_dlg_proof: gen_key_delegated_proof(wallet_handle, &remote_user_pw_verkey, &remote_agent_pw_did, &remote_agent_pw_verkey), name: None, logo_url: None, public_did: None, }, sender_agency_detail: ForwardAgentDetail { did: FORWARD_AGENT_DID.to_string(), verkey: FORWARD_AGENT_DID_VERKEY.to_string(), endpoint: FORWARD_AGENT_ENDPOINT.to_string(), }, answer_status_code: MessageStatusCode::Accepted, thread: None, } ))); let msgs = [create_msg, msg_details]; compose_message(wallet_handle, &msgs, agent_pairwise_did, agent_pairwise_verkey, agent_did, agent_verkey) } pub fn decompose_connection_request_answer_created(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, String), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(1, msgs.len()); match msgs.remove(0) { A2AMessage::Version1(A2AMessageV1::MessageCreated(msg_created)) => Ok((sender_verkey, msg_created.uid)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_create_general_message(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str, mtype: RemoteMessageType) -> BoxedFuture<Vec<u8>, Error> { let create_msg = build_create_message_request(mtype, None); let msg_details: A2AMessage = A2AMessage::Version1(A2AMessageV1::MessageDetail( MessageDetail::General( GeneralMessageDetail { msg: PAYLOAD.to_vec(), title: None, detail: None, } ) )); let msgs = [create_msg, msg_details]; compose_message(wallet_handle, &msgs, agent_pairwise_did, agent_pairwise_verkey, agent_did, agent_verkey) } fn build_create_message_request(mtype: RemoteMessageType, reply_to_msg_id: Option<String>) -> A2AMessage { A2AMessage::Version1(A2AMessageV1::CreateMessage(CreateMessage { mtype, send_msg: false, uid: None, reply_to_msg_id })) } pub fn decompose_general_message_created(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, String), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(1, msgs.len()); match msgs.remove(0) { A2AMessage::Version1(A2AMessageV1::MessageCreated(msg_created)) => Ok((sender_verkey, msg_created.uid)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_get_messages(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::GetMessages(GetMessages { exclude_payload: None, uids: Vec::new(), status_codes: Vec::new(), }))]; compose_message(wallet_handle, &msgs, agent_pairwise_did, agent_pairwise_verkey, agent_did, agent_verkey) } pub fn decompose_get_messages(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, Vec<GetMessagesDetailResponse>), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(1, msgs.len()); match msgs.remove(0) { A2AMessage::Version1(A2AMessageV1::Messages(messages)) => Ok((sender_verkey, messages.msgs)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_update_message_status_message(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str, uid: &str, status_code: MessageStatusCode) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::UpdateMessageStatus(UpdateMessageStatus { uids: vec![uid.to_string()], status_code }))]; compose_message(wallet_handle, &msgs, agent_pairwise_did, agent_pairwise_verkey, agent_did, agent_verkey) } pub fn decompose_message_status_updated(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, MessageStatusUpdated), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(1, msgs.len()); match msgs.remove(0) { A2AMessage::Version1(A2AMessageV1::MessageStatusUpdated(msg)) => Ok((sender_verkey, msg)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_update_connection_status_message(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str) -> BoxedFuture<Vec<u8>, Error> {<|fim▁hole|> status_code: ConnectionStatus::Deleted }))]; compose_message(wallet_handle, &msgs, agent_pairwise_did, agent_pairwise_verkey, agent_did, agent_verkey) } pub fn decompose_connection_status_updated(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, ConnectionStatusUpdated), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(1, msgs.len()); match msgs.remove(0) { A2AMessage::Version1(A2AMessageV1::ConnectionStatusUpdated(msg)) => Ok((sender_verkey, msg)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_get_messages_by_connection(wallet_handle: i32, agent_did: &str, agent_verkey: &str, agent_pairwise_did: &str, agent_pairwise_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::GetMessagesByConnections(GetMessagesByConnections { exclude_payload: None, uids: Vec::new(), status_codes: Vec::new(), pairwise_dids: Vec::new(), }))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, agent_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle,agent_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn decompose_get_messages_by_connection(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<(String, Vec<MessagesByConnection>), Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { assert_eq!(1, msgs.len()); match msgs.remove(0) { A2AMessage::Version1(A2AMessageV1::MessagesByConnections(messages)) => Ok((sender_verkey, messages.msgs)), _ => Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_update_configs(wallet_handle: i32, agent_did: &str, agent_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::UpdateConfigs( UpdateConfigs { configs: vec![ ConfigOption {name: "zoom_zoom".to_string(), value: "value".to_string()}, ConfigOption {name: "name".to_string(), value: "super agent".to_string()}, ConfigOption {name: "logo_url".to_string(), value: "http://logo.url".to_string()} ] }))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, agent_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle, agent_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn compose_get_configs(wallet_handle: i32, agent_did: &str, agent_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::GetConfigs( GetConfigs { configs: vec![String::from("name"), String::from("logo_url")] }))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, agent_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle, agent_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn decompose_configs(wallet_handle: i32, msg: &[u8]) -> BoxedFuture<Vec<ConfigOption>, Error> { A2AMessage::unbundle_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, &msg) .and_then(|(sender_verkey, mut msgs)| { if let Some(A2AMessage::Version1(A2AMessageV1::Configs(configs))) = msgs.pop() { Ok((configs.configs)) } else { Err(err_msg("Invalid message")) } }) .into_box() } pub fn compose_remove_configs(wallet_handle: i32, agent_did: &str, agent_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::RemoveConfigs( RemoveConfigs { configs: vec![String::from("name")] }))]; let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_AGENT_DID_VERKEY, agent_verkey, &msgs).wait().unwrap(); compose_forward(wallet_handle, agent_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn compose_forward(wallet_handle: i32, recipient_did: &str, recipient_vk: &str, msg: Vec<u8>) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::Forward( ForwardV1 { fwd: recipient_did.into(), msg, }))]; A2AMessage::prepare_anoncrypted(wallet_handle,recipient_vk, &msgs) } pub fn compose_authcrypted_forward(wallet_handle: i32, sender_vk: &str, recipient_did: &str, recipient_vk: &str, msg: Vec<u8>) -> BoxedFuture<Vec<u8>, Error> { let msgs = [A2AMessage::Version1(A2AMessageV1::Forward( ForwardV1 { fwd: recipient_did.into(), msg, }))]; A2AMessage::prepare_authcrypted(wallet_handle, sender_vk, recipient_vk, &msgs) } pub fn compose_message(wallet_handle: i32, msgs: &[A2AMessage], agent_pairwise_did: &str, agent_pairwise_verkey: &str, agent_did: &str, agent_verkey: &str) -> BoxedFuture<Vec<u8>, Error> { let msg = A2AMessage::prepare_authcrypted(wallet_handle, EDGE_PAIRWISE_DID_VERKEY, agent_pairwise_verkey, &msgs).wait().unwrap(); let msg = compose_authcrypted_forward(wallet_handle, EDGE_AGENT_DID_VERKEY, agent_pairwise_did, agent_verkey, msg).wait().unwrap(); compose_forward(wallet_handle, agent_did, FORWARD_AGENT_DID_VERKEY, msg) } pub fn gen_key_delegated_proof(wallet_handle: i32, signer_vk: &str, did: &str, verkey: &str) -> KeyDlgProof { let signature = format!("{}{}", did, verkey); let signature = crypto::sign(wallet_handle, signer_vk, signature.as_bytes()).wait().unwrap(); let signature = base64::encode(&signature); KeyDlgProof { agent_did: did.into(), agent_delegated_key: verkey.into(), signature } }<|fim▁end|>
let msgs = [A2AMessage::Version1(A2AMessageV1::UpdateConnectionStatus(UpdateConnectionStatus {
<|file_name|>templatevm.py<|end_file_name|><|fim▁begin|># # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2014-2016 Wojtek Porczyk <[email protected]> # Copyright (C) 2016 Marek Marczykowski <[email protected]>) # Copyright (C) 2016 Bahtiar `kalkin-` Gadimov <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, see <https://www.gnu.org/licenses/>. # ''' This module contains the TemplateVM implementation ''' import qubes import qubes.config import qubes.vm.qubesvm import qubes.vm.mix.net from qubes.config import defaults from qubes.vm.qubesvm import QubesVM class TemplateVM(QubesVM): '''Template for AppVM''' dir_path_prefix = qubes.config.system_path['qubes_templates_dir'] @property def appvms(self): ''' Returns a generator containing all domains based on the current TemplateVM. ''' for vm in self.app.domains: if hasattr(vm, 'template') and vm.template is self: yield vm netvm = qubes.VMProperty('netvm', load_stage=4, allow_none=True, default=None, # pylint: disable=protected-access setter=qubes.vm.qubesvm.QubesVM.netvm._setter,<|fim▁hole|> def __init__(self, *args, **kwargs): assert 'template' not in kwargs, "A TemplateVM can not have a template" self.volume_config = { 'root': { 'name': 'root', 'snap_on_start': False, 'save_on_stop': True, 'rw': True, 'source': None, 'size': defaults['root_img_size'], }, 'private': { 'name': 'private', 'snap_on_start': False, 'save_on_stop': True, 'rw': True, 'source': None, 'size': defaults['private_img_size'], 'revisions_to_keep': 0, }, 'volatile': { 'name': 'volatile', 'size': defaults['root_img_size'], 'snap_on_start': False, 'save_on_stop': False, 'rw': True, }, 'kernel': { 'name': 'kernel', 'snap_on_start': False, 'save_on_stop': False, 'rw': False } } super(TemplateVM, self).__init__(*args, **kwargs) @qubes.events.handler('property-set:default_user', 'property-set:kernel', 'property-set:kernelopts', 'property-set:vcpus', 'property-set:memory', 'property-set:maxmem', 'property-set:qrexec_timeout', 'property-set:shutdown_timeout', 'property-set:management_dispvm') def on_property_set_child(self, _event, name, newvalue, oldvalue=None): """Send event about default value change to child VMs (which use default inherited from the template). This handler is supposed to be set for properties using `_default_with_template()` function for the default value. """ if newvalue == oldvalue: return for vm in self.appvms: if not vm.property_is_default(name): continue vm.fire_event('property-reset:' + name, name=name)<|fim▁end|>
doc='VM that provides network connection to this domain. When ' '`None`, machine is disconnected.')
<|file_name|>websocket.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use dom::bindings::codegen::Bindings::WebSocketBinding; use dom::bindings::codegen::Bindings::WebSocketBinding::{BinaryType, WebSocketMethods}; use dom::bindings::codegen::UnionTypes::StringOrStringSequence; use dom::bindings::conversions::{ToJSValConvertible}; use dom::bindings::error::{Error, Fallible, ErrorResult}; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; use dom::bindings::js::Root; use dom::bindings::refcounted::Trusted; use dom::bindings::reflector::{Reflectable, reflect_dom_object}; use dom::bindings::str::{DOMString, USVString, is_token}; use dom::blob::{Blob, DataSlice}; use dom::closeevent::CloseEvent; use dom::event::{Event, EventBubbles, EventCancelable}; use dom::eventtarget::EventTarget; use dom::messageevent::MessageEvent; use dom::urlhelper::UrlHelper; use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use js::jsapi::{JSAutoCompartment, RootedValue}; use js::jsapi::{JS_GetArrayBufferData, JS_NewArrayBuffer}; use js::jsval::UndefinedValue; use libc::{uint32_t, uint8_t}; use net_traits::CookieSource::HTTP; use net_traits::CoreResourceMsg::{WebsocketConnect, SetCookiesForUrl}; use net_traits::MessageData; use net_traits::hosts::replace_hosts; use net_traits::unwrap_websocket_protocol; use net_traits::{WebSocketCommunicate, WebSocketConnectData, WebSocketDomAction, WebSocketNetworkEvent}; use script_runtime::ScriptThreadEventCategory::WebSocketEvent; use script_runtime::{CommonScriptMsg, ScriptChan}; use script_thread::Runnable; use std::ascii::AsciiExt; use std::borrow::ToOwned; use std::cell::Cell; use std::ptr; use std::sync::Arc; use std::thread; use websocket::client::request::Url; use websocket::header::{Headers, WebSocketProtocol}; use websocket::ws::util::url::parse_url; #[derive(JSTraceable, PartialEq, Copy, Clone, Debug, HeapSizeOf)] enum WebSocketRequestState { Connecting = 0, Open = 1, Closing = 2, Closed = 3, } // list of bad ports according to // https://fetch.spec.whatwg.org/#port-blocking const BLOCKED_PORTS_LIST: &'static [u16] = &[ 1, // tcpmux 7, // echo 9, // discard 11, // systat 13, // daytime 15, // netstat 17, // qotd 19, // chargen 20, // ftp-data 21, // ftp 22, // ssh 23, // telnet 25, // smtp 37, // time 42, // name 43, // nicname 53, // domain 77, // priv-rjs 79, // finger 87, // ttylink 95, // supdup 101, // hostriame 102, // iso-tsap 103, // gppitnp 104, // acr-nema 109, // pop2 110, // pop3 111, // sunrpc 113, // auth 115, // sftp 117, // uucp-path 119, // nntp 123, // ntp 135, // loc-srv / epmap 139, // netbios 143, // imap2 179, // bgp 389, // ldap 465, // smtp+ssl 512, // print / exec 513, // login 514, // shell 515, // printer 526, // tempo 530, // courier 531, // chat 532, // netnews 540, // uucp 556, // remotefs 563, // nntp+ssl 587, // smtp 601, // syslog-conn 636, // ldap+ssl 993, // imap+ssl 995, // pop3+ssl 2049, // nfs 3659, // apple-sasl 4045, // lockd 6000, // x11 6665, // irc (alternate) 6666, // irc (alternate) 6667, // irc (default) 6668, // irc (alternate) 6669, // irc (alternate) ]; // Close codes defined in https://tools.ietf.org/html/rfc6455#section-7.4.1 // Names are from https://github.com/mozilla/gecko-dev/blob/master/netwerk/protocol/websocket/nsIWebSocketChannel.idl #[allow(dead_code)] mod close_code { pub const NORMAL: u16 = 1000; pub const GOING_AWAY: u16 = 1001; pub const PROTOCOL_ERROR: u16 = 1002; pub const UNSUPPORTED_DATATYPE: u16 = 1003; pub const NO_STATUS: u16 = 1005; pub const ABNORMAL: u16 = 1006; pub const INVALID_PAYLOAD: u16 = 1007; pub const POLICY_VIOLATION: u16 = 1008; pub const TOO_LARGE: u16 = 1009; pub const EXTENSION_MISSING: u16 = 1010; pub const INTERNAL_ERROR: u16 = 1011; pub const TLS_FAILED: u16 = 1015; } pub fn close_the_websocket_connection(address: Trusted<WebSocket>, sender: Box<ScriptChan>, code: Option<u16>, reason: String) { let close_task = box CloseTask { address: address, failed: false, code: code, reason: Some(reason), }; sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, close_task)).unwrap(); } pub fn fail_the_websocket_connection(address: Trusted<WebSocket>, sender: Box<ScriptChan>) { let close_task = box CloseTask { address: address, failed: true, code: Some(close_code::ABNORMAL), reason: None, }; sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, close_task)).unwrap(); } #[dom_struct] pub struct WebSocket { eventtarget: EventTarget, url: Url, ready_state: Cell<WebSocketRequestState>, buffered_amount: Cell<u64>, clearing_buffer: Cell<bool>, //Flag to tell if there is a running thread to clear buffered_amount #[ignore_heap_size_of = "Defined in std"] sender: DOMRefCell<Option<IpcSender<WebSocketDomAction>>>, binary_type: Cell<BinaryType>, protocol: DOMRefCell<String>, //Subprotocol selected by server } impl WebSocket { fn new_inherited(url: Url) -> WebSocket { WebSocket { eventtarget: EventTarget::new_inherited(), url: url, ready_state: Cell::new(WebSocketRequestState::Connecting), buffered_amount: Cell::new(0), clearing_buffer: Cell::new(false), sender: DOMRefCell::new(None), binary_type: Cell::new(BinaryType::Blob), protocol: DOMRefCell::new("".to_owned()), } } fn new(global: GlobalRef, url: Url) -> Root<WebSocket> { reflect_dom_object(box WebSocket::new_inherited(url), global, WebSocketBinding::Wrap) } pub fn Constructor(global: GlobalRef, url: DOMString, protocols: Option<StringOrStringSequence>) -> Fallible<Root<WebSocket>> { // Step 1. let resource_url = try!(Url::parse(&url).map_err(|_| Error::Syntax)); // Although we do this replace and parse operation again in the resource thread, // we try here to be able to immediately throw a syntax error on failure. let _ = try!(parse_url(&replace_hosts(&resource_url)).map_err(|_| Error::Syntax)); // Step 2: Disallow https -> ws connections. // Step 3: Potentially block access to some ports. let port: u16 = resource_url.port_or_known_default().unwrap(); if BLOCKED_PORTS_LIST.iter().any(|&p| p == port) { return Err(Error::Security); } // Step 4. let protocols = match protocols { Some(StringOrStringSequence::String(string)) => vec![String::from(string)], Some(StringOrStringSequence::StringSequence(sequence)) => { sequence.into_iter().map(String::from).collect() }, _ => Vec::new(), }; // Step 5. for (i, protocol) in protocols.iter().enumerate() { // https://tools.ietf.org/html/rfc6455#section-4.1 // Handshake requirements, step 10 if protocols[i + 1..].iter().any(|p| p.eq_ignore_ascii_case(protocol)) { return Err(Error::Syntax); } // https://tools.ietf.org/html/rfc6455#section-4.1 if !is_token(protocol.as_bytes()) { return Err(Error::Syntax); } } // Step 6: Origin. let origin = UrlHelper::Origin(&global.get_url()).0; // Step 7. let ws = WebSocket::new(global, resource_url.clone()); let address = Trusted::new(ws.r()); let connect_data = WebSocketConnectData { resource_url: resource_url.clone(), origin: origin, protocols: protocols, }; // Create the interface for communication with the resource thread let (dom_action_sender, resource_action_receiver): (IpcSender<WebSocketDomAction>, IpcReceiver<WebSocketDomAction>) = ipc::channel().unwrap(); let (resource_event_sender, dom_event_receiver): (IpcSender<WebSocketNetworkEvent>, IpcReceiver<WebSocketNetworkEvent>) = ipc::channel().unwrap(); let connect = WebSocketCommunicate { event_sender: resource_event_sender, action_receiver: resource_action_receiver, }; let _ = global.core_resource_thread().send(WebsocketConnect(connect, connect_data)); *ws.sender.borrow_mut() = Some(dom_action_sender); let moved_address = address.clone(); let sender = global.networking_task_source(); thread::spawn(move || { while let Ok(event) = dom_event_receiver.recv() { match event { WebSocketNetworkEvent::ConnectionEstablished(headers, protocols) => { let open_thread = box ConnectionEstablishedTask { address: moved_address.clone(), headers: headers, protocols: protocols, }; sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, open_thread)).unwrap(); }, WebSocketNetworkEvent::MessageReceived(message) => { let message_thread = box MessageReceivedTask { address: moved_address.clone(), message: message, }; sender.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, message_thread)).unwrap(); }, WebSocketNetworkEvent::Fail => { fail_the_websocket_connection(moved_address.clone(), sender.clone()); }, WebSocketNetworkEvent::Close(code, reason) => { close_the_websocket_connection(moved_address.clone(), sender.clone(), code, reason); }, } } }); // Step 7. Ok(ws) } // https://html.spec.whatwg.org/multipage/#dom-websocket-send fn send_impl(&self, data_byte_len: u64) -> Fallible<bool> { let return_after_buffer = match self.ready_state.get() { WebSocketRequestState::Connecting => { return Err(Error::InvalidState); }, WebSocketRequestState::Open => false, WebSocketRequestState::Closing | WebSocketRequestState::Closed => true, }; let address = Trusted::new(self); match data_byte_len.checked_add(self.buffered_amount.get()) { None => panic!(), Some(new_amount) => self.buffered_amount.set(new_amount) }; if return_after_buffer { return Ok(false); } if !self.clearing_buffer.get() && self.ready_state.get() == WebSocketRequestState::Open { self.clearing_buffer.set(true); let task = box BufferedAmountTask { address: address, }; let global = self.global(); global.r().script_chan().send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task)).unwrap(); } Ok(true) } } impl WebSocketMethods for WebSocket { // https://html.spec.whatwg.org/multipage/#handler-websocket-onopen event_handler!(open, GetOnopen, SetOnopen); // https://html.spec.whatwg.org/multipage/#handler-websocket-onclose event_handler!(close, GetOnclose, SetOnclose); // https://html.spec.whatwg.org/multipage/#handler-websocket-onerror event_handler!(error, GetOnerror, SetOnerror); // https://html.spec.whatwg.org/multipage/#handler-websocket-onmessage event_handler!(message, GetOnmessage, SetOnmessage); // https://html.spec.whatwg.org/multipage/#dom-websocket-url fn Url(&self) -> DOMString { DOMString::from(self.url.as_str()) } // https://html.spec.whatwg.org/multipage/#dom-websocket-readystate fn ReadyState(&self) -> u16 { self.ready_state.get() as u16 } // https://html.spec.whatwg.org/multipage/#dom-websocket-bufferedamount fn BufferedAmount(&self) -> u64 { self.buffered_amount.get() } // https://html.spec.whatwg.org/multipage/#dom-websocket-binarytype fn BinaryType(&self) -> BinaryType { self.binary_type.get() } // https://html.spec.whatwg.org/multipage/#dom-websocket-binarytype fn SetBinaryType(&self, btype: BinaryType) { self.binary_type.set(btype) } // https://html.spec.whatwg.org/multipage/#dom-websocket-protocol fn Protocol(&self) -> DOMString { DOMString::from(self.protocol.borrow().clone()) } // https://html.spec.whatwg.org/multipage/#dom-websocket-send fn Send(&self, data: USVString) -> ErrorResult { let data_byte_len = data.0.as_bytes().len() as u64; let send_data = try!(self.send_impl(data_byte_len)); if send_data { let mut other_sender = self.sender.borrow_mut(); let my_sender = other_sender.as_mut().unwrap(); let _ = my_sender.send(WebSocketDomAction::SendMessage(MessageData::Text(data.0))); } Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-websocket-send fn Send_(&self, blob: &Blob) -> ErrorResult { /* As per https://html.spec.whatwg.org/multipage/#websocket the buffered amount needs to be clamped to u32, even though Blob.Size() is u64 If the buffer limit is reached in the first place, there are likely other major problems */ let data_byte_len = blob.Size(); let send_data = try!(self.send_impl(data_byte_len)); if send_data { let mut other_sender = self.sender.borrow_mut(); let my_sender = other_sender.as_mut().unwrap(); let bytes = blob.get_data().get_bytes().to_vec(); let _ = my_sender.send(WebSocketDomAction::SendMessage(MessageData::Binary(bytes))); } Ok(()) } // https://html.spec.whatwg.org/multipage/#dom-websocket-close fn Close(&self, code: Option<u16>, reason: Option<USVString>) -> ErrorResult { if let Some(code) = code { //Fail if the supplied code isn't normal and isn't reserved for libraries, frameworks, and applications if code != close_code::NORMAL && (code < 3000 || code > 4999) { return Err(Error::InvalidAccess); } } if let Some(ref reason) = reason { if reason.0.as_bytes().len() > 123 { //reason cannot be larger than 123 bytes return Err(Error::Syntax); } } match self.ready_state.get() { WebSocketRequestState::Closing | WebSocketRequestState::Closed => {} //Do nothing WebSocketRequestState::Connecting => { //Connection is not yet established /*By setting the state to closing, the open function will abort connecting the websocket*/ self.ready_state.set(WebSocketRequestState::Closing); let address = Trusted::new(self); let sender = self.global().r().networking_task_source(); fail_the_websocket_connection(address, sender); } WebSocketRequestState::Open => { self.ready_state.set(WebSocketRequestState::Closing); // Kick off _Start the WebSocket Closing Handshake_ // https://tools.ietf.org/html/rfc6455#section-7.1.2 let reason = reason.map(|reason| reason.0); let mut other_sender = self.sender.borrow_mut(); let my_sender = other_sender.as_mut().unwrap(); let _ = my_sender.send(WebSocketDomAction::Close(code, reason)); } } Ok(()) //Return Ok } } /// Task queued when *the WebSocket connection is established*. struct ConnectionEstablishedTask { address: Trusted<WebSocket>, protocols: Vec<String>, headers: Headers, } impl Runnable for ConnectionEstablishedTask { fn handler(self: Box<Self>) { let ws = self.address.root(); let global = ws.r().global(); // Step 1: Protocols. if !self.protocols.is_empty() && self.headers.get::<WebSocketProtocol>().is_none() { let sender = global.r().networking_task_source(); fail_the_websocket_connection(self.address, sender); return; } // Step 2. ws.ready_state.set(WebSocketRequestState::Open); // Step 3: Extensions. //TODO: Set extensions to extensions in use // Step 4: Protocols. let protocol_in_use = unwrap_websocket_protocol(self.headers.get::<WebSocketProtocol>()); if let Some(protocol_name) = protocol_in_use { *ws.protocol.borrow_mut() = protocol_name.to_owned(); }; // Step 5: Cookies. if let Some(cookies) = self.headers.get_raw("set-cookie") { for cookie in cookies.iter() { if let Ok(cookie_value) = String::from_utf8(cookie.clone()) { let _ = ws.global().r().core_resource_thread().send(SetCookiesForUrl(ws.url.clone(), cookie_value, HTTP)); } } } // Step 6. ws.upcast().fire_simple_event("open"); } } struct BufferedAmountTask { address: Trusted<WebSocket>, } impl Runnable for BufferedAmountTask { // See https://html.spec.whatwg.org/multipage/#dom-websocket-bufferedamount // // To be compliant with standards, we need to reset bufferedAmount only when the event loop // reaches step 1. In our implementation, the bytes will already have been sent on a background // thread. fn handler(self: Box<Self>) { let ws = self.address.root(); ws.buffered_amount.set(0); ws.clearing_buffer.set(false); } } struct CloseTask { address: Trusted<WebSocket>, failed: bool, code: Option<u16>, reason: Option<String>, } impl Runnable for CloseTask { fn handler(self: Box<Self>) { let ws = self.address.root(); let ws = ws.r(); let global = ws.global(); if ws.ready_state.get() == WebSocketRequestState::Closed { // Do nothing if already closed. return; } // Perform _the WebSocket connection is closed_ steps. // https://html.spec.whatwg.org/multipage/#closeWebSocket // Step 1. ws.ready_state.set(WebSocketRequestState::Closed); // Step 2. if self.failed { ws.upcast().fire_simple_event("error"); } // Step 3. let clean_close = !self.failed; let code = self.code.unwrap_or(close_code::NO_STATUS); let reason = DOMString::from(self.reason.unwrap_or("".to_owned())); let close_event = CloseEvent::new(global.r(), atom!("close"), EventBubbles::DoesNotBubble, EventCancelable::NotCancelable, clean_close, code, reason); close_event.upcast::<Event>().fire(ws.upcast()); } } struct MessageReceivedTask { address: Trusted<WebSocket>, message: MessageData, } impl Runnable for MessageReceivedTask { #[allow(unsafe_code)] fn handler(self: Box<Self>) { let ws = self.address.root(); debug!("MessageReceivedTask::handler({:p}): readyState={:?}", &*ws, ws.ready_state.get()); // Step 1. if ws.ready_state.get() != WebSocketRequestState::Open { return; } // Step 2-5. let global = ws.r().global(); // global.get_cx() returns a valid `JSContext` pointer, so this is safe. unsafe { let cx = global.r().get_cx(); let _ac = JSAutoCompartment::new(cx, ws.reflector().get_jsobject().get()); let mut message = RootedValue::new(cx, UndefinedValue()); match self.message { MessageData::Text(text) => text.to_jsval(cx, message.handle_mut()), MessageData::Binary(data) => { match ws.binary_type.get() { BinaryType::Blob => { let slice = DataSlice::new(Arc::new(data), None, None); let blob = Blob::new(global.r(), slice, ""); blob.to_jsval(cx, message.handle_mut()); } BinaryType::Arraybuffer => { let len = data.len() as uint32_t;<|fim▁hole|> let mut is_shared = false; let buf_data: *mut uint8_t = JS_GetArrayBufferData(buf, &mut is_shared, ptr::null()); assert!(!is_shared); ptr::copy_nonoverlapping(data.as_ptr(), buf_data, len as usize); buf.to_jsval(cx, message.handle_mut()); } } }, } MessageEvent::dispatch_jsval(ws.upcast(), global.r(), message.handle()); } } }<|fim▁end|>
let buf = JS_NewArrayBuffer(cx, len);
<|file_name|>test_mnistplus.py<|end_file_name|><|fim▁begin|>""" This file tests the MNISTPlus class. majorly concerning the X and y member of the dataset and their corresponding sizes, data scales and topological views. """ from pylearn2.datasets.mnistplus import MNISTPlus from pylearn2.space import IndexSpace, VectorSpace import unittest from pylearn2.testing.skip import skip_if_no_data import numpy as np def test_MNISTPlus():<|fim▁hole|> Test the MNISTPlus warper. Tests the scale of data, the splitting of train, valid, test sets. Tests that a topological batch has 4 dimensions. Tests that it work well with selected type of augmentation. """ skip_if_no_data() for subset in ['train', 'valid', 'test']: ids = MNISTPlus(which_set=subset) assert 0.01 >= ids.X.min() >= 0.0 assert 0.99 <= ids.X.max() <= 1.0 topo = ids.get_batch_topo(1) assert topo.ndim == 4 del ids train_y = MNISTPlus(which_set='train', label_type='label') assert 0.99 <= train_y.X.max() <= 1.0 assert 0.0 <= train_y.X.min() <= 0.01 assert train_y.y.max() == 9 assert train_y.y.min() == 0 assert train_y.y.shape == (train_y.X.shape[0], 1) train_y = MNISTPlus(which_set='train', label_type='azimuth') assert 0.99 <= train_y.X.max() <= 1.0 assert 0.0 <= train_y.X.min() <= 0.01 assert 0.0 <= train_y.y.max() <= 1.0 assert 0.0 <= train_y.y.min() <= 1.0 assert train_y.y.shape == (train_y.X.shape[0], 1) train_y = MNISTPlus(which_set='train', label_type='rotation') assert 0.99 <= train_y.X.max() <= 1.0 assert 0.0 <= train_y.X.min() <= 0.01 assert train_y.y.max() == 9 assert train_y.y.min() == 0 assert train_y.y.shape == (train_y.X.shape[0], 1) train_y = MNISTPlus(which_set='train', label_type='texture_id') assert 0.99 <= train_y.X.max() <= 1.0 assert 0.0 <= train_y.X.min() <= 0.01 assert train_y.y.max() == 9 assert train_y.y.min() == 0 assert train_y.y.shape == (train_y.X.shape[0], 1)<|fim▁end|>
"""
<|file_name|>_changedsince.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.<|fim▁hole|># but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # gen.filters.rules/Person/_ChangedSince.py #------------------------------------------------------------------------- # # Standard Python modules # #------------------------------------------------------------------------- from ....const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext #------------------------------------------------------------------------- # # Gramps modules # #------------------------------------------------------------------------- from .._changedsincebase import ChangedSinceBase #------------------------------------------------------------------------- # # ChangedSince # #------------------------------------------------------------------------- class ChangedSince(ChangedSinceBase): """Rule that checks for persons changed since a specific time.""" labels = [ _('Changed after:'), _('but before:') ] name = _('Persons changed after <date time>') description = _("Matches person records changed after a specified " "date-time (yyyy-mm-dd hh:mm:ss) or in the range, if a second " "date-time is given.")<|fim▁end|>
# # This program is distributed in the hope that it will be useful,