text:
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, DeferredQueue
from twisted.web.server import Site

from vumi.utils import http_request
from vumi.tests.utils import MockHttpServer
from vumi.message import TransportUserMessage
from vumi.transports.integrat.integrat import (IntegratHttpResource,
                                               IntegratTransport)
from vumi.transports.tests.helpers import TransportHelper
from vumi.tests.helpers import VumiTestCase

XML_TEMPLATE = '''
<Message>
    <Version Version="1.0"/>
    <Response Type="OnUSSEvent">
        <SystemID>Higate</SystemID>
        <UserID>LoginName</UserID>
        <Service>SERVICECODE</Service>
        <Network ID="1" MCC="655" MNC="001"/>
        <OnUSSEvent Type="%(ussd_type)s">
            <USSContext SessionID="%(sid)s"
                        NetworkSID="%(network_sid)s"
                        MSISDN="%(msisdn)s"
                        Script="testscript"
                        ConnStr="%(connstr)s"/>
            <USSText Type="TEXT">%(text)s</USSText>
        </OnUSSEvent>
    </Response>
</Message>
'''

class TestIntegratHttpResource(VumiTestCase):

    DEFAULT_MSG = {
        'from_addr': '+2799053421',
        'to_addr': '*120*44#',
        'transport_metadata': {
            'session_id': 'sess1234',
            },
        }

    @inlineCallbacks
    def setUp(self):
        self.msgs = []
        site_factory = Site(IntegratHttpResource("testgrat", "ussd",
            self._publish))
        self.server = yield reactor.listenTCP(
            0, site_factory, interface='127.0.0.1')
        self.add_cleanup(self.server.loseConnection)
        addr = self.server.getHost()
        self._server_url = "http://%s:%s/" % (addr.host, addr.port)

    def _publish(self, **kws):
        self.msgs.append(kws)

    def send_request(self, xml):
        d = http_request(self._server_url, xml, method='GET')
        return d

    @inlineCallbacks
    def check_response(self, xml, responses):
        """Check that sending the given XML results in the given responses."""
        yield self.send_request(xml)
        for msg, expected_override in zip(self.msgs, responses):
            expected = self.DEFAULT_MSG.copy()
            expected.update(expected_override)
            for key, value in expected.items():
                self.assertEqual(msg[key], value)
        self.assertEqual(len(self.msgs), len(responses))
        del self.msgs[:]

    def make_ussd(self, ussd_type, sid=None, network_sid="netsid12345",
                  msisdn=None, connstr=None, text=""):
        sid = (self.DEFAULT_MSG['transport_metadata']['session_id']
              if sid is None else sid)
        msisdn = self.DEFAULT_MSG['from_addr'] if msisdn is None else msisdn
        connstr = self.DEFAULT_MSG['to_addr'] if connstr is None else connstr
        return XML_TEMPLATE % {
            'ussd_type': ussd_type, 'sid': sid, 'network_sid': network_sid,
            'msisdn': msisdn, 'connstr': connstr, 'text': text,
            }

    @inlineCallbacks
    def test_new_session(self):
        # this should not generate a message since we use
        # the 'open' event to start a new sesison.
        xml = self.make_ussd(ussd_type='New', text="")
        yield self.check_response(xml, [])

    @inlineCallbacks
    def test_new_session_via_request(self):
        # this should not generate a message since we use
        # the 'open' event to start a new sesison.
        xml = self.make_ussd(ussd_type='Request', text="REQ")
        yield self.check_response(xml, [])

    @inlineCallbacks
    def test_open_session(self):
        xml = self.make_ussd(ussd_type='Open', text="")
        yield self.check_response(xml, [{
            'session_event': TransportUserMessage.SESSION_NEW,
            'content': None,
            }])

    @inlineCallbacks
    def test_resume_session(self):
        xml = self.make_ussd(ussd_type='Request', text="foo")
        yield self.check_response(xml, [{
            'session_event': TransportUserMessage.SESSION_RESUME,
            'content': 'foo',
            }])

    @inlineCallbacks
    def test_non_ussd(self):
        xml = """
        <Message>
            <Version Version="1.0"/>
            <Response Type="OnReceiveSMS">
            <OnReceiveSMS>
              <Content Type="HEX">06052677F6A565 ...etc</Content>
            </OnReceiveSMS>
            </Response>
        </Message>
        """
        yield self.check_response(xml, [])

class TestIntegratTransport(VumiTestCase):

    @inlineCallbacks
    def setUp(self):
        self.integrat_calls = DeferredQueue()
        self.mock_integrat = MockHttpServer(self.handle_request)
        self.add_cleanup(self.mock_integrat.stop)
        yield self.mock_integrat.start()
        config = {
            'web_path': "foo",
            'web_port': "0",
            'url': self.mock_integrat.url,
            'username': 'testuser',
            'password': 'testpass',
            }
        self.tx_helper = self.add_helper(TransportHelper(IntegratTransport))
        self.transport = yield self.tx_helper.get_transport(config)
        addr = self.transport.web_resource.getHost()
        self.transport_url = "http://%s:%s/" % (addr.host, addr.port)
        self.higate_response = '<Response status_code="0"/>'

    def handle_request(self, request):
        # The content attr will have been set to None by the time we read this.
        request.content_body = request.content.getvalue()
        self.integrat_calls.put(request)
        return self.higate_response

    @inlineCallbacks
    def test_health(self):
        result = yield http_request(self.transport_url + "health", "",
                                    method='GET')
        self.assertEqual(result, "OK")

    @inlineCallbacks
    def test_outbound(self):
        yield self.tx_helper.make_dispatch_outbound("hi", transport_metadata={
            'session_id': "sess123",
        })
        req = yield self.integrat_calls.get()
        self.assertEqual(req.path, '/')
        self.assertEqual(req.method, 'POST')
        self.assertEqual(req.getHeader('content-type'),
                         'text/xml; charset=utf-8')
        self.assertEqual(req.content_body,
                         '<Message><Version Version="1.0" />'
                         '<Request Flags="0" SessionID="sess123"'
                           ' Type="USSReply">'
                         '<UserID Orientation="TR">testuser</UserID>'
                         '<Password>testpass</Password>'
                         '<USSText Type="TEXT">hi</USSText>'
                         '</Request></Message>')

    @inlineCallbacks
    def test_outbound_no_content(self):
        yield self.tx_helper.make_dispatch_outbound(None, transport_metadata={
            'session_id': "sess123",
        })
        req = yield self.integrat_calls.get()
        self.assertEqual(req.path, '/')
        self.assertEqual(req.method, 'POST')
        self.assertEqual(req.getHeader('content-type'),
                         'text/xml; charset=utf-8')
        self.assertEqual(req.content_body,
                         '<Message><Version Version="1.0" />'
                         '<Request Flags="0" SessionID="sess123"'
                           ' Type="USSReply">'
                         '<UserID Orientation="TR">testuser</UserID>'
                         '<Password>testpass</Password>'
                         '<USSText Type="TEXT" />'
                         '</Request></Message>')

    @inlineCallbacks
    def test_inbound(self):
        xml = XML_TEMPLATE % {
            'ussd_type': 'Request',
            'sid': 'sess1234',
            'network_sid': "netsid12345",
            'msisdn': '27345',
            'connstr': '*120*99#',
            'text': 'foobar',
            }
        yield http_request(self.transport_url + "foo", xml, method='GET')
        [msg] = yield self.tx_helper.wait_for_dispatched_inbound(1)
        self.assertEqual(msg['transport_name'], self.tx_helper.transport_name)
        self.assertEqual(msg['transport_type'], "ussd")
        self.assertEqual(msg['transport_metadata'],
                         {"session_id": "sess1234"})
        self.assertEqual(msg['session_event'],
                         TransportUserMessage.SESSION_RESUME)
        self.assertEqual(msg['from_addr'], '27345')
        self.assertEqual(msg['to_addr'], '*120*99#')
        self.assertEqual(msg['content'], 'foobar')

    @inlineCallbacks
    def test_inbound_non_ascii(self):
        xml = (XML_TEMPLATE % {
            'ussd_type': 'Request',
            'sid': 'sess1234',
            'network_sid': "netsid12345",
            'msisdn': '27345',
            'connstr': '*120*99#',
            'text': u'öæł',
            }).encode("utf-8")
        yield http_request(self.transport_url + "foo", xml, method='GET')
        [msg] = yield self.tx_helper.wait_for_dispatched_inbound(1)
        self.assertEqual(msg['content'], u'öæł')

    @inlineCallbacks
    def test_nack(self):
        self.higate_response = """
            <Response status_code="-1">
                <Data name="method_error">
                    <field name="error_code" value="-1"/>
                    <field name="reason" value="Expecting POST, not GET"/>
                </Data>
            </Response>""".strip()

        msg = yield self.tx_helper.make_dispatch_outbound(
            "hi", transport_metadata={'session_id': "sess123"})
        yield self.integrat_calls.get()
        [nack] = yield self.tx_helper.wait_for_dispatched_events(1)
        self.assertEqual(nack['user_message_id'], msg['message_id'])
        self.assertEqual(nack['sent_message_id'], msg['message_id'])
        self.assertEqual(nack['nack_reason'],
            'error_code: -1, reason: Expecting POST, not GET')


text:
package javafx.scene.layout;

import java.util.Iterator;

import javafx.scene.Node;
import javafx.scene.Parent;

import com.sun.javafx.util.WeakReferenceQueue;

/**
 * The base class for defining node-specific layout constraints.  Region
 * classes may create extensions of this class if they need to define their own
 * set of layout constraints.
 *
 * @since JavaFX 2.0
 */
public abstract class ConstraintBase {

    /**
     * If set as max value indicates that the pref value should be used as the max.
     * This allows an application to constrain a resizable node's size, which normally
     * has an unlimited max value, to its preferred size.
     */
    public static final double CONSTRAIN_TO_PREF = Double.NEGATIVE_INFINITY;

     WeakReferenceQueue impl_nodes = new WeakReferenceQueue();

     ConstraintBase() {
     }

     void add(Parent node) {
         impl_nodes.add(node);
     }

    void remove(Parent node) {
        impl_nodes.remove(node);
    }

