# -*- coding: utf-8 -*- # # Copyright (C) 2012-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import gzip from io import BytesIO import json import logging import os import posixpath import re try: import threading except ImportError: # pragma: no cover import dummy_threading as threading import zlib from . import DistlibException from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url, queue, quote, unescape, string_types, build_opener, HTTPRedirectHandler as BaseRedirectHandler, text_type, Request, HTTPError, URLError) from .database import Distribution, DistributionPath, make_dist from .metadata import Metadata, MetadataInvalidError from .util import (cached_property, parse_credentials, ensure_slash, split_filename, get_project_data, parse_requirement, parse_name_and_version, ServerProxy, normalize_name) from .version import get_scheme, UnsupportedVersionError from .wheel import Wheel, is_compatible logger = logging.getLogger(__name__) HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)') CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I) HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml') DEFAULT_INDEX = 'https://pypi.org/pypi' def get_all_distribution_names(url=None): """ Return all distribution names known by an index. :param url: The URL of the index. :return: A list of all known distribution names. """ if url is None: url = DEFAULT_INDEX client = ServerProxy(url, timeout=3.0) try: return client.list_packages() finally: client('close')() class RedirectHandler(BaseRedirectHandler): """ A class to work around a bug in some Python 3.2.x releases. """ # There's a bug in the base version for some 3.2.x # (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header # returns e.g. /abc, it bails because it says the scheme '' # is bogus, when actually it should use the request's # URL for the scheme. See Python issue #13696. def http_error_302(self, req, fp, code, msg, headers): # Some servers (incorrectly) return multiple Location headers # (so probably same goes for URI). Use first header. newurl = None for key in ('location', 'uri'): if key in headers: newurl = headers[key] break if newurl is None: # pragma: no cover return urlparts = urlparse(newurl) if urlparts.scheme == '': newurl = urljoin(req.get_full_url(), newurl) if hasattr(headers, 'replace_header'): headers.replace_header(key, newurl) else: headers[key] = newurl return BaseRedirectHandler.http_error_302(self, req, fp, code, msg, headers) http_error_301 = http_error_303 = http_error_307 = http_error_302 class Locator(object): """ A base class for locators - things that locate distributions. """ source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz') binary_extensions = ('.egg', '.exe', '.whl') excluded_extensions = ('.pdf',) # A list of tags indicating which wheels you want to match. The default # value of None matches against the tags compatible with the running # Python. If you want to match other values, set wheel_tags on a locator # instance to a list of tuples (pyver, abi, arch) which you want to match. wheel_tags = None downloadable_extensions = source_extensions + ('.whl',) def __init__(self, scheme='default'): """ Initialise an instance. :param scheme: Because locators look for most recent versions, they need to know the version scheme to use. This specifies the current PEP-recommended scheme - use ``'legacy'`` if you need to support existing distributions on PyPI. """ self._cache = {} self.scheme = scheme # Because of bugs in some of the handlers on some of the platforms, # we use our own opener rather than just using urlopen. self.opener = build_opener(RedirectHandler()) # If get_project() is called from locate(), the matcher instance # is set from the requirement passed to locate(). See issue #18 for # why this can be useful to know. self.matcher = None self.errors = queue.Queue() def get_errors(self): """ Return any errors which have occurred. """ result = [] while not self.errors.empty(): # pragma: no cover try: e = self.errors.get(False) result.append(e) except self.errors.Empty: continue self.errors.task_done() return result def clear_errors(self): """ Clear any errors which may have been logged. """ # Just get the errors and throw them away self.get_errors() def clear_cache(self): self._cache.clear() def _get_scheme(self): return self._scheme def _set_scheme(self, value): self._scheme = value scheme = property(_get_scheme, _set_scheme) def _get_project(self, name): """ For a given project, get a dictionary mapping available versions to Distribution instances. This should be implemented in subclasses. If called from a locate() request, self.matcher will be set to a matcher for the requirement to satisfy, otherwise it will be None. """ raise NotImplementedError('Please implement in the subclass') def get_distribution_names(self): """ Return all the distribution names known to this locator. """ raise NotImplementedError('Please implement in the subclass') def get_project(self, name): """ For a given project, get a dictionary mapping available versions to Distribution instances. This calls _get_project to do all the work, and just implements a caching layer on top. """ if self._cache is None: # pragma: no cover result = self._get_project(name) elif name in self._cache: result = self._cache[name] else: self.clear_errors() result = self._get_project(name) self._cache[name] = result return result def score_url(self, url): """ Give an url a score which can be used to choose preferred URLs for a given project release. """ t = urlparse(url) basename = posixpath.basename(t.path) compatible = True is_wheel = basename.endswith('.whl') is_downloadable = basename.endswith(self.downloadable_extensions) if is_wheel: compatible = is_compatible(Wheel(basename), self.wheel_tags) return (t.scheme == 'https', 'pypi.org' in t.netloc, is_downloadable, is_wheel, compatible, basename) def prefer_url(self, url1, url2): """ Choose one of two URLs where both are candidates for distribution archives for the same version of a distribution (for example, .tar.gz vs. zip). The current implementation favours https:// URLs over http://, archives from PyPI over those from other locations, wheel compatibility (if a wheel) and then the archive name. """ result = url2 if url1: s1 = self.score_url(url1) s2 = self.score_url(url2) if s1 > s2: result = url1 if result != url2: logger.debug('Not replacing %r with %r', url1, url2) else: logger.debug('Replacing %r with %r', url1, url2) return result def split_filename(self, filename, project_name): """ Attempt to split a filename in project name, version and Python version. """ return split_filename(filename, project_name) def convert_url_to_download_info(self, url, project_name): """ See if a URL is a candidate for a download URL for a project (the URL has typically been scraped from an HTML page). If it is, a dictionary is returned with keys "name", "version", "filename" and "url"; otherwise, None is returned. """ def same_project(name1, name2): return normalize_name(name1) == normalize_name(name2) result = None scheme, netloc, path, params, query, frag = urlparse(url) if frag.lower().startswith('egg='): # pragma: no cover logger.debug('%s: version hint in fragment: %r', project_name, frag) m = HASHER_HASH.match(frag) if m: algo, digest = m.groups() else: algo, digest = None, None origpath = path if path and path[-1] == '/': # pragma: no cover path = path[:-1] if path.endswith('.whl'): try: wheel = Wheel(path) if not is_compatible(wheel, self.wheel_tags): logger.debug('Wheel not compatible: %s', path) else: if project_name is None: include = True else: include = same_project(wheel.name, project_name) if include: result = { 'name': wheel.name, 'version': wheel.version, 'filename': wheel.filename, 'url': urlunparse((scheme, netloc, origpath, params, query, '')), 'python-version': ', '.join( ['.'.join(list(v[2:])) for v in wheel.pyver]), } except Exception as e: # pragma: no cover logger.warning('invalid path for wheel: %s', path) elif not path.endswith(self.downloadable_extensions): # pragma: no cover logger.debug('Not downloadable: %s', path) else: # downloadable extension path = filename = posixpath.basename(path) for ext in self.downloadable_extensions: if path.endswith(ext): path = path[:-len(ext)] t = self.split_filename(path, project_name) if not t: # pragma: no cover logger.debug('No match for project/version: %s', path) else: name, version, pyver = t if not project_name or same_project(project_name, name): result = { 'name': name, 'version': version, 'filename': filename, 'url': urlunparse((scheme, netloc, origpath, params, query, '')), #'packagetype': 'sdist', } if pyver: # pragma: no cover result['python-version'] = pyver break if result and algo: result['%s_digest' % algo] = digest return result def _get_digest(self, info): """ Get a digest from a dictionary by looking at a "digests" dictionary or keys of the form 'algo_digest'. Returns a 2-tuple (algo, digest) if found, else None. Currently looks only for SHA256, then MD5. """ result = None if 'digests' in info: digests = info['digests'] for algo in ('sha256', 'md5'): if algo in digests: result = (algo, digests[algo]) break if not result: for algo in ('sha256', 'md5'): key = '%s_digest' % algo if key in info: result = (algo, info[key]) break return result def _update_version_data(self, result, info): """ Update a result dictionary (the final result from _get_project) with a dictionary for a specific version, which typically holds information gleaned from a filename or URL for an archive for the distribution. """ name = info.pop('name') version = info.pop('version') if version in result: dist = result[version] md = dist.metadata else: dist = make_dist(name, version, scheme=self.scheme) md = dist.metadata dist.digest = digest = self._get_digest(info) url = info['url'] result['digests'][url] = digest if md.source_url != info['url']: md.source_url = self.prefer_url(md.source_url, url) result['urls'].setdefault(version, set()).add(url) dist.locator = self result[version] = dist def locate(self, requirement, prereleases=False): """ Find the most recent distribution which matches the given requirement. :param requirement: A requirement of the form 'foo (1.0)' or perhaps 'foo (>= 1.0, < 2.0, != 1.3)' :param prereleases: If ``True``, allow pre-release versions to be located. Otherwise, pre-release versions are not returned. :return: A :class:`Distribution` instance, or ``None`` if no such distribution could be located. """ result = None r = parse_requirement(requirement) if r is None: # pragma: no cover raise DistlibException('Not a valid requirement: %r' % requirement) scheme = get_scheme(self.scheme) self.matcher = matcher = scheme.matcher(r.requirement) logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__) versions = self.get_project(r.name) if len(versions) > 2: # urls and digests keys are present # sometimes, versions are invalid slist = [] vcls = matcher.version_class for k in versions: if k in ('urls', 'digests'): continue try: if not matcher.match(k): logger.debug('%s did not match %r', matcher, k) else: if prereleases or not vcls(k).is_prerelease: slist.append(k) else: logger.debug('skipping pre-release ' 'version %s of %s', k, matcher.name) except Exception: # pragma: no cover logger.warning('error matching %s with %r', matcher, k) pass # slist.append(k) if len(slist) > 1: slist = sorted(slist, key=scheme.key) if slist: logger.debug('sorted list: %s', slist) version = slist[-1] result = versions[version] if result: if r.extras: result.extras = r.extras result.download_urls = versions.get('urls', {}).get(version, set()) d = {} sd = versions.get('digests', {}) for url in result.download_urls: if url in sd: # pragma: no cover d[url] = sd[url] result.digests = d self.matcher = None return result class PyPIRPCLocator(Locator): """ This locator uses XML-RPC to locate distributions. It therefore cannot be used with simple mirrors (that only mirror file content). """ def __init__(self, url, **kwargs): """ Initialise an instance. :param url: The URL to use for XML-RPC. :param kwargs: Passed to the superclass constructor. """ super(PyPIRPCLocator, self).__init__(**kwargs) self.base_url = url self.client = ServerProxy(url, timeout=3.0) def get_distribution_names(self): """ Return all the distribution names known to this locator. """ return set(self.client.list_packages()) def _get_project(self, name): result = {'urls': {}, 'digests': {}} versions = self.client.package_releases(name, True) for v in versions: urls = self.client.release_urls(name, v) data = self.client.release_data(name, v) metadata = Metadata(scheme=self.scheme) metadata.name = data['name'] metadata.version = data['version'] metadata.license = data.get('license') metadata.keywords = data.get('keywords', []) metadata.summary = data.get('summary') dist = Distribution(metadata) if urls: info = urls[0] metadata.source_url = info['url'] dist.digest = self._get_digest(info) dist.locator = self result[v] = dist for info in urls: url = info['url'] digest = self._get_digest(info) result['urls'].setdefault(v, set()).add(url) result['digests'][url] = digest return result class PyPIJSONLocator(Locator): """ This locator uses PyPI's JSON interface. It's very limited in functionality and probably not worth using. """ def __init__(self, url, **kwargs): super(PyPIJSONLocator, self).__init__(**kwargs) self.base_url = ensure_slash(url) def get_distribution_names(self): """ Return all the distribution names known to this locator. """ raise NotImplementedError('Not available from this locator') def _get_project(self, name): result = {'urls': {}, 'digests': {}} url = urljoin(self.base_url, '%s/json' % quote(name)) try: resp = self.opener.open(url) data = resp.read().decode() # for now d = json.loads(data) md = Metadata(scheme=self.scheme) data = d['info'] md.name = data['name'] md.version = data['version'] md.license = data.get('license') md.keywords = data.get('keywords', []) md.summary = data.get('summary') dist = Distribution(md) dist.locator = self urls = d['urls'] result[md.version] = dist for info in d['urls']: url = info['url'] dist.download_urls.add(url) dist.digests[url] = self._get_digest(info) result['urls'].setdefault(md.version, set()).add(url) result['digests'][url] = self._get_digest(info) # Now get other releases for version, infos in d['releases'].items(): if version == md.version: continue # already done omd = Metadata(scheme=self.scheme) omd.name = md.name omd.version = version odist = Distribution(omd) odist.locator = self result[version] = odist for info in infos: url = info['url'] odist.download_urls.add(url) odist.digests[url] = self._get_digest(info) result['urls'].setdefault(version, set()).add(url) result['digests'][url] = self._get_digest(info) # for info in urls: # md.source_url = info['url'] # dist.digest = self._get_digest(info) # dist.locator = self # for info in urls: # url = info['url'] # result['urls'].setdefault(md.version, set()).add(url) # result['digests'][url] = self._get_digest(info) except Exception as e: self.errors.put(text_type(e)) logger.exception('JSON fetch failed: %s', e) return result class Page(object): """ This class represents a scraped HTML page. """ # The following slightly hairy-looking regex just looks for the contents of # an anchor link, which has an attribute "href" either immediately preceded # or immediately followed by a "rel" attribute. The attribute values can be # declared with double quotes, single quotes or no quotes - which leads to # the length of the expression. _href = re.compile(""" (rel\\s*=\\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\\s\n]*))\\s+)? href\\s*=\\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\\s\n]*)) (\\s+rel\\s*=\\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\\s\n]*)))? """, re.I | re.S | re.X) _base = re.compile(r"""<base\s+href\s*=\s*['"]?([^'">]+)""", re.I | re.S) def __init__(self, data, url): """ Initialise an instance with the Unicode page contents and the URL they came from. """ self.data = data self.base_url = self.url = url m = self._base.search(self.data) if m: self.base_url = m.group(1) _clean_re =<EMAIL_ADDRESS>re.I) @cached_property def links(self): """ Return the URLs of all the links on a page together with information about their "rel" attribute, for determining which ones to treat as downloads and which ones to queue for further scraping. """ def clean(url): "Tidy up an URL." scheme, netloc, path, params, query, frag = urlparse(url) return urlunparse((scheme, netloc, quote(path), params, query, frag)) result = set() for match in self._href.finditer(self.data): d = match.groupdict('') rel = (d['rel1'] or d['rel2'] or d['rel3'] or d['rel4'] or d['rel5'] or d['rel6']) url = d['url1'] or d['url2'] or d['url3'] url = urljoin(self.base_url, url) url = unescape(url) url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url) result.add((url, rel)) # We sort the result, hoping to bring the most recent versions # to the front result = sorted(result, key=lambda t: t[0], reverse=True) return result class SimpleScrapingLocator(Locator): """ A locator which scrapes HTML pages to locate downloads for a distribution. This runs multiple threads to do the I/O; performance is at least as good as pip's PackageFinder, which works in an analogous fashion. """ # These are used to deal with various Content-Encoding schemes. decoders = { 'deflate': zlib.decompress, 'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(d)).read(), 'none': lambda b: b, } def __init__(self, url, timeout=None, num_workers=10, **kwargs): """ Initialise an instance. :param url: The root URL to use for scraping. :param timeout: The timeout, in seconds, to be applied to requests. This defaults to ``None`` (no timeout specified). :param num_workers: The number of worker threads you want to do I/O, This defaults to 10. :param kwargs: Passed to the superclass. """ super(SimpleScrapingLocator, self).__init__(**kwargs) self.base_url = ensure_slash(url) self.timeout = timeout self._page_cache = {} self._seen = set() self._to_fetch = queue.Queue() self._bad_hosts = set() self.skip_externals = False self.num_workers = num_workers self._lock = threading.RLock() # See issue #45: we need to be resilient when the locator is used # in a thread, e.g. with concurrent.futures. We can't use self._lock # as it is for coordinating our internal threads - the ones created # in _prepare_threads. self._gplock = threading.RLock() self.platform_check = False # See issue #112 def _prepare_threads(self): """ Threads are created only when get_project is called, and terminate before it returns. They are there primarily to parallelise I/O (i.e. fetching web pages). """ self._threads = [] for i in range(self.num_workers): t = threading.Thread(target=self._fetch) t.setDaemon(True) t.start() self._threads.append(t) def _wait_threads(self): """ Tell all the threads to terminate (by sending a sentinel value) and wait for them to do so. """ # Note that you need two loops, since you can't say which # thread will get each sentinel for t in self._threads: self._to_fetch.put(None) # sentinel for t in self._threads: t.join() self._threads = [] def _get_project(self, name): result = {'urls': {}, 'digests': {}} with self._gplock: self.result = result self.project_name = name url = urljoin(self.base_url, '%s/' % quote(name)) self._seen.clear() self._page_cache.clear() self._prepare_threads() try: logger.debug('Queueing %s', url) self._to_fetch.put(url) self._to_fetch.join() finally: self._wait_threads() del self.result return result platform_dependent = re.compile(r'\b(linux_(i\d86|x86_64|arm\w+)|' r'win(32|_amd64)|macosx_?\d+)\b', re.I) def _is_platform_dependent(self, url): """ Does an URL refer to a platform-specific download? """ return self.platform_dependent.search(url) def _process_download(self, url): """ See if an URL is a suitable download for a project. If it is, register information in the result dictionary (for _get_project) about the specific version it's for. Note that the return value isn't actually used other than as a boolean value. """ if self.platform_check and self._is_platform_dependent(url): info = None else: info = self.convert_url_to_download_info(url, self.project_name) logger.debug('process_download: %s -> %s', url, info) if info: with self._lock: # needed because self.result is shared self._update_version_data(self.result, info) return info def _should_queue(self, link, referrer, rel): """ Determine whether a link URL from a referring page and with a particular "rel" attribute should be queued for scraping. """ scheme, netloc, path, _, _, _ = urlparse(link) if path.endswith(self.source_extensions + self.binary_extensions + self.excluded_extensions): result = False elif self.skip_externals and not link.startswith(self.base_url): result = False elif not referrer.startswith(self.base_url): result = False elif rel not in ('homepage', 'download'): result = False elif scheme not in ('http', 'https', 'ftp'): result = False elif self._is_platform_dependent(link): result = False else: host = netloc.split(':', 1)[0] if host.lower() == 'localhost': result = False else: result = True logger.debug('should_queue: %s (%s) from %s -> %s', link, rel, referrer, result) return result def _fetch(self): """ Get a URL to fetch from the work queue, get the HTML page, examine its links for download candidates and candidates for further scraping. This is a handy method to run in a thread. """ while True: url = self._to_fetch.get() try: if url: page = self.get_page(url) if page is None: # e.g. after an error continue for link, rel in page.links: if link not in self._seen: try: self._seen.add(link) if (not self._process_download(link) and self._should_queue(link, url, rel)): logger.debug('Queueing %s from %s', link, url) self._to_fetch.put(link) except MetadataInvalidError: # e.g. invalid versions pass except Exception as e: # pragma: no cover self.errors.put(text_type(e)) finally: # always do this, to avoid hangs :-) self._to_fetch.task_done() if not url: #logger.debug('Sentinel seen, quitting.') break def get_page(self, url): """ Get the HTML for an URL, possibly from an in-memory cache. XXX TODO Note: this cache is never actually cleared. It's assumed that the data won't get stale over the lifetime of a locator instance (not necessarily true for the default_locator). """ # http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api scheme, netloc, path, _, _, _ = urlparse(url) if scheme == 'file' and os.path.isdir(url2pathname(path)): url = urljoin(ensure_slash(url), 'index.html') if url in self._page_cache: result = self._page_cache[url] logger.debug('Returning %s from cache: %s', url, result) else: host = netloc.split(':', 1)[0] result = None if host in self._bad_hosts: logger.debug('Skipping %s due to bad host %s', url, host) else: req = Request(url, headers={'Accept-encoding': 'identity'}) try: logger.debug('Fetching %s', url) resp = self.opener.open(req, timeout=self.timeout) logger.debug('Fetched %s', url) headers = resp.info() content_type = headers.get('Content-Type', '') if HTML_CONTENT_TYPE.match(content_type): final_url = resp.geturl() data = resp.read() encoding = headers.get('Content-Encoding') if encoding: decoder = self.decoders[encoding] # fail if not found data = decoder(data) encoding = 'utf-8' m = CHARSET.search(content_type) if m: encoding = m.group(1) try: data = data.decode(encoding) except UnicodeError: # pragma: no cover data = data.decode('latin-1') # fallback result = Page(data, final_url) self._page_cache[final_url] = result except HTTPError as e: if e.code != 404: logger.exception('Fetch failed: %s: %s', url, e) except URLError as e: # pragma: no cover logger.exception('Fetch failed: %s: %s', url, e) with self._lock: self._bad_hosts.add(host) except Exception as e: # pragma: no cover logger.exception('Fetch failed: %s: %s', url, e) finally: self._page_cache[url] = result # even if None (failure) return result _distname_re = re.compile('<a href=[^>]*>([^<]+)<') def get_distribution_names(self): """ Return all the distribution names known to this locator. """ result = set() page = self.get_page(self.base_url) if not page: raise DistlibException('Unable to get %s' % self.base_url) for match in self._distname_re.finditer(page.data): result.add(match.group(1)) return result class DirectoryLocator(Locator): """ This class locates distributions in a directory tree. """ def __init__(self, path, **kwargs): """ Initialise an instance. :param path: The root of the directory tree to search. :param kwargs: Passed to the superclass constructor, except for: * recursive - if True (the default), subdirectories are recursed into. If False, only the top-level directory is searched, """ self.recursive = kwargs.pop('recursive', True) super(DirectoryLocator, self).__init__(**kwargs) path = os.path.abspath(path) if not os.path.isdir(path): # pragma: no cover raise DistlibException('Not a directory: %r' % path) self.base_dir = path def should_include(self, filename, parent): """ Should a filename be considered as a candidate for a distribution archive? As well as the filename, the directory which contains it is provided, though not used by the current implementation. """ return filename.endswith(self.downloadable_extensions) def _get_project(self, name): result = {'urls': {}, 'digests': {}} for root, dirs, files in os.walk(self.base_dir): for fn in files: if self.should_include(fn, root): fn = os.path.join(root, fn) url = urlunparse(('file', '', pathname2url(os.path.abspath(fn)), '', '', '')) info = self.convert_url_to_download_info(url, name) if info: self._update_version_data(result, info) if not self.recursive: break return result def get_distribution_names(self): """ Return all the distribution names known to this locator. """ result = set() for root, dirs, files in os.walk(self.base_dir): for fn in files: if self.should_include(fn, root): fn = os.path.join(root, fn) url = urlunparse(('file', '', pathname2url(os.path.abspath(fn)), '', '', '')) info = self.convert_url_to_download_info(url, None) if info: result.add(info['name']) if not self.recursive: break return result class JSONLocator(Locator): """ This locator uses special extended metadata (not available on PyPI) and is the basis of performant dependency resolution in distlib. Other locators require archive downloads before dependencies can be determined! As you might imagine, that can be slow. """ def get_distribution_names(self): """ Return all the distribution names known to this locator. """ raise NotImplementedError('Not available from this locator') def _get_project(self, name): result = {'urls': {}, 'digests': {}} data = get_project_data(name) if data: for info in data.get('files', []): if info['ptype'] != 'sdist' or info['pyversion'] != 'source': continue # We don't store summary in project metadata as it makes # the data bigger for no benefit during dependency # resolution dist = make_dist(data['name'], info['version'], summary=data.get('summary', 'Placeholder for summary'), scheme=self.scheme) md = dist.metadata md.source_url = info['url'] # TODO SHA256 digest if 'digest' in info and info['digest']: dist.digest = ('md5', info['digest']) md.dependencies = info.get('requirements', {}) dist.exports = info.get('exports', {}) result[dist.version] = dist result['urls'].setdefault(dist.version, set()).add(info['url']) return result class DistPathLocator(Locator): """ This locator finds installed distributions in a path. It can be useful for adding to an :class:`AggregatingLocator`. """ def __init__(self, distpath, **kwargs): """ Initialise an instance. :param distpath: A :class:`DistributionPath` instance to search. """ super(DistPathLocator, self).__init__(**kwargs) assert isinstance(distpath, DistributionPath) self.distpath = distpath def _get_project(self, name): dist = self.distpath.get_distribution(name) if dist is None: result = {'urls': {}, 'digests': {}} else: result = { dist.version: dist, 'urls': {dist.version: set([dist.source_url])}, 'digests': {dist.version: set([None])} } return result class AggregatingLocator(Locator): """ This class allows you to chain and/or merge a list of locators. """ def __init__(self, *locators, **kwargs): """ Initialise an instance. :param locators: The list of locators to search. :param kwargs: Passed to the superclass constructor, except for: * merge - if False (the default), the first successful search from any of the locators is returned. If True, the results from all locators are merged (this can be slow). """ self.merge = kwargs.pop('merge', False) self.locators = locators super(AggregatingLocator, self).__init__(**kwargs) def clear_cache(self): super(AggregatingLocator, self).clear_cache() for locator in self.locators: locator.clear_cache() def _set_scheme(self, value): self._scheme = value for locator in self.locators: locator.scheme = value scheme = property(Locator.scheme.fget, _set_scheme) def _get_project(self, name): result = {} for locator in self.locators: d = locator.get_project(name) if d: if self.merge: files = result.get('urls', {}) digests = result.get('digests', {}) # next line could overwrite result['urls'], result['digests'] result.update(d) df = result.get('urls') if files and df: for k, v in files.items(): if k in df: df[k] |= v else: df[k] = v dd = result.get('digests') if digests and dd: dd.update(digests) else: # See issue #18. If any dists are found and we're looking # for specific constraints, we only return something if # a match is found. For example, if a DirectoryLocator # returns just foo (1.0) while we're looking for # foo (>= 2.0), we'll pretend there was nothing there so # that subsequent locators can be queried. Otherwise we # would just return foo (1.0) which would then lead to a # failure to find foo (>= 2.0), because other locators # weren't searched. Note that this only matters when # merge=False. if self.matcher is None: found = True else: found = False for k in d: if self.matcher.match(k): found = True break if found: result = d break return result def get_distribution_names(self): """ Return all the distribution names known to this locator. """ result = set() for locator in self.locators: try: result |= locator.get_distribution_names() except NotImplementedError: pass return result # We use a legacy scheme simply because most of the dists on PyPI use legacy # versions which don't conform to PEP 426 / PEP 440. default_locator = AggregatingLocator( JSONLocator(), SimpleScrapingLocator('https://pypi.org/simple/', timeout=3.0), scheme='legacy') locate = default_locator.locate NAME_VERSION_RE = re.compile(r'(?P<name>[\w-]+)\s*' r'\(\s*(==\s*)?(?P<ver>[^)]+)\)$') class DependencyFinder(object): """ Locate dependencies for distributions. """ def __init__(self, locator=None): """ Initialise an instance, using the specified locator to locate distributions. """ self.locator = locator or default_locator self.scheme = get_scheme(self.locator.scheme) def add_distribution(self, dist): """ Add a distribution to the finder. This will update internal information about who provides what. :param dist: The distribution to add. """ logger.debug('adding distribution %s', dist) name = dist.key self.dists_by_name[name] = dist self.dists[(name, dist.version)] = dist for p in dist.provides: name, version = parse_name_and_version(p) logger.debug('Add to provided: %s, %s, %s', name, version, dist) self.provided.setdefault(name, set()).add((version, dist)) def remove_distribution(self, dist): """ Remove a distribution from the finder. This will update internal information about who provides what. :param dist: The distribution to remove. """ logger.debug('removing distribution %s', dist) name = dist.key del self.dists_by_name[name] del self.dists[(name, dist.version)] for p in dist.provides: name, version = parse_name_and_version(p) logger.debug('Remove from provided: %s, %s, %s', name, version, dist) s = self.provided[name] s.remove((version, dist)) if not s: del self.provided[name] def get_matcher(self, reqt): """ Get a version matcher for a requirement. :param reqt: The requirement :type reqt: str :return: A version matcher (an instance of :class:`distlib.version.Matcher`). """ try: matcher = self.scheme.matcher(reqt) except UnsupportedVersionError: # pragma: no cover # XXX compat-mode if cannot read the version name = reqt.split()[0] matcher = self.scheme.matcher(name) return matcher def find_providers(self, reqt): """ Find the distributions which can fulfill a requirement. :param reqt: The requirement. :type reqt: str :return: A set of distribution which can fulfill the requirement. """ matcher = self.get_matcher(reqt) name = matcher.key # case-insensitive result = set() provided = self.provided if name in provided: for version, provider in provided[name]: try: match = matcher.match(version) except UnsupportedVersionError: match = False if match: result.add(provider) break return result def try_to_replace(self, provider, other, problems): """ Attempt to replace one provider with another. This is typically used when resolving dependencies from multiple sources, e.g. A requires (B >= 1.0) while C requires (B >= 1.1). For successful replacement, ``provider`` must meet all the requirements which ``other`` fulfills. :param provider: The provider we are trying to replace with. :param other: The provider we're trying to replace. :param problems: If False is returned, this will contain what problems prevented replacement. This is currently a tuple of the literal string 'cantreplace', ``provider``, ``other`` and the set of requirements that ``provider`` couldn't fulfill. :return: True if we can replace ``other`` with ``provider``, else False. """ rlist = self.reqts[other] unmatched = set() for s in rlist: matcher = self.get_matcher(s) if not matcher.match(provider.version): unmatched.add(s) if unmatched: # can't replace other with provider problems.add(('cantreplace', provider, other, frozenset(unmatched))) result = False else: # can replace other with provider self.remove_distribution(other) del self.reqts[other] for s in rlist: self.reqts.setdefault(provider, set()).add(s) self.add_distribution(provider) result = True return result def find(self, requirement, meta_extras=None, prereleases=False): """ Find a distribution and all distributions it depends on. :param requirement: The requirement specifying the distribution to find, or a Distribution instance. :param meta_extras: A list of meta extras such as :test:, :build: and so on. :param prereleases: If ``True``, allow pre-release versions to be returned - otherwise, don't return prereleases unless they're all that's available. Return a set of :class:`Distribution` instances and a set of problems. The distributions returned should be such that they have the :attr:`required` attribute set to ``True`` if they were from the ``requirement`` passed to ``find()``, and they have the :attr:`build_time_dependency` attribute set to ``True`` unless they are post-installation dependencies of the ``requirement``. The problems should be a tuple consisting of the string ``'unsatisfied'`` and the requirement which couldn't be satisfied by any distribution known to the locator. """ self.provided = {} self.dists = {} self.dists_by_name = {} self.reqts = {} meta_extras = set(meta_extras or []) if ':*:' in meta_extras: meta_extras.remove(':*:') # :meta: and :run: are implicitly included meta_extras |= set([':test:', ':build:', ':dev:']) if isinstance(requirement, Distribution): dist = odist = requirement logger.debug('passed %s as requirement', odist) else: dist = odist = self.locator.locate(requirement, prereleases=prereleases) if dist is None: raise DistlibException('Unable to locate %r' % requirement) logger.debug('located %s', odist) dist.requested = True problems = set() todo = set([dist]) install_dists = set([odist]) while todo: dist = todo.pop() name = dist.key # case-insensitive if name not in self.dists_by_name: self.add_distribution(dist) else: #import pdb; pdb.set_trace() other = self.dists_by_name[name] if other != dist: self.try_to_replace(dist, other, problems) ireqts = dist.run_requires | dist.meta_requires sreqts = dist.build_requires ereqts = set() if meta_extras and dist in install_dists: for key in ('test', 'build', 'dev'): e = ':%s:' % key if e in meta_extras: ereqts |= getattr(dist, '%s_requires' % key) all_reqts = ireqts | sreqts | ereqts for r in all_reqts: providers = self.find_providers(r) if not providers: logger.debug('No providers found for %r', r) provider = self.locator.locate(r, prereleases=prereleases) # If no provider is found and we didn't consider # prereleases, consider them now. if provider is None and not prereleases: provider = self.locator.locate(r, prereleases=True) if provider is None: logger.debug('Cannot satisfy %r', r) problems.add(('unsatisfied', r)) else: n, v = provider.key, provider.version if (n, v) not in self.dists: todo.add(provider) providers.add(provider) if r in ireqts and dist in install_dists: install_dists.add(provider) logger.debug('Adding %s to install_dists', provider.name_and_version) for p in providers: name = p.key if name not in self.dists_by_name: self.reqts.setdefault(p, set()).add(r) else: other = self.dists_by_name[name] if other != p: # see if other can be replaced by p self.try_to_replace(p, other, problems) dists = set(self.dists.values()) for dist in dists: dist.build_time_dependency = dist not in install_dists if dist.build_time_dependency: logger.debug('%s is a build-time dependency only.', dist.name_and_version) logger.debug('find done for %s', odist) return dists, problems


