text:
	<!-- twitter card -->
	<meta name="twitter:card" content="summary_large_image">
	<meta name="twitter:site" content="@{{ site.social_account }}">
	<meta name="twitter:title" content="{% if page.title %}{{ page.title  }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}">
	<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
	<meta name="twitter:creator" content="@{{ site.social_account }}">
	<meta name="twitter:image:src" content="{% if page.twitter_image %}{{ page.twitter_image  | prepend: site.url }}{% else %}{{ site.twitter_image | prepend: site.url }}{% endif %}">
	<meta name="twitter:domain" content="{{ site.uri }}">


text:
/*
 * $Log$
 * Revision 1.10  2004/09/08 13:56:57  peiyongz
 * Apache License Version 2.0
 *
 * Revision 1.9  2003/12/17 00:18:40  cargilld
 * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.
 *
 * Revision 1.8  2003/07/31 17:14:27  peiyongz
 * Grammar embed grammar description
 *
 * Revision 1.7  2003/06/25 22:38:18  peiyongz
 * to use new GrammarResolver::getGrammar()
 *
 * Revision 1.6  2003/01/13 20:16:51  knoaman
 * [Bug 16024] SchemaSymbols.hpp conflicts C++ Builder 6 dir.h
 *
 * Revision 1.5  2002/11/04 14:49:42  tng
 * C++ Namespace Support.
 *
 * Revision 1.4  2002/09/24 20:12:48  tng
 * Performance: use XMLString::equals instead of XMLString::compareString
 *
 * Revision 1.3  2002/07/12 15:17:48  knoaman
 * For a given global element, store info about a substitution group element
 * as a SchemaElementDecl and not as a string.
 *
 * Revision 1.2  2002/02/25 21:18:18  tng
 * Schema Fix: Ensure no invalid uri index for UPA checking.
 *
 * Revision 1.1.1.1  2002/02/01 22:22:47  peiyongz
 * sane_include
 *
 * Revision 1.11  2001/11/28 16:46:03  tng
 * Schema fix: Initialize the temporary string as null terminated.
 *
 * Revision 1.10  2001/11/21 14:30:13  knoaman
 * Fix for UPA checking.
 *
 * Revision 1.9  2001/11/07 21:50:28  tng
 * Fix comment log that lead to error.
 *
 * Revision 1.8  2001/11/07 21:12:15  tng
 * Performance: Create QName in ContentSpecNode only if it is a leaf/Any/PCDataNode.
 *
 * Revision 1.7  2001/10/04 15:08:56  knoaman
 * Add support for circular import.
 *
 * Revision 1.6  2001/08/21 15:57:51  tng
 * Schema: Add isAllowedByWildcard.  Help from James Murphy.
 *
 * Revision 1.5  2001/05/29 19:47:22  knoaman
 * Fix bug -  memory was not allocated before call to XMLString::subString
 *
 * Revision 1.4  2001/05/28 20:55:42  tng
 * Schema: Null pointer checking in SubsitutionGropuComparator
 *
 * Revision 1.3  2001/05/11 13:27:37  tng
 * Copyright update.
 *
 * Revision 1.2  2001/05/04 14:50:28  tng
 * Fixed the cvs symbols.
 *
 *
 */

// ---------------------------------------------------------------------------
//  Includes
// ---------------------------------------------------------------------------
#include <xercesc/framework/XMLGrammarPool.hpp>
#include <xercesc/framework/XMLSchemaDescription.hpp>
#include <xercesc/validators/schema/SubstitutionGroupComparator.hpp>
#include <xercesc/validators/common/Grammar.hpp>
#include <xercesc/validators/schema/SchemaGrammar.hpp>
#include <xercesc/validators/schema/ComplexTypeInfo.hpp>
#include <xercesc/validators/schema/SchemaSymbols.hpp>

XERCES_CPP_NAMESPACE_BEGIN

bool SubstitutionGroupComparator::isEquivalentTo(QName* const anElement
                                               , QName* const exemplar)
{
    if (!anElement && !exemplar)
        return true;

    if ((!anElement && exemplar) || (anElement && !exemplar))
        return false;

    if (XMLString::equals(anElement->getLocalPart(), exemplar->getLocalPart()) &&
        (anElement->getURI() == exemplar->getURI()))
        return true; // they're the same!

    if (!fGrammarResolver || !fStringPool )
    {
        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::SubGrpComparator_NGR, anElement->getMemoryManager());
    }

    unsigned int uriId = anElement->getURI();
    if (uriId == XMLContentModel::gEOCFakeId ||
        uriId == XMLContentModel::gEpsilonFakeId ||
        uriId == XMLElementDecl::fgPCDataElemId ||
        uriId == XMLElementDecl::fgInvalidElemId)
        return false;

    const XMLCh* uri = fStringPool->getValueForId(uriId);
    const XMLCh* localpart = anElement->getLocalPart();

    // In addition to simply trying to find a chain between anElement and exemplar,
    // we need to make sure that no steps in the chain are blocked.
    // That is, at every step, we need to make sure that the element
    // being substituted for will permit being substituted
    // for, and whether the type of the element will permit derivations in
    // instance documents of this sort.

    if (!uri)
        return false;

    SchemaGrammar *sGrammar = (SchemaGrammar*) fGrammarResolver->getGrammar(uri);
    if (!sGrammar || sGrammar->getGrammarType() == Grammar::DTDGrammarType)
        return false;

    SchemaElementDecl* anElementDecl = (SchemaElementDecl*) sGrammar->getElemDecl(uriId, localpart, 0, Grammar::TOP_LEVEL_SCOPE);
    if (!anElementDecl)
        return false;

    SchemaElementDecl* pElemDecl = anElementDecl->getSubstitutionGroupElem();
    bool foundIt = false;

    while (pElemDecl) //(substitutionGroupFullName)
    {
        if (XMLString::equals(pElemDecl->getBaseName(), exemplar->getLocalPart()) &&
            (pElemDecl->getURI() == exemplar->getURI()))
        {
            // time to check for block value on element
            if((pElemDecl->getBlockSet() & SchemaSymbols::XSD_SUBSTITUTION) != 0)
                return false;

            foundIt = true;
            break;
        }

        pElemDecl = pElemDecl->getSubstitutionGroupElem();
    }//while

    if (!foundIt)
        return false;

    // this will contain anElement's complexType information.
    ComplexTypeInfo *aComplexType = anElementDecl->getComplexTypeInfo();
    int exemplarBlockSet = pElemDecl->getBlockSet();

    if(!aComplexType)
    {
        // check on simpleType case
        DatatypeValidator *anElementDV = anElementDecl->getDatatypeValidator();
        DatatypeValidator *exemplarDV = pElemDecl->getDatatypeValidator();

        return((anElementDV == 0) ||
            ((anElementDV == exemplarDV) ||
            ((exemplarBlockSet & SchemaSymbols::XSD_RESTRICTION) == 0)));
    }

    // now we have to make sure there are no blocks on the complexTypes that this is based upon
    int anElementDerivationMethod = aComplexType->getDerivedBy();
    if((anElementDerivationMethod & exemplarBlockSet) != 0)
        return false;

    // this will contain exemplar's complexType information.
    ComplexTypeInfo *exemplarComplexType = pElemDecl->getComplexTypeInfo();

    for(ComplexTypeInfo *tempType = aComplexType;
        tempType != 0 && tempType != exemplarComplexType;
        tempType = tempType->getBaseComplexTypeInfo())
    {
        if((tempType->getBlockSet() & anElementDerivationMethod) != 0)
            return false;
    }//for

    return true;
}

bool SubstitutionGroupComparator::isAllowedByWildcard(SchemaGrammar* const pGrammar,
                                                      QName* const element,
                                                      unsigned int wuri, bool wother)
{
    // whether the uri is allowed directly by the wildcard
    unsigned int uriId = element->getURI();

    if ((!wother && uriId == wuri) ||
        (wother &&
         uriId != wuri &&
         uriId != XMLContentModel::gEOCFakeId &&
         uriId != XMLContentModel::gEpsilonFakeId &&
         uriId != XMLElementDecl::fgPCDataElemId &&
         uriId != XMLElementDecl::fgInvalidElemId))
    {
        return true;
    }

    // get all elements that can substitute the current element
    RefHash2KeysTableOf<ElemVector>* theValidSubstitutionGroups = pGrammar->getValidSubstitutionGroups();

    if (!theValidSubstitutionGroups)
        return false;

    ValueVectorOf<SchemaElementDecl*>* subsElements = theValidSubstitutionGroups->get(element->getLocalPart(), uriId);

    if (!subsElements)
        return false;

    // then check whether there exists one element that is allowed by the wildcard
    int size = subsElements->size();

    for (int i = 0; i < size; i++)
    {
        unsigned int subUriId = subsElements->elementAt(i)->getElementName()->getURI();

        if ((!wother && subUriId == wuri) ||
            (wother &&
             subUriId != wuri &&
             subUriId != XMLContentModel::gEOCFakeId &&
             subUriId != XMLContentModel::gEpsilonFakeId &&
             subUriId != XMLElementDecl::fgPCDataElemId &&
             subUriId != XMLElementDecl::fgInvalidElemId))
        {
            return true;
        }
    }
    return false;
}

XERCES_CPP_NAMESPACE_END

/**
  * End of file SubstitutionGroupComparator.cpp
  */

redpajama_set_name: RedPajamaGithub


text:
/*
 * npm-proxy.js: Smart, prototypal proxy for routing traffic between _the_ public npm and _a_ private npm.
 *
 * (C) 2013, Nodejitsu Inc.
 *
 */

var httpProxy = require('http-proxy'),
    EE = require('events').EventEmitter,
    hyperquest = require('hyperquest'),
    util = require('util'),
    url_ = require('url');