     /**
      * Calls requestLayout on layout parent associated with this constraint object.
      */
     protected void requestLayout() {
        Iterator<Parent> nodeIter = impl_nodes.iterator();

        while (nodeIter.hasNext()) {
            nodeIter.next().requestLayout();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace GraphNews\CrawlerBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class GraphNewsCrawlerBundle extends Bundle
{
}


text:
//
//  main.cpp
//  SignalsTest
//
//  Created by Jorge López on 14/10/16.
//  Copyright © 2016 Jorge López. All rights reserved.
//

#include <iostream>
#include "signal_tests.h"
#include "silly_tests.h"
#include "perfect_forwarding_tests.h"

int main()
{
	TestDCSignal();

	std::cout << "Enter to exit the program: ";
	std::cin.ignore().get();
	return 0;
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Blechnum capense var. gregsonii Watts

### Remarks
null


text:
// -*- C++ -*-

// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
// version.

// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this library; see the file COPYING3.  If not see
// <http://www.gnu.org/licenses/>.

// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.

// Permission to use, copy, modify, sell, and distribute this software
// is hereby granted without fee, provided that the above copyright
// notice appears in all copies, and that both that copyright notice
// and this permission notice appear in supporting documentation. None
// of the above authors, nor IBM Haifa Research Laboratories, make any
// representation about the suitability of this software for any
// purpose. It is provided "as is" without express or implied
// warranty.

/**
 * @file hash_resize_example.cpp
 * An example of externally resizing a map.
 */

/**
 * This example shows how to externally manipulate the size of a hash-based
 * container object throught its resize-policy object.
 **/

#include <functional>
#include <cassert>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/hash_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

// A simple hash functor.
// hash could serve instead of this functor, but it is not yet
// standard everywhere.
struct int_hash : public unary_function<int, size_t>
{
  inline size_t
  operator()(const int& r_i) const
  { return r_i; }
};

int main()
{
  // A probing hash table mapping ints to chars.
  typedef
    gp_hash_table<
    int,
    char,
    int_hash,
    equal_to<
    int>,
    // Combining function.
    direct_mask_range_hashing<>,
    // Probe function.
    linear_probe_fn<>,
    // Resize policy.
    hash_standard_resize_policy<
    hash_exponential_size_policy<>,
    hash_load_check_resize_trigger<>,
    /* Allow external access to size.
     * Without setting this to true, external resizing
     * is not possible.
     */
    true> >
    map_t;

  map_t g;

  // Check the actual size of the container object. In this case, this
  // should be the initial size given by the size policy object.
  assert(g.get_actual_size() == 8);

  // Insert some elements.
  g[1] = 'a';
  g[2] = 'b';
  g[3] = 'c';

  // Now resize the table upward.
  g.resize(200);

  // Check the actual size of the container object.
  // For the policy used in this example, the nearest larger size than
  // 200 is 256.
  assert(g.get_actual_size() == 256);

  g[67] = 'g';
  g[22] = 'f';

  // Regardless of the internal size, the logical size should be 5.
  assert(g.size() == 5);

  // Now resize the table downward.
  g.resize(106);

  // Check the actual size of the container object.
  // For the policy used in this example, the nearest larger size than
  // 106 is 128.
  assert(g.get_actual_size() == 128);

  g[37] = 'f';

  // Regardless of the internal size, the logical size should be 5.
  assert(g.size() == 6);

  return 0;
}


text:
var starts = _.sortBy(allData.Start, function(d) {
  return d.CompletionTime
});

var skippables = _.map(starts.slice(0, -1), function(d, i) {
  return (starts[i + 1].CompletionTime - d.CompletionTime) > 20 ? i : 0;
});
var skippablesIdx = _.filter(skippables, function(d) {
  return d > 0;
});

// generates title

var events = _.sortBy(_.map(allData.EventLog,
  function(ev) {
    return {
      cmd: ev.Cmd + " " + ((ev.Args != null) ? ev.Args.join(" ") : ""),
      ts: ev.StartTime,
      end: ev.EndTime
    };
  }), function(x) {return x.ts});

var title = d3.select("#content").append("h4")

var stringify = function(d) {
  return _.flatten(_.map(_.keys(d), function(k) {
    return [k, ": ", d[k], "<br/>"]
  })).join("");
}

var broken = [];

var lastBreak = 0
_.each(starts.slice(0, -1),
  function(d, i) {
    if ((starts[i + 1].CompletionTime - d.CompletionTime) > 20) {
      broken.push(starts.slice(lastBreak, i));
      lastBreak = i
    }
  });
broken.push(starts.slice(lastBreak, -1));

var margin = {
    top: 20,
    right: 50,
    bottom: 30,
    left: 30
  },
  width = 960 - margin.left - margin.right,
  height = 500 - margin.top - margin.bottom;

var xScale = d3.scale.linear()
  .domain([0, 1.01 * d3.max(allData.EventLog, function(d) {
    return d.EndTime;
  })])
  .range([0, width]);

var yScale = d3.scale.linear()
  .domain([0, 1.01 * d3.max(starts, function(d) {
    return d.Delay;
  })])
  .range([height, 0]);

var yUnitScale = d3.scale.linear()
  .domain([0, d3.max(starts, function(d) {
    return d.RunningCount;
  })])
  .range([height, 0]);

var yCPUScale = d3.scale.linear()
  .domain([0, 100])
  .range([height, 0]);

var xAxis = d3.svg.axis()
  .scale(xScale)
  .orient("bottom")
  .innerTickSize(-height)
  .outerTickSize(0)
  .tickPadding(10);

var yAxis = d3.svg.axis()
  .scale(yScale)
  .ticks(10)
  .orient("left")
  .innerTickSize(-width)
  .outerTickSize(0);

var yUnitsAxis = d3.svg.axis()
  .scale(yUnitScale)
  .ticks(10)
  .orient("right")
  .innerTickSize(-width)
  .outerTickSize(0);

var canvas = d3.select("#content")
  .append("svg")
  .attr("width", width + margin.left + margin.right)
  .attr("height", height + margin.top + margin.bottom)
  .append("g")
  .attr("transform", "translate(" + margin.left + "," + margin.top + ")");

canvas.append("g")
  .attr("class", "x axis")
  .attr("transform", "translate(0," + height + ")")
  .call(xAxis);

canvas.append("g")
  .attr("class", "y axis left")
  .call(yAxis);

canvas.append("g")
  .attr("class", "y axis nogrid")
  .attr("transform", "translate(" + width + ",0)")
  .call(yUnitsAxis);

var div = d3.select("body").append("div")
  .attr("class", "tooltip")
  .style("opacity", 0);

var bars = canvas.selectAll("circles")
  .data(allData.Start)
  .enter()
  .append("circle")
  .attr("class", "delaypoint")
  .attr("cy", function(d) {
    return yScale(d.Delay);
  })
  .attr("r", function(d) {
    return 2;
  })
  .attr("cx", function(d, i) {
    return xScale(d.CompletionTime);
  })
  .on("mouseover", function(d) {
    div.transition()
      .duration(20)
      .style("opacity", .9);
    div.html(stringify(d))
      .style("left", (d3.event.pageX) + "px")
      .style("top", (d3.event.pageY - 28) + "px");
  })
  .on("mouseout", function(d) {
    div.transition()
      .duration(500)
      .style("opacity", 0);
  });

_.each(broken, function(data) {
  var startingCount = canvas.append("path")
    .data([data.slice(1, -1)])
    .attr("class", "line-starting-count")
    .attr("d", d3.svg.line()
      .x(function(d) {
        return xScale(d.CompletionTime);
      })
      .y(function(d) {
        return yUnitScale(d.StartingCount);
      })
    );
})

var runningCount = canvas.append("path")
  .data([starts])
  .attr("class", "line-running-count")
  .attr("d", d3.svg.line()
    .x(function(d) {
      return xScale(d.CompletionTime);
    })
    .y(function(d) {
      return yUnitScale(d.RunningCount);
    })
  );

_.each(allData.MachineStats, function(machineStats, machineName) {
  var systemdLine = _.filter(machineStats, function(obj){ return obj.Process == "systemd";});
  canvas.append("path")
    .data([systemdLine])
    .attr("class", "systemd-cpu-usage")
    .attr("d", d3.svg.line()
        .x(function(d) {
          return xScale(d.TimeStamp);
        })
        .y(function(d) {
          return yCPUScale(d.CPUUsage);
        })
        );
  var fleetLine = _.filter(machineStats, function(obj){ return obj.Process == "fleetd";});
  canvas.append("path")
    .data([fleetLine])
    .attr("class", "fleet-cpu-usage")
    .attr("d", d3.svg.line()
        .x(function(d) {
          return xScale(d.TimeStamp);
        })
        .y(function(d) {
          return yCPUScale(d.CPUUsage);
        })
        );
})

// labels

var xlabel = canvas.append("text")
  .attr("transform", "translate(" + (width / 2) + " ," + (height + margin.bottom) + ")")
  .style("text-anchor", "middle")
  .text("test time (s)");

var ylabel = canvas.append("text")
  .attr("transform", "rotate(-90)")
  .attr("y", 0 - margin.left)
  .attr("x", 0 - (height / 2))
  .attr("dy", "1em")
  .style("text-anchor", "middle")
  .text("delay (s)");

var yUnitslabel = canvas.append("text")
  .attr("transform", "rotate(-90)")
  .attr("y", width + margin.right / 2)
  .attr("x", 0 - (height / 2))
  .attr("dy", "1em")
  .style("text-anchor", "middle")
  .text("unit count");

var createLegend = function(g) {
  var legend = g.append("g")
    .attr("class", "legend")

  legend.append("circle").attr("class", "delaypoint")
    .attr("cx", width / 2).attr("cy", 0).attr("r", 2)

  var createLabel = function(label, y_offset) {
    return function(g) {
      g.append("text")
        .attr("x", width / 2 + 5)
        .attr("y", y_offset)
        .attr("dy", ".35em")
        .style("text-anchor", "begin")
        .text(label)
    };
  };

  var createLegendLine = function(klass, y_offset) {
    return function(g) {
      g.append("line")
        .attr("class", klass)
        .attr("x1", width / 2 - 5)
        .attr("x2", width / 2 + 3)
        .attr("y1", y_offset)
        .attr("y2", y_offset)
    };
  }

  legend.call(createLabel("delay between star-trigger and real-start", 0));
  legend.call(createLabel("units running", 15));
  legend.call(createLabel("units starting", 30));
  legend.call(createLegendLine("line-running-count", 15))
  legend.call(createLegendLine("line-starting-count", 30))
};

canvas.call(createLegend)

var eventLine = canvas.append("rect")
  .attr("class","timeline-focus")
  .attr("x", 0)
  .attr("y", 0)
  .attr("width", 0)
  .attr("height", height)
  .style("display","none");

_.each(events, function(ev) {
  title
    .append("span")
    .attr("class","event-text")
    .on("mouseover", function() { eventLine.style("display", null); })
    .on("mouseout", function() { eventLine.style("display", "none"); })
    .on("mousemove",function() {
      eventLine.attr("x",xScale(ev.ts))
      eventLine.attr("width", xScale(ev.end) - xScale(ev.ts))
    })
    .text(ev.cmd);
});


text:
import { Component, OnInit } from '@angular/core';
import { AuthService } from '../auth/auth.service';
import * as firebase from 'firebase/app';
import { FirebaseListObservable, AngularFireDatabase } from 'angularfire2/database';
import { Router } from '@angular/router';

@Component({
  selector: 'app-forum',
  templateUrl: './forum.component.html',
  styleUrls: ['./forum.component.scss']
})
export class ForumComponent implements OnInit {

	items: FirebaseListObservable<any>;
	courseID: any;

  constructor(private af : AngularFireDatabase, private authService: AuthService, private router: Router) {}

  ngOnInit() {
  	this.courseID = this.router.url.split('/')[2];

  	this.items = this.af.list('/categories/' + this.courseID);
  }

}


text:
<!DOCTYPE html>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">

<title>sap.m.NumericContent</title>


text:
from oslo_utils import versionutils

from nova import db
from nova import exception
from nova import objects
from nova.objects import base
from nova.objects import fields

@base.NovaObjectRegistry.register
class VirtualInterface(base.NovaPersistentObject, base.NovaObject):
    # Version 1.0: Initial version
    # Version 1.1: Add tag field
    VERSION = '1.1'

    fields = {
        'id': fields.IntegerField(),
        'address': fields.StringField(nullable=True),
        'network_id': fields.IntegerField(),
        'instance_uuid': fields.UUIDField(),
        'uuid': fields.UUIDField(),
        'tag': fields.StringField(nullable=True),
    }

    def obj_make_compatible(self, primitive, target_version):
        target_version = versionutils.convert_version_to_tuple(target_version)
        if target_version < (1, 1) and 'tag' in primitive:
            del primitive['tag']

    @staticmethod
    def _from_db_object(context, vif, db_vif):
        for field in vif.fields:
            setattr(vif, field, db_vif[field])
        vif._context = context
        vif.obj_reset_changes()
        return vif

    @base.remotable_classmethod
    def get_by_id(cls, context, vif_id):
        db_vif = db.virtual_interface_get(context, vif_id)
        if db_vif:
            return cls._from_db_object(context, cls(), db_vif)

    @base.remotable_classmethod
    def get_by_uuid(cls, context, vif_uuid):
        db_vif = db.virtual_interface_get_by_uuid(context, vif_uuid)
        if db_vif:
            return cls._from_db_object(context, cls(), db_vif)

    @base.remotable_classmethod
    def get_by_address(cls, context, address):
        db_vif = db.virtual_interface_get_by_address(context, address)
        if db_vif:
            return cls._from_db_object(context, cls(), db_vif)

    @base.remotable_classmethod
    def get_by_instance_and_network(cls, context, instance_uuid, network_id):
        db_vif = db.virtual_interface_get_by_instance_and_network(context,
                instance_uuid, network_id)
        if db_vif:
            return cls._from_db_object(context, cls(), db_vif)

    @base.remotable
    def create(self):
        if self.obj_attr_is_set('id'):
            raise exception.ObjectActionError(action='create',
                                              reason='already created')
        updates = self.obj_get_changes()
        db_vif = db.virtual_interface_create(self._context, updates)
        self._from_db_object(self._context, self, db_vif)

    @base.remotable_classmethod
    def delete_by_instance_uuid(cls, context, instance_uuid):
        db.virtual_interface_delete_by_instance(context, instance_uuid)

@base.NovaObjectRegistry.register
class VirtualInterfaceList(base.ObjectListBase, base.NovaObject):
    # Version 1.0: Initial version
    VERSION = '1.0'
    fields = {
        'objects': fields.ListOfObjectsField('VirtualInterface'),
    }

    @base.remotable_classmethod
    def get_all(cls, context):
        db_vifs = db.virtual_interface_get_all(context)
        return base.obj_make_list(context, cls(context),
                                  objects.VirtualInterface, db_vifs)

    @staticmethod
    @db.select_db_reader_mode
    def _db_virtual_interface_get_by_instance(context, instance_uuid,
                                              use_slave=False):
        return db.virtual_interface_get_by_instance(context, instance_uuid)

    @base.remotable_classmethod
    def get_by_instance_uuid(cls, context, instance_uuid, use_slave=False):
        db_vifs = cls._db_virtual_interface_get_by_instance(
            context, instance_uuid, use_slave=use_slave)
        return base.obj_make_list(context, cls(context),
                                  objects.VirtualInterface, db_vifs)


text:
namespace LavoraConNoi.Models
{
    using System;
    using System.Collections.Generic;

    public partial class a_parameters
    {
        public string DESTINATARI_EMAIL { get; set; }
        public string DIRECTORY_CURRICULUM { get; set; }
        public byte[] MSG_MAIL_CANDIDATO { get; set; }
        public string DIRECTORY_CURRICULUM_LOCALE { get; set; }
        public Nullable<System.DateTime> LAST_SK_VALUTAZ { get; set; }
    }
}


text:
<!DOCTYPE HTML>

    <meta charset="utf-8">
    <link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#text-underline-position-property">
    <link rel="match" href="reference/text-decoration-underline-position-horizontal-ref.html">

サンプル

サンプル

"text-underline-position: right" alone should be same as "auto right"

"text-underline-position: left" alone should be same as "auto left"


text:
lrserver = gulp-require('tiny-lr');
livereload = require('connect-livereload');
express = require('express');
// *********************************************

const SERVER = {config: config.server};
livereloadport = 35729;
serverport = 5000;

//We only configure the server here and start it only when running the watch task
var server = express();
//Add livereload middleware before static-middleware
server.use(livereload({
    port: livereloadport
}));

server.use(express.static(DIR.build));

gulp.task('express', function() {
    $.util.log("start express server");
    //Set up your static fileserver, which serves files in the build dir
    server.listen(serverport);

    //Set up your livereload server
    //lrserver.listen(livereloadport);
});


text:
package erede

const tpl_request_cc = `<Request version="2">
	<Authentication>
		<AcquirerCode><rdcd_pv>{{.User}}</rdcd_pv></AcquirerCode>
		<password>{{.Password}}</password>
	</Authentication>
	<Transaction>
		<CardTxn>
			<Card>
				<pan>{{.CC}}</pan>
				<expirydate>{{.ExpiryDate}}</expirydate>
				<Cv2Avs><cv2>{{.CCVC2}}</cv2></Cv2Avs>
				<card_account_type>{{.TipoTransacao}}</card_account_type>
			</Card>
			<method>{{.Method}}</method>
		</CardTxn>
		<TxnDetails>
			<merchantreference>{{.MReference}}</merchantreference>
			<capturemethod>ecomm</capturemethod>
			<amount currency="BRL">{{.Amount}}</amount>
			{{if .TipoParcelado}}
			<Instalments>
				<type>{{.TipoParcelado}}</type><number>{{.NumParcelas}}</number>
			</Instalments>
			{{end}}
			{{if .SkipRisk}}{{else}}
			<Risk>
				<Action service="1">
					<MerchantConfiguration>
						<merchant_location>{{.VMLocation}}</merchant_location>
						<channel>{{.VChannel}}</channel>
					</MerchantConfiguration>
					<CustomerDetails>
						<RiskDetails>
							{{if .VuserId}}<user_id>{{.VuserId}}</user_id>{{end}}
							{{if .Vmail}}<email_address>{{.Vmail}}</email_address>{{end}}
							{{if .VIP}}<ip_address>{{.VIP}}</ip_address>{{end}}
						</RiskDetails>
						<PersonalDetails>
							{{if .PFone1}}<telephone>{{.PFone1}}</telephone>{{end}}
							{{if .PFone2}}<telephone_2>{{.PFone2}}</telephone_2>{{end}}
							{{if .PDateBirth}}<date_of_birth >{{.PDateBirth}}</date_of_birth>{{end}}
							{{if .PIDNumber}}<id_number>{{.PIDNumber}}</id_number>
							<id_type>{{.PIDType}}</id_type>{{end}}
							{{if .PFName}}<first_name>{{.PFName}}</first_name>{{end}}
							{{if .PLName}}
							<surname>{{.PLName}}</surname>
							{{end}}
						</PersonalDetails>
						<PaymentDetails>
							<payment_method>CC</payment_method>
						</PaymentDetails>
						{{if .SkipAddressDetails}}{{else}}
						<AddressDetails>
							<address_line1>{{.Address1}}</address_line1>
							<address_line2>{{.Address2}}</address_line2>
							<city>{{.AddressCity}}</city>
							<state_province>{{.AddressState}}</state_province>
							<country>{{.AddressCountry}}</country>
							<zip_code>{{.AddressZIP}}</zip_code>
						</AddressDetails>
						{{end}}
						{{if .SkipShippingDetails}}{{else}}
						<ShippingDetails>
							<delivery_date>{{.DeliveryDate}}</delivery_date>
							<delivery_method>{{.DeliveryMethod}}</delivery_method>
							<address_line1>{{.DeliveryAddress1}}</address_line1>
							<address_line2>{{.DeliveryAddress2}}</address_line2>
							<city>{{.DeliveryCity}}</city>
							<state_province>{{.DeliveryState}}</state_province>
							<country>{{.DeliveryCountry}}</country>
							<zip_code>{{.DeliveryZIP}}</zip_code>
						</ShippingDetails>
						{{end}}
						{{if .SkipOrderDetails}}{{else}}
						<OrderDetails>
							{{if .SkipBillingDetails}}{{else}}
							<BillingDetails>
								<address_line1>{{.Cobranca1}}</address_line1>
								<address_line2>{{.Cobranca2}}</address_line2>
								<city>{{.CobrancaCity}}</city>
								<state_province>{{.CobrancaState}}</state_province>
								<country>{{.CobrancaCountry}}</country>
								<zip_code>{{.CobrancaZIP}}</zip_code>
							</BillingDetails>
							{{end}}
							{{if .SkipLineItems}}{{else}}
							<LineItems>
								{{with .OrderItems}}
								{{range .}}
									<Item>
										<product_code>{{.ProductCode}}</product_code>
										<product_description>{{.ProductDescription}}</product_description>
										<product_category>{{.ProductCategory}}</product_category>
										<order_quantity>{{.OrderQuantity}}</order_quantity>
										<unit_price>{{.UnitPrice}}</unit_price>
										<product_risk>{{.ProductRisk}}</product_risk>
									</Item>
								{{end}}
								{{end}}
							</LineItems>
							{{end}}
						</OrderDetails>
						{{end}}
					</CustomerDetails>
				</Action>
			</Risk>
			{{end}}
			{{if .UseThreeDSecure}}
			<ThreeDSecure>
				<verify>yes</verify>
				<mobile_number>{{.ThreeDSecure.MobileNumber}}</mobile_number>
				<merchant_url>{{.ThreeDSecure.MerchantURL}}</merchant_url>
				<purchase_desc>{{.ThreeDSecure.PurchaseDesc}}</purchase_desc>
				<purchase_datetime>{{.ThreeDSecure.PurchaseDatetime}}</purchase_datetime>
				<Browser>
					<device_category>{{.ThreeDSecure.Browser.DeviceCategory}}</device_category>
					<accept_headers>*/*</accept_headers>
					<user_agent>{{.ThreeDSecure.Browser.UserAgent}}</user_agent>
				</Browser>
			</ThreeDSecure>
			{{end}}
		</TxnDetails>
	</Transaction>
	{{if .ShowUserAgent}}
	<UserAgent>
		<architecture version="2.6.32-5-686">i386-Linux</architecture>
		<language vendor="Sun Microsystems Inc." version="20.1-b02" vm-name="Java HotSpot(TM) Server VM">Java</language>
		<Libraries>
			<lib version="v2-1-3">XMLDocument</lib>
		</Libraries>
	</UserAgent>
	{{end}}
</Request>`

const tpl_request_dc = `<Request version="2">
	<Authentication>
		<AcquirerCode><rdcd_pv>{{.User}}</rdcd_pv></AcquirerCode>
		<password>{{.Password}}</password>
	</Authentication>
	<Transaction>
		<CardTxn>
			<Card>
				<pan>{{.CC}}</pan>
				<expirydate>{{.ExpiryDate}}</expirydate>
				<Cv2Avs><cv2>{{.CCVC2}}</cv2></Cv2Avs>
				<card_account_type>{{.TipoTransacao}}</card_account_type>
			</Card>
			<method>{{.Method}}</method>
		</CardTxn>
		<TxnDetails>
			<merchantreference>{{.MReference}}</merchantreference>
			<capturemethod>ecomm</capturemethod>
			<amount currency="BRL">{{.Amount}}</amount>
			<ThreeDSecure>
				<verify>yes</verify>
				<merchant_url>{{.ThreeDSecure.MerchantURL}}</merchant_url>
				<purchase_desc>{{.ThreeDSecure.PurchaseDesc}}</purchase_desc>
				<purchase_datetime>{{.ThreeDSecure.PurchaseDatetime}}</purchase_datetime>
				{{if .ThreeDSecure.MobileNumber}}<mobile_number>{{.ThreeDSecure.MobileNumber}}</mobile_number>{{end}}
				<Browser>
					<device_category>0</device_category>
					<accept_headers>*/*</accept_headers>
					<user_agent>IE/6.0</user_agent>
				</Browser>
			</ThreeDSecure>
		</TxnDetails>
	</Transaction>
	{{if .ShowUserAgent}}
	<UserAgent>
		<architecture version="2.6.32-5-686">i386-Linux</architecture>
		<language vendor="Sun Microsystems Inc." version="20.1-b02" vm-name="Java HotSpot(TM) Server VM">Java</language>
		<Libraries>
			<lib version="v2-1-3">XMLDocument</lib>
		</Libraries>
	</UserAgent>
	{{end}}
</Request>`

const tpl_request_boleto = `<Request version="2">
	<Authentication>
		<AcquirerCode>
			<rdcd_pv>{{.User}}</rdcd_pv>
		</AcquirerCode>
		<password>{{.Password}}</password>
	</Authentication>
	<Transaction>
		<BoletoTxn>
			<method>payment</method>
			{{if .BoletoEmail}}<customer_email>{{.BoletoEmail}}</customer_email>{{end}}
			<customer_ip>127.0.0.1</customer_ip>
			{{if .BoletoNome}}<first_name>{{.BoletoNome}}</first_name>{{end}}
			{{if .BoletoSobrenome}}<last_name>{{.BoletoSobrenome}}</last_name>{{end}}
			{{if .BoletoEndereco}}<billing_street1>{{.BoletoEndereco}}</billing_street1>{{end}}
			{{if .BoletoCidade}}<billing_city>{{.BoletoCidade}}</billing_city>{{end}}
			{{if .BoletoCEP}}<billing_postcode>{{.BoletoCEP}}</billing_postcode>{{end}}
			<billing_country>BR</billing_country>
			{{if .BoletoTel}}<customer_telephone>{{.BoletoTel}}</customer_telephone>{{end}}
			<interest_per_day>{{.BoletoJurosDia}}</interest_per_day>
			<overdue_fine>{{.BoletoMulta}}</overdue_fine>
			<expiry_date>{{.BoletoVencimento}}</expiry_date>
			<processor_id>{{.BoletoBanco}}</processor_id>
			{{if .BoletoInstrucoes}}<instructions>{{.BoletoInstrucoes}}</instructions>{{end}}
		</BoletoTxn>
		<TxnDetails>
			<merchantreference>{{.MReference}}</merchantreference>
			<amount currency="BRL">{{.Amount}}</amount>
		</TxnDetails>
	</Transaction><UserAgent><architecture version="2.6.32-5-686">i386-Linux</architecture><language vendor="Sun Microsystems Inc." version="20.1-b02" vm-name="Java HotSpot(TM) Client VM">Java</language>
	<Libraries><lib version="">XMLDocument</lib></Libraries></UserAgent>
</Request>`

const tpl_fulfill = `<Request version="2">
	<Authentication>
		<AcquirerCode><rdcd_pv>{{.User}}</rdcd_pv></AcquirerCode>
		<password>{{.Password}}</password>
	</Authentication>
	<Transaction>
		<HistoricTxn>
			<reference>{{.GatewayReference}}</reference>
			<authcode>{{.AuthCode}}</authcode>
			<method>fulfill</method>
		</HistoricTxn>
	</Transaction>
</Request>`


text:
package java.nio.channels;

import java.io.IOException;
import java.net.Socket;
import java.net.SocketOption;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.spi.AbstractSelectableChannel;
import java.nio.channels.spi.SelectorProvider;

/**
 * A selectable channel for stream-oriented connecting sockets.
 *
 *
 A socket channel is created by invoking one of the {@link #open open}
 * methods of this class.  It is not possible to create a channel for an arbitrary,
 * pre-existing socket. A newly-created socket channel is open but not yet
 * connected.  An attempt to invoke an I/O operation upon an unconnected
 * channel will cause a {@link NotYetConnectedException} to be thrown.  A
 * socket channel can be connected by invoking its {@link #connect connect}
 * method; once connected, a socket channel remains connected until it is
 * closed.  Whether or not a socket channel is connected may be determined by
 * invoking its {@link #isConnected isConnected} method.
 *
 *
 Socket channels support non-blocking connection: A socket
 * channel may be created and the process of establishing the link to the
 * remote socket may be initiated via the {@link #connect connect} method for
 * later completion by the {@link #finishConnect finishConnect} method.
 * Whether or not a connection operation is in progress may be determined by
 * invoking the {@link #isConnectionPending isConnectionPending} method.
 *
 *
 Socket channels support asynchronous shutdown, which is similar
 * to the asynchronous close operation specified in the {@link Channel} class.
 * If the input side of a socket is shut down by one thread while another
 * thread is blocked in a read operation on the socket's channel, then the read
 * operation in the blocked thread will complete without reading any bytes and
 * will return <tt>-1</tt>.  If the output side of a socket is shut down by one
 * thread while another thread is blocked in a write operation on the socket's
 * channel, then the blocked thread will receive an {@link
 * AsynchronousCloseException}.
 *
 *
 Socket options are configured using the {@link #setOption(SocketOption,Object)
 * setOption} method. Socket channels support the following options:
 *

 *

 *

 *     Option Name
 *     Description
 *

 *

 *      {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF}
 *      The size of the socket send buffer
 *

 *

 *      {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF}
 *      The size of the socket receive buffer
 *

 *

 *      {@link java.net.StandardSocketOptions#SO_KEEPALIVE SO_KEEPALIVE}
 *      Keep connection alive
 *

 *

 *      {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR}
 *      Re-use address
 *

 *

 *      {@link java.net.StandardSocketOptions#SO_LINGER SO_LINGER}
 *      Linger on close if data is present (when configured in blocking mode
 *          only)
 *

 *

 *      {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY}
 *      Disable the Nagle algorithm
 *

 *

 *

 * Additional (implementation specific) options may also be supported.
 *
 *
 Socket channels are safe for use by multiple concurrent threads.  They
 * support concurrent reading and writing, though at most one thread may be
 * reading and at most one thread may be writing at any given time.  The {@link
 * #connect connect} and {@link #finishConnect finishConnect} methods are
 * mutually synchronized against each other, and an attempt to initiate a read
 * or write operation while an invocation of one of these methods is in
 * progress will block until that invocation is complete.

 *
 * @author Mark Reinhold
 * @author JSR-51 Expert Group
 * @since 1.4
 */

public abstract class SocketChannel
    extends AbstractSelectableChannel
    implements ByteChannel, ScatteringByteChannel, GatheringByteChannel, NetworkChannel
{

    /**
     * Initializes a new instance of this class.
     */
    protected SocketChannel(SelectorProvider provider) {
        super(provider);
    }

    /**
     * Opens a socket channel.
     *
     *
 The new channel is created by invoking the {@link
     * java.nio.channels.spi.SelectorProvider#openSocketChannel
     * openSocketChannel} method of the system-wide default {@link
     * java.nio.channels.spi.SelectorProvider} object.

     *
     * @return  A new socket channel
     *
     * @throws  IOException
     *          If an I/O error occurs
     */
    public static SocketChannel open() throws IOException {
        return SelectorProvider.provider().openSocketChannel();
    }

    /**
     * Opens a socket channel and connects it to a remote address.
     *
     *
 This convenience method works as if by invoking the {@link #open()}
     * method, invoking the {@link #connect(SocketAddress) connect} method upon
     * the resulting socket channel, passing it <tt>remote</tt>, and then
     * returning that channel.

     *
     * @param  remote
     *         The remote address to which the new channel is to be connected
     *
     * @throws  AsynchronousCloseException
     *          If another thread closes this channel
     *          while the connect operation is in progress
     *
     * @throws  ClosedByInterruptException
     *          If another thread interrupts the current thread
     *          while the connect operation is in progress, thereby
     *          closing the channel and setting the current thread's
     *          interrupt status
     *
     * @throws  UnresolvedAddressException
     *          If the given remote address is not fully resolved
     *
     * @throws  UnsupportedAddressTypeException
     *          If the type of the given remote address is not supported
     *
     * @throws  SecurityException
     *          If a security manager has been installed
     *          and it does not permit access to the given remote endpoint
     *
     * @throws  IOException
     *          If some other I/O error occurs
     */
    public static SocketChannel open(SocketAddress remote)
        throws IOException
    {
        SocketChannel sc = open();
        try {
            sc.connect(remote);
        } catch (Throwable x) {
            try {
                sc.close();
            } catch (Throwable suppressed) {
                x.addSuppressed(suppressed);
            }
            throw x;
        }
        assert sc.isConnected();
        return sc;
    }

    /**
     * Returns an operation set identifying this channel's supported
     * operations.
     *
     *
 Socket channels support connecting, reading, and writing, so this
     * method returns <tt>(</tt>{@link SelectionKey#OP_CONNECT}
     * <tt>|</tt> {@link SelectionKey#OP_READ} <tt>|</tt> {@link
     * SelectionKey#OP_WRITE}<tt>)</tt>.

     *
     * @return  The valid-operation set
     */
    public final int validOps() {
        return (SelectionKey.OP_READ
                | SelectionKey.OP_WRITE
                | SelectionKey.OP_CONNECT);
    }

    // -- Socket-specific operations --

    /**
     * @throws  ConnectionPendingException
     *          If a non-blocking connect operation is already in progress on
     *          this channel
     * @throws  AlreadyBoundException               {@inheritDoc}
     * @throws  UnsupportedAddressTypeException     {@inheritDoc}
     * @throws  ClosedChannelException              {@inheritDoc}
     * @throws  IOException                         {@inheritDoc}
     *
     * @since 1.7
     */
    @Override
    public abstract SocketChannel bind(SocketAddress local)
        throws IOException;

    /**
     * @throws  UnsupportedOperationException           {@inheritDoc}
     * @throws  IllegalArgumentException                {@inheritDoc}
     * @throws  ClosedChannelException                  {@inheritDoc}
     * @throws  IOException                             {@inheritDoc}
     *
     * @since 1.7
     */
    @Override
    public abstract <T> SocketChannel setOption(SocketOption<T> name, T value)
        throws IOException;

    /**
     * Shutdown the connection for reading without closing the channel.
     *
     *
 Once shutdown for reading then further reads on the channel will
     * return {@code -1}, the end-of-stream indication. If the input side of the
     * connection is already shutdown then invoking this method has no effect.
     *
     * @return  The channel
     *
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     * @throws  ClosedChannelException
     *          If this channel is closed
     * @throws  IOException
     *          If some other I/O error occurs
     *
     * @since 1.7
     */
    public abstract SocketChannel shutdownInput() throws IOException;

    /**
     * Shutdown the connection for writing without closing the channel.
     *
     *
 Once shutdown for writing then further attempts to write to the
     * channel will throw {@link ClosedChannelException}. If the output side of
     * the connection is already shutdown then invoking this method has no
     * effect.
     *
     * @return  The channel
     *
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     * @throws  ClosedChannelException
     *          If this channel is closed
     * @throws  IOException
     *          If some other I/O error occurs
     *
     * @since 1.7
     */
    public abstract SocketChannel shutdownOutput() throws IOException;

    /**
     * Retrieves a socket associated with this channel.
     *
     *
 The returned object will not declare any public methods that are not
     * declared in the {@link java.net.Socket} class.

     *
     * @return  A socket associated with this channel
     */
    public abstract Socket socket();

    /**
     * Tells whether or not this channel's network socket is connected.
     *
     * @return  <tt>true</tt> if, and only if, this channel's network socket
     *          is {@link #isOpen open} and connected
     */
    public abstract boolean isConnected();

    /**
     * Tells whether or not a connection operation is in progress on this
     * channel.

     *
     * @return  <tt>true</tt> if, and only if, a connection operation has been
     *          initiated on this channel but not yet completed by invoking the
     *          {@link #finishConnect finishConnect} method
     */
    public abstract boolean isConnectionPending();

    /**
     * Connects this channel's socket.
     *
     *
 If this channel is in non-blocking mode then an invocation of this
     * method initiates a non-blocking connection operation.  If the connection
     * is established immediately, as can happen with a local connection, then
     * this method returns <tt>true</tt>.  Otherwise this method returns
     * <tt>false</tt> and the connection operation must later be completed by
     * invoking the {@link #finishConnect finishConnect} method.
     *
     *
 If this channel is in blocking mode then an invocation of this
     * method will block until the connection is established or an I/O error
     * occurs.
     *
     *
 This method performs exactly the same security checks as the {@link
     * java.net.Socket} class.  That is, if a security manager has been
     * installed then this method verifies that its {@link
     * java.lang.SecurityManager#checkConnect checkConnect} method permits
     * connecting to the address and port number of the given remote endpoint.
     *
     *
 This method may be invoked at any time.  If a read or write
     * operation upon this channel is invoked while an invocation of this
     * method is in progress then that operation will first block until this
     * invocation is complete.  If a connection attempt is initiated but fails,
     * that is, if an invocation of this method throws a checked exception,
     * then the channel will be closed.

     *
     * @param  remote
     *         The remote address to which this channel is to be connected
     *
     * @return  <tt>true</tt> if a connection was established,
     *          <tt>false</tt> if this channel is in non-blocking mode
     *          and the connection operation is in progress
     *
     * @throws  AlreadyConnectedException
     *          If this channel is already connected
     *
     * @throws  ConnectionPendingException
     *          If a non-blocking connection operation is already in progress
     *          on this channel
     *
     * @throws  ClosedChannelException
     *          If this channel is closed
     *
     * @throws  AsynchronousCloseException
     *          If another thread closes this channel
     *          while the connect operation is in progress
     *
     * @throws  ClosedByInterruptException
     *          If another thread interrupts the current thread
     *          while the connect operation is in progress, thereby
     *          closing the channel and setting the current thread's
     *          interrupt status
     *
     * @throws  UnresolvedAddressException
     *          If the given remote address is not fully resolved
     *
     * @throws  UnsupportedAddressTypeException
     *          If the type of the given remote address is not supported
     *
     * @throws  SecurityException
     *          If a security manager has been installed
     *          and it does not permit access to the given remote endpoint
     *
     * @throws  IOException
     *          If some other I/O error occurs
     */
    public abstract boolean connect(SocketAddress remote) throws IOException;

    /**
     * Finishes the process of connecting a socket channel.
     *
     *
 A non-blocking connection operation is initiated by placing a socket
     * channel in non-blocking mode and then invoking its {@link #connect
     * connect} method.  Once the connection is established, or the attempt has
     * failed, the socket channel will become connectable and this method may
     * be invoked to complete the connection sequence.  If the connection
     * operation failed then invoking this method will cause an appropriate
     * {@link java.io.IOException} to be thrown.
     *
     *
 If this channel is already connected then this method will not block
     * and will immediately return <tt>true</tt>.  If this channel is in
     * non-blocking mode then this method will return <tt>false</tt> if the
     * connection process is not yet complete.  If this channel is in blocking
     * mode then this method will block until the connection either completes
     * or fails, and will always either return <tt>true</tt> or throw a checked
     * exception describing the failure.
     *
     *
 This method may be invoked at any time.  If a read or write
     * operation upon this channel is invoked while an invocation of this
     * method is in progress then that operation will first block until this
     * invocation is complete.  If a connection attempt fails, that is, if an
     * invocation of this method throws a checked exception, then the channel
     * will be closed.

     *
     * @return  <tt>true</tt> if, and only if, this channel's socket is now
     *          connected
     *
     * @throws  NoConnectionPendingException
     *          If this channel is not connected and a connection operation
     *          has not been initiated
     *
     * @throws  ClosedChannelException
     *          If this channel is closed
     *
     * @throws  AsynchronousCloseException
     *          If another thread closes this channel
     *          while the connect operation is in progress
     *
     * @throws  ClosedByInterruptException
     *          If another thread interrupts the current thread
     *          while the connect operation is in progress, thereby
     *          closing the channel and setting the current thread's
     *          interrupt status
     *
     * @throws  IOException
     *          If some other I/O error occurs
     */
    public abstract boolean finishConnect() throws IOException;

    /**
     * Returns the remote address to which this channel's socket is connected.
     *
     *
 Where the channel is bound and connected to an Internet Protocol
     * socket address then the return value from this method is of type {@link
     * java.net.InetSocketAddress}.
     *
     * @return  The remote address; {@code null} if the channel's socket is not
     *          connected
     *
     * @throws  ClosedChannelException
     *          If the channel is closed
     * @throws  IOException
     *          If an I/O error occurs
     *
     * @since 1.7
     */
    public abstract SocketAddress getRemoteAddress() throws IOException;

    // -- ByteChannel operations --

    /**
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     */
    public abstract int read(ByteBuffer dst) throws IOException;

    /**
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     */
    public abstract long read(ByteBuffer[] dsts, int offset, int length)
        throws IOException;

    /**
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     */
    public final long read(ByteBuffer[] dsts) throws IOException {
        return read(dsts, 0, dsts.length);
    }

    /**
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     */
    public abstract int write(ByteBuffer src) throws IOException;

    /**
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     */
    public abstract long write(ByteBuffer[] srcs, int offset, int length)
        throws IOException;

    /**
     * @throws  NotYetConnectedException
     *          If this channel is not yet connected
     */
    public final long write(ByteBuffer[] srcs) throws IOException {
        return write(srcs, 0, srcs.length);
    }

}


text:
namespace FacsalData.Migrations
{
    using System.CodeDom.Compiler;
    using System.Data.Entity.Migrations;
    using System.Data.Entity.Migrations.Infrastructure;
    using System.Resources;

    [GeneratedCode("EntityFramework.Migrations", "6.1.0-30225")]
    public sealed partial class RequireHomeDeptOnPerson : IMigrationMetadata
    {
        private readonly ResourceManager Resources = new ResourceManager(typeof(RequireHomeDeptOnPerson));

        string IMigrationMetadata.Id
        {
            get { return "201411111913112_RequireHomeDeptOnPerson"; }
        }

        string IMigrationMetadata.Source
        {
            get { return null; }
        }

        string IMigrationMetadata.Target
        {
            get { return Resources.GetString("Target"); }
        }
    }
}


text:
/*

Package stream provides methods for listening to Twitter's Streaming APIs.

To begin using you will need credentials for an app setup in Twitter. Then you can get your timeline like so,

    // assuming consumerKey, consumerSecret, accessToken and accessSecret hold
    // the credentials
    auth := stream.Auth(consumerKey, consumerSecret, accessToken, accessSecret)

    for tweet := range.Timeline(auth) {
      log.Println(tweet)
    }

Warning, this library does not do any error handling at the moment, it ignores
any incoming messages that do not look like tweets.

*/
package stream


text:
Sidekiq.configure_server do |config|
  schedule_file = "config/worker_schedule.yml"

  if File.exists?(schedule_file)
    Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
  end
end


text:
geowatchutil.codec.geowatch_codec_tilerequest module
====================================================

.. automodule:: geowatchutil.codec.geowatch_codec_tilerequest
    :members:
    :undoc-members:
    :show-inheritance:


text:
require 'spec_helper'

RSpec.describe Cryptoexchange::Exchanges::Coinmate::Market do
  it { expect(described_class::NAME).to eq 'coinmate' }
  it { expect(described_class::API_URL).to eq 'https://coinmate.io/api' }
end


text:
import json
from pprint import pprint

file = open('my_json_data','a')

data = """
        Need and Types of Maintenance, Software Configuration Management (SCM), Software Change Management, Version Control, Change control and Reporting, Program Comprehension Techniques, Re-engineering, Reverse Engineering, Tool Support.
Project Management Concepts, Feasilibility Analysis, Project and Process Planning, Resources Allocations, Software efforts, Schedule, and Cost estimations, Project Scheduling and Tracking, Risk Assessment and Mitigation, Software Quality Assurance (SQA). Project Plan, Project Metrics.
"""

data = data.replace('\n',' ').strip()
data = data.replace('.', ',').strip()
data = data.split(',')

count = 1

mydict = {}

for x in data:
	mydict[count] = {}
	mydict[count]["content"] = x
	mydict[count]["done"] = False
	count += 1

file.write(json.dumps(mydict) + '\n\n\n')
file.close()

pprint(mydict)


text:
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:exslt="http://exslt.org/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd" version="3.3" ID="P0b002ee185b2f37c">
<name type="corporate">
 <namePart>United States Government Printing Office</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">printer</roleTerm>
  <roleTerm type="code" authority="marcrelator">prt</roleTerm>
</role>
 <role>
  <roleTerm type="text" authority="marcrelator">distributor</roleTerm>
  <roleTerm type="code" authority="marcrelator">dst</roleTerm>
</role>
</name>
<name type="corporate">
 <namePart>United States</namePart>
 <namePart>United States District Court District of Kansas</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">author</roleTerm>
  <roleTerm type="code" authority="marcrelator">aut</roleTerm>
</role>
 <description>Government Organization</description>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">government publication</genre>
<language>
 <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<extension>
 <collectionCode>USCOURTS</collectionCode>
 <category>Judicial Publications</category>
 <branch>judicial</branch>
 <dateIngested>2013-07-31</dateIngested>
</extension>
<originInfo>
 <publisher>Administrative Office of the United States Courts</publisher>
 <dateIssued encoding="w3cdtf">2013-07-30</dateIssued>
 <issuance>monographic</issuance>
</originInfo>
<physicalDescription>
 <note type="source content type">deposited</note>
 <digitalOrigin>born digital</digitalOrigin>
</physicalDescription>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="uri">http://www.gpo.gov/fdsys/pkg/USCOURTS-ksd-5_12-cv-03109</identifier>
<identifier type="local">P0b002ee185b2f37c</identifier>
<recordInfo>
 <recordContentSource authority="marcorg">DGPO</recordContentSource>
 <recordCreationDate encoding="w3cdtf">2013-07-31</recordCreationDate>
 <recordChangeDate encoding="w3cdtf">2013-07-31</recordChangeDate>
 <recordIdentifier source="DGPO">USCOURTS-ksd-5_12-cv-03109</recordIdentifier>
 <recordOrigin>machine generated</recordOrigin>
 <languageOfCataloging>
  <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</languageOfCataloging>
</recordInfo>
<accessCondition type="GPO scope determination">fdlp</accessCondition>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-ksd-5_12-cv-03109</accessId>
 <courtType>District</courtType>
 <courtCode>ksd</courtCode>
 <courtCircuit>10th</courtCircuit>
 <courtState>Kansas</courtState>
 <courtSortOrder>2190</courtSortOrder>
 <caseNumber>5:12-cv-03109</caseNumber>
 <caseOffice>Topeka</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>555</natureSuitCode>
 <natureSuit>Prisoner - Prison Condition</natureSuit>
 <cause>42:2000 Protection of Land Use as Religious Exercise</cause>
 <party firstName="Rick" fullName="Rick Barrett" lastName="Barrett" role="Defendant"></party>
 <party firstName="Chauncey" fullName="Chauncey Biby" lastName="Biby" role="Defendant"></party>
 <party firstName="Douglas" fullName="Douglas W. Burris" lastName="Burris" middleName="W." role="Defendant"></party>
 <party firstName="Gloria" fullName="Gloria Geither" lastName="Geither" role="Defendant"></party>
 <party firstName="James" fullName="James Heimgartner" lastName="Heimgartner" role="Defendant"></party>
 <party firstName="Larry" fullName="Larry Hoshaw" lastName="Hoshaw" role="Defendant"></party>
 <party firstName="Joshua" fullName="Joshua James Robertson" lastName="Robertson" middleName="James" role="Plaintiff"></party>
</extension>
<titleInfo>
 <title>Robertson (ID 76205) v. Biby et al</title>
 <partNumber>5:12-cv-03109</partNumber>
</titleInfo>
<location>
 <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/pkg/USCOURTS-ksd-5_12-cv-03109/content-detail.html</url>
</location>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="preferred citation">5:12-cv-03109;12-3109</identifier>
<name type="corporate">
 <namePart>United States District Court District of Kansas</namePart>
 <namePart>10th Circuit</namePart>
 <namePart>Topeka</namePart>
 <affiliation>U.S. Courts</affiliation>
 <role>
  <roleTerm authority="marcrelator" type="text">author</roleTerm>
  <roleTerm authority="marcrelator" type="code">aut</roleTerm>
</role>
</name>
<name type="personal">
 <displayForm>Rick Barrett</displayForm>
 <namePart type="family">Barrett</namePart>
 <namePart type="given">Rick</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>Chauncey Biby</displayForm>
 <namePart type="family">Biby</namePart>
 <namePart type="given">Chauncey</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>Douglas W. Burris</displayForm>
 <namePart type="family">Burris</namePart>
 <namePart type="given">Douglas</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>Gloria Geither</displayForm>
 <namePart type="family">Geither</namePart>
 <namePart type="given">Gloria</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>James Heimgartner</displayForm>
 <namePart type="family">Heimgartner</namePart>
 <namePart type="given">James</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>Larry Hoshaw</displayForm>
 <namePart type="family">Hoshaw</namePart>
 <namePart type="given">Larry</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>Joshua James Robertson</displayForm>
 <namePart type="family">Robertson</namePart>
 <namePart type="given">Joshua</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Plaintiff</description>
</name>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-ksd-5_12-cv-03109</accessId>
 <courtType>District</courtType>
 <courtCode>ksd</courtCode>
 <courtCircuit>10th</courtCircuit>
 <courtState>Kansas</courtState>
 <courtSortOrder>2190</courtSortOrder>
 <caseNumber>5:12-cv-03109</caseNumber>
 <caseOffice>Topeka</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>555</natureSuitCode>
 <natureSuit>Prisoner - Prison Condition</natureSuit>
 <cause>42:2000 Protection of Land Use as Religious Exercise</cause>
 <party firstName="Rick" fullName="Rick Barrett" lastName="Barrett" role="Defendant"></party>
 <party firstName="Chauncey" fullName="Chauncey Biby" lastName="Biby" role="Defendant"></party>
 <party firstName="Douglas" fullName="Douglas W. Burris" lastName="Burris" middleName="W." role="Defendant"></party>
 <party firstName="Gloria" fullName="Gloria Geither" lastName="Geither" role="Defendant"></party>
 <party firstName="James" fullName="James Heimgartner" lastName="Heimgartner" role="Defendant"></party>
 <party firstName="Larry" fullName="Larry Hoshaw" lastName="Hoshaw" role="Defendant"></party>
 <party firstName="Joshua" fullName="Joshua James Robertson" lastName="Robertson" middleName="James" role="Plaintiff"></party>
 <state>Kansas</state>
</extension>
<relatedItem type="constituent" ID="id-USCOURTS-ksd-5_12-cv-03109-0" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ksd-5_12-cv-03109/USCOURTS-ksd-5_12-cv-03109-0/mods.xml">
 <titleInfo>
  <title>Robertson (ID 76205) v. Biby et al</title>
  <subTitle>MEMORANDUM AND ORDER ENTERED: Plaintiff's motion 2 for leave to proceed in forma pauperis is granted. This matter is dismissed for failure to state a claim upon which relief may be granted. Plaintiff's motion 3 for a preliminary injunction is denied as moot. Signed by Senior District Judge Sam A. Crow on 1/2/2013. (Mailed to pro se party Joshua James Robertson by regular mail.) (Attachments: #(1) Stewart vs. Beach Order) (smnd)</subTitle>
  <partNumber>0</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2013-01-02</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ksd-5_12-cv-03109-0.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee185b375ff</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ksd-5_12-cv-03109/USCOURTS-ksd-5_12-cv-03109-0</identifier>
 <identifier type="former granule identifier">ksd-5_12-cv-03109_0.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ksd-5_12-cv-03109/USCOURTS-ksd-5_12-cv-03109-0/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ksd-5_12-cv-03109/pdf/USCOURTS-ksd-5_12-cv-03109-0.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 5:12-cv-03109; Robertson (ID 76205) v. Biby et al; </searchTitle>
  <courtName>United States District Court District of Kansas</courtName>
  <state>Kansas</state>
  <accessId>USCOURTS-ksd-5_12-cv-03109-0</accessId>
  <sequenceNumber>0</sequenceNumber>
  <dateIssued>2013-01-02</dateIssued>
  <docketText>MEMORANDUM AND ORDER ENTERED: Plaintiff's motion 2 for leave to proceed in forma pauperis is granted. This matter is dismissed for failure to state a claim upon which relief may be granted. Plaintiff's motion 3 for a preliminary injunction is denied as moot. Signed by Senior District Judge Sam A. Crow on 1/2/2013. (Mailed to pro se party Joshua James Robertson by regular mail.) (Attachments: #(1) Stewart vs. Beach Order) (smnd)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ksd-5_12-cv-03109-1" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ksd-5_12-cv-03109/USCOURTS-ksd-5_12-cv-03109-1/mods.xml">
 <titleInfo>
  <title>Robertson (ID 76205) v. Biby et al</title>
  <subTitle>MEMORANDUM AND ORDER ENTERED: Plaintiff's motion 7 to alter or amend is denied. Signed by Senior District Judge Sam A. Crow on 7/30/2013. (Mailed to pro se party Joshua James Robertson by regular mail.) (smnd)</subTitle>
  <partNumber>1</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2013-07-30</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ksd-5_12-cv-03109-1.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee185b375fe</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ksd-5_12-cv-03109/USCOURTS-ksd-5_12-cv-03109-1</identifier>
 <identifier type="former granule identifier">ksd-5_12-cv-03109_1.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ksd-5_12-cv-03109/USCOURTS-ksd-5_12-cv-03109-1/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ksd-5_12-cv-03109/pdf/USCOURTS-ksd-5_12-cv-03109-1.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 5:12-cv-03109; Robertson (ID 76205) v. Biby et al; </searchTitle>
  <courtName>United States District Court District of Kansas</courtName>
  <state>Kansas</state>
  <accessId>USCOURTS-ksd-5_12-cv-03109-1</accessId>
  <sequenceNumber>1</sequenceNumber>
  <dateIssued>2013-07-30</dateIssued>
  <docketText>MEMORANDUM AND ORDER ENTERED: Plaintiff's motion 7 to alter or amend is denied. Signed by Senior District Judge Sam A. Crow on 7/30/2013. (Mailed to pro se party Joshua James Robertson by regular mail.) (smnd)</docketText>
</extension>
</relatedItem>
</mods>


text:
package io.yosper.iot.message_router;

import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.InputStream;
import java.util.Properties;
import java.lang.String;

public class Config {
	private static final String config_file = "config/config.properties";

	public static Properties load() {
		Properties prop = null;
		InputStream input = null;

		try {
			input = new FileInputStream(config_file);
			prop = new Properties();

			prop.load(input);
			// System.out.println(prop.list());

			input.close();

		} catch (IOException ex) {
			ex.printStackTrace();
		} finally {
			if (input != null) {
				try {
					input.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}

		return prop;
	}

	public static void save(Properties prop) {

		OutputStream output = null;

		if (prop == null)
			return;

		try {
			output = new FileOutputStream(config_file);

			// set the properties value
			// prop.setProperty("mqtt_broker", "mqtt.home");

			// save properties to project root folder
			// prop.store(output, null);
			output.close();
		} catch(IOException io) {
			io.printStackTrace();
		} finally {
			if (output != null) {
				try {
					output.close();
				}
				catch(IOException e) {
					e.printStackTrace();
				}
			}

		}
	}
}


text:
/**
 * (c) 2014, Andrii Heonia
 * https://github.com/AndriiHeonia/disjoint-set
 */

(function () { 'use strict';

function disjointSet() {
    return new DisjointSet();
}

var DisjointSet = function() {
    this._reset();
};

DisjointSet.prototype = {
    add: function (val) {
        var id = this._isPrimitive(val) ? val : this._lastId;
        if (typeof val._disjointSetId === 'undefined') {
            val._disjointSetId = this._relations[id] = id;
            this._objects[id] = val;
            this._size[id] = 1;
            this._lastId++;
        }
        return this;
    },

    find: function (val) {
        var id = this._isPrimitive(val) ? val : val._disjointSetId;
        return this._findById(id);
    },

    _findById: function (id) {
        var rootId = id;
        while (this._relations[rootId] !== rootId) {
            rootId = this._relations[rootId];
        }
        return rootId;
    },

    connected: function (val1, val2) {
        return this.find(val1) === this.find(val2) ? true : false;
    },

    union: function (val1, val2) {
        var val1RootId = this.find(val1),
            val2RootId = this.find(val2);

        if (val1RootId === val2RootId) { return this; }

        if (this._size[val1RootId] < this._size[val2RootId]) {
            this._relations[val1RootId] = val2RootId;
            this._size[val1RootId] += this._size[val2RootId];
        }
        else {
            this._relations[val2RootId] = val1RootId;
            this._size[val2RootId] += this._size[val1RootId];
        }

        return this;
    },

    extract: function () {
        var rootId,
            resObj = {},
            resArr = [];

        for (var id in this._relations) {
            rootId = this._findById(id);

            if (typeof resObj[rootId] === 'undefined') {
                resObj[rootId] = [];
            }
            resObj[rootId].push(this._objects[id]);
        }

        for (var key1 in resObj) {
            resArr.push(resObj[key1]);
        }

        return resArr;
    },

    destroy: function () {
        this._reset();
    },

    _isPrimitive: function (val) {
        if (typeof this.IS_PRIMITIVE !== 'undefined') {
            return this.IS_PRIMITIVE;
        }
        else {
            this.IS_PRIMITIVE = DisjointSet._isPrimitive(val);
            return this.IS_PRIMITIVE;
        }
    },

    _reset: function () {
        for (var id in this._objects) {
            delete this._objects[id]._disjointSetId;
        }
        this._objects = {};
        this._relations = {};
        this._size = {};
        this._lastId = 0;
    }
};

DisjointSet._isPrimitive = function (val) {
    if (Object.prototype.toString.call(val) === '[object String]' ||
        Object.prototype.toString.call(val) === '[object Number]') {
        return true;
    }
    else {
        return false;
    }
};

if (typeof define === 'function' && define.amd) {
    define(function() {
        return disjointSet;
    });
} else if (typeof module !== 'undefined') {
    module.exports = disjointSet;
} else if (typeof self !== 'undefined') {
    self.disjointSet = disjointSet;
} else {
    window.disjointSet = disjointSet;
}

})();


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.5.4.20-2-8
description: >
    String.prototype.trim - argument 'this' is a number that converts
    to a string (value is negative number)
---*/

assert.sameValue(String.prototype.trim.call(-20), "-20", 'String.prototype.trim.call(-20)');


text:
{% extends "base.html" %}

{% block title %}{{ show.name }}{% endblock %}
{% block head %}
<link href="http://vjs.zencdn.net/4.2/video-js.css" rel="stylesheet">

{% endblock %}
{% block content %}

{{ episode.show.name }}

 {{ episode.name }} {{ season_episode_tag }}

{{ episode.description }}

{% if protected_url %}

<video id="my_video_1" class="video-js vjs-default-skin" controls
 preload="auto" width="640" height="400" poster="http://i.imgur.com/aOao8rT.png"
 data-setup="{}">
 <source src="{{ protected_url }}" type='video/mp4'>
</video>

{% endif %}

Date Aired

{{ episode.date_aired }}

Date Updated

{{ episode.date_updated }}

Rating

{{ episode.rating }}

Hits

{{ episode.hits }}

Status

{{ episode.status }}

Location

{{ episode.location }}

File Size

{{ episode.file_size }}

File Exists

{{ episode.file_exists }}

{% if protected_url %}
   Watch Video
{% else %}
  <button type="button" class="btn btn-default" disabled="disabled"> Watch Video</button>
{% endif %}
{% if episode.info_update %}
  <button type="button" class="btn btn-default" disabled="disabled"> Update Information</button>
{% else %}
   Update Information
{% endif %}

{{ user_ip }}

{% endblock %}


text:
kot-mono
========

King of Thieves running on mono


text:
PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;

static char * verbose;

int main(int argc, char** argv)
{
    verbose = getenv("PEGASUS_TEST_VERBOSE");
    const char* tmpDir = getenv ("PEGASUS_TMP");
    if (tmpDir == NULL)
    {
        tmpDir = ".";
    }
    String path;
    assert(FileSystem::getCurrentDirectory(path));
    // Need to add test to confirm that the directory
    // is indeed FileSystem.
    assert(FileSystem::exists("FileSystem.cpp"));
    assert(!FileSystem::exists("NoSuchFile.dat"));
    // assert(!FileSystem::canExecute("FileSytem.cpp"));
    assert(!FileSystem::canRead("NoSuchFile.dat"));
    assert(!FileSystem::canWrite("NoSuchFile.dat"));
    // assert(!FileSystem::canRead("NoCanRead.dat"));
    assert(FileSystem::isDirectory(".."));
    assert(FileSystem::isDirectory("."));
    assert(!FileSystem::isDirectory("FileSystem.cpp"));
    assert(FileSystem::isDirectory("./testdir"));

    Array<String> paths;
    assert( FileSystem::getDirectoryContents("./testdir", paths) );

    for (Uint32 i = 0; i < paths.size(); i++)
    {
	if (String::equal(paths[i], "CVS"))
	{
	    paths.remove(i);
	    break;
	}
    }

    String realName;
    assert(FileSystem::existsNoCase("filesystem.cpp", realName));
    assert(String::equal(realName, "FileSystem.cpp"));

    assert(FileSystem::existsNoCase(
	"../FileSystem/filesystem.cpp", realName));
    assert(String::equal(realName, "../FileSystem/FileSystem.cpp"));

    BubbleSort(paths);
    assert(paths.size() == 3);
    assert(String::equal(paths[0], "a"));
    assert(String::equal(paths[1], "b"));
    assert(String::equal(paths[2], "c"));

    // Test for getCurrentDirectory
    // Go to testdir, test for file "a"
    // Then return and test for file
    {
	String saveDir;
	assert(FileSystem::getCurrentDirectory(saveDir));
	assert(FileSystem::changeDirectory("testdir"));
	assert(FileSystem::exists("a"));
	FileSystem::changeDirectory(saveDir);
	String newSaveDir;
	assert(FileSystem::getCurrentDirectory(newSaveDir));
	assert(saveDir == newSaveDir);
	assert(FileSystem::exists("FileSystem.cpp"));
    }
    // Test the Create and delete functions
    // Creates directories and files and deletes them.
    {
        String t (tmpDir);
        t.append("/TestDirectory");
        String t1 (tmpDir);
        t1.append("/TestDirectory2");
        String tf (tmpDir);
        tf.append("/TestFile.txt");
        CString f = tf.getCString();
        String tf1 (tmpDir);
        tf1.append("/TestFile1.txt");
        CString f1 = tf1.getCString();

	FileSystem::makeDirectory(t);
	assert(FileSystem::isDirectory(t));
	FileSystem::removeDirectory(t);
	assert(!FileSystem::isDirectory(t));

	// Tests for remove hierarchy command
	// ATTN: Removed following until next test ks
	// because remove hiearchy does not work yet.
	FileSystem::makeDirectory(t);

	String save_cwd;
	FileSystem::getCurrentDirectory(save_cwd);

	// create some files in new directory
	if (!FileSystem::changeDirectory(t))
	    // ATTN: what is valid error return?
	    return -1;

  	ofstream of1(f);
	of1 << "test" << endl;
	of1.close();
	assert(FileSystem::exists(tf));

  	ofstream of2(f1);
	of2 << "test" << endl;
	of2.close();
	assert(FileSystem::exists(tf1));

	// Create a second level directory
	FileSystem::makeDirectory(t1);

	// Create files in this dir
	if (!FileSystem::changeDirectory(t1))
	    return -1;

	ofstream of3("testfile3.txt");
	of3 << "test" << endl;
	of3.close();

    	ofstream of4("testfile4.txt");
	of4 << "test" << endl;
	of4.close();

	// Go back to top level directory

	FileSystem::changeDirectory(save_cwd);
        assert(FileSystem::isDirectory(t));
	FileSystem::removeDirectoryHier(t);
	// be sure directory is removed
	assert(!FileSystem::isDirectory(t));

    }
    // Test renameFile:
    {
        String FILE1 (tmpDir);
        FILE1.append("/file1.txt");
        String FILE2 (tmpDir);
        FILE2.append("/file2.txt");

  	ofstream of1(FILE1.getCString());
	of1 << "test" << endl;
	of1.close();
	assert(FileSystem::exists(FILE1));

	assert(FileSystem::exists(FILE1));
	assert(!FileSystem::exists(FILE2));
	assert(FileSystem::renameFile(FILE1, FILE2));

	assert(!FileSystem::exists(FILE1));

	assert(FileSystem::exists(FILE2));
	assert(FileSystem::renameFile(FILE2, FILE1));
	assert(FileSystem::exists(FILE1));
	assert(!FileSystem::exists(FILE2));
        assert(FileSystem::removeFile(FILE1));
        assert(!FileSystem::exists(FILE1));
    }
     // Test getFileNameFromPath
    {
        FileSystem::changeDirectory(path);
    	String pathName = FileSystem::getAbsoluteFileName("./testdir","a");
	assert(pathName.size()!=0);	// It should be there.
	pathName = FileSystem::getAbsoluteFileName("./testdir","#$@#(@$#!");
	assert(pathName.size()==0);	// It should not be there.
    }
    cout << argv[0] << " +++++ passed all tests" << endl;

    return 0;
}


text:
package net.kebernet.skillz.builder;

import com.amazon.speech.ui.PlainTextOutputSpeech;

/**
 * A builder for PlainTextOutputSpeech.
 *

 *     Example:
 *

 *

 *     PlainTextSpeedOutput output = PlainTextOutputBuilder.withText("Hello, world.")
 *                                                          .withId("id:hello")
 *                                                          .build();
*

 *
 */
public class PlainTextOutputBuilder {

    private final PlainTextOutputSpeech result = new PlainTextOutputSpeech();

    private PlainTextOutputBuilder(String text) {
        this.result.setText(text);
    }

    /**
     * Sets the ID for the PlainTextSpeechOutput
     * @param id The id
     * @return The builder
     */
    @SuppressWarnings("unused")
    public PlainTextOutputBuilder withId(String id){
        this.result.setId(id);
        return this;
    }

    /**
     * Constructs a PlainTextSpeechOutput from the current values.
     * @return SpeechOutput.
     */
    public PlainTextOutputSpeech build(){
        if(this.result.getId() == null){
            this.result.setId(Integer.toString(result.getText().hashCode()) );
        }
        return this.result;
    }

    /** Begin a new Builder with the plain text value
     *
     * @param text Text to use
     * @return the builder
     */
    public static PlainTextOutputBuilder withText(String text){
        return new PlainTextOutputBuilder(text);
    }
}


text:
Order

<form ng-submit="order.addToCart()" novalidate>

            Location
            <select ng-init="order.selectedLocation"
                    ng-model="order.selectedLocation"
                    ng-options="location as location.name for location in order.allLocations"
                    class="form-control"
                    id="locationList">
            </select>

            Beverages
            <select ng-init="order.selectedBeverage"
                    ng-model="order.selectedBeverage"
                    ng-options="beverage as beverage.name for beverage in order.allBeverages"
                    class="form-control"
                    id="beveragelist">
            </select>

            Size
            <select ng-init="order.selectedSize"
                    ng-model="order.selectedSize"
                    ng-options="size as size.name for size in order.allSizes"
                    class="form-control"
                    id="sizeList">
            </select>

            Quantity
            <input class="form-control" type="text" name="quantity" ng-model="order.quantity"/>

    <button class="btn btn-primary" type="submit">Add To Cart</button>
    <button class="btn btn-default" type="button" ng-click="order.submitOrder()">Submit Order</button>
</form>


text:
package uinput

import (
	"fmt"
	"io"
	"os"
	"syscall"
)

// A Dial is a device that will trigger rotation events.
// For details see: https://www.kernel.org/doc/Documentation/input/event-codes.txt
type Dial interface {
	// Turn will simulate a dial movement.
	Turn(delta int32) error

	io.Closer
}

type vDial struct {
	name       []byte
	deviceFile *os.File
}

// CreateDial will create a new dial input device. A dial is a device that can trigger rotation events.
func CreateDial(path string, name []byte) (Dial, error) {
	err := validateDevicePath(path)
	if err != nil {
		return nil, err
	}
	err = validateUinputName(name)
	if err != nil {
		return nil, err
	}

	fd, err := createDial(path, name)
	if err != nil {
		return nil, err
	}

	return vDial{name: name, deviceFile: fd}, nil
}

// Turn will simulate a dial movement.
func (vRel vDial) Turn(delta int32) error {
	return sendDialEvent(vRel.deviceFile, delta)
}

// Close closes the device and releases the device.
func (vRel vDial) Close() error {
	return closeDevice(vRel.deviceFile)
}

func createDial(path string, name []byte) (fd *os.File, err error) {
	deviceFile, err := createDeviceFile(path)
	if err != nil {
		return nil, fmt.Errorf("could not create dial input device: %v", err)
	}

	err = registerDevice(deviceFile, uintptr(evRel))
	if err != nil {
		deviceFile.Close()
		return nil, fmt.Errorf("failed to register dial input device: %v", err)
	}

	// register dial events
	err = ioctl(deviceFile, uiSetRelBit, uintptr(relDial))
	if err != nil {
		deviceFile.Close()
		return nil, fmt.Errorf("failed to register dial events: %v", err)
	}

	return createUsbDevice(deviceFile,
		uinputUserDev{
			Name: toUinputName(name),
			ID: inputID{
				Bustype: busUsb,
				Vendor:  0x4711,
				Product: 0x0816,
				Version: 1}})
}

func sendDialEvent(deviceFile *os.File, delta int32) error {
	iev := inputEvent{
		Time:  syscall.Timeval{Sec: 0, Usec: 0},
		Type:  evRel,
		Code:  relDial,
		Value: delta}

	buf, err := inputEventToBuffer(iev)
	if err != nil {
		return fmt.Errorf("writing abs event failed: %v", err)
	}

	_, err = deviceFile.Write(buf)
	if err != nil {
		return fmt.Errorf("failed to write rel event to device file: %v", err)
	}

	return syncEvents(deviceFile)
}


text:
package com.github.hburgmeier.jerseyoauth2.authsrv.openid;

import javax.servlet.http.HttpServletRequest;

import com.github.hburgmeier.jerseyoauth2.api.user.IUser;
import com.github.hburgmeier.jerseyoauth2.authsrv.api.user.IUserService;

public class OpenIdUserService implements IUserService {

	@Override
	public IUser getCurrentUser(HttpServletRequest request) {
		OpenIDUser user = (OpenIDUser)request.getSession().getAttribute(OpenIdConstants.OPENID_SESSION_VAR);
		return user;
	}

}


text:
This is a work in progress. Most of the NSE stuff is usable, but not complete.

## Files Overview

Important modules are as follows -
* `all_stocks_list` - A utility that populates a DB table of all stocks traded on BSE and NSE. See the respective Util files for the stocks that are of interest to us. Utility - would likely 'stay in this repository'.
* `get_stocks_nse` - New way of downloading NSE stocks data. Application - will stay here.
* `get_stocks_bse` - Download data for individual stocks traded on BSE. Application - will stay here.
* `get_indices_nse` - Download data for indices traded on NSE. Application - will stay here.
* `corp_actions_nse` - Downloading corproate actions data for NSE. Mainly used to get Bonus/Split data to adjust historical prices. Application - will stay here.
* `scrip_to_h5` - Few experiments with HDF5 store (not usable yet). (Most likely Deprecated), will go away
* `read_sql_data` - (Will move to 'library' repo.)
* `process_pd_panel_lc` and `process_pd_panel_vector` - Experimental files, will stay here.
* `corp_actions_bse` - Not in usable form. Will mostly be deprecated.

### Downloading Data

~`get_stock_nse` and `get_stocks_nse2` are used to download OHLCVD historical
data for a stock. get\_stock\_nse2 - uses bhavcopy, ~get\_stocks\_nse~ is
observed to be a bit unreliable, hence the second approach is the supported one.~

`get_stock_nse` is used to download historical data sing bhavcopy method.

`get_stocks_bse` is used to download OHLCVD historical data for BSE scrips.

This downloaded data is kind of a staging data. Most of this data is maintained
inside an SQLite3 DB. (So someone can directly go and use it).

`corp_actions_nse` and `corp_actions_bse` are used to get corp actions for an
NSE or a BSE stock. NSE version is always preferred. BSE version is incomplete
yet as there are a number of issues with that (eg. ex\_date is missing in many
cases, stocks split ratio is missing.) To really fill this data we'd do it
manually later.

`get_indices_bse` and `get_indices_nse` are used to get indices historical data
from 1-Jan-2002 or whichever is earlier. These two scrips need a bit more work.

`all_stocks_list.py` - is a script that generates 'master list' of all stocks
traded on either NSE or BSE. We do not take stocks from all 'groups' in BSE
we only take group A, B and T (D and DT - we may but they are not very liquid
and hence not very useful). For NSE we are only interested in EQ and BE series

~The structure of HDF file is being iterated, so it's really very very early
right now to discuss in details.~


text:
package xyz.white.editor.events.tree;

import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Group;
import xyz.white.editor.events.Event;

/**
 * Created by 10037 on 2017/4/23 0023.
 */
public class TreeActorMoveEvent implements Event{
    public Actor actor;
    public Group group;

    public TreeActorMoveEvent(Actor actor, Group group){
        this.actor = actor;
        this.group = group;
    }

    @Override
    public Event redo() {
        return null;
    }

    @Override
    public Event undo() {
        return null;
    }
}


text:
<?php
namespace Xetaravel\Events\Experiences;

use Xetaravel\Models\DiscussConversation;
use Xetaravel\Models\User;

class ConversationWasCreatedEvent
{
    /**
     * The conversation instance.
     *
     * @var \Xetaravel\Models\DiscussConversation
     */
    public $conversation;

    /**
     * The user instance.
     *
     * @var \Xetaravel\Models\User
     */
    public $user;

    /**
     * Create a new event instance.
     *
     * @param \Xetaravel\Models\DiscussConversation $conversation
     * @param \Xetaravel\Models\User $user
     */
    public function __construct(DiscussConversation $conversation, User $user)
    {
        $this->conversation = $conversation;
        $this->user = $user;
    }
}


text:
<?php
namespace HTTP\Middleware;
use Slim\Middleware;

/**
 *
 */
class Csrf extends Middleware{
  protected $key;

  public function call (){

    $this->key = "csrf_token";
    $this->app->hook('slim.before',[$this,'check']);
    $this->next->call();
  }

  public function check(){
    $session = $this->app->session;
    $hash = $this->app->hash;
    if (!$session->exists($this->key)) {
      $session->put($this->key,$hash->make($hash->salt(10)));
    }
    $token = $session->get($this->key);
    if (strpos($this->app->request()->getPath(), 'api') === false) {

      if (in_array($this->app->request()->getMethod(),['POST','PUT','DELETE'])) {
        $submited_token = $this->app->request()->post($this->key) ? : "";
        if (!$hash->check($token,$submited_token)) {
           throw new Exception("CSRF token mismatch ");
        }
      }
      unset($_POST[$this->key]);
      if($this->app->debug){
          echo "CSRF </br> csrf_key </br>";
          var_dump($this->key);
          echo "csrf_token </br>";
          var_dump($token);
      }
      $this->app->view()->appendData([
        'csrf_key'=>$this->key,
        'csrf_token'=>$token
      ]);
    }
  }

}

 ?>


text: rsoup from jsoup


text:
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

START("13.4.4.15 - hasComplexContent()");

TEST(1, true, XML.prototype.hasOwnProperty("hasComplexContent"));

x =
<alpha attr1="value1">
    <bravo>one</bravo>
    <charlie>
        two
        three
        <echo>four</echo>
    </charlie>
    <delta />
    <foxtrot attr2="value2">five</foxtrot>
    <golf attr3="value3" />
    <hotel>
        six
        seven
    </hotel>
    <india><juliet /></india>
</alpha>;

TEST(2, true, x.hasComplexContent());
TEST(3, false, x.bravo.hasComplexContent());
TEST(4, true, x.charlie.hasComplexContent());
TEST(5, false, x.delta.hasComplexContent());
TEST(6, false, x.foxtrot.hasComplexContent());
TEST(7, false, x.golf.hasComplexContent());
TEST(8, false, x.hotel.hasComplexContent());
TEST(9, false, x.@attr1.hasComplexContent());
TEST(10, false, x.bravo.child(0).hasComplexContent());
TEST(11, true, x.india.hasComplexContent());

END();


text:
package amplifybackend

import (
	"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/aws/aws-sdk-go/private/protocol"
)

const (

	// ErrCodeBadRequestException for service response error code
	// "BadRequestException".
	//
	// An error returned if a request is not formed properly.
	ErrCodeBadRequestException = "BadRequestException"

	// ErrCodeGatewayTimeoutException for service response error code
	// "GatewayTimeoutException".
	//
	// An error returned if there's a temporary issue with the service.
	ErrCodeGatewayTimeoutException = "GatewayTimeoutException"

	// ErrCodeNotFoundException for service response error code
	// "NotFoundException".
	//
	// An error returned when a specific resource type is not found.
	ErrCodeNotFoundException = "NotFoundException"

	// ErrCodeTooManyRequestsException for service response error code
	// "TooManyRequestsException".
	//
	// An error that is returned when a limit of a specific type has been exceeded.
	ErrCodeTooManyRequestsException = "TooManyRequestsException"
)

var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
	"BadRequestException":      newErrorBadRequestException,
	"GatewayTimeoutException":  newErrorGatewayTimeoutException,
	"NotFoundException":        newErrorNotFoundException,
	"TooManyRequestsException": newErrorTooManyRequestsException,
}


text:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>DEV | Url Parser | Jasmine Test Runner</title>
        <link rel="stylesheet" href="lib/jasmine/jasmine.css">
        <script src="lib/jasmine/jasmine.js"></script>
        <script src="lib/jasmine/jasmine-html.js"></script>

        <script src="lib/jasmine-helper.js"></script>

        <script src="../src/intro.js"></script>
        <script src="../src/byroads.js"></script>
        <script src="../src/route.js"></script>
        <script src="../src/pattern-lexer.js"></script>

        <script src="spec/lexer.spec.js"></script>
        <script src="spec/add.spec.js"></script>
        <script src="spec/remove.spec.js"></script>
        <script src="spec/match.spec.js"></script>
        <script src="spec/getMatchedRoutes.spec.js"></script>
        <script src="spec/create.spec.js"></script>
        <script src="spec/toString.spec.js"></script>
        <script src="spec/interpolate.spec.js"></script>
        <script src="spec/dispose.spec.js"></script>
    </head>
    <body>
        <script>
            //run specs and add reporter
            var reporter = new jasmine.HtmlReporter,
                env = jasmine.getEnv();
            env.specFilter = function(spec){
                return reporter.specFilter(spec)
            };
            env.addReporter(reporter);
            env.execute();
        </script>
    </body>
</html>


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.operator;

import com.google.common.util.concurrent.ListenableFuture;

public interface NestedLoopJoinPagesBridge
{
    ListenableFuture<NestedLoopJoinPages> getPagesFuture();

    ListenableFuture<?> setPages(NestedLoopJoinPages nestedLoopJoinPages);

    void destroy();
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>CMAKE_COLOR_MAKEFILE — CMake 3.7.1 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="top" title="CMake 3.7.1 Documentation" href="../index.html" />
    <link rel="up" title="cmake-variables(7)" href="../manual/cmake-variables.7.html" />
    <link rel="next" title="CMAKE_CONFIGURATION_TYPES" href="CMAKE_CONFIGURATION_TYPES.html" />
    <link rel="prev" title="CMAKE_CODELITE_USE_TARGETS" href="CMAKE_CODELITE_USE_TARGETS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.7.1 Documentation »

cmake-variables(7) »

CMAKE_COLOR_MAKEFILE¶

Enables color output when using the Makefile Generators.

When enabled, the generated Makefiles will produce colored output.
Default is ON.

Previous topic

CMAKE_CODELITE_USE_TARGETS

Next topic

CMAKE_CONFIGURATION_TYPES

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          next |

          previous |

    CMake »

    3.7.1 Documentation »

cmake-variables(7) »

        © Copyright 2000-2016 Kitware, Inc. and Contributors.
      Created using Sphinx 1.4a0+.


text:
This is an extension panel for Django Debug Toolbar that adds Pycassa's NoSQL stack trace debug to your debug toolbar. [Pycassa](https://github.com/pycassa/pycassa) is Apache Cassandra's python driver.

### Setup
Modify your `settings.py` Add `debug_toolbar_pycassa` to `INSTALLED_APPS` and `DEBUG_TOOLBAR_PANELS`:

```
INSTALLED_APPS = (
    ...
    'debug_toolbar',
    'debug_toolbar_pycassa',
)
```

```
DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.versions.VersionsPanel',
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.headers.HeadersPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.sql.SQLPanel',

    'debug_toolbar_pycassa.pycassa_panel.PycassaDebugPanel',

    'debug_toolbar.panels.staticfiles.StaticFilesPanel',
    'debug_toolbar.panels.templates.TemplatesPanel',
    'debug_toolbar.panels.cache.CachePanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
]
```

Based on awesome Harry Marr's [MongoDB panel](https://github.com/hmarr/django-debug-toolbar-mongo)


text:
from django.template import Library, TextNode

register = Library()

def do_tag1(parser, token):
    return TextNode('<app 1 lib 1 tag 1>')

def do_tag2(parser, token):
    return TextNode('<app 1 lib 1 tag 2>')

register.tag('tag1', do_tag1)
register.tag('tag2', do_tag2)