My favorite places!
This is a page about my favorite places. I hope that you find it very interesting and fun!
A list, of my favorite places, in order:
Vienna
Berlin
Powell's Books
Laurelhurst Park
Epicodus


Uses of Class
com.opengamma.strata.product.common.ExchangeId
-
Packages that use ExchangeId Package Description com.opengamma.strata.product.common Entity objects shared between other packages.com.opengamma.strata.product.etd Entity objects describing Exchange Traded Derivatives (ETDs). -
-
Uses of ExchangeId in com.opengamma.strata.product.common
Fields in com.opengamma.strata.product.common declared as ExchangeId Modifier and Type Field Description static ExchangeId
ExchangeIds. ECAG
Eurex Clearing AG.static ExchangeId
ExchangeIds. HUDX
Hungarian Derivative Energy Exchange.static ExchangeId
ExchangeIds. HUPX
Hungarian Power Exchange.static ExchangeId
ExchangeIds. IFEN
ICE Futures Europe - Oil and Refined Products Division.static ExchangeId
ExchangeIds. IFLL
ICE Futures Europe - Financial Products Division.static ExchangeId
ExchangeIds. IFLO
ICE Futures Europe - Equity Products Division.static ExchangeId
ExchangeIds. IFLX
ICE Futures Europe - Agricultural Products Division.static ExchangeId
ExchangeIds. IFUS
ICE Futures U.S.static ExchangeId
ExchangeIds. IFUT
ICE Futures Europe - European Utilities Division.static ExchangeId
ExchangeIds. NEXO
Norexeco.static ExchangeId
ExchangeIds. NLPX
APX Power Nl.static ExchangeId
ExchangeIds. NODX
Nodal Exchange.static ExchangeId
ExchangeIds. NPGA
Gaspoint Nordic.static ExchangeId
ExchangeIds. NZFX
New Zealand Futures & Options.static ExchangeId
ExchangeIds. XASX
Australian Securities Exchange.static ExchangeId
ExchangeIds. XCBO
Chicago Board Options Exchange.static ExchangeId
ExchangeIds. XCBT
Chicago Board of Trade (CBOT).static ExchangeId
ExchangeIds. XCEC
Commodities Exchange Center (COMEX).static ExchangeId
ExchangeIds. XCME
Chicago Mercantile Exchange (CME).static ExchangeId
ExchangeIds. XEEE
European Energy Exchange.static ExchangeId
ExchangeIds. XFNO
Borsa Istanbul Exchangestatic ExchangeId
ExchangeIds. XGAS
Central Eastern European Gas Exchange.static ExchangeId
ExchangeIds. XHKF
Hong Kong Futures Exchange Ltd.static ExchangeId
ExchangeIds. XHKG
Hong Kong Exchanges And Clearing Ltd.static ExchangeId
ExchangeIds. XJSE
Johannesburg Stock Exchange.static ExchangeId
ExchangeIds. XKFE
Korea Exchange (Futures Market)static ExchangeId
ExchangeIds. XKLS
Bursa Malaysia.static ExchangeId
ExchangeIds. XLME
London Metal Exchange.static ExchangeId
ExchangeIds. XMAT
Euronext Exchange - Paris MATIFstatic ExchangeId
ExchangeIds. XMGE
Minneapolis Grain Exchange.static ExchangeId
ExchangeIds. XMOD
The Montreal Exchange.static ExchangeId
ExchangeIds. XMON
Euronext Exchange - Paris MONEPstatic ExchangeId
ExchangeIds. XMRV
Mercado Español de Futuros Financiero (MEFF).static ExchangeId
ExchangeIds. XNYM
New York Mercantile Exchange (NYMEX).static ExchangeId
ExchangeIds. XOSE
Osaka Exchange.static ExchangeId
ExchangeIds. XPAR
Euronext Exchange - Parisstatic ExchangeId
ExchangeIds. XPOW
Powernext.static ExchangeId
ExchangeIds. XSAF
JSE - Equity Derivatives Market.static ExchangeId
ExchangeIds. XSES
Singapore Exchange Ltd.static ExchangeId
ExchangeIds. XSFE
ASX - Trade24 (formerly Sydney Futures Exchange).static ExchangeId
ExchangeIds. XTFF
Tokyo Financial Exchange.static ExchangeId
ExchangeIds. XTKS
Tokyo Stock Exchange.static ExchangeId
ExchangeIds. XTKT
Tokyo Commodity Exchange.static ExchangeId
ExchangeIds. XWAR
Warsaw Stock Exchange.Methods in com.opengamma.strata.product.common that return ExchangeId Modifier and Type Method Description static ExchangeId
ExchangeId. of(String name)
Returns an identifier for the exchange. -
Uses of ExchangeId in com.opengamma.strata.product.etd
Methods in com.opengamma.strata.product.etd that return ExchangeId Modifier and Type Method Description ExchangeId
EtdContractGroupId. getExchangeId()
Gets the exchange identifier.ExchangeId
EtdContractSpec. getExchangeId()
Gets the ID of the exchange where the instruments derived from the product are traded.ExchangeId
SplitEtdId. getExchangeId()
Gets the ID of the exchange where the instruments derived from the product are traded.Methods in com.opengamma.strata.product.etd that return types with arguments of type ExchangeId Modifier and Type Method Description org.joda.beans.MetaProperty<ExchangeId>
EtdContractSpec.Meta. exchangeId()
The meta-property for theexchangeId
property.Methods in com.opengamma.strata.product.etd with parameters of type ExchangeId Modifier and Type Method Description static EtdContractSpecId
EtdIdUtils. contractSpecId(EtdType type, ExchangeId exchangeId, EtdContractCode contractCode)
Creates an identifier for a contract specification.EtdContractSpecBuilder
EtdContractSpecBuilder. exchangeId(ExchangeId exchangeId)
Sets the ID of the exchange where the instruments derived from the contract specification are traded.SplitEtdId.Builder
SplitEtdId.Builder. exchangeId(ExchangeId exchangeId)
Sets the ID of the exchange where the instruments derived from the product are traded.static SecurityId
EtdIdUtils. futureId(ExchangeId exchangeId, EtdContractCode contractCode, YearMonth expiryMonth, EtdVariant variant)
Creates an identifier for an ETD future instrument.static EtdContractGroupId
EtdContractGroupId. of(ExchangeId exchangeId, EtdContractGroupCode contractGroupCode)
Creates an instance from the exchange identifier and group code.static SecurityId
EtdIdUtils. optionId(ExchangeId exchangeId, EtdContractCode contractCode, YearMonth expiryMonth, EtdVariant variant, int version, PutCall putCall, double strikePrice)
Creates an identifier for an ETD option instrument.static SecurityId
EtdIdUtils. optionId(ExchangeId exchangeId, EtdContractCode contractCode, YearMonth expiryMonth, EtdVariant variant, int version, PutCall putCall, double strikePrice, YearMonth underlyingExpiryMonth)
Creates an identifier for an ETD option instrument.
-