//
// ### function NpmProxy (options)
// #### @options {Object} Options for initializing the proxy
// ####   @npm     {Array|string} Public npm CouchDBs we are proxying against.
// ####   @policy  {Object} Default policy
// ####     - npm         {url.parse} Private npm CouchDB we are proxying against.
// ####     - transparent {boolean}   If true: always behaves as a pass-thru to public npm(s).
// ####     - private     {Object}    Set of initial private modules.
// ####     - blacklist   {Object}    Set of initial blacklisted modules.
// ####     - whitelist   {Object}    Set of iniitial whitelisted modules.
// ####   @writePrivateOk {function}  **Optional** Predicate for writing new private packages.
// ####   @log            {function}  **Optional** Log function. Defaults to console.
//
// Constructor function for the NpmProxy object responsible for
// making proxy decisions between multiple npm registries.
//
var NpmProxy = module.exports = function (options) {
  if (!(this instanceof NpmProxy)) { return new NpmProxy(options) }
  EE.call(this);

  var self = this;

  //
  // URL to CouchDB and the proxy instance to use.
  //
  this.npm = options.npm;
  this.log = options.log || console;

  //
  // Remark: if we dont have a specific read/write url,
  // assume we either have an array or an url.parsed object
  //
  this.interval   = options.interval || 60 * 15 * 1000;
  this.currentNpm = this.npm && this.npm.read || this.npm;
  this.isUrlArray(this.npm.read || this.npm);
  //
  // Default these values if there is no read/write
  //
  this.writeNpm = this.npm.write || this.currentNpm;

  this.secure = options.secure || options.strictSSL || options.rejectUnauthorized || false;
  //
  // Setup the http-proxy instance to handle bad respones
  // and allow lax SSL if there is nothing passed in
  //
  this.proxy  = httpProxy.createProxyServer({ secure: this.secure, prependPath: false });
  this.proxy.on('error', this.onProxyError.bind(this));
  //
  // Proxy these events to the main prototype so we don't need to inspect
  // the internal http-proxy instance
  //
  this.proxy.on('start', this.emit.bind(this, 'start'));
  this.proxy.on('end', this.emit.bind(this, 'end'));

  //
  // Handler for decoupling any authorization logic
  // for new private packages from the proxy itself.
  //
  this.writePrivateOk = options.writePrivateOk;

  //
  // Set the policy
  //
  if (options.policy) {
    this.setPolicy(options.policy);
  }
};

util.inherits(NpmProxy, EE);

//
// ### function isUrlArray(urls)
// Handles the case where we have an array of urls so its reusable
//
NpmProxy.prototype.isUrlArray = function (urls) {
  //
  // Begin cycling public npm URLs only if it is an Array
  // we can cycle through.
  //
  if (Array.isArray(urls)) {
    if (urls.length === 1) {
      this.currentNpm = urls[0]
    }
    else {
      this.currentNpm = null;
      this.nextPublicNpm(urls);
      this.intervalId = setInterval(
        this.nextPublicNpm.bind(this, urls),
        this.interval
      );
    }
  }
};

//
// ### function setPolicy (policy)
// Sets the specified `policy` on this instance
//
NpmProxy.prototype.setPolicy = function (policy) {
  //
  // Remark: Pre-transformed the policy Arrays into Objects
  // for fast lookup.
  //
  this.policy           = policy;
  this.policy.blacklist = this.policy.blacklist || {};
  if (this.policy.transparent) {
    this.private =
    this.decide  =
    this.merge   =
      this.public;
  }
};

//
// ### function nextPublicNpm ()
// Sets the current public npm to a random
// selection (without replacement).
//
NpmProxy.prototype.nextPublicNpm = function (urls) {
  var index   = Math.random() * urls.length | 0,
      lastNpm = this.currentNpm;

  this.currentNpm = urls.splice(index, 1)[0];
  this.log.info('[public npm] %s --> %s', (lastNpm && lastNpm.href) || 'none', this.currentNpm.href);
  if (lastNpm) {
    urls.push(lastNpm);
  }
};

//
// ### function public (req, res, policy)
// #### @req {ServerRequest}  Incoming Request to the npm registry
// #### @res {ServerResponse} Outgoing Response to the npm client
//
// Make a proxy request to `url` against the public
// npm registry and stream the response back to the `res`.
//
NpmProxy.prototype.public = function (req, res) {
  var address = req.connection.remoteAddress || req.socket.remoteAddress,
      method = req.method.toLowerCase(),
      host,
      npm;

  npm = method !== 'put' && method !== 'delete'
    ? this.currentNpm
    : this.writeNpm;

  host = npm.vhost || npm.host || npm.hostname;

  this.log.info('[public] %s - %s %s %s %j', address, req.method, req.url, host, req.headers);

  this.emit('headers', req, req.headers, npm);

  req.headers.host = host;

  this.proxy.web(req, res, {
    target: npm.href
  });
};

//
// ### function private (req, res, policy)
// #### @req {ServerRequest}  Incoming Request to the npm registry
// #### @res {ServerResponse} Outgoing Response to the npm client
// #### @policy {Object} Policy info with admin and private npm dbs.
//
// Make a proxy request to `url` against the private
// npm registry and stream the response back to the `res`.
//
NpmProxy.prototype.private = function (req, res, policy) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;
  if (policy.transparent) {
    return this.public(req, res);
  }

  var address = req.connection.remoteAddress || req.socket.remoteAddress,
      host = policy.npm.vhost || policy.npm.host || policy.npm.hostname;

  this.log.info('[private] %s - %s %s %s %j', address, req.method, req.url, host, req.headers);

  this.emit('headers', req, req.headers, policy.npm);

  req.headers.host = host;

  this.proxy.web(req, res, {
    target: policy.npm.href
  });
};

//
// ### function decide (req, res, policy)
// #### @req {ServerRequest}  Incoming Request to the npm registry
// #### @res {ServerResponse} Outgoing Response to the npm client
// #### @policy {Object} Policy info with admin and private npm dbs.
//
// For the `pkg` requested, based on the:
//
// * Whitelist policy
// * Blacklist policy
// * Known private packages
//
// decide whether to proxy to the public or private npm
// registry and then stream the response back to the res
// from whatever registry was selected.
//
NpmProxy.prototype.decide = function (req, res, policy) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;
  if (policy.transparent) {
    return this.public(req, res);
  }
  var packageNamespaceMatch = /^\/-\/package\/(.*?)\//.exec(req.url);

  var address  = req.connection.remoteAddress || req.socket.remoteAddress,
      url      = req.url,
      method   = req.method.toLowerCase(),
      pkg      = packageNamespaceMatch ? packageNamespaceMatch[1] : url.slice(1).split('?').shift().split('/').shift(),
      proxy    = this.proxy,
      self     = this,
      decideFn;

  //
  // Proxy or serve not found based on the decision
  //
  function onDecision(err, target) {
    //
    // If there was no target then this is a 404 by definition
    // even if it exists in the public registry because of a
    // potential whitelist.
    //
    if (err || !target) {
      return self.notFound(req, res, err || { message: 'Unknown pkg: ' + pkg });
    }

    // if X-Forwarded-Host is set, npm returns 404 {"error":"not_found","reason":"no_db_file"}
    if (req.headers["x-forwarded-host"]) delete req.headers["x-forwarded-host"];

    //
    // If we get a valid target then we can proxy to it
    //
    self.log.info('[decide] %s - %s %s %s %j', address, req.method, req.url, target.vhost || target.host || target.hostname, req.headers);

    self.emit('headers', req, req.headers, target);

    req.headers.host = target.vhost || target.host || target.hostname;
    proxy.web(req, res, {
      target: target.href
    });
  }

  //
  // Calculate the decision function based on the HTTP
  // method. We could potentially optimize this by having two
  // deicison functions since the readUrl method(s) do not
  // have an async-nature.
  //
  // The choice of `standard{Read,Write}Url` vs `whitelist{Read,Write}Url`
  // is an important distinction here because the logic is
  // so drastically different between whitelist and not.
  //
  if (method === 'get' || method === 'head') {
    return policy.whitelist
      ? this.whitelistReadUrl(pkg, policy, onDecision)
      : this.standardReadUrl(pkg, policy, onDecision);
  }

  return policy.whitelist
    ? this.whitelistWriteUrl(pkg, policy, onDecision)
    : this.standardWriteUrl(pkg, policy, onDecision);
};

//
// ### function notFound (req, res)
// Simple 404 handler.
//
NpmProxy.prototype.notFound = function (req, res, err) {
  var address = req.connection.remoteAddress || req.socket.remoteAddress,
      code    = err ? 400 : 404,
      json;

  if (!err) { global.console.trace(); }
  err = err || { message: 'Unknown error' };
  this.log.error('[not found] %s - %s %s %s %j', address, req.method, req.url, err.message, req.headers);

  res.writeHead(code, { 'content-type': 'application/json' });
  json = { error: 'not_found', reason: err.message };
  res.end(JSON.stringify(json));
};

//
// ### function standardReadUrl (pkg, policy, callback)
// #### @pkg {string} npm package to get the read URL for.
// #### @policy {Object} Policy info with admin and private npm dbs.
// Calculates the target read (i.e. GET or HEAD) URL based on the
// `pkg`, `this.policy` and `this.npm` targets.
//
NpmProxy.prototype.standardReadUrl = function (pkg, policy, callback) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;

  //
  // There **IS NO WHITELIST** so if it is already a known private package
  // or part of a blacklist then proxy directly to the private npm.
  //
  if (policy.private[pkg] || policy.blacklist[pkg]) {
    return callback(null, policy.npm);
  }

  //
  // Otherwise send it to the public npm
  //
  return callback(null, this.currentNpm);
};

//
// ### function standardWriteUrl (pkg, callback)
// #### @pkg {string} npm package to get the write URL for.
// #### @policy {Object} Policy info with admin and private npm dbs.
// Calculates the target write (i.e. PUT or POST) URL based on the
// `pkg`, `this.policy` and `this.npm` targets..
//
NpmProxy.prototype.standardWriteUrl = function (pkg, policy, callback) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;

  var writeOk = this.writePrivateOk,
      self    = this,
      err;

  //
  // There **IS NO WHITELIST** so if it is already a known private package
  // or part of a blacklist then proxy directly to the private npm.
  //
  if (policy.private[pkg] || policy.blacklist[pkg]) {
    return callback(null, policy.npm);
  }

  //
  // Otherwise we need to look this package in the public registry
  // - if it does not exist we proxy to the private registry
  // - if it does exist then we proxy to the public registry
  //
  hyperquest({
    uri: url_.resolve(this.writeNpm.href, pkg),
    rejectUnauthorized: this.secure
  })
  .on('error', callback)
  .on('response', function (res) {
    if (res.statusCode == 404) {
      if (writeOk) {
        err = writeOk(policy, self);
        if (err) {
          return callback(err);
        }
      }

      policy.private[pkg] = true;
      return callback(null, policy.npm);
    }

    return callback(null, self.writeNpm);
  });
};

//
// ### function whitelistReadUrl (pkg, callback)
// #### @pkg {string} npm package to get the read URL for.
// #### @policy {Object} Policy info with admin and private npm dbs.
// Calculates the target read (i.e. GET or HEAD) URL based on the
// `pkg`, `this.policy` and `this.npm` targets.. Assumes there is
// a whitelist by default.
//
NpmProxy.prototype.whitelistReadUrl = function (pkg, policy, callback) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;

  //
  // There **IS A WHITELIST** so if it is in the whitelist proxy to the
  // public registry
  //
  if (policy.whitelist[pkg]) {
    return callback(null, this.currentNpm);
  }

  //
  // If it is already a known private package or part of a blacklist
  // then proxy directly to the private npm.
  //
  if (policy.private[pkg] || policy.blacklist[pkg]) {
    return callback(null, policy.npm);
  }

  //
  // Otherwise it is FORBIDDEN!
  //
  return callback(new Error('Your whitelist policy prevents you from getting ' + pkg));
};

//
// ### function whitelistWriteUrl (pkg, callback)
// #### @pkg {string} npm package to get the read URL for.
// #### @policy {Object} Policy info with admin and private npm dbs.
// Calculates the target read (i.e. GET or HEAD) URL based on the
// `pkg`, `this.policy` and `this.npm` targets.. Assumes there is
// a whitelist by default.
//
NpmProxy.prototype.whitelistWriteUrl = function (pkg, policy, callback) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;

  var writePrivateOk = this.writePrivateOk,
      limits         = policy && policy.limits,
      self           = this;

  //
  // There **IS A WHITELIST** so if it is in the whitelist proxy to the
  // public registry
  //
  if (policy.whitelist[pkg]) {
    return callback(null, this.writeNpm);
  }

  //
  // If it is already a known private package or part of a blacklist
  // then proxy directly to the private npm.
  //
  if (policy.private[pkg] || policy.blacklist[pkg]) {
    return callback(null, policy.npm);
  }

  //
  // Otherwise we need to look this package in the public registry
  // - if it does not exist we proxy to the private registry
  // - if it does exist then we 404
  //
  hyperquest({
    uri: url_.resolve(this.writeNpm.href, pkg),
    rejectUnauthorized: this.secure
  })
  .on('error', callback)
  .on('response', function (res) {
    if (res.statusCode == 404) {
      if (limits && limits.private && Object.keys(policy.private).length >= limits.private) {
        return callback(new Error('Out of private packages. Have you considered upgrading?'));
      }

      policy.private[pkg] = true;
      return callback(null, policy.npm);
    }

    //
    // Otherwise it is FORBIDDEN.
    //
    return callback(new Error('Your whitelist policy prevents you from writing ' + pkg));
  });
};

//
// ### function merge (req, res)
// #### @req {ServerRequest}  Incoming Request to the npm registry
// #### @res {ServerResponse} Outgoing Response to the npm client
// #### @policy {Object} Policy info with admin and private npm dbs.
//
// Concurrently request `/url` against the public
// and private npm registry and stream the JSON
// merged responses back to `res` as a single
// JSON object.
//
NpmProxy.prototype.merge = function (req, res, policy) {
  //
  // Always default to a set policy. This enables the
  // the enterprise case only one policy enforced.
  //
  policy = policy || this.policy;

  var address = req.connection.remoteAddress || req.socket.remoteAddress,
      method  = req.method,
      url     = req.url,
      self    = this,
      contentTypes = {},
      responses    = {};

  //
  // ### function makeRequest (target)
  // Makes a request to `req.url` to the
  // specified target.
  //
  function makeRequest(target) {
    var headers = Object.keys(req.headers)
      .reduce(function (all, key) {
        all[key] = req.headers[key];
        return all;
      }, {});

    //
    // Set the correct host header.
    //
    headers.host = target.host;

    self.log.info('[merge] %s - %s %s %s %j', address, req.method, req.url, target.host, req.headers);
    return hyperquest({
      url:     url_.resolve(target.href, url),
      method:  method,
      headers: headers
    });
  }

  //
  // ### function onResponse (type, pRes)
  // Sets the content type from the proxy
  // response.
  //
  function onResponse(type, pRes) {
    contentTypes[type] = pRes.headers['content-type'].split(';')[0];
    responses[type]    = pRes;

    //
    // If we have both a public and a private
    // response.
    //
    if (responses.public && responses.private) {
      if (contentTypes.public === contentTypes.private) {
        return self.merge.handlers[contentTypes.public](req, res, responses);
      }

      res.writeHead(500, { 'content-type': 'text/plain' });
      res.end('Content-Type mismatch: ' + JSON.stringify(contentTypes));
    }
  }

  makeRequest(policy.npm)
    .on('response', onResponse.bind(null, 'private'));

  makeRequest(this.currentNpm)
    .on('response', onResponse.bind(null, 'public'));
};

//
// ### @merge.handlers {Object}
// Merge handlers for multiple proxy responses.
//
NpmProxy.prototype.merge.handlers = {
  'text/plain': function textPlain(req, res, responses) {
    //
    // TODO: Properly merge these together.
    //
    responses.public.pipe(res);
  },
  'text/xml': function textXml(req, res, responses) {
    //
    // TODO: Properly merge these together.
    //
    responses.public.pipe(res);
  },
  'application/json': function appJson(req, res, responses) {
    //
    // TODO: Properly merge these together.
    //
    responses.public.pipe(res);
  }
};

//
// ### function onProxyError (err, req, res)
// `http-proxy` "error" event handler
//
NpmProxy.prototype.onProxyError = function (err, req, res) {
  var address = req.connection.remoteAddress || req.socket.remoteAddress,
      code    = res.statusCode || 500,
      json;

  this.log.error('[proxy error] %s - %s %s %s %j', address, req.method, req.url, err.message, req.headers);

  if (!res.headersSent) {
    res.writeHead(code, { 'content-type': 'application/json' });
  }

  json = { error: 'proxy_error', reason: err.message };
  res.end(JSON.stringify(json));
};


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
	<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
		<param name="Threshold" value="debug" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d [%t][%p] - (%F:%L) - %m%n" />
		</layout>
	</appender>

   <appender name="ADMIN" class="org.apache.log4j.DailyRollingFileAppender">
      <param name="File"   value="C:/likits/log/admin/center-log.log" />
      <param name="Append" value="true" />
      <param name="DatePattern"   value="'.'yyyy-MM-dd-a" />
      <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%d [%t][%p] - (%F:%L) - %m%n"/>
      </layout>
   </appender>

	<logger name="ADMIN" additivity="false">
		<level value="debug"/>
		<appender-ref ref="ADMIN"/>
	</logger>

	<root>
      <priority value="info" />
      <appender-ref ref="STDOUT" />
   </root>

</log4j:configuration>


text:
from distutils.core import setup, Extension
from rdkit import RDConfig

# force the use of g++ please
from distutils import sysconfig
save_init_posix = sysconfig._init_posix

def my_init_posix():
  print('my_init_posix: changing gcc to g++')
  save_init_posix()
  g = sysconfig.get_config_vars()
  g['CC'] = 'g++'
  g['LDSHARED'] = 'g++ -shared'
  g['PY_CFLAGS'] = g['PY_CFLAGS'].replace('-O3', '')

sysconfig._init_posix = my_init_posix

destDir = RDConfig.RDCodeDir
extDir = RDConfig.RDBaseDir + "/External"
# this is how things are done with BPLv2
boostInc = '-isystem%s' % (extDir + "/boost_1_29_0")
incDirs = []
# FIX: there's gotta be a better way of doing this
pyLibDir = '/usr/lib/python2.2/config'
boostLibDir = extDir + "/boost_1_29_0/libs/python/build/bin/libboost_python.so/gcc/debug/runtime-link-dynamic/shared-linkable-true/"
boostLib = "boost_python"
libDirs = [boostLibDir, pyLibDir]
libraries = [boostLib, "python2.2"]  # have to include g++ here or we get link errors with boost

compileArgs = ['-ftemplate-depth-150',
               '-DBOOST_PYTHON_DYNAMIC_LIB',
               boostInc, ]
setup(name="python_objs", version="1.0", ext_modules=[Extension(
  "python_objs", ["python_objs.cpp"], include_dirs=incDirs, library_dirs=libDirs,
  libraries=libraries, extra_compile_args=compileArgs)])


text:
<!DOCTYPE html>
<html lang="en">
  <head>
    {% include header.html %}
  </head>
  <body>
    {% include navbar.html %}
    {% include jumbotron.html %}
    {{ content }}
    <div class="container">
      {% include footer.html %}
    </div>
  </body>
</html>


text:
html {overflow-y:scroll;}
body { font-family: Verdana, sans-serif; font-size: 12px; color:#484848; margin: 0; padding: 30px; min-width: 900px;  }

h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif;}
h1 {margin:0; padding:0; font-size: 24px;}
h2, .wiki h1 {font-size: 20px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
h3, .wiki h2 {font-size: 16px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}

/***** Layout *****/
#wrapper {background: white;}

#top-menu {background: #2C4056; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 2px 0px 6px;}
#top-menu ul {margin: 0;  padding: 0;}
#top-menu li {
  float:left;
  list-style-type:none;
  margin: 0px 0px 0px 0px;
  padding: 0px 0px 0px 0px;
  white-space:nowrap;
}
#top-menu a {color: #fff; margin-right: 8px; font-weight: bold;}
#top-menu #loggedas { float: right; margin-right: 0.5em; color: #fff; }

#account {float:right;}

#header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
#header a {color:#f8f8f8;}
#header h1 a.ancestor { font-size: 80%; }
#quick-search {float:right;}

#main-menu {position: absolute;  bottom: 0px;  left:6px; margin-right: -500px;}
#main-menu ul {margin: 0;  padding: 0;}
#main-menu li {
  float:left;
  list-style-type:none;
  margin: 0px 2px 0px 0px;
  padding: 0px 0px 0px 0px;
  white-space:nowrap;
}
#main-menu li a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  margin: 0;
  padding: 4px 10px 4px 10px;
}
#main-menu li a:hover {background:#759FCF; color:#fff;}
#main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}

#admin-menu ul {margin: 0;  padding: 0;}
#admin-menu li {margin: 0;  padding: 0 0 6px 0; list-style-type:none;}

#admin-menu a { background-position: 0% 40%; background-repeat: no-repeat; padding-left: 20px; padding-top: 2px; padding-bottom: 3px;}
#admin-menu a.projects { background-image: url(../images/projects.png); }
#admin-menu a.users { background-image: url(../images/user.png); }
#admin-menu a.groups { background-image: url(../images/group.png); }
#admin-menu a.roles { background-image: url(../images/database_key.png); }
#admin-menu a.trackers { background-image: url(../images/ticket.png); }
#admin-menu a.issue_statuses { background-image: url(../images/ticket_edit.png); }
#admin-menu a.workflows { background-image: url(../images/ticket_go.png); }
#admin-menu a.custom_fields { background-image: url(../images/textfield.png); }
#admin-menu a.enumerations { background-image: url(../images/text_list_bullets.png); }
#admin-menu a.settings { background-image: url(../images/changeset.png); }
#admin-menu a.plugins { background-image: url(../images/plugin.png); }
#admin-menu a.info { background-image: url(../images/help.png); }
#admin-menu a.server_authentication { background-image: url(../images/server_key.png); }