Register
{% if current_user.is_authenticated %}Create a new user account.
{% else %}DOAJ is free to use without logging in.
You only need an account if you wish to create an application for a journal’s inclusion in the DOAJ or you are a volunteer.
{% endif %}If you have difficulty registering, contact us.


{% extends 'admin_side_menu.html' %} {% load static %} {% block title %}
Do you really want to delete the user?


Home
Blog
Projects
TBD
TBD
Working on the blog for now, I'll add my projects here when I get a chance!


Passionate amateur & professional teachers can share their experience & knowledge through in-person classes
Students can follow their passions in a flexible & relaxed learning environment that caters to all levels


What We Are Reading Today: Margaret Thatcher by Charles Moore
Taylor Swift took the high road as she won six American Music Awards on Sunday to surpass Michael Jackson’s all-time record, avoiding any direct mention of a bitter dispute with her old record company.
Swift won the top award, artist of the year, and four others. She was also given an honorary artist of the decade award, taking her all-time total to 29 American Music Awards, organizers said. That easily outstripped the 24 awards picked up by Jackson.
“All that matters to me is the memories that I have had with you guys, with you the fans, over the years,” Swift, 29, told the audience at the ceremony in Los Angeles after performing a medley of her old hits.
“This year has been a lot of good, a lot of really complicated, so (on) behalf of my family and me, thank you so much for being there and caring,” said Swift.