#main {background-color:#EEEEEE;}

#sidebar{ float: right; width: 22%; position: relative; z-index: 9; padding: 0; margin: 0;}
* html #sidebar{ width: 22%; }
#sidebar h3{ font-size: 14px; margin-top:14px; color: #666;  }
#sidebar hr{ width: 100%; margin: 0 auto; height: 1px; background: #ccc; border: 0; }
* html #sidebar hr{ width: 95%; position: relative; left: -6px; color: #ccc; }
#sidebar .contextual { margin-right: 1em; }

#content { width: 75%; background-color: #fff; margin: 0px; border-right: 1px solid #ddd; padding: 6px 10px 10px 10px; z-index: 10; }
* html #content{ width: 75%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
html>body #content { min-height: 600px; }
* html body #content { height: 600px; } /* IE */

#main.nosidebar #sidebar{ display: none; }
#main.nosidebar #content{ width: auto; border-right: 0; }

#footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;}

#login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }
#login-form table td {padding: 6px;}
#login-form label {font-weight: bold;}
#login-form input#username, #login-form input#password { width: 300px; }

#modalbg {position:absolute; top:0; left:0; width:100%; height:100%; background:#ccc; z-index:49; opacity:0.5;}
html>body #modalbg {position:fixed;}
div.modal { border-radius:5px; position:absolute; top:25%; background:#fff; border:2px solid #759FCF; z-index:50; padding:0px; padding:8px; box-shadow: 1px 1px 8px #888; }
div.modal h3.title {background:#759FCF; color:#fff; border:0; padding-left:8px; margin:-8px; margin-bottom: 1em; border-top-left-radius:2px;border-top-right-radius:2px;}
div.modal p.buttons {text-align:right; margin-bottom:0;}
html>body div.modal {position:fixed;}

input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; }

.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }

/***** Links *****/
a, a:link, a:visited{ color: #2A5685; text-decoration: none; }
a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
a img{ border: 0; }

a.issue.closed, a.issue.closed:link, a.issue.closed:visited { color: #999; text-decoration: line-through; }

#sidebar a.selected {line-height:1.7em; padding:1px 3px 2px 2px; margin-left:-2px; background-color:#9DB9D5; color:#fff; border-radius:2px; -moz-border-radius:2px;}
#sidebar a.selected:hover {text-decoration:none;}
#admin-menu a {line-height:1.7em;}
#admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;}

a.collapsible {padding-left: 12px; background: url(../images/arrow_expanded.png) no-repeat -3px 40%;}
a.collapsible.collapsed {background: url(../images/arrow_collapsed.png) no-repeat -5px 40%;}

a#toggle-completed-versions {color:#999;}
/***** Tables *****/
table.list { border: 1px solid #e4e4e4;  border-collapse: collapse; width: 100%; margin-bottom: 4px; }
table.list th {  background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
table.list td { vertical-align: top; }
table.list td.id { width: 2%; text-align: center;}
table.list td.checkbox { width: 15px; padding: 2px 0 0 0; }
table.list td.checkbox input {padding:0px;}
table.list td.buttons { width: 15%; white-space:nowrap; text-align: right; }
table.list td.buttons a { padding-right: 0.6em; }
table.list caption { text-align: left; padding: 0.5em 0.5em 0.5em 0; }

tr.project td.name a { white-space:nowrap; }

tr.project.idnt td.name span {background: url(../images/bullet_arrow_right.png) no-repeat 0 50%; padding-left: 16px;}
tr.project.idnt-1 td.name {padding-left: 0.5em;}
tr.project.idnt-2 td.name {padding-left: 2em;}
tr.project.idnt-3 td.name {padding-left: 3.5em;}
tr.project.idnt-4 td.name {padding-left: 5em;}
tr.project.idnt-5 td.name {padding-left: 6.5em;}
tr.project.idnt-6 td.name {padding-left: 8em;}
tr.project.idnt-7 td.name {padding-left: 9.5em;}
tr.project.idnt-8 td.name {padding-left: 11em;}
tr.project.idnt-9 td.name {padding-left: 12.5em;}

tr.issue { text-align: center; white-space: nowrap; }
tr.issue td.subject, tr.issue td.category, td.assigned_to, tr.issue td.string, tr.issue td.text { white-space: normal; }
tr.issue td.subject { text-align: left; }
tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;}

tr.issue.idnt td.subject a {background: url(../images/bullet_arrow_right.png) no-repeat 0 50%; padding-left: 16px;}
tr.issue.idnt-1 td.subject {padding-left: 0.5em;}
tr.issue.idnt-2 td.subject {padding-left: 2em;}
tr.issue.idnt-3 td.subject {padding-left: 3.5em;}
tr.issue.idnt-4 td.subject {padding-left: 5em;}
tr.issue.idnt-5 td.subject {padding-left: 6.5em;}
tr.issue.idnt-6 td.subject {padding-left: 8em;}
tr.issue.idnt-7 td.subject {padding-left: 9.5em;}
tr.issue.idnt-8 td.subject {padding-left: 11em;}
tr.issue.idnt-9 td.subject {padding-left: 12.5em;}

tr.entry { border: 1px solid #f8f8f8; }
tr.entry td { white-space: nowrap; }
tr.entry td.filename { width: 30%; }
tr.entry td.filename_no_report { width: 70%; }
tr.entry td.size { text-align: right; font-size: 90%; }
tr.entry td.revision, tr.entry td.author { text-align: center; }
tr.entry td.age { text-align: right; }
tr.entry.file td.filename a { margin-left: 16px; }
tr.entry.file td.filename_no_report a { margin-left: 16px; }

tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}

tr.changeset { height: 20px }
tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
tr.changeset td.revision_graph { width: 15%; background-color: #fffffb; }
tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;}
tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;}

table.files tr.file td { text-align: center; }
table.files tr.file td.filename { text-align: left; padding-left: 24px; }
table.files tr.file td.digest { font-size: 80%; }

table.members td.roles, table.memberships td.roles { width: 45%; }

tr.message { height: 2.6em; }
tr.message td.subject { padding-left: 20px; }
tr.message td.created_on { white-space: nowrap; }
tr.message td.last_message { font-size: 80%; white-space: nowrap; }
tr.message.locked td.subject { background: url(../images/locked.png) no-repeat 0 1px; }
tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; }

tr.version.closed, tr.version.closed a { color: #999; }
tr.version td.name { padding-left: 20px; }
tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; }
tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; }