CryptoWars is the first strategy game to fully run on smart contracts. Build your village, summon your army, protect your e11 tokens and attack your enemies to steal theirs. - e11-io/crypto-wars-so...
Come test with us!
Updated bundles now available for OSX and Ubuntu.
(ROGUE daemon + Rogue game + TUI)
(Windows coming as.soom as possible)
https://t.co/uFxiXDrCQ6
@KomodoPlatform
Please, help boost the signal a a bit and RT/Share!(edited)
Sdunbar09-Mar-19 04:58 AM
weird, i didnt even start rogue_tui. All i did was try to run ./rogue from the new extracted files and it asked me to put my rogue.conf in the current directory
so i did that and then ./rogue again and the game started up?
seems to work?
im guessing the chain is not running though?
i have no idea what im doing lol
Where is the rogue daemon in this package?
Cryptofist09-Mar-19 05:21 AM
I believe you start with komodod(edited)
I'll take a look in a bit when I return to my computer.
Double check the instructions from git hub in the meantime.
@TonyL is there anything additional to know about set up with the bundles?
TonyL09-Mar-19 05:43 AM
@Cryptofist it's on github in releases page: just unzip, start daemon with rogue params, start tui
Tui will copy config, will ensure that rogue synced and set pubkey so unzip and start is all what is needed
Cryptofist09-Mar-19 05:44 AM
@Sdunbar ^
Thanks @TonyL !(edited)
TonyL09-Mar-19 06:03 AM
Daemon is komodod, tui is rogue_tui
1
Sdunbar09-Mar-19 07:39 AM
ok will give that a shot tomorrow
gonna go to bed thanks for help
Sdunbar09-Mar-19 04:40 PM
- Fork point: ROGUE 0004d3a94f71c01b6080a633ad120a1d4851733ccac1e50f3b6029ccdcd2d953, height 39764
Please help, human!
if you launch with -maxreorg=2701 it might be able to resolve this automaticallyError: A block chain reorganization has been detected that would roll back 2691 blocks! This is larger than the maximum of 99 blocks, and so the node is shutting down for your safety.
not sure if this is user error - something im doing wrong or not
SHossain09-Mar-19 05:12 PM
start with reindex or delete chain data (except wallet.dat & ROGUE.conf) and start again
Komodo. Contribute to jl777/komodo development by creating an account on GitHub.
Sdunbar10-Mar-19 07:30 PM
Thanks
When I name my character and then it shows my high score after it doesnt seem to have the name
TonyL11-Mar-19 12:21 PM
For fresh warrior name will appear in warriors list after your warrior back - it's fine that rogue printing blank name on this stage
CrisF11-Mar-19 02:15 PM
TonyLToday at 11:04 PM
ANNOUNCEMENT: wiped OSX bundle from github. Before OS specific things resolution only Ubuntu release will be maintained. If you want to test on any other OS - please set-up virtual machine with Ubuntu OS or rent VPS/spin cloud instance with it.
ronyi22-Mar-19 07:11 AM
New T-850:
Hitpoints: 74
Strength: 31
Level: 11
Experience: 6646
Dungeon Level: 18
Chain: ROGUE
Inventory:
10 rations of food
7 slime-molds
+7 leather armor [protection 9]
A +8,+4 two handed sword
5 scrolls of teleportation
6 scrolls of monster confusion
6 potions of restore strength(pink)
3 potions of extra healing(yellow)
2 potions of raise level(silver)
10 potions of healing(ecru)
4 potions of monster detection(grey)
A ring of sustain strength(garnet)
A ring of slow digestion(onyx)
A ring of slow digestion(onyx)
A ring of searching(stibotantalite)
A ring of aggravate monster(jade)
Total packsize: 16
Deleted User26-May-19 06:35 AM
Hi here :).
Barterlly is now open on BETA mode, and will provide tools for users and CoinOwners to perform OTC trades in a safe way.
Any KMD assetchain dPowed will be listed, and supported, for free.
Other coins not already listed can submit a listing application at : https://barterlly.typeform.com/to/iqpS1H
During the BETA, Barterlly won't charge any fee other than the transaction ones. after the release we will charge 1% on top of every transaction.
Our goal is to provide premium tools for coins listed on the platform. (Discord swapbot, twitter integration, public orders, wallet integration, API, custom templating, and many more).
Feel free to join us on our Discord.
https://discord.gg/RHc95zw
The app link is located at : https://app.barterlly.io
We are open to suggestions, and partnerships.
See you soon !
Barterlly's team


Pots
问题描述 :
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:
- FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;
- DROP(i) empty the pot i to the drain;
- POUR(i,j) pour from pot i to pot j; after this operation either the pot j is full (and there may be some water left in the pot i), or the pot i is empty (and all its contents have been moved to the pot j).
Write a program to find the shortest possible sequence of these operations that will yield exactly C liters of water in one of the pots.
输入:
On the first and only line are the numbers A, B, and C. These are all integers in the range from 1 to 100 and C≤max(A,B).
输出:
The first line of the output must contain the length of the sequence of operations K. The following K lines must each describe one operation. If there are several sequences of minimal length, output any one of them. If the desired result can’t be achieved, the first and only line of the file must contain the word ‘impossible’.
样例输入:
3 5 4
样例输出:
6 FILL(2) POUR(2,1) DROP(1) POUR(2,1) FILL(2) POUR(2,1)
解题代码:
//* @author: import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main{ private static final String[] status = new String[] { "", "FILL(1)", "FILL(2)", "DROP(1)", "DROP(2)", "POUR(1,2)", "POUR(2,1)" }; private static boolean[][] visted = new boolean[101][101]; private static int a; private static int b; private static int c; public static void main(String[] args) { Scanner sc = new Scanner(System.in); for (int i = 0; i < 101; ++i) { for (int j = 0; j < 101; ++j) visted[i][j] = false; } a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); bfs(); } static void bfs() { boolean is = false; LinkedList< Node> queue = new LinkedList< Node>(); Node p = new Node(); p.aa = 0; p.bb = 0; visted[p.aa][p.bb] = true; queue.addLast(p); // visted[p.aa][p.bb] = true; // p = new Node(); // p.aa = 0; // p.bb = b; // p.status.add(2); // visted[p.aa][p.bb] = true; // queue.addLast(p); while (!queue.isEmpty()) { Node front = queue.getFirst(); queue.remove(); int r = -1; for (int i = 1; i <= 6; ++i) { int aa = front.aa; int bb = front.bb; int flag = i; switch (flag) { case 1: aa = a; break; case 2: bb = b; break; case 3: aa = 0; break; case 4: bb = 0; break; case 5: r = b - bb; bb = bb + (r <= aa ? r : aa); aa = (r <= aa ? (aa - r) : 0); break; case 6: r = a - aa; aa = aa + (r <= bb ? r : bb); bb = (r <= bb ? (bb - r) : 0); break; default: break; } if (aa == c || bb == c) { int size = front.status.size(); System.out.println(size + 1); for (int j = 0; j < size; ++j) System.out.println(status[front.status.get(j)]); System.out.println(status[flag]); is = true; return; } if (!visted[aa][bb]) { Node tmp = new Node(); tmp.aa = aa; tmp.bb = bb; int size = front.status.size(); for (int j = 0; j < size; ++j) tmp.status.add(front.status.get(j)); tmp.status.add(flag); visted[aa][bb] = true; queue.addLast(tmp); } } } if (!is) System.out.println("impossible"); } private static class Node { private int aa; private int bb; private ArrayList< Integer> status = new ArrayList< Integer>(); } }
(adsbygoogle = window.adsbygoogle || []).push({});
已更正。
Thanks for using the time to examine this, I truly feel strongly about it and enjoy finding out far more on this subject matter. If achievable, as you achieve knowledge
很强大啊，佩服
Good task for the group. Hold it up for every yeara??s winner. This is a excellent oppotunity for a lot more enhancement. Indeed, obtaining far better and much better is constantly the crucial. Just like my pal suggests on the truth about ab muscles, he just keeps obtaining much better.
有些说不通吧，只有1个孩子肯定是男孩了
楼主 为什么输入的形式都不对 题目是不是弄错了？
沙发呢，我抢到了沙发
处凡愚而不减，在圣贤而不增；
住烦恼而不乱，居禅定而不寂。
#pragma pack(2) 这个用法太坑爹
I go through some of your put up and I uncovered a good deal of expertise from it. Many thanks for posting this sort of exciting posts
C语言版本的代码好像有点问题
很不错！
学习了
根本过不了。。。。


1. Keep yourself hydrated: Drink plenty of water every day. It will flush out toxins from your body which are bad for your skin. Moreover your skin will be kept naturally hydrated. An ancient time natural organic skin care beauty tip.
2.Avoid too much direct sun exposure: Do not expose yourself for long hours to direct sun heat, as the direct sun heat for long hours causes ageing spots and wrinkles. Before going in to direct sun light, use a good sunscreen lotion. This will slow down skin ageing and prevent early onset of wrinkles.
3. Exercising: Exercise daily till you start sweating. It opens up your skin pours and the toxins escape from your skin. An ancient time organic skincare tip.
4. Avoid smoking and too much of alcohol: You may take moderately good quality alcoholic drinks. A natural beauty tip.
5. Moisturizer: Use a good moisturizer every day, especially on the facial area to make your skin look healthy and glowing. An effective natural beauty tip, especially useful if you are prone to dry skin.
6. Make-up products: Try to use natural or organic skin care make-up products. Chemical based make-up products are very harmful for your skin.
7.  Otherwise your skin will remain clogged up for long hours while you are sleeping. Your skin also needs breathing time. Sleeping with make-up on your face can cause acne and zits.
8. Avoid stress and have adequate sleep.
9. Eat healthy natural food: This will provide you the required vitamins and minerals that are good for your skin. Have moderate spicy and fried food.