tr.user td { width:13%; }
tr.user td.email { width:18%; }
tr.user td { white-space: nowrap; }
tr.user.locked, tr.user.registered { color: #aaa; }
tr.user.locked a, tr.user.registered a { color: #aaa; }

table.permissions td.role {color:#999;font-size:90%;font-weight:normal !important;text-align:center;vertical-align:bottom;}

tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;}

tr.time-entry { text-align: center; white-space: nowrap; }
tr.time-entry td.subject, tr.time-entry td.comments { text-align: left; white-space: normal; }
td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
td.hours .hours-dec { font-size: 0.9em; }

table.plugins td { vertical-align: middle; }
table.plugins td.configure { text-align: right; padding-right: 1em; }
table.plugins span.name { font-weight: bold; display: block; margin-bottom: 6px; }
table.plugins span.description { display: block; font-size: 0.9em; }
table.plugins span.url { display: block; font-size: 0.9em; }

table.list tbody tr.group td { padding: 0.8em 0 0.5em 0.3em; font-weight: bold; border-bottom: 1px solid #ccc; }
table.list tbody tr.group span.count { color: #aaa; font-size: 80%; }
tr.group a.toggle-all { color: #aaa; font-size: 80%; font-weight: normal; display:none;}
tr.group:hover a.toggle-all { display:inline;}
a.toggle-all:hover {text-decoration:none;}

table.list tbody tr:hover { background-color:#ffffdd; }
table.list tbody tr.group:hover { background-color:inherit; }
table td {padding:2px;}
table p {margin:0;}
.odd {background-color:#f6f7f8;}
.even {background-color: #fff;}

a.sort { padding-right: 16px; background-position: 100% 50%; background-repeat: no-repeat; }
a.sort.asc  { background-image: url(../images/sort_asc.png); }
a.sort.desc { background-image: url(../images/sort_desc.png); }

table.attributes { width: 100% }
table.attributes th { vertical-align: top; text-align: left; }
table.attributes td { vertical-align: top; }

table.boards a.board, h3.comments { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }

table.query-columns {
    border-collapse: collapse;
    border: 0;
}

table.query-columns td.buttons {
    vertical-align: middle;
    text-align: center;
}

td.center {text-align:center;}

h3.version { background: url(../images/package.png) no-repeat 0% 50%; padding-left: 20px; }

div.issues h3 { background: url(../images/ticket.png) no-repeat 0% 50%; padding-left: 20px; }
div.members h3 { background: url(../images/group.png) no-repeat 0% 50%; padding-left: 20px; }
div.news h3 { background: url(../images/news.png) no-repeat 0% 50%; padding-left: 20px; }
div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; }

#watchers ul {margin: 0;  padding: 0;}
#watchers li {list-style-type:none;margin: 0px 2px 0px 0px; padding: 0px 0px 0px 0px;}
#watchers select {width: 95%; display: block;}
#watchers a.delete {opacity: 0.4;}
#watchers a.delete:hover {opacity: 1;}
#watchers img.gravatar {margin: 0 4px 2px 0;}

span#watchers_inputs {overflow:auto; display:block;}
span.search_for_watchers {display:block;}
span.search_for_watchers, span.add_attachment {font-size:80%; line-height:2.5em;}
span.search_for_watchers a, span.add_attachment a {padding-left:16px; background: url(../images/bullet_add.png) no-repeat 0 50%; }

.highlight { background-color: #FCFD8D;}
.highlight.token-1 { background-color: #faa;}
.highlight.token-2 { background-color: #afa;}
.highlight.token-3 { background-color: #aaf;}

.box{
padding:6px;
margin-bottom: 10px;
background-color:#f6f6f6;
color:#505050;
line-height:1.5em;
border: 1px solid #e4e4e4;
}

div.square {
 border: 1px solid #999;
 float: left;
 margin: .3em .4em 0 .4em;
 overflow: hidden;
 width: .6em; height: .6em;
}
.contextual {float:right; white-space: nowrap; line-height:1.4em;margin-top:5px; padding-left: 10px; font-size:0.9em;}
.contextual input, .contextual select {font-size:0.9em;}
.message .contextual { margin-top: 0; }

.splitcontent {overflow:auto;}
.splitcontentleft{float:left; width:49%;}
.splitcontentright{float:right; width:49%;}
form {display: inline;}
input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;}
fieldset {border: 1px solid #e4e4e4; margin:0;}
legend {color: #484848;}
hr { width: 100%; height: 1px; background: #ccc; border: 0;}
blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
blockquote blockquote { margin-left: 0;}
acronym  { border-bottom: 1px dotted; cursor: help; }
textarea.wiki-edit { width: 99%; }
li p {margin-top: 0;}
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;}
p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; }
p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; }

div.issue div.subject div div { padding-left: 16px; }
div.issue div.subject p {margin: 0; margin-bottom: 0.1em; font-size: 90%; color: #999;}
div.issue div.subject>div>p { margin-top: 0.5em; }
div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;}
div.issue span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px; -moz-border-radius: 2px;}
div.issue .next-prev-links {color:#999;}
div.issue table.attributes th {width:22%;}
div.issue table.attributes td {width:28%;}

#issue_tree table.issues, #relations table.issues { border: 0; }
#issue_tree td.checkbox, #relations td.checkbox {display:none;}
#relations td.buttons {padding:0;}

fieldset.collapsible { border-width: 1px 0 0 0; font-size: 0.9em; }
fieldset.collapsible legend { padding-left: 16px; background: url(../images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; }
fieldset.collapsible.collapsed legend { background-image: url(../images/arrow_collapsed.png); }

fieldset#date-range p { margin: 2px 0 2px 0; }
fieldset#filters table { border-collapse: collapse; }
fieldset#filters table td { padding: 0; vertical-align: middle; }
fieldset#filters tr.filter { height: 2em; }
fieldset#filters td.field { width:200px; }
fieldset#filters td.operator { width:170px; }
fieldset#filters td.values { white-space:nowrap; }
fieldset#filters td.values select {min-width:130px;}
fieldset#filters td.values img { vertical-align: middle; margin-left:1px; }
fieldset#filters td.add-filter { text-align: right; vertical-align: top; }
.buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; }

div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
div#issue-changesets div.changeset { padding: 4px;}
div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; }
div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}

.journal ul.details img {margin:0 0 -3px 4px;}

div#activity dl, #search-results { margin-left: 2em; }
div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
div#activity dt.me .time { border-bottom: 1px solid #999; }
div#activity dt .time { color: #777; font-size: 80%; }
div#activity dd .description, #search-results dd .description { font-style: italic; }
div#activity span.project:after, #search-results span.project:after { content: " -"; }
div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; }

#search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }

div#search-results-counts {float:right;}
div#search-results-counts ul { margin-top: 0.5em; }
div#search-results-counts  li { list-style-type:none; float: left; margin-left: 1em; }

dt.issue { background-image: url(../images/ticket.png); }
dt.issue-edit { background-image: url(../images/ticket_edit.png); }
dt.issue-closed { background-image: url(../images/ticket_checked.png); }
dt.issue-note { background-image: url(../images/ticket_note.png); }
dt.changeset { background-image: url(../images/changeset.png); }
dt.news { background-image: url(../images/news.png); }
dt.message { background-image: url(../images/message.png); }
dt.reply { background-image: url(../images/comments.png); }
dt.wiki-page { background-image: url(../images/wiki_edit.png); }
dt.attachment { background-image: url(../images/attachment.png); }
dt.document { background-image: url(../images/document.png); }
dt.project { background-image: url(../images/projects.png); }
dt.time-entry { background-image: url(../images/time.png); }

#search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }

div#roadmap .related-issues { margin-bottom: 1em; }
div#roadmap .related-issues td.checkbox { display: none; }
div#roadmap .wiki h1:first-child { display: none; }
div#roadmap .wiki h1 { font-size: 120%; }
div#roadmap .wiki h2 { font-size: 110%; }
body.controller-versions.action-show div#roadmap .related-issues {width:70%;}

div#version-summary { float:right; width:28%; margin-left: 16px; margin-bottom: 16px; background-color: #fff; }
div#version-summary fieldset { margin-bottom: 1em; }
div#version-summary fieldset.time-tracking table { width:100%; }
div#version-summary th, div#version-summary td.total-hours { text-align: right; }

table#time-report td.hours, table#time-report th.period, table#time-report th.total { text-align: right; padding-right: 0.5em; }
table#time-report tbody tr.subtotal { font-style: italic; color:#777;}
table#time-report tbody tr.subtotal td.hours { color:#b0b0b0; }
table#time-report tbody tr.total { font-weight: bold; background-color:#EEEEEE; border-top:1px solid #e4e4e4;}
table#time-report .hours-dec { font-size: 0.9em; }

div.wiki-page .contextual a {opacity: 0.4}
div.wiki-page .contextual a:hover {opacity: 1}

form .attributes select { width: 60%; }
input#issue_subject { width: 99%; }
select#issue_done_ratio { width: 95px; }

ul.projects { margin: 0; padding-left: 1em; }
ul.projects.root { margin: 0;  padding: 0; }
ul.projects ul.projects { border-left: 3px solid #e0e0e0; }
ul.projects li.root { list-style-type:none; margin-bottom: 1em; }
ul.projects li.child { list-style-type:none; margin-top: 1em;}
ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
.my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }

#tracker_project_ids ul { margin: 0;  padding-left: 1em; }
#tracker_project_ids li { list-style-type:none; }

#related-issues li img {vertical-align:middle;}

ul.properties {padding:0; font-size: 0.9em; color: #777;}
ul.properties li {list-style-type:none;}
ul.properties li span {font-style:italic;}

.total-hours { font-size: 110%; font-weight: bold; }
.total-hours span.hours-int { font-size: 120%; }

.autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
#user_login, #user_firstname, #user_lastname, #user_mail, #my_account_form select, #user_form select, #user_identity_url { width: 90%; }

#workflow_copy_form select { width: 200px; }

textarea#custom_field_possible_values {width: 99%}
input#content_comments {width: 99%}

.pagination {font-size: 90%}
p.pagination {margin-top:8px;}

/***** Tabular forms ******/
.tabular p{
margin: 0;
padding: 3px 0 3px 0;
padding-left: 180px; /* width of left column containing the label elements */
min-height: 1.8em;
clear:left;
}

html>body .tabular p {overflow:hidden;}

.tabular label{
font-weight: bold;
float: left;
text-align: right;
/* width of left column */
margin-left: -180px;
/* width of labels. Should be smaller than left column to create some right margin */
width: 175px;
}

.tabular label.floating{
font-weight: normal;
margin-left: 0px;
text-align: left;
width: 270px;
}

.tabular label.block{
font-weight: normal;
margin-left: 0px !important;
text-align: left;
float: none;
display: block;
width: auto;
}

.tabular label.inline{
float:none;
margin-left: 5px !important;
width: auto;
}

label.no-css {
  font-weight: inherit;
  float:none;
  text-align:left;
  margin-left:0px;
  width:auto;
}
input#time_entry_comments { width: 90%;}

#preview fieldset {margin-top: 1em; background: url(../images/draft.png)}

.tabular.settings p{ padding-left: 300px; }
.tabular.settings label{ margin-left: -300px; width: 295px; }
.tabular.settings textarea { width: 99%; }

.settings.enabled_scm table {width:100%}
.settings.enabled_scm td.scm_name{ font-weight: bold; }

fieldset.settings label { display: block; }
fieldset#notified_events .parent { padding-left: 20px; }

.required {color: #bb0000;}
.summary {font-style: italic;}

#attachments_fields input.description {margin-left: 8px; width:340px;}
#attachments_fields span {display:block; white-space:nowrap;}
#attachments_fields img {vertical-align: middle;}

div.attachments { margin-top: 12px; }
div.attachments p { margin:4px 0 2px 0; }
div.attachments img { vertical-align: middle; }
div.attachments span.author { font-size: 0.9em; color: #888; }

p.other-formats { text-align: right; font-size:0.9em; color: #666; }
.other-formats span + span:before { content: "| "; }

a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }

em.info {font-style:normal;font-size:90%;color:#888;display:block;}
em.info.error {padding-left:20px; background:url(../images/exclamation.png) no-repeat 0 50%;}

textarea.text_cf {width:90%;}

/* Project members tab */
div#tab-content-members .splitcontentleft, div#tab-content-memberships .splitcontentleft, div#tab-content-users .splitcontentleft { width: 64% }
div#tab-content-members .splitcontentright, div#tab-content-memberships .splitcontentright, div#tab-content-users .splitcontentright { width: 34% }
div#tab-content-members fieldset, div#tab-content-memberships fieldset, div#tab-content-users fieldset { padding:1em; margin-bottom: 1em; }
div#tab-content-members fieldset legend, div#tab-content-memberships fieldset legend, div#tab-content-users fieldset legend { font-weight: bold; }
div#tab-content-members fieldset label, div#tab-content-memberships fieldset label, div#tab-content-users fieldset label { display: block; }
div#tab-content-members fieldset div, div#tab-content-users fieldset div { max-height: 400px; overflow:auto; }

#users_for_watcher {height: 200px; overflow:auto;}
#users_for_watcher label {display: block;}

table.members td.group { padding-left: 20px; background: url(../images/group.png) no-repeat 0% 50%; }

input#principal_search, input#user_search {width:100%}
input#principal_search, input#user_search {
  background: url(../images/magnifier.png) no-repeat 2px 50%; padding-left:20px;
  border:1px solid #9EB1C2; border-radius:3px; height:1.5em; width:95%;
}
input#principal_search.ajax-loading, input#user_search.ajax-loading {
 background-image: url(../images/loading.gif);
}

* html div#tab-content-members fieldset div { height: 450px; }

/***** Flash & error messages ****/
#errorExplanation, div.flash, .nodata, .warning, .conflict {
    padding: 4px 4px 4px 30px;
    margin-bottom: 12px;
    font-size: 1.1em;
    border: 2px solid;
}

div.flash {margin-top: 8px;}

div.flash.error, #errorExplanation {
    background: url(../images/exclamation.png) 8px 50% no-repeat;
    background-color: #ffe3e3;
    border-color: #dd0000;
    color: #880000;
}

div.flash.notice {
    background: url(../images/true.png) 8px 5px no-repeat;
    background-color: #dfffdf;
    border-color: #9fcf9f;
    color: #005f00;
}

div.flash.warning, .conflict {
    background: url(../images/warning.png) 8px 5px no-repeat;
    background-color: #FFEBC1;
    border-color: #FDBF3B;
    color: #A6750C;
    text-align: left;
}

.nodata, .warning {
    text-align: center;
    background-color: #FFEBC1;
    border-color: #FDBF3B;
    color: #A6750C;
}

#errorExplanation ul { font-size: 0.9em;}
#errorExplanation h2, #errorExplanation p { display: none; }

.conflict-details {font-size:80%;}

/***** Ajax indicator ******/
#ajax-indicator {
position: absolute; /* fixed not supported by IE */
background-color:#eee;
border: 1px solid #bbb;
top:35%;
left:40%;
width:20%;
font-weight:bold;
text-align:center;
padding:0.6em;
z-index:100;
opacity: 0.5;
}

html>body #ajax-indicator { position: fixed; }

#ajax-indicator span {
background-position: 0% 40%;
background-repeat: no-repeat;
background-image: url(../images/loading.gif);
padding-left: 26px;
vertical-align: bottom;
}

/***** Calendar *****/
table.cal {border-collapse: collapse; width: 100%; margin: 0px 0 6px 0;border: 1px solid #d7d7d7;}
table.cal thead th {width: 14%; background-color:#EEEEEE; padding: 4px; }
table.cal thead th.week-number {width: auto;}
table.cal tbody tr {height: 100px;}
table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
table.cal td.week-number { background-color:#EEEEEE; padding: 4px; border:none; font-size: 1em;}
table.cal td p.day-num {font-size: 1.1em; text-align:right;}
table.cal td.odd p.day-num {color: #bbb;}
table.cal td.today {background:#ffffdd;}
table.cal td.today p.day-num {font-weight: bold;}
table.cal .starting a, p.cal.legend .starting {background: url(../images/bullet_go.png) no-repeat -1px -2px; padding-left:16px;}
table.cal .ending a, p.cal.legend .ending {background: url(../images/bullet_end.png) no-repeat -1px -2px; padding-left:16px;}
table.cal .starting.ending a, p.cal.legend .starting.ending {background: url(../images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
p.cal.legend span {display:block;}

/***** Tooltips ******/
.tooltip{position:relative;z-index:24;}
.tooltip:hover{z-index:25;color:#000;}
.tooltip span.tip{display: none; text-align:left;}

div.tooltip:hover span.tip{
display:block;
position:absolute;
top:12px; left:24px; width:270px;
border:1px solid #555;
background-color:#fff;
padding: 4px;
font-size: 0.8em;
color:#505050;
}

/***** Progress bar *****/
table.progress {
    border-collapse: collapse;
    border-spacing: 0pt;
    empty-cells: show;
    text-align: center;
    float:left;
    margin: 1px 6px 1px 0px;
}

table.progress td { height: 1em; }
table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
table.progress td.done { background: #D3EDD3 none repeat scroll 0%; }
table.progress td.todo { background: #eee none repeat scroll 0%; }
p.pourcent {font-size: 80%;}
p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;}

#roadmap table.progress td { height: 1.2em; }
/***** Tabs *****/
#content .tabs {height: 2.6em; margin-bottom:1.2em; position:relative; overflow:hidden;}
#content .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; width: 2000px; border-bottom: 1px solid #bbbbbb;}
#content .tabs ul li {
float:left;
list-style-type:none;
white-space:nowrap;
margin-right:4px;
background:#fff;
position:relative;
margin-bottom:-1px;
}
#content .tabs ul li a{
display:block;
font-size: 0.9em;
text-decoration:none;
line-height:1.3em;
padding:4px 6px 4px 6px;
border: 1px solid #ccc;
border-bottom: 1px solid #bbbbbb;
background-color: #f6f6f6;
color:#999;
font-weight:bold;
border-top-left-radius:3px;
border-top-right-radius:3px;
}

#content .tabs ul li a:hover {
background-color: #ffffdd;
text-decoration:none;
}

#content .tabs ul li a.selected {
background-color: #fff;
border: 1px solid #bbbbbb;
border-bottom: 1px solid #fff;
color:#444;
}

#content .tabs ul li a.selected:hover {
background-color: #fff;
}

div.tabs-buttons { position:absolute; right: 0; width: 48px; height: 24px; background: white; bottom: 0; border-bottom: 1px solid #bbbbbb; }

button.tab-left, button.tab-right {
    font-size: 0.9em;
    cursor: pointer;
    height:24px;
    border: 1px solid #ccc;
    border-bottom: 1px solid #bbbbbb;
    position:absolute;
    padding:4px;
    width: 20px;
    bottom: -1px;
}

button.tab-left {
    right: 20px;
    background: #eeeeee url(../images/bullet_arrow_left.png) no-repeat 50% 50%;
    border-top-left-radius:3px;
}

button.tab-right {
    right: 0;
    background: #eeeeee url(../images/bullet_arrow_right.png) no-repeat 50% 50%;
    border-top-right-radius:3px;
}

/***** Auto-complete *****/
div.autocomplete {
  position:absolute;
  width:400px;
  margin:0;
  padding:0;
}
div.autocomplete ul {
  list-style-type:none;
  margin:0;
  padding:0;
}
div.autocomplete ul li {
  list-style-type:none;
  display:block;
  margin:-1px 0 0 0;
  padding:2px;
  cursor:pointer;
  font-size: 90%;
  border: 1px solid #ccc;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  background-color:white;
}
div.autocomplete ul li.selected { background-color: #ffb;}
div.autocomplete ul li span.informal {
  font-size: 80%;
  color: #aaa;
}

#parent_issue_candidates ul li {width: 500px;}
#related_issue_candidates ul li {width: 500px;}

/***** Diff *****/
.diff_out { background: #fcc; }
.diff_out span { background: #faa; }
.diff_in { background: #cfc; }
.diff_in span { background: #afa; }

.text-diff {
padding: 1em;
background-color:#f6f6f6;
color:#505050;
border: 1px solid #e4e4e4;
}

/***** Wiki *****/
div.wiki table {
    border-collapse: collapse;
    margin-bottom: 1em;
}

div.wiki table, div.wiki td, div.wiki th {
    border: 1px solid #bbb;
    padding: 4px;
}

div.wiki .noborder, div.wiki .noborder td, div.wiki .noborder th {border:0;}

div.wiki .external {
    background-position: 0% 60%;
    background-repeat: no-repeat;
    padding-left: 12px;
    background-image: url(../images/external.png);
}

div.wiki a.new {
    color: #b73535;
}

div.wiki ul, div.wiki ol {margin-bottom:1em;}

div.wiki pre {
    margin: 1em 1em 1em 1.6em;
    padding: 2px 2px 2px 0;
    background-color: #fafafa;
    border: 1px solid #dadada;
    width:auto;
    overflow-x: auto;
    overflow-y: hidden;
}

div.wiki ul.toc {
    background-color: #ffffdd;
    border: 1px solid #e4e4e4;
    padding: 4px;
    line-height: 1.2em;
    margin-bottom: 12px;
    margin-right: 12px;
    margin-left: 0;
    display: table
}
* html div.wiki ul.toc { width: 50%; } /* IE6 doesn't autosize div */

div.wiki ul.toc.right { float: right; margin-left: 12px; margin-right: 0; width: auto; }
div.wiki ul.toc.left  { float: left; margin-right: 12px; margin-left: 0; width: auto; }
div.wiki ul.toc ul { margin: 0; padding: 0; }
div.wiki ul.toc li { list-style-type:none; margin: 0;}
div.wiki ul.toc li li { margin-left: 1.5em; }
div.wiki ul.toc li li li { font-size: 0.8em; }

div.wiki ul.toc a {
    font-size: 0.9em;
    font-weight: normal;
    text-decoration: none;
    color: #606060;
}
div.wiki ul.toc a:hover { color: #c61a1a; text-decoration: underline;}

a.wiki-anchor { display: none; margin-left: 6px; text-decoration: none; }
a.wiki-anchor:hover { color: #aaa !important; text-decoration: none; }
h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor { display: inline; color: #ddd; }

div.wiki img { vertical-align: middle; }

/***** My page layout *****/
.block-receiver {
border:1px dashed #c0c0c0;
margin-bottom: 20px;
padding: 15px 0 15px 0;
}

.mypage-box {
margin:0 0 20px 0;
color:#505050;
line-height:1.5em;
}

.handle {
cursor: move;
}

a.close-icon {
display:block;
margin-top:3px;
overflow:hidden;
width:12px;
height:12px;
background-repeat: no-repeat;
cursor:pointer;
background-image:url('../images/close.png');
}

a.close-icon:hover {
background-image:url('../images/close_hl.png');
}

/***** Gantt chart *****/
.gantt_hdr {
  position:absolute;
  top:0;
  height:16px;
  border-top: 1px solid #c0c0c0;
  border-bottom: 1px solid #c0c0c0;
  border-right: 1px solid #c0c0c0;
  text-align: center;
  overflow: hidden;
}

.gantt_subjects { font-size: 0.8em; }
.gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; }

.task {
  position: absolute;
  height:8px;
  font-size:0.8em;
  color:#888;
  padding:0;
  margin:0;
  line-height:16px;
  white-space:nowrap;
}

.task.label {width:100%;}
.task.label.project, .task.label.version { font-weight: bold; }

.task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }
.task_done { background:#00c600 url(../images/task_done.png); border: 1px solid #00c600; }
.task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }

.task_todo.parent { background: #888; border: 1px solid #888; height: 3px;}
.task_late.parent, .task_done.parent { height: 3px;}
.task.parent.marker.starting  { position: absolute; background: url(../images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; left: 0px; top: -1px;}
.task.parent.marker.ending { position: absolute; background: url(../images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; right: 0px; top: -1px;}

.version.task_late { background:#f66 url(../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
.version.task_done { background:#00c600 url(../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
.version.task_todo { background:#fff url(../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
.version.marker { background-image:url(../images/version_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }

.project.task_late { background:#f66 url(../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
.project.task_done { background:#00c600 url(../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
.project.task_todo { background:#fff url(../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
.project.marker { background-image:url(../images/project_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }

.version-behind-schedule a, .issue-behind-schedule a {color: #f66914;}
.version-overdue a, .issue-overdue a, .project-overdue a {color: #f00;}

/***** Icons *****/
.icon {
background-position: 0% 50%;
background-repeat: no-repeat;
padding-left: 20px;
padding-top: 2px;
padding-bottom: 3px;
}

.icon-add { background-image: url(../images/add.png); }
.icon-edit { background-image: url(../images/edit.png); }
.icon-copy { background-image: url(../images/copy.png); }
.icon-duplicate { background-image: url(../images/duplicate.png); }
.icon-del { background-image: url(../images/delete.png); }
.icon-move { background-image: url(../images/move.png); }
.icon-save { background-image: url(../images/save.png); }
.icon-cancel { background-image: url(../images/cancel.png); }
.icon-multiple { background-image: url(../images/table_multiple.png); }
.icon-folder { background-image: url(../images/folder.png); }
.open .icon-folder { background-image: url(../images/folder_open.png); }
.icon-package { background-image: url(../images/package.png); }
.icon-user { background-image: url(../images/user.png); }
.icon-projects { background-image: url(../images/projects.png); }
.icon-help { background-image: url(../images/help.png); }
.icon-attachment  { background-image: url(../images/attachment.png); }
.icon-history  { background-image: url(../images/history.png); }
.icon-time  { background-image: url(../images/time.png); }
.icon-time-add  { background-image: url(../images/time_add.png); }
.icon-stats  { background-image: url(../images/stats.png); }
.icon-warning  { background-image: url(../images/warning.png); }
.icon-fav  { background-image: url(../images/fav.png); }
.icon-fav-off  { background-image: url(../images/fav_off.png); }
.icon-reload  { background-image: url(../images/reload.png); }
.icon-lock  { background-image: url(../images/locked.png); }
.icon-unlock  { background-image: url(../images/unlock.png); }
.icon-checked  { background-image: url(../images/true.png); }
.icon-details  { background-image: url(../images/zoom_in.png); }
.icon-report  { background-image: url(../images/report.png); }
.icon-comment  { background-image: url(../images/comment.png); }
.icon-summary  { background-image: url(../images/lightning.png); }
.icon-server-authentication { background-image: url(../images/server_key.png); }
.icon-issue { background-image: url(../images/ticket.png); }
.icon-zoom-in { background-image: url(../images/zoom_in.png); }
.icon-zoom-out { background-image: url(../images/zoom_out.png); }
.icon-passwd { background-image: url(../images/textfield_key.png); }
.icon-test { background-image: url(../images/bullet_go.png); }

.icon-file { background-image: url(../images/files/default.png); }
.icon-file.text-plain { background-image: url(../images/files/text.png); }
.icon-file.text-x-c { background-image: url(../images/files/c.png); }
.icon-file.text-x-csharp { background-image: url(../images/files/csharp.png); }
.icon-file.text-x-java { background-image: url(../images/files/java.png); }
.icon-file.text-x-javascript { background-image: url(../images/files/js.png); }
.icon-file.text-x-php { background-image: url(../images/files/php.png); }
.icon-file.text-x-ruby { background-image: url(../images/files/ruby.png); }
.icon-file.text-xml { background-image: url(../images/files/xml.png); }
.icon-file.text-css { background-image: url(../images/files/css.png); }
.icon-file.text-html { background-image: url(../images/files/html.png); }
.icon-file.image-gif { background-image: url(../images/files/image.png); }
.icon-file.image-jpeg { background-image: url(../images/files/image.png); }
.icon-file.image-png { background-image: url(../images/files/image.png); }
.icon-file.image-tiff { background-image: url(../images/files/image.png); }
.icon-file.application-pdf { background-image: url(../images/files/pdf.png); }
.icon-file.application-zip { background-image: url(../images/files/zip.png); }
.icon-file.application-x-gzip { background-image: url(../images/files/zip.png); }

img.gravatar {
    padding: 2px;
    border: solid 1px #d5d5d5;
    background: #fff;
    vertical-align: middle;
}

div.issue img.gravatar {
    float: left;
    margin: 0 6px 0 0;
    padding: 5px;
}

div.issue table img.gravatar {
    height: 14px;
    width: 14px;
    padding: 2px;
    float: left;
    margin: 0 0.5em 0 0;
}

h2 img.gravatar {
    margin: -2px 4px -4px 0;
}

h3 img.gravatar {
    margin: -4px 4px -4px 0;
}

h4 img.gravatar {
    margin: -6px 4px -4px 0;
}

td.username img.gravatar {
    margin: 0 0.5em 0 0;
    vertical-align: top;
}

#activity dt img.gravatar {
    float: left;
    margin: 0 1em 1em 0;
}

/* Used on 12px Gravatar img tags without the icon background */
.icon-gravatar {
  float: left;
  margin-right: 4px;
}

#activity dt,
.journal {
    clear: left;
}

.journal-link {
    float: right;
}

h2 img { vertical-align:middle; }

.hascontextmenu { cursor: context-menu; }

/***** Media print specific styles *****/
@media print {
  #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; }
  #main { background: #fff; }
  #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;}
  #wiki_add_attachment { display:none; }
  .hide-when-print { display: none; }
  .autoscroll {overflow-x: visible;}
  table.list {margin-top:0.5em;}
  table.list th, table.list td {border: 1px solid #aaa;}
}

/* Accessibility specific styles */
.hidden-for-sighted {
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}


text:
#pragma once
#include <aws/lookoutmetrics/LookoutMetrics_EXPORTS.h>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace LookoutMetrics
{
namespace Model
{
  class AWS_LOOKOUTMETRICS_API ActivateAnomalyDetectorResult
  {
  public:
    ActivateAnomalyDetectorResult();
    ActivateAnomalyDetectorResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    ActivateAnomalyDetectorResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

  };

} // namespace Model
} // namespace LookoutMetrics
} // namespace Aws


text:
var mediaInfo = require(process.cwd()+"/bot/utilities/media");
    settings = require(process.cwd() + '/settings.js').settings;

var repo = require(process.cwd()+'/repo');

var genre = [];

module.exports = function(bot, db, data, clev, yt) {
    bot.log("info", "BOT", 'TonerBot Command: ' + data.params.join(" "));
    if(data.params.length > 0) {
        var query = data.params.join(" ");
        if (query.includes(".q")) {
            query = query.substring(2);
            yt.search(query, 50, function(error, result) {
              if (error) {
                bot.log("info", "BOT", 'Error Response: ' + error);
              }
              else {
                bot.queueMedia("youtube",
                result['items'][(Math.floor(Math.random() * 49))]['id']['videoId'],
                function(response){});
              }
            });
        } else if (query.includes('song')) {
            bot.sendChat(mediaInfo.currentName + ' is currently playing...');
        } else {
//            clevv = new cleverbot(settings.API_USER, settings.API_KEY);
            clev.setNick(data.user.username);
            clev.create(function(err, response) {
                bot.log("info", "BOT", 'NICK Clev: ' + clev.nick);
                clev.ask(query, function(err, response) {
                    if (err) throw response;
                    bot.log("info", "BOT", 'TonerBot Says: ' + response);
                    bot.sendChat(response);
                });
            });
//        fallback
//            cleverbot = new Cleverbot;
//            Cleverbot.prepare(function(){
//              clev.write(data.params.join(" "), function (response) {
//                   bot.sendChat(response.message)
//              });
//            });
        }
    }
};


text:
module Prop

  # Convenience middleware that conveys the message configured on a Prop handle as well
  # as time left before the current window has passed in a Retry-After header.
  class Middleware

    # Default error handler
    class DefaultErrorHandler
      def self.call(env, error)
        body    = error.description || "This action has been rate limited"
        headers = { "Content-Type" => "text/plain", "Content-Length" => "#{body.size}", "Retry-After" => "#{error.retry_after}" }

        [ 429, headers, [ body ]]
      end
    end

    def initialize(app, options = {})
      @app     = app
      @options = options
      @handler = options[:error_handler] || DefaultErrorHandler
    end

    def call(env)
      begin
        @app.call(env)
      rescue Prop::RateLimited => e
        render_response(env, e)
      end
    end

    protected

    def render_response(env, error)
      @handler.call(env, error)
    end
  end

end


text:
using System.Collections.ObjectModel;

namespace BlueYonder.Reservations.Areas.HelpPage.ModelDescriptions
{
    public class ComplexTypeModelDescription : ModelDescription
    {
        public ComplexTypeModelDescription()
        {
            Properties = new Collection<ParameterDescription>();
        }

        public Collection<ParameterDescription> Properties { get; private set; }
    }
}


text:
import java.text.DecimalFormat;
import java.util.List;

public class Japao implements Comparacao{

	public void compararOutroPais(List<DadosPaises> pai){
		DecimalFormat formato = new DecimalFormat("0.00");
		int total = 0;
		double taxa = 0;
		Paises pa = Paises.BRASIL;

		for(Object i: pai){
			DadosPaises dp = (DadosPaises)i;
			if(dp.getPais().equals(pa)){
				total = dp.getTotalMortos();
				taxa = dp.getTaxaObito();
			}
			if(dp.getPais().equals(Paises.JAPÃO)){

				System.out.println("A "+dp.getPais()+" no ano de 2011 teve um total de "+dp.getTotalMortos()+ " mil mortos em acidente de trânsito enquanto "
			+ pa+" teve um total de "+total+" mil" );
				System.out.println("Porém a taxa/100mil habitantes da "+dp.getPais()+" foi de "+dp.getTaxaObito());
				System.out.println("Enquanto a do "+pa+" foi de "+taxa+" ou seja "+formato.format((((taxa/dp.getTaxaObito())*100)-100))+
						"% mais mortos, em taxa/100mil habitantes, que o  "+dp.getPais());

			}

		}
	}

}


text:
symfony-console-bootstrap
=========================

This project provides a bootstrapped console for your Symfony bundle. If you build useful command classes in your Bundles, you can now test them on their own (no need to pull into a Symfony project to run them)

<img src="https://travis-ci.org/tests-always-included/symfony-console-bootstrap.svg"/>


text:
module.exports = KarmaConfig

function KarmaConfig(config) {
  const {argv} = require('yargs')
  const browsers = [
    'Chrome',
    'Safari',
    'Firefox',
    'Nightmare',
    'browserstack:chrome',
    'browserstack:safari',
    'browserstack:firefox',
    'browserstack:edge',
  ]

  if (process.env.BROWSER_STACK_ENV) {
    const browserStackBrowsers = browsers.filter(browser => browser.startsWith('browserstack'))
    console.log(`Testing specs in ${browserStackBrowsers.length} browsers (${browserStackBrowsers.join(', ')})`)
  }

  config.set({
    basePath: '',
    port: 9876,
    colors: true,
    logLevel: config.LOG_ERROR,
    singleRun: true,

    browsers,

    files: [
      'node_modules/angular/index.js',
      'index.js',
      'angular.js',
      'webcomponents/**/*.directive.js',
      'webcomponents/**/*.scss',
      'index.spec.js',
      'angular.spec.js',
      'webcomponents/**/*.spec.js',
      'webcomponents/**/*.directive.spec.js',
    ],

    preprocessors: {
      '**/*.js': ['webpack', 'sourcemap'],
      'webcomponents/**/*.scss': ['scss'],
    },

    webpack: {
      devtool: 'inline-source-map',
    },

    webpackServer: {
      noInfo: true,
    },

    customLaunchers: {
      'browserstack:chrome': {
        base: 'BrowserStack',
        browser: 'chrome',
        'browser_version': '57',
        os: 'Windows',
        'os_version': '10',
      },
      'browserstack:firefox': {
        base: 'BrowserStack',
        browser: 'firefox',
        'browser_version': '53',
        os: 'Windows',
        'os_version': '10',
      },
      'browserstack:safari': {
        base: 'BrowserStack',
        browser: 'safari',
        'browser_version': '10',
        os: 'OS X',
        'os_version': 'Sierra',
      },
      'browserstack:edge': {
        base: 'BrowserStack',
        browser: 'edge',
        'browser_version': '15',
        os: 'Windows',
        'os_version': '10',
      },
    },

    browserStack: {
      username: process.env.BROWSERSTACK_USERNAME,
      accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
    },

    browserDisconnectTimeout: 10000,
    browserDisconnectTolerance: 1,
    browserNoActivityTimeout: 4 * 60 * 1000,
    captureTimeout : 4 * 60 * 1000,

    frameworks: [
      'mocha',
      'detectBrowsers',
    ],

    client: {
      captureConsole: true,

      mocha: {
        grep: argv.grep,
        bail: argv.bail,
      },
    },

    reporters: [
      'mocha',
    ],

    mochaReporter: {
      output: 'autowatch',
    },

    detectBrowsers: {
      enabled: argv.browsers === 'all',
      usePhantomJS: false,
      postDetection(availableBrowsers) {
        const runnableBrowsers = availableBrowsers.filter(browser => browsers.indexOf(browser) > -1)
        console.log(`Testing specs in ${runnableBrowsers.length} browsers (${runnableBrowsers.join(', ')})`)
        return runnableBrowsers
      },
    }
  })
}


text:
<?php

namespace GD\Tests;

trait CreateApplication
{
    /**
     * Creates the application.
     *
     * @return \Silly\Edition\Pimple\Application
     */
    public function createApplication()
    {
        $app = require __DIR__.'/../bootstrap/app.php';

        return $app;
    }
}


text:
package org.sistemafinanciero.entity;

// Generated 02-may-2014 11:48:28 by Hibernate Tools 4.0.0

import java.math.BigInteger;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.sistemafinanciero.entity.type.TipoEmpresa;

/**
 * PersonaJuridica generated by hbm2java
 */
@Entity
@Table(name = "PERSONA_JURIDICA", schema = "C##BDSISTEMAFINANCIERO")
@XmlRootElement(name = "personanatural")
@XmlAccessorType(XmlAccessType.NONE)
@NamedQueries({
		@NamedQuery(name = PersonaJuridica.FindAll, query = "SELECT p FROM PersonaJuridica p"),
		@NamedQuery(name = PersonaJuridica.FindByTipoAndNumeroDocumento, query = "SELECT p FROM PersonaJuridica p WHERE p.tipoDocumento.idTipoDocumento = :idtipodocumento AND p.numeroDocumento = :numerodocumento"),
		@NamedQuery(name = PersonaJuridica.FindByFilterText, query = "SELECT p FROM PersonaJuridica p WHERE p.numeroDocumento like :filtertext OR UPPER(p.razonSocial) LIKE :filtertext") })
public class PersonaJuridica implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	public final static String FindByTipoAndNumeroDocumento = "PersonaJuridica.FindByTipoAndNumeroDocumento";
	public final static String FindByFilterText = "PersonaJuridica.FindByFilterText";
	public final static String FindAll = "PersonaJuridica.FindAll";

	private BigInteger idPersonaJuridica;
	private TipoDocumento tipoDocumento;
	private PersonaNatural representanteLegal;
	private String numeroDocumento;
	private String razonSocial;
	private String nombreComercial;
	private Date fechaConstitucion;
	private String actividadPrincipal;
	private String direccion;
	private String referencia;
	private String telefono;
	private String celular;
	private String email;
	private TipoEmpresa tipoEmpresa;
	private Integer finLucro;
	private String ubigeo;
	private Set socios = new HashSet(0);
	private Set accionistas = new HashSet(0);

	public PersonaJuridica() {
	}

	public PersonaJuridica(BigInteger idPersonaJuridica,
			TipoDocumento tipoDocumento, TipoEmpresa tipoEmpresa,
			boolean finLucro) {
		this.idPersonaJuridica = idPersonaJuridica;
		this.tipoDocumento = tipoDocumento;
		this.tipoEmpresa = tipoEmpresa;
		this.finLucro = (finLucro ? 1 : 0);
	}

	public PersonaJuridica(BigInteger idPersonaJuridica,
			TipoDocumento tipoDocumento, PersonaNatural personaNatural,
			String numeroDocumento, String razonSocial, String nombreComercial,
			Date fechaConstitucion, String direccion, String referencia,
			String telefono, String celular, String email,
			TipoEmpresa tipoEmpresa, boolean finLucro, String ubigeo,
			Set socios, Set accionistas) {
		this.idPersonaJuridica = idPersonaJuridica;
		this.tipoDocumento = tipoDocumento;
		this.representanteLegal = personaNatural;
		this.numeroDocumento = numeroDocumento;
		this.razonSocial = razonSocial;
		this.nombreComercial = nombreComercial;
		this.fechaConstitucion = fechaConstitucion;
		this.direccion = direccion;
		this.referencia = referencia;
		this.telefono = telefono;
		this.celular = celular;
		this.email = email;
		this.tipoEmpresa = tipoEmpresa;
		this.finLucro = (finLucro ? 1 : 0);
		this.ubigeo = ubigeo;
		this.socios = socios;
		this.accionistas = accionistas;
	}

	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="PERSONAJURIDICA_SEQ")
	@SequenceGenerator(name="PERSONAJURIDICA_SEQ", initialValue=1, allocationSize=1, sequenceName="PERSONAJURIDICA_SEQ")
	@XmlElement(name = "id")
	@Id
	@Column(name = "ID_PERSONA_JURIDICA", unique = true, nullable = false, precision = 22, scale = 0)
	public BigInteger getIdPersonaJuridica() {
		return this.idPersonaJuridica;
	}

	public void setIdPersonaJuridica(BigInteger idPersonaJuridica) {
		this.idPersonaJuridica = idPersonaJuridica;
	}

	@XmlElement
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_TIPO_DOCUMENTO", nullable = false)
	public TipoDocumento getTipoDocumento() {
		return this.tipoDocumento;
	}

	public void setTipoDocumento(TipoDocumento tipoDocumento) {
		this.tipoDocumento = tipoDocumento;
	}

	@XmlElement
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_REPRESENTANTE_LEGAL")
	public PersonaNatural getRepresentanteLegal() {
		return this.representanteLegal;
	}

	public void setRepresentanteLegal(PersonaNatural representanteLegal) {
		this.representanteLegal = representanteLegal;
	}

	@XmlElement
	@Column(name = "NUMERO_DOCUMENTO", length = 20, columnDefinition = "nvarchar2")
	public String getNumeroDocumento() {
		return this.numeroDocumento;
	}

	public void setNumeroDocumento(String numeroDocumento) {
		this.numeroDocumento = numeroDocumento;
	}

	@XmlElement
	@Column(name = "RAZON_SOCIAL", length = 150, columnDefinition = "nvarchar2")
	public String getRazonSocial() {
		return this.razonSocial;
	}

	public void setRazonSocial(String razonSocial) {
		this.razonSocial = razonSocial;
	}

	@XmlElement
	@Column(name = "NOMBRE_COMERCIAL", length = 100, columnDefinition = "nvarchar2")
	public String getNombreComercial() {
		return this.nombreComercial;
	}

	public void setNombreComercial(String nombreComercial) {
		this.nombreComercial = nombreComercial;
	}

	@XmlElement
	@Column(name = "ACTIVIDAD_PRINCIPAL", length = 70, columnDefinition = "nvarchar2")
	public String getActividadPrincipal() {
		return actividadPrincipal;
	}

	public void setActividadPrincipal(String actividadPrincipal) {
		this.actividadPrincipal = actividadPrincipal;
	}

	@XmlElement
	@Temporal(TemporalType.DATE)
	@Column(name = "FECHA_CONSTITUCION", length = 7)
	public Date getFechaConstitucion() {
		return this.fechaConstitucion;
	}

	public void setFechaConstitucion(Date fechaConstitucion) {
		this.fechaConstitucion = fechaConstitucion;
	}

	@XmlElement
	@Column(name = "DIRECCION", length = 140, columnDefinition = "nvarchar2")
	public String getDireccion() {
		return this.direccion;
	}

	public void setDireccion(String direccion) {
		this.direccion = direccion;
	}

	@XmlElement
	@Column(name = "REFERENCIA", length = 140, columnDefinition = "nvarchar2")
	public String getReferencia() {
		return this.referencia;
	}

	public void setReferencia(String referencia) {
		this.referencia = referencia;
	}

	@XmlElement
	@Column(name = "TELEFONO", length = 40, columnDefinition = "nvarchar2")
	public String getTelefono() {
		return this.telefono;
	}

	public void setTelefono(String telefono) {
		this.telefono = telefono;
	}

	@XmlElement
	@Column(name = "CELULAR", length = 40, columnDefinition = "nvarchar2")
	public String getCelular() {
		return this.celular;
	}

	public void setCelular(String celular) {
		this.celular = celular;
	}

	@XmlElement
	@Column(name = "EMAIL", length = 40, columnDefinition = "nvarchar2")
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@XmlElement
	@Enumerated(EnumType.STRING)
	@Column(name = "TIPO_EMPRESA", nullable = false, length = 30, columnDefinition = "nvarchar2")
	public TipoEmpresa getTipoEmpresa() {
		return this.tipoEmpresa;
	}

	public void setTipoEmpresa(TipoEmpresa tipoEmpresa) {
		this.tipoEmpresa = tipoEmpresa;
	}

	@XmlElement
	@Column(name = "FIN_LUCRO", nullable = false, precision = 22, scale = 0)
	public Boolean getFinLucro() {
		if(this.finLucro == null)
			return null;
		else if(this.finLucro == 1)
			return true;
		else
			return false;
	}

	public void setFinLucro(Boolean finLucro) {
		if(finLucro == null)
			this.finLucro = null;
		else
			this.finLucro = (finLucro ? 1 : 0);
	}

	@XmlElement
	@Column(name = "UBIGEO", length = 12, columnDefinition = "nvarchar2")
	public String getUbigeo() {
		return this.ubigeo;
	}

	public void setUbigeo(String ubigeo) {
		this.ubigeo = ubigeo;
	}

	@XmlTransient
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "personaJuridica")
	public Set<Socio> getSocios() {
		return this.socios;
	}

	public void setSocios(Set socios) {
		this.socios = socios;
	}

	@XmlElement
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "personaJuridica")
	public Set<Accionista> getAccionistas() {
		return this.accionistas;
	}

	public void setAccionistas(Set accionistas) {
		this.accionistas = accionistas;
	}

}