{% extends 'layout.html' %} {% set pageHeading = "Check if you can apply for a Test and Trace Support Payment" %} {% block pageTitle %} {{pageHeading}} | {{serviceName}} {% endblock %} {% block beforeContent %} {% endblock %} {% block content %}
You can use this service if the NHS COVID-19 app has detected that you have been in contact with a person who has coronavirus. This means you are advised to self-isolate.
You may be entitled to a payment of £500 from your local authority under the Test and Trace Support Payment scheme if you are:
Your local authority will tell you when you apply if you’re counted as being on a low income.
You cannot claim this payment more than once within a self-isolation period. You can claim it for separate self-isolation periods, as long as they do not overlap with each other.
If you have technical problems while you are using this service, select the ‘Financial support’ button in the app and find the link for Help to apply for the Test and Trace Support Payment.
{{ insetText({ "HTML": "Before you can apply for the payment, you will need to register with NHS Test and Trace, as we need to know who you are to check your eligibility. You have left the app to do this because in the app you are anonymous.
To claim this payment, you need to register before your self-isolation period finishes. You can check this using the self-isolation countdown timer in the app.
" }) }}


Eat N' Run: Lunch Lady Madness
Runner 1
Jello Kid is a student that likes to run. High Score: 0
UNLOCK ME
Home


:to exert traction on :draw haul a wagon
:to obtain or move by or as if by hauling was hauled to parties night after night by his wife
:to transport in a vehicle :cart
:to change the course of (a ship) especially so as to sail closer to the wind
:to bring before an authority for interrogation or judgment :hale haul traffic violators into court
:to exert traction :pull
:to move along :proceed
:to furnish transportation
:shift
:to move quickly


---
layout: default
title: The Web Exploration Experiment
---
The steps for downloading the log files are as follows -
- Open Mozilla Firefox and in the upper right corner of the screen click on the red icon of the web-extension
- Now, click once on the option 'Log data 1' and then click on 'Download Console Log data'. Save the txt file.
- Now, click once on the option 'Log data 2' and then click on 'Download Console Log data'. Save the txt file.
- Repeat the above steps six times. (2 clicks per step)
- Finally save all the six txt files in a .zip folder and name it appropriately as mentioned.


/* * * Copyright (c) 2019 Sandeep Virdi * * 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.virdis.models import java.nio.ByteBuffer import cats.effect.{ContextShift, Sync} import com.virdis.utils.Utils /** * Block Design:Default size 64 MB * |--------------------------------------------------| * | DataByteBuffer - stores payload in | * | page aligned data block. | * | Default size of data block | * | 4096 bytes. | * |--------------------------------------------------| * | Index - stores key, page and offset. | * | page represents the numerical | * | value of the page aligned data | * | block, offset represents the | * | index of the data in the page. | * |--------------------------------------------------| * | BloomFilter - use to check if the key is | * | present in the block. | * |--------------------------------------------------| * | Footer | * | | * | ---------------------------------------------- | * | | a | b | d | e | f | g | h | i | j | | * | ---------------------------------------------- | * | a - Timestamp (creation time) | * | b - MinKey (smallest key in the block) | * | c - MaxKey (largest key in the block) | * | d - DataBufferOffset (offset in the block where | * | DataBuffer is written) | * | e - DataBufferSize (size of DataBuffer in bytes)| * | f - IndexStartOffset (offset in the block where | * | Index is written) | * | g - NoOfKeysInIndex (number of keys in index) | * | h - BloomFilterOffset (offset in the block where| * | bloomfilter is written) | * | i - BlockNumber (block number in the file) | * -------------------------------------------------- * */ final case class Block( data: DataByteBuffer, index: IndexByteBuffer, bloomFilter: ByteBuffer, footer: Footer ) { def clean[F[_]]()(implicit F: Sync[F], Cs: ContextShift[F]): F[Unit] = { Utils.freeDirectBuffer[F](data.underlying)(F, Cs) Utils.freeDirectBuffer[F](index.underlying)(F, Cs) Utils.freeDirectBuffer[F](bloomFilter)(F, Cs) } }


Mobile Cell Phone Network Not Working Problem and Solution – How to Solve No Network Problem in any Mobile Cell Phone
Manually search for network. If there is NO Network then there is problem in the Antenna Switch. Repair or Replace the Antenna Switch to solve the problem.If there is Network after Manual Search but the Home Network could not be selected then there is problem in the PFO. Repair or change the PFO.If the Network gets disconnected during phone call there repair or change the Network IC.Clean the Antenna Tips and Antenna Point.If there is still Network Problem then Heat or Change the 26 MHz Crystal Oscillator.If the problem is not solved then Heat or Change the Antenna Switch. You can also jumper if Antenna Switch is not available.Heat, Change or Jumper the PFO if the problem still persists.Heat, Reball or Change the Network IC.Heat, Reball or Change the Power IC.Heat, Reball or Change the CPU.
Mobile Cell Phone SIM Not Working Problem and Solution – How to Solve SIM Card Fault in any Mobile Cell Phone
Check settings and see if the mobile phone is in Flight Mode or Not. If it is in “Flight Mode” then change the Mode to Normal.Clean SIM Card Tips and SIM Connector.If the problem is not solved then change the SIM Card and Check.If the problem still persists then Change the SIM Connector.If you still do not find solution to the problem then Check Track of the SIM Section. Refer to the Diagram of the Particular Model of the Mobile Phone. Books with Diagrams of Tracks are available in the Market and on the Internet.If the problem is still not solved then Heat or Change the SIM IC.Finally, Heat, Reball or Change the Power IC.
DND de-registration through SMS to 1909.
De-registration of DND services is easy and convenient through SMS. Send SMS STOP to1909 from your mobile number. You will get an SMS from your mobile operator confirming the DND (now NCPR) de-registration request. [9:59 AM, 7/10/2016] +91 96776 71572: Deactivate DND through voice call to 1909. Dial 1909 from your mobile number and choose from either to speak with customer care executive or IVR (Interactive Voice Response system). If you choose to speak with Customer care executive, ask the executive to de-register DND services (now NCPR). The executive will confirm you the cancel request and you will get an SMS confirming your request.SIGN-UP
+91


Digest-MD5 authentication is the required authentication
mechanism for LDAP v3 servers
(
RFC 2829).
Because the use of SASL is part of the LDAP v3
(
RFC 2251),
servers that support only the LDAP v2 do not support Digest-MD5.
The Digest-MD5 mechanism is described in
RFC 2831.
It is based on the HTTP Digest Authentication
(RFC 2617).
In Digest-MD5, the LDAP server sends data that includes
various authentication options that it is willing to support plus
a special token to the LDAP client.
The client responds by sending an encrypted response that indicates the
authentication options that it has selected. The response is encrypted
in such a way that proves that the client knows its password.
The LDAP server then decrypts and verifies the client's response.
To use the Digest-MD5 authentication mechanism, you must set the
authentication environment properties as follows.
-
Context.SECURITY_AUTHENTICATION.
-
Set to the string "DIGEST-MD5".
-
Context.SECURITY_PRINCIPAL.
-
Set to the principal name.
This is a server-specific format. Some servers support a login user id
format, such as that defined for Unix or Windows login screens.
Others accept a distinguished name.
Yet others use the authorization id formats defined in
RFC 2829. In that RFC,
the name should be either the string "dn:", followed by the
fully qualified DN of the entity being authenticated,
or the string "u:", followed by the user id.
Some servers accept multiple formats.
Examples of some of these formats are "cuser",
"dn: cn=C. User, ou=NewHires, o=JNDITutorial", and
"u: cuser"
The data type of this property must be java.lang.String.
-
Context.SECURITY_CREDENTIALS.
-
Set to the password of the principal (e.g., "mysecret").
It is of type java.lang.String, char array (char[]),
or byte array (byte[]).
If the password is a java.lang.String or char[],
then it is encoded by using UTF-8 for transmission to the server.
If the password is a byte[], then it is transmitted as is to the server.
The following example shows how a
client performs authentication using Digest-MD5 to an LDAP server.
// Set up the environment for creating the initial context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial");
// Authenticate as C. User and password "mysecret"
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_PRINCIPAL, "dn:cn=C. User, ou=NewHires, o=JNDITutorial");
env.put(Context.SECURITY_CREDENTIALS, "mysecret");
// Create the initial context
DirContext ctx = new InitialDirContext(env);
// ... do something useful with ctx
Note: The
Sun Java Directory Server, v5.2
supports the Digest-MD5 authentication mechanism for users that have
clear-text passwords. You must set the password encryption mode
before
you create the user. If you have already created the user, delete it
and recreate it.
To set the password encryption mode using
the Administration Console, select the Configuration tab and the Data
node. In the Passwords pane, select the
"No encryption (CLEAR)" option for
"Password encryption."
The server accepts simple user names (that is, the value of the
"uid" attribute for entries that have one) and the "dn:" format
of user names.
See the server's documentation for detailed information.
Specifying the Realm
A
realm defines the namespace from which the authentication
entity (the value of the
Context.SECURITY_PRINCIPAL property)
is selected. A server might have multiple realms. For example, a
server for a university might be configured to have two realms, one
for its student users and another for faculty users. Realm
configuration is done by the directory administrator. Some
directories have a default single realm. For example, the Sun Java
Directory Server, v5.2, uses the fully qualified hostname of the machine
as the default realm.
In Digest-MD5 authentication, you must authenticate to a specific realm.
You may use the following authentication environment property to
specify the realm. If you do not specify a realm, then any one of the
realms offered by the server will be used.
-
java.naming.security.sasl.realm
-
Set to the realm of the principal.
This is a deployment-specific and/or server-specific case-sensitive string.
It identifies the realm or domain
from which the principal name
(Context.SECURITY_PRINCIPAL) should be chosen.
If this realm does not match one of the realms offered by the server,
then the authentication fails.
The following example shows how to
set the environment properties for
performing authentication using Digest-MD5 and a specified realm.
To make this example work in your environment, you must change
the source code so that the realm value reflects what has been
configured on your directory server.
// Authenticate as C. User and password "mysecret" in realm "JNDITutorial"
env.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
env.put(Context.SECURITY_PRINCIPAL, "dn:cn=C. User, ou=NewHires, o=JNDITutorial");
env.put(Context.SECURITY_CREDENTIALS, "mysecret");
env.put("java.naming.security.sasl.realm", "JNDITutorial");
If you need to use
privacy protection and other SASL properties, these are discussed in the JNDI Tutorial.


A diverse mixture of indigenous and tropical Flora that attracts a wide variety of fascinating insect and primate life. All this combined with the loving care of our Kenyan staff will make your holiday on Chale Island intriguing, relaxing and warmly memorable.beautiful


Save the world
10 May 2013- DESIGN, PRINT
Mail admirer
10 May 2013- DESIGN, VEDIO
Spolit for choice
10 May 2013- DESIGN, PRINT
Busy girl
10 May 2013- DESIGN, PRINT
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old
10 May 2013- DESIGN, PRINT
10 May 2013- DESIGN, VEDIO
10 May 2013- DESIGN, PRINT
10 May 2013- DESIGN, PRINT
Minimal design helps viewers navigate though the design.
Aliquam enim enim, pharetra in sodales at. interdum sit amet dui. Nullam vulputate euismod urna non pharetra. phasellus blandit mattis ipsum. ac laoreet lorem lacinia et. Cras et ligula libero.
Heretra in sodales atsen interdum >Aliquam enim enim, pharetra in sodales at. interdum sit amet dui. Nullam vulputate euismod urna non pharetra. phasellus blandit mattis ipsum. ac laoreet lorem lacinia et. Cras et ligula libero.
Heretra in sodales atsen interdum >10 May 2013
10 May 2013
10 May 2013
QUATE OF THE WEEK


--- layout: default class: 'typography' ---
Helvetica Neue — This typeface, designed by Max Miedinger and other project members at the Haas'sche Schriftgiesserei, has become one of the most famous and popular typefaces in the world, thanks to the marketing strategy of Stempel and Linotype. It forms an integral part of many printers and operating systems. The original letterforms of Helvetica had to be modified for the Linotype system. Over the years, Helvetica was expanded to include many different weights, but these were not coordinated with each other.
Font Family: "Helvetica Neue", Arial, sans-serif;
| Example | Font Weight | Font Size / Line Height |
Uses |
|---|---|---|---|
Helvetica Neue |
700 | 54px / 54px |
h1 heading
|
Helvetica Neue |
700 | 40px / 40px |
h2 heading
|
Helvetica Neue |
700 | 36px / 44px |
h3 heading
|
Helvetica Neue |
400/700 | 27px / 32px |
h4 heading, blockquote quote text
|
Helvetica Neue |
400/700 | 24px / 28px |
h5 heading
|
Helvetica Neue |
400/700 | 18px / 28px |
h6 heading, cite inside blockquote
|
| Helvetica Neue | 400 | 16px / 26px | Base paragraph and body text |
| Helvetica Neue | 400 | 14px / 20px | |
| Helvetica Neue | 400 | 12px / 18px |
small text
|
...I'm Wolverine. I'm the best there is at what I do, but what I do best isn't very nice. Logan

...I'm Wolverine. I'm the best there is at what I do, but what I do
best isn't very nice.
Logan

As Dog lay unconscious, Logan unsheathed his claws, for the first time in public (to the shock of everyone watching), and was about to deal the deathblow, when Rose leaped in to stop him, but was accidentally impaled by his claws. Horrified, Logan held her in his arms as she died. Stricken with grief and guilt for the death of his first love, Logan fled into the nearby woods, where he lived in self-imposed exile in a feral state with a pack of wolves for months, if not years.

History

As Dog lay unconscious, Logan unsheathed his claws...

This is a nice link
Red links are links to wiki articles that don't yet exist. Historically in Mediawiki, they have been colored red, but community theme colors may present them differently. Any red links should contain the redlink
class.
Superman
Bullet list

It has been estimated to be 60 feet high and 250 feet long...

The Black Gate was made from an impregnable black stone.

During the War of the Ring, Frodo and Sam had a chance...

Number list

It has been estimated to be 60 feet high and 250 feet long...

The Black Gate was made from an impregnable black stone.

During the War of the Ring, Frodo and Sam had a chance...


A better way to display icons
To avoid having characters or html entities directly in your HTML, you can use generated content to display icons. The ::before and ::after pseudo-selectors allow us to insert content before or after the content of an element. By choosing icon fonts as the content to display we keep our markup free of extraneous code and we start down the path of making our icons more friendly to accessibility devices.
Here's how it works.
.icon:before {
font-family: 'my icon font';
content: "\e000";
font-size: 1em;
}
Let's use generated content
Display the camera icon, it's unicode value is '\e007.'


Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic. Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.
Beetroot water spinach okra water chestnut ricebean pea catsear courgette summer purslane. Water spinach arugula pea tatsoi aubergine spring onion bush tomato kale radicchio turnip chicory salsify pea sprouts fava bean. Dandelion zucchini burdock yarrow chickpea dandelion sorrel courgette turnip greens tigernut soybean radish artichoke wattle seed endive groundnut broccoli arugula.
My Reflection
This challenge was a nice balance between challenging and do able. My pair and I spent two hours on the whole challenge but different parts took longer than others. It was easy enough to change pixels to percentages, but we had a harder time changing the display of the nav bar to above the content of the page. This was largely due to a combined ingnorance on both our parts as to how block, inline, and inline block displays work. We messed around with this part for a long time to get it to work.
The next couple tasks were similarly pretty straightforward but we really got stuck trying to adjust the font size to respond to changes in screen width. We tried a few things with em and with percentages but realized that these only set fonts relative to a parent font and not relative to the screensize. After a lot of digging and playing around with code my pair discover something called viewport width which will convert the font size to a percentage of the screenwidth. This can also be used for screen height. Of course, before we tried this we actually experimented with media queries but realized that was kind of choppy and not as ideal as something that responds to changing screensizes.
I'm pretty confident in my understanding of pixels and percentages but I still struggle with positioning and displays in CSS and I need to experiment more with media queries to be more confident in using them. I understand the theory and big picture behind responsive web design and I think its a really neat idea. Its something that I guess I always took for granted as a web consumer but its kind of exciting to understand how it works and why it would be useful.


Gerald Dempsey "Buster" Posey is an American professional baseball catcher for the San Francisco Giants of Major League Baseball (MLB).
He bats and throws right-handed. Posey has also filled in at first base for the Giants. Posey was born in Leesburg, Georgia. He played four sports in high school;
when playing baseball, he excelled at hitting and pitching. He attended Florida State University, where he began playing the catcher position.
He won the Golden Spikes Award in 2008 and was selected by the Giants with the fifth overall pick in the 2008 Major League Baseball draft.
Posey made his major league debut on September 11, 2009. After starting the 2010 season in the minor leagues, he was called back up to the major leagues
in May. As a rookie, he finished with a .305 batting average, 18 home runs, and 67 runs batted in. He was named the National League (NL) Rookie of the Year.
He caught every inning of the playoffs as the Giants won the 2010 World Series. In 2011, Posey missed most of the year after he was severely injured in a collision with Scott Cousins at home plate.
Posey returned from his injury in 2012 and posted a .336 batting average to win the 2012 NL batting title.
He became the second San Francisco Giant to win the batting title and was named the NL Most Valuable Player for 2012.
He won his second World Series that year as the Giants swept the Detroit Tigers in four games. In 2013, Posey signed an eight-year contract extension worth
$167 million, a record in sum and in length for a player with his level of experience. He won his third World Series the following year as the Giants
defeated the Kansas City Royals. In 2016, he won his first Gold Glove award after an excellent defensive season.
In 2016, UA and Buster Posey agreed to a contract extension. "Buster is everything a team could ask for in a model baseball player,
and Under Armour is proud to be his long-term partner, " said Ryan Kuehl, VP of global category sports marketing at Under Armour, in a statement.
"His accomplishments speak for themselves, and Buster's humility, hunger and never-ending focus on being a better athlete and teammate every day
are the values Under Armour was built on; we're excited to see what he does next."
As part of the renewed partnership, the San Fransisco Giants catcher will continue to sport the brand's baseball gear on the field and in training
as well as support Under Armour's Connected Fitness and MLB licensed apparel platforms, the company said.
The extended deal also means Posey will now serve the face of Under Armour's exclusive baseball collection in collaboration with Dick's Sporting Goods.


The clp(Q,R) system described in this chapter is an instance of the general Constraint Logic Programming scheme introduced by [Jaffar & Michaylov 87]. It is a third-party product, bundled with SICStus Prolog as two library packages. It is not supported by SICS in any way.
The implementation is at least as complete as other existing clp(R) implementations: It solves linear equations over rational or real valued variables, covers the lazy treatment of nonlinear equations, features a decision algorithm for linear inequalities that detects implied equations, removes redundancies, performs projections (quantifier elimination), allows for linear dis-equations, and provides for linear optimization.


Stack Loop Demo 3
Version:
unknown
Using asynchronous conditional loops.
Loop with
conventional while loop
Async Loop with setTimeout(..., 1)
Waiting...
Async Loop with setZeroTimeout(...)
Waiting...
Async Loop with setZeroTimeout/Promise
Waiting...
Note:
the stackloop.js library automatically uses
setZeroTimeout
() when the wait parameter is set to zero (which is default).


A month ago I decided to give IE a go as my "daily driver" browser. I used it to develop with and for general
browsing.
Why? Because I haven't used internet explorer as a full time browser for about 10 years. It has a reputation for
being slow, lacking features and being non-standards compliant, especially for developers who need to support it.
But this isnt 2006, IE7 isn't the latest version, IE11 is. Maybe IE11 is just as good as Chrome but I haven't noticed?
Probably the biggest thing I took away from this experiment is how much I rely on the familiarity of my workspace.
The first couple of hours with IE11 were a nightmare. No bookmarks, no history, Bing, unfamiliar
settings and dev tools all made for an uneasy feeling that had me reaching for Chrome. However, once I got those things
sorted and synced from Chome, my password manager extension installed and tweaking settings to my liking I quickly
became much more comfortable. It's amazing how much I used to dislik using IE11 to debug and test with because of a couple of
settings that were not to my liking out of the box.
What I liked about IE11
-
Dev tools are nice to use. They even include some features that have only recently been added to Chrome like the colour picker.
The ability to emulate older browsers is somthing nice that is also worth mentioning, although that is already widely known.
-
Everything works. There was not a single site I visted over the month that didn't work in IE, and I never noticed any
lack of style features or animations.
-
I often found myself forgetting I was using IE. To me that is a good sign.
-
Developing in IE and therefore developing IE first allows quick testing for IE8 and IE9.
-
IE11 is customisable. I could fiddle with a lot of settings to get it exactly how I liked it.
What I didn't like about IE11
-
Speed was noticibly slower, especially for JavaScript rendering. Many JavaScript heavy sites take a little longer to load,
but it was Google Play Music that caused the most pain for me. Everything worked, but there was often little stutters in
the music playback. This may have more to do with Google not optimising thier code for IE than IE itself, but either way
I found it annoying.
-
Lack of extensions. I actually thought I would miss these more than I did, but it was still a pain point for me. The 2
extentions I did manage to get on IE required a restart of Windows!
-
Syncing is terrible. While it is possible to sync my favorites between my Windows 8 and Windows 10 PC's,
I am left in the dark at work. Syncing involves linking a Microsoft account to you Windows 8 or 10 OS, then waiting for
the favorites to sync, or in my case, be deleted in favour of synced favorites from a couple of years ago. There is
no way I found to sync history, extensions or currently open tabs.
-
Windows only. One of the nicest features of Chrome (and other cross platform browsers) is being able to
sync extensions and bookmarks across my devices at home and work. With no support for Android or Mac,
half my devices couldnt even run IE. It is possible to run Windows across all devices, but IE hasn't convinced me
to drop Android in favour of Windows Phone.


Fun With The Family!
═════════════════
At Penguin Resorts
Find Out More!
Bring The Kids!
Now, when you come with one child or more, you get an extra
large fish aquarium during your stay, with no charges!
Take a guided penguin tour with your whole family, and kids under 7
can ask for penguin costumes to wear whenever they want, free!
Introducing the new state-of-the-art penguin arcade! Buy a pass for a
microscopic fee, and passes for kids under 13 years old are on the house!
We also have other activities that are free for everyone!
Such as penguin minigolf, tennis, swimming, basketball, and much, much more!
How To Get These Benefits?
When reserving a suite, just specify everything you would like.
Extremely simple.
Any Questions, just specify, and we'll get back to you ASAP.
Thanks for choosing Penguin Resorts.
Book A Suite


- Login to post new content in the forum.
| Topic | Replies | Created | Last reply | |
|---|---|---|---|---|
| Please need help,I'm new. | 6 | 2 years 40 weeks ago by SeriousMan |
2 years 40 weeks ago by Robert Wall |
|
| Help needed to get Nodes page working. | 6 | 2 years 45 weeks ago by ngbod |
2 years 45 weeks ago by ngbod |
|
| Can't edit oemgateway.conf on windows xp | 6 | 3 years 1 week ago by phildabeast |
2 years 29 weeks ago by EnergyRnR |
|
| Raspi Emoncms & HD - stability ? | 6 | 3 years 6 weeks ago by Derry |
2 years 41 weeks ago by Bra1n |
|
| (SOLVED) Problem updating Emoncms on Pi with HDD | 6 | 3 years 6 weeks ago by hatfieldr |
3 years 6 weeks ago by GJPickard |
|
| EmonTx v3 set up problems [solved] | 6 | 3 years 8 weeks ago by GJPickard |
3 years 8 weeks ago by GJPickard |
|
| Bulk Updates | 6 | 3 years 16 weeks ago by warlock |
3 years 16 weeks ago by warlock |
|
| emonTX and RFData | 6 | 3 years 23 weeks ago by warlock |
3 years 23 weeks ago by Robert Wall |
|
| Arduino energy monitor - Consumption per hour | 6 | 3 years 24 weeks ago by Guest |
3 years 24 weeks ago by Guest |
|
| Using 2 emontx with emonglcd for solar pv | 6 | 3 years 24 weeks ago by noworries |
3 years 24 weeks ago by calypso_rae |
|
| Arduino IDE + mongodb | 6 | 3 years 35 weeks ago by Guest |
3 years 35 weeks ago by Robert Wall |
|
| Adding temperature and humidity sensing to an existing standard setup | 6 | 3 years 37 weeks ago by PhilThy |
3 years 37 weeks ago by PhilThy |
|
| Smoothie chart displays no data from feed | 6 | 3 years 39 weeks ago by Guest |
2 years 44 weeks ago by ricard0g0mes |
|
| How to just send the time part from the raspberry pi to emonglcd | 6 | 3 years 41 weeks ago by rjcollingham |
3 years 27 weeks ago by v8hybrid |
|
| Both Pi images corrupted on site | 6 | 3 years 43 weeks ago by Guest |
3 years 42 weeks ago by TrystanLea |
|
| PI + Emoncms + RFM12Pi + emonTx | 6 | 3 years 44 weeks ago by Ughy |
3 years 44 weeks ago by Paul Reed |
|
| CT positioning on 3phase mains | 6 | 3 years 50 weeks ago by tomtobback |
3 years 49 weeks ago by Robert Wall |
|
| Open Kontrol Gateway | 6 | 4 years 5 weeks ago by PaulOckenden |
4 years 4 weeks ago by Robert Wall |
|
| Small graph | 6 | 4 years 7 weeks ago by Guest |
4 years 6 weeks ago by TrystanLea |
|
| Just testing | 6 | 4 years 12 weeks ago by calypso_rae |
4 years 12 weeks ago by calypso_rae |
|
| Installation on Pi | 6 | 4 years 12 weeks ago by Elektitus |
4 years 12 weeks ago by Elektitus |
|
| emoncms.org not working ? | 6 | 4 years 14 weeks ago by Guest |
4 years 13 weeks ago by Jérôme |
|
| emoncms - Problem sending data kwhd feed | 6 | 4 years 24 weeks ago by Guest |
4 years 24 weeks ago by Guest |
|
| PT1000 RTD Building Block | 6 | 4 years 30 weeks ago by Guest |
3 years 32 weeks ago by Robert Wall |
|
| Nanode not responding | 6 | 4 years 36 weeks ago by Guest |
4 years 36 weeks ago by glyn.hudson |
|
| emonTx and ac adaptor polarity | 6 | 4 years 41 weeks ago by Guest |
4 years 41 weeks ago by mharizanov |
|
| Location of library files | 6 | 4 years 43 weeks ago by calypso_rae |
4 years 41 weeks ago by TrystanLea |
|
| Emontx download problem | 6 | 5 years 9 weeks ago by Guest |
5 years 9 weeks ago by Guest |
|
| NanodeRF static IP. | 6 | 5 years 18 weeks ago by Guest |
5 years 17 weeks ago by TrystanLea |
|
| Hmm - was working now, isnt... | 6 | 5 years 19 weeks ago by Guest |
5 years 15 weeks ago by glyn.hudson |
|
| emonTx: avrdude stk500_getsync not in sync | 6 | 5 years 23 weeks ago by EnergyRnR |
5 years 6 weeks ago by S Bateman |
|
| x-axis 2 hours off | 6 | 5 years 25 weeks ago by Guest |
5 years 20 weeks ago by Guest |
|
| Wifi MQTT Relay do not work after upgrade | 5 | 44 weeks 4 days ago by pychu |
41 weeks 6 days ago by pychu |
|
| Raspberry[low-write 9.2 | 2015.11.27]- Feed DAILY-PHPTIMESERIES Bargraph problem | 5 | 46 weeks 4 days ago by Neni84 |
46 weeks 3 days ago by Neni84 |
|
| local data logging - no data recorded | 5 | 46 weeks 5 days ago by VWE |
46 weeks 5 days ago by VWE |
|
| Arduino Pro Mini Energy Monitor - Receiving Wrong Large Negative Values | 5 | 47 weeks 4 days ago by thanosmats |
47 weeks 3 days ago by thanosmats |
|
| Exception MQTT: invalid literal for int() with base 10 | 5 | 1 year 1 day ago by allmac |
52 weeks 16 hours ago by allmac |
|
| Power Usage Monitor directly from breaker panel | 5 | 1 year 6 days ago by Modulo36 |
1 year 5 days ago by Modulo36 |
|
| emonhub.conf not reporting to emoncms.org? | 5 | 1 year 3 weeks ago by rpjg51 |
1 year 3 weeks ago by rpjg51 |
|
| Is there a numbering range for RFM Devices? | 5 | 1 year 3 weeks ago by sheppy |
1 year 3 weeks ago by sheppy |
|
| EMONTX locked up possibly heat related | 5 | 1 year 4 weeks ago by sheppy |
1 year 3 weeks ago by sheppy |
|
| Troubleshooting inactive nodes | 5 | 1 year 6 weeks ago by joshpond |
1 year 6 weeks ago by joshpond |
|
| Changing TX NodeID in software | 5 | 1 year 6 weeks ago by jasonnet |
1 year 6 weeks ago by jasonnet |
|
| Raspberry Pi zero | 5 | 1 year 7 weeks ago by Harvs |
1 year 2 weeks ago by leodm |
|
| New installation IT-network 3Phase ? | 5 | 1 year 9 weeks ago by torgeir |
1 year 9 weeks ago by torgeir |
|
| Data Issue - TxV3 and RFM69Pi ?? [SOLVED] | 5 | 1 year 9 weeks ago by eskimofisherman |
1 year 9 weeks ago by eskimofisherman |
|
| input - input = feed | 5 | 1 year 12 weeks ago by smitt1979 |
1 year 12 weeks ago by smitt1979 |
|
| EmonCMS V9 Upgrade Fail | 5 | 1 year 14 weeks ago by welbaz |
1 year 13 weeks ago by firefox7518 |
|
| EmonCMS My Solar Broken | 5 | 1 year 16 weeks ago by artattack2 |
1 year 14 weeks ago by artattack2 |
|
| audio extension cable for CT cables | 5 | 1 year 26 weeks ago by davidbeccue |
1 year 6 weeks ago by Rhys |


Discount Offer using dynamic programming?
How we at Myntra solved a critical business problem in discounting using dynamic programming.
Software Engineer, Algorithmic Programmer, NLP enthusiast
How we at Myntra solved a critical business problem in discounting using dynamic programming.
How to get your employees motivated to attend the daily scrum/stand-up meets through chocolate and a simple but creative Python chat bot on Slack.
A tutorial on how to use recursion in React components. Recursive react components enable the code to be clean, maintainble, extensible and readable. Recursion reduces seemingly complex problems to simpler ones. The tutorial explains recursion in React from the fundamentals along with a simple example in addition to a complex one being introduced towards the end.
My published kernel in the Kaggle Contest, Spooky Author Identification. Highest Public LB score - 0.29 (Top 50) for a published kernel in the contest. Uses Simple Feature Engineering like Punctuation,Stop Words,Glove Sentence vectors. In addition, it creates stack features from simple Features such as tfidf and count vectors for words and chars. Multinomial naive bayes(mnb) is then applied with the following combination - tfidf+words+mnb,tfidf+chars+mnb,count+words+mnb,count+chars+mnb. Conv Nets on keras texttosequence, NNs on glove sentence vectors and Fast Text are also used as stack features. XGBoost, which is the final model which will use the simple and stack features as input.
This tutorial explains on how memoization is relevant in reducing time complexity. In addition, it focusses on two standard problems in Dynamic Programming, the Longest Increasing Subsequence problem and the Coin Denomination problem.
This tutorial gives an intuition on why Dynamic Programming is fun to code and extremely useful in Computer Science. It talks about Dynamic Programming using a basic example, the Subset Sum problem. The tutorial further adds more intuition as to how Dynamic Programming problems should be approached along with additional practice problems.


I have a 3 Phase installation in my house and I envisage to install OpenEnergyMonitor for monitoring my global electricity consumption.
I have seen a lot a discussions on the Labs and Forum pages about 3-Phase measurement, but it is not clear to me if it can be done in a simple way with only one EmonTxV3, whithout adding specific software.
Hence, my questions :
1/ Can ONE standard EmonTxV3-fully-assembled (as proposed in OEMShop) with 3 CT sensors and one AC-AC power supply correctly measure my total electricity consumption, without any specific software ?
2/ Or, will it be necessary to load additionnal piece of software to make appropriate assumptions and corrections. In this case, where in the OEM site can I find the right software to be used, with instructions to load and use it. ?
3/ How will be calculated the sum of the 3 powers in EmonTx or Emoncms . Is it done automatically ? or will I have to do configure it myself with my own input process (Inputs, Input process, feeds) in Emoncms ?
Thanks in advance
Ben
Re: 3 Phase measurement
living with denmark and having 3 phase also i can say:
1) no, each phase is not in sync so you will need 3 ac adapters
there is a thread somewhere with true 3phase monitoring
Re: 3 Phase measurement
http://openenergymonitor.org/emon/node/1170
Re: 3 Phase measurement
Hello Boelle,
You say "you will need 3 ac adapters", which does mean I will need 3 EmonTXV3 ???
Re: 3 Phase measurement
for absolute best possible accuracy yes...
with only one it will always be "guesswork" as it only have one AC input
i have posted the link to the full fat 3 phase thread but as i put an internal link in post it have to ok'ed by a moderator....
Re: 3 Phase measurement
If you are not concerned with absolute precision, then it is possible to run with one ac adapter and delay the voltage reference in software for use with the second and third phases. Unfortunately, there is no solution - other than three emonTx V3s - that meets your requirement of "whithout adding specific software".


The very first thing that Captain needs is a root domain. For example, if you own myawesomecompany.com, you
can use captain.myawesomecompany.com or foo.bar.myawesomecompany.com as your root domain. First, you
need to make sure that the ip address for all subdomains of the root domain resolve to the Captain ip address. To do
this, go to the DNS settings in your domain provider website, and set a wild card A entry.
For example: Type: A, Name (or host): *.captain, IP (or Points to): <IP_ADDRESS> where this is the IP address of your captain machine.
NOTE: DNS settings might take several hours to take into effect. See here for more details.
Setting up Docker Registry is only required if you plan to run your Captain on a cluster. For single node Captain deployments, Docker Registry is optional. Captain provides two methods for you to setup your docker registry:
You can switch between the two approaches, but you'll have to re-deploy your apps to Captain again such that your images get created on your new Docker Registry. Unless you lost access to the source code, this is a relatively easy task.
Current Docker Registry: {{captaininfo.isRegistryLocal?'Local at ':'Remote at'}} {{captaininfo.dockerRegistryDomain}}