text:
import { TNodeWithLexicalScopeStatements } from '../../../types/node/TNodeWithLexicalScopeStatements';

import { IArrayStorage } from '../IArrayStorage';

export interface IVisitedLexicalScopeNodesStackStorage extends IArrayStorage<TNodeWithLexicalScopeStatements> {
    /**
     * @returns {TNodeWithLexicalScopeStatements | undefined}
     */
    getLastElement (): TNodeWithLexicalScopeStatements | undefined;

    /**
     * @returns {TNodeWithLexicalScopeStatements | undefined}
     */
    getPenultimateElement (): TNodeWithLexicalScopeStatements | undefined;

    /**
     * @returns {TNodeWithLexicalScopeStatements | undefined}
     */
    pop (): TNodeWithLexicalScopeStatements | undefined;

    /**
     * @param {TNodeWithLexicalScopeStatements} lexicalScopeBodyNode
     */
    push (lexicalScopeBodyNode: TNodeWithLexicalScopeStatements): void;
}


text:
    if (st->_undo_state.undoing == 0) \
    block

Storage* storage_create()
{
    // init controller
    Storage* storage = (Storage*)malloc(sizeof(Storage));

    // init current data
    storage->vector = (Vector*)malloc(sizeof(Vector));
    vector_init(storage->vector, sizeof(Holiday));

    // init undo
    storage->undo_length = 0;

    return storage;
}

void storage_destroy(Storage* storage)
{
    // free current data
    vector_free(storage->vector);
    free(storage->vector);

    // free undo
    int i;
    for (i = 0; i < storage->undo_length; i++)
    {
        vector_free(storage->undo_vectors[i]);
        free(storage->undo_vectors[i]);
    }

    // free main container aka controller
    free(storage);
}

void storage_add_to_undo(Storage* storage, Vector* vector)
{
    // printf("Added to undo"); print_eol();
    storage->undo_vectors[storage->undo_length] = (Vector*)vector_new_from(vector);
    storage->undo_length++;
}

int storage_undo(Storage* storage)
{
    // nothing to undo
    if (storage->undo_length == 0)
    {
        return 0;
    }

    // free current data
    vector_free(storage->vector);
    free(storage->vector);

    // set current data to last undo, will be freed by destroy
    storage->vector = (Vector*)storage->undo_vectors[storage->undo_length - 1];
    // printf("Undo set"); print_eol();

    // remove from undo
    storage->undo_vectors[storage->undo_length - 1] = NULL;
    storage->undo_length--;

    return 1;
}

// return the index in our storage where te id is present
int storage_find_index_by_id(Storage* storage, const int id)
{
    int i, length = vector_length(storage->vector);

    for (i = 0; i < length; i++)
    {
        Holiday* temp_holiday = (Holiday*)vector_get(storage->vector, i);
        if (temp_holiday->id == id)
        {
            return i;
        }
    }
    return -1;
}

int storage_holiday_id_exists(Storage* storage, const int id)
{
    if (storage_find_index_by_id(storage, id) != -1)
        return 1;

    return 0;
}

void storage_insert_holiday(Storage* storage, Holiday* holiday)
{
    storage_add_to_undo(storage, storage->vector);
    vector_append(storage->vector, holiday);
}

void storage_update_holiday(Storage* storage, Holiday* holiday)
{
    storage_add_to_undo(storage, storage->vector);
    int index = storage_find_index_by_id(storage, holiday->id);
    //     printf("update, index=%d, id=%d\n", index, wtf);
    //     print_holiday(ho);

    vector_set(storage->vector, index, holiday);
}

void storage_delete_holiday(Storage* storage, const int id)
{
    storage_add_to_undo(storage, storage->vector);
    int index = storage_find_index_by_id(storage, id);

    vector_remove(storage->vector, index);
}

void storage_print_header_all_holidays()
{
    printf("%s\t%s\t\t\t%s\t\t%s", "ID", "Description", "Type", "Price");
    print_eol();
    print_eol();
}

void storage_print_holiday(const Holiday* holiday)
{
    printf("%d\t%s\t\t\t%s\t\t%f\n", holiday->id, holiday->destination, holiday->type, holiday->price);
}

void storage_print_all(const Storage* storage)
{
    int i, j, length = vector_length(storage->vector);
    if (length == 0)
    {
        printf("There are NO holidays.");
        print_eol();
        return;
    }

    storage_print_header_all_holidays();
    for (i = 0; i < length; i++)
        storage_print_holiday((Holiday*)(vector_get(storage->vector, i)));

    // ALL undos
    //     printf("HISTORY"); print_eol(); print_eol();
    //     for(i = 0; i < storage->undo_length; i++)
    //     {
    //         printf("-------------------"); print_eol(); print_eol();
    //         length = vector_length(storage->undo_vectors[i]);
    //         for(j = 0; j < length; j++)
    //         {
    //             storage_print_holiday((Holiday
    //             *)(vector_get(storage->undo_vectors[i], j)));
    //         }
    //     }
}

void storage_filter_by_price(Storage* storage, const float price, int direction)
{
    storage_add_to_undo(storage, storage->vector);
    Vector* new_filtered = (Vector*)malloc(sizeof(Vector));
    vector_init(new_filtered, sizeof(Holiday));

    int i, length = vector_length(storage->vector);
    for (i = 0; i < length; i++)
    {
        Holiday* temp_holiday = (Holiday*)vector_get(storage->vector, i);

        if (direction == -1)
        {
            if (temp_holiday->price < price)
            {
                vector_append(new_filtered, temp_holiday);
            }
        }
        else if (direction == 1)
        {
            if (temp_holiday->price > price)
            {
                vector_append(new_filtered, temp_holiday);
            }
        }
        else if (direction == 0)
        {
            if (temp_holiday->price == price)
            {
                vector_append(new_filtered, temp_holiday);
            }
        }
    }

    // delete old
    vector_free(storage->vector);
    free(storage->vector);
    storage->vector = new_filtered;
}

void storage_filter_by_type(Storage* storage, const char* type)
{
    storage_add_to_undo(storage, storage->vector);
    Vector* new_filtered = (Vector*)malloc(sizeof(Vector));
    vector_init(new_filtered, sizeof(Holiday));

    int i, length = vector_length(storage->vector);
    for (i = 0; i < length; i++)
    {
        Holiday* temp_holiday = (Holiday*)vector_get(storage->vector, i);

        if (strcmp(temp_holiday->type, type) == 0)
        {
            vector_append(new_filtered, temp_holiday);
        }
    }

    // delete old
    vector_free(storage->vector);
    free(storage->vector);
    storage->vector = new_filtered;
}

// void test_holiday()
// {
//     storage st;
//     storage_init(&st);
//
//     holiday ho_push = {.id = 1, .destination = "Test", .type="TestType"};
//
//     // push
//     storage_push_back(&st, &ho_push);
//
//     // test get
//     holiday ho_test = storage_get(&st, 0);
//     assert(ho_test.id == 1);
//     assert(strcmp(ho_test.destination, "Test") == 0);
//     assert(strcmp(ho_test.type, "TestType") == 0);
//
//     storage_free(&st);
// }

// Copy an holiday
// void storage_holiday_copy(Holiday *destination, const Holiday *source)
// {
//     destination->id = source->id;
//     destination->price = source->price;
//     strcpy(destination->destination, source->destination);
//     strcpy(destination->type, source->type);
// }

redpajama_set_name: RedPajamaGithub


text:
/**
 * Interaction for the pages templates
 */
jsBackend.extensions =
{
  init: function()
        {
          jsBackend.extensions.modalInstall.init();
        }
};

jsBackend.extensions.modalInstall =
{
  init: function() {

    $('.jsConfirmationTrigger').off().on('click', function (e) {

      // prevent default
      e.preventDefault();

      // get data
      var href = $(this).attr('href');
      var message = $(this).data('message');

      if (typeof message == 'undefined') {
        message = jsBackend.locale.msg('ConfirmModuleInstallDefault');
      }

      // the first is necessary to prevent multiple popups showing after a previous modal is dismissed without
      // refreshing the page
      $confirmation = $('.jsConfirmation').clone().first();

      // bind
      if (href !== '') {
        // set data
        $confirmation.find('.jsConfirmationMessage').html(message);
        $confirmation.find('.jsConfirmationSubmit').attr('href', $(this).attr('href'));

        // open dialog
        $confirmation.modal('show');
      }

    });
  }
};

$(jsBackend.extensions.init);


text:
<annotation>
<folder>paper_notebook</folder>
<filename>paper_notebook_1_view_1_pose_10_lit_1.jpg</filename>
<source>
<database>photorealistic	rendering</database>
</source>
<size>
<width>640</width>
<height>480</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>paper_notebook</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>209</xmin>
<ymin>153</ymin>
<xmax>464</xmax>
<ymax>344</ymax>
</bndbox>
</object>
</annotation>


text:
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using WPFAddressBook.Entities;

namespace WPFAddressBook
{
    public class AddressBookContext : DbContext
    {
        public AddressBookContext() : base("AddressBookConnection")
        {

        }

        public DbSet<Person> Persons { get; set; }
        public DbSet<Address> Addresses { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}


text:
$packageArgs = @{
  packageName   = 'flashdevelop'
  unzipLocation = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
  fileType      = 'exe'
  url           = 'http://www.flashdevelop.org/downloads/releases/FlashDevelop-5.3.3.exe'
  silentArgs    = '/S'
  validExitCodes= @(0)
  softwareName  = 'FlashDevelop*'
  checksum      = '7B3109DD768C0C2EF285A0D4A019AB4E89D58F0229A3B820D72F363E7EE3DE38'
  checksumType  = 'sha256'
}

Install-ChocolateyPackage @packageArgs


text:
package domain

// VDisk -
type VDisk struct {
	Path        string `json:"path"`
	PlannedFree int64  `json:"plannedFree"`
	Bin         *Bin   `json:"bin"`
	Src         bool   `json:"src"`
	Dst         bool   `json:"dst"`
}


text:
package org.zzy.distributed.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by zhaoyu on 16-8-23.
 */
@Controller
public class HomeController {

    @RequestMapping(value = "/")
    public String home() {
        return "index";
    }
}


text:
namespace OpenTNF.Library
{
    internal class Hashing
    {
        /// <summary>
        /// This is a simple hashing function from Robert Sedgwicks Hashing in C book.
        /// Also, some simple optimizations to the algorithm in order to speed up
        /// its hashing process have been added. from: www.partow.net
        /// </summary>
        /// <param name="values">array of objects, parameters combination that you need
        /// to get a unique hash code for them</param>
        /// <returns>Hash code</returns>
        internal static int RsHash(params object[] values)
        {
            const int b = 378551;
            int a = 63689;
            int hash = 0;

            unchecked
            {
                foreach (object value in values)
                {
                    if (value != null)
                    {
                        hash = hash * a + value.GetHashCode();
                        a = a * b;
                    }
                }
            }

            return hash;
        }
    }
}


text:
package com.clicktravel.infrastructure.host.aws.ec2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.clicktravel.common.http.client.HttpClient;

public class Ec2InstanceDataAccessor implements Ec2InstanceData {

    private static String METADATA_PATH = "/meta-data";
    private final Logger logger = LoggerFactory.getLogger(getClass());
    private final HttpClient client;
    private String instanceId;

    /**
     * @param client HttpClient with base URI configured to access a particular EC2 instance data
     */
    public Ec2InstanceDataAccessor(final HttpClient client) {
        this.client = client;
    }

    @Override
    public String getInstanceId() {
        if (instanceId == null) {
            logger.debug("About to retrieve EC2 instance id");
            instanceId = readMetadata("/instance-id");
            logger.debug("Retrieved EC2 instance id: [" + instanceId + "]");
        }
        return instanceId;
    }

    private String readMetadata(final String propertyName) {
        return client.get(METADATA_PATH + propertyName).readEntity(String.class);
    }
}


text:
require 'rails_helper'

RSpec.describe "educations/new", type: :view do
  before(:each) do
    assign(:education, Education.new(
      :institution => "MyString",
      :area => "MyString",
      :study_type => ""
    ))
  end

  it "renders new education form" do
    render

    assert_select "form[action=?][method=?]", educations_path, "post" do

      assert_select "input#education_institution[name=?]", "education[institution]"

      assert_select "input#education_area[name=?]", "education[area]"

      assert_select "input#education_study_type[name=?]", "education[study_type]"
    end
  end
end


text:
package mock_control

import (
	context "context"
	gomock "github.com/golang/mock/gomock"
	gopacket "github.com/google/gopacket"
	layers "github.com/google/gopacket/layers"
	addr "github.com/scionproto/scion/go/lib/addr"
	snet "github.com/scionproto/scion/go/lib/snet"
	control "github.com/scionproto/scion/go/pkg/gateway/control"
	pathhealth "github.com/scionproto/scion/go/pkg/gateway/pathhealth"
	policies "github.com/scionproto/scion/go/pkg/gateway/pathhealth/policies"
	routing "github.com/scionproto/scion/go/pkg/gateway/routing"
	net "net"
	reflect "reflect"
)

// MockDataplaneSession is a mock of DataplaneSession interface
type MockDataplaneSession struct {
	ctrl     *gomock.Controller
	recorder *MockDataplaneSessionMockRecorder
}

// MockDataplaneSessionMockRecorder is the mock recorder for MockDataplaneSession
type MockDataplaneSessionMockRecorder struct {
	mock *MockDataplaneSession
}

// NewMockDataplaneSession creates a new mock instance
func NewMockDataplaneSession(ctrl *gomock.Controller) *MockDataplaneSession {
	mock := &MockDataplaneSession{ctrl: ctrl}
	mock.recorder = &MockDataplaneSessionMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDataplaneSession) EXPECT() *MockDataplaneSessionMockRecorder {
	return m.recorder
}

// Close mocks base method
func (m *MockDataplaneSession) Close() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Close")
}

// Close indicates an expected call of Close
func (mr *MockDataplaneSessionMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDataplaneSession)(nil).Close))
}

// SetPaths mocks base method
func (m *MockDataplaneSession) SetPaths(arg0 []snet.Path) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetPaths", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetPaths indicates an expected call of SetPaths
func (mr *MockDataplaneSessionMockRecorder) SetPaths(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPaths", reflect.TypeOf((*MockDataplaneSession)(nil).SetPaths), arg0)
}

// Write mocks base method
func (m *MockDataplaneSession) Write(arg0 gopacket.Packet) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Write", arg0)
}

// Write indicates an expected call of Write
func (mr *MockDataplaneSessionMockRecorder) Write(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockDataplaneSession)(nil).Write), arg0)
}

// MockDiscoverer is a mock of Discoverer interface
type MockDiscoverer struct {
	ctrl     *gomock.Controller
	recorder *MockDiscovererMockRecorder
}

// MockDiscovererMockRecorder is the mock recorder for MockDiscoverer
type MockDiscovererMockRecorder struct {
	mock *MockDiscoverer
}

// NewMockDiscoverer creates a new mock instance
func NewMockDiscoverer(ctrl *gomock.Controller) *MockDiscoverer {
	mock := &MockDiscoverer{ctrl: ctrl}
	mock.recorder = &MockDiscovererMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDiscoverer) EXPECT() *MockDiscovererMockRecorder {
	return m.recorder
}

// Gateways mocks base method
func (m *MockDiscoverer) Gateways(arg0 context.Context) ([]control.Gateway, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Gateways", arg0)
	ret0, _ := ret[0].([]control.Gateway)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Gateways indicates an expected call of Gateways
func (mr *MockDiscovererMockRecorder) Gateways(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Gateways", reflect.TypeOf((*MockDiscoverer)(nil).Gateways), arg0)
}

// MockRoutingTable is a mock of RoutingTable interface
type MockRoutingTable struct {
	ctrl     *gomock.Controller
	recorder *MockRoutingTableMockRecorder
}

// MockRoutingTableMockRecorder is the mock recorder for MockRoutingTable
type MockRoutingTableMockRecorder struct {
	mock *MockRoutingTable
}

// NewMockRoutingTable creates a new mock instance
func NewMockRoutingTable(ctrl *gomock.Controller) *MockRoutingTable {
	mock := &MockRoutingTable{ctrl: ctrl}
	mock.recorder = &MockRoutingTableMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRoutingTable) EXPECT() *MockRoutingTableMockRecorder {
	return m.recorder
}

// Activate mocks base method
func (m *MockRoutingTable) Activate() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Activate")
}

// Activate indicates an expected call of Activate
func (mr *MockRoutingTableMockRecorder) Activate() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Activate", reflect.TypeOf((*MockRoutingTable)(nil).Activate))
}

// ClearSession mocks base method
func (m *MockRoutingTable) ClearSession(arg0 int) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ClearSession", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// ClearSession indicates an expected call of ClearSession
func (mr *MockRoutingTableMockRecorder) ClearSession(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearSession", reflect.TypeOf((*MockRoutingTable)(nil).ClearSession), arg0)
}

// Deactivate mocks base method
func (m *MockRoutingTable) Deactivate() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Deactivate")
}

// Deactivate indicates an expected call of Deactivate
func (mr *MockRoutingTableMockRecorder) Deactivate() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deactivate", reflect.TypeOf((*MockRoutingTable)(nil).Deactivate))
}

// RouteIPv4 mocks base method
func (m *MockRoutingTable) RouteIPv4(arg0 layers.IPv4) control.PktWriter {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RouteIPv4", arg0)
	ret0, _ := ret[0].(control.PktWriter)
	return ret0
}

// RouteIPv4 indicates an expected call of RouteIPv4
func (mr *MockRoutingTableMockRecorder) RouteIPv4(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteIPv4", reflect.TypeOf((*MockRoutingTable)(nil).RouteIPv4), arg0)
}

// RouteIPv6 mocks base method
func (m *MockRoutingTable) RouteIPv6(arg0 layers.IPv6) control.PktWriter {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RouteIPv6", arg0)
	ret0, _ := ret[0].(control.PktWriter)
	return ret0
}

// RouteIPv6 indicates an expected call of RouteIPv6
func (mr *MockRoutingTableMockRecorder) RouteIPv6(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteIPv6", reflect.TypeOf((*MockRoutingTable)(nil).RouteIPv6), arg0)
}

// SetSession mocks base method
func (m *MockRoutingTable) SetSession(arg0 int, arg1 control.PktWriter) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetSession", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetSession indicates an expected call of SetSession
func (mr *MockRoutingTableMockRecorder) SetSession(arg0, arg1 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSession", reflect.TypeOf((*MockRoutingTable)(nil).SetSession), arg0, arg1)
}

// MockRoutingTableSwapper is a mock of RoutingTableSwapper interface
type MockRoutingTableSwapper struct {
	ctrl     *gomock.Controller
	recorder *MockRoutingTableSwapperMockRecorder
}

// MockRoutingTableSwapperMockRecorder is the mock recorder for MockRoutingTableSwapper
type MockRoutingTableSwapperMockRecorder struct {
	mock *MockRoutingTableSwapper
}

// NewMockRoutingTableSwapper creates a new mock instance
func NewMockRoutingTableSwapper(ctrl *gomock.Controller) *MockRoutingTableSwapper {
	mock := &MockRoutingTableSwapper{ctrl: ctrl}
	mock.recorder = &MockRoutingTableSwapperMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRoutingTableSwapper) EXPECT() *MockRoutingTableSwapperMockRecorder {
	return m.recorder
}

// SetRoutingTable mocks base method
func (m *MockRoutingTableSwapper) SetRoutingTable(arg0 control.RoutingTable) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetRoutingTable", arg0)
}

// SetRoutingTable indicates an expected call of SetRoutingTable
func (mr *MockRoutingTableSwapperMockRecorder) SetRoutingTable(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRoutingTable", reflect.TypeOf((*MockRoutingTableSwapper)(nil).SetRoutingTable), arg0)
}

// MockRoutingTableFactory is a mock of RoutingTableFactory interface
type MockRoutingTableFactory struct {
	ctrl     *gomock.Controller
	recorder *MockRoutingTableFactoryMockRecorder
}

// MockRoutingTableFactoryMockRecorder is the mock recorder for MockRoutingTableFactory
type MockRoutingTableFactoryMockRecorder struct {
	mock *MockRoutingTableFactory
}

// NewMockRoutingTableFactory creates a new mock instance
func NewMockRoutingTableFactory(ctrl *gomock.Controller) *MockRoutingTableFactory {
	mock := &MockRoutingTableFactory{ctrl: ctrl}
	mock.recorder = &MockRoutingTableFactoryMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRoutingTableFactory) EXPECT() *MockRoutingTableFactoryMockRecorder {
	return m.recorder
}

// New mocks base method
func (m *MockRoutingTableFactory) New(arg0 []*control.RoutingChain) (control.RoutingTable, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "New", arg0)
	ret0, _ := ret[0].(control.RoutingTable)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// New indicates an expected call of New
func (mr *MockRoutingTableFactoryMockRecorder) New(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockRoutingTableFactory)(nil).New), arg0)
}

// MockEngineFactory is a mock of EngineFactory interface
type MockEngineFactory struct {
	ctrl     *gomock.Controller
	recorder *MockEngineFactoryMockRecorder
}

// MockEngineFactoryMockRecorder is the mock recorder for MockEngineFactory
type MockEngineFactoryMockRecorder struct {
	mock *MockEngineFactory
}

// NewMockEngineFactory creates a new mock instance
func NewMockEngineFactory(ctrl *gomock.Controller) *MockEngineFactory {
	mock := &MockEngineFactory{ctrl: ctrl}
	mock.recorder = &MockEngineFactoryMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockEngineFactory) EXPECT() *MockEngineFactoryMockRecorder {
	return m.recorder
}

// New mocks base method
func (m *MockEngineFactory) New(arg0 control.RoutingTable, arg1 []*control.SessionConfig, arg2 map[int][]byte) control.Worker {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "New", arg0, arg1, arg2)
	ret0, _ := ret[0].(control.Worker)
	return ret0
}

// New indicates an expected call of New
func (mr *MockEngineFactoryMockRecorder) New(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockEngineFactory)(nil).New), arg0, arg1, arg2)
}

// MockPathMonitor is a mock of PathMonitor interface
type MockPathMonitor struct {
	ctrl     *gomock.Controller
	recorder *MockPathMonitorMockRecorder
}

// MockPathMonitorMockRecorder is the mock recorder for MockPathMonitor
type MockPathMonitorMockRecorder struct {
	mock *MockPathMonitor
}

// NewMockPathMonitor creates a new mock instance
func NewMockPathMonitor(ctrl *gomock.Controller) *MockPathMonitor {
	mock := &MockPathMonitor{ctrl: ctrl}
	mock.recorder = &MockPathMonitorMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPathMonitor) EXPECT() *MockPathMonitorMockRecorder {
	return m.recorder
}

// Register mocks base method
func (m *MockPathMonitor) Register(arg0 addr.IA, arg1 *policies.Policies, arg2 int) control.PathMonitorRegistration {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Register", arg0, arg1, arg2)
	ret0, _ := ret[0].(control.PathMonitorRegistration)
	return ret0
}

// Register indicates an expected call of Register
func (mr *MockPathMonitorMockRecorder) Register(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockPathMonitor)(nil).Register), arg0, arg1, arg2)
}

// MockPathMonitorRegistration is a mock of PathMonitorRegistration interface
type MockPathMonitorRegistration struct {
	ctrl     *gomock.Controller
	recorder *MockPathMonitorRegistrationMockRecorder
}

// MockPathMonitorRegistrationMockRecorder is the mock recorder for MockPathMonitorRegistration
type MockPathMonitorRegistrationMockRecorder struct {
	mock *MockPathMonitorRegistration
}

// NewMockPathMonitorRegistration creates a new mock instance
func NewMockPathMonitorRegistration(ctrl *gomock.Controller) *MockPathMonitorRegistration {
	mock := &MockPathMonitorRegistration{ctrl: ctrl}
	mock.recorder = &MockPathMonitorRegistrationMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPathMonitorRegistration) EXPECT() *MockPathMonitorRegistrationMockRecorder {
	return m.recorder
}

// Close mocks base method
func (m *MockPathMonitorRegistration) Close() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Close")
}

// Close indicates an expected call of Close
func (mr *MockPathMonitorRegistrationMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPathMonitorRegistration)(nil).Close))
}

// Get mocks base method
func (m *MockPathMonitorRegistration) Get() pathhealth.Selection {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get")
	ret0, _ := ret[0].(pathhealth.Selection)
	return ret0
}

// Get indicates an expected call of Get
func (mr *MockPathMonitorRegistrationMockRecorder) Get() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPathMonitorRegistration)(nil).Get))
}

// MockPacketConnFactory is a mock of PacketConnFactory interface
type MockPacketConnFactory struct {
	ctrl     *gomock.Controller
	recorder *MockPacketConnFactoryMockRecorder
}

// MockPacketConnFactoryMockRecorder is the mock recorder for MockPacketConnFactory
type MockPacketConnFactoryMockRecorder struct {
	mock *MockPacketConnFactory
}

// NewMockPacketConnFactory creates a new mock instance
func NewMockPacketConnFactory(ctrl *gomock.Controller) *MockPacketConnFactory {
	mock := &MockPacketConnFactory{ctrl: ctrl}
	mock.recorder = &MockPacketConnFactoryMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPacketConnFactory) EXPECT() *MockPacketConnFactoryMockRecorder {
	return m.recorder
}

// New mocks base method
func (m *MockPacketConnFactory) New() (net.PacketConn, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "New")
	ret0, _ := ret[0].(net.PacketConn)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// New indicates an expected call of New
func (mr *MockPacketConnFactoryMockRecorder) New() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockPacketConnFactory)(nil).New))
}

// MockPrefixConsumer is a mock of PrefixConsumer interface
type MockPrefixConsumer struct {
	ctrl     *gomock.Controller
	recorder *MockPrefixConsumerMockRecorder
}

// MockPrefixConsumerMockRecorder is the mock recorder for MockPrefixConsumer
type MockPrefixConsumerMockRecorder struct {
	mock *MockPrefixConsumer
}

// NewMockPrefixConsumer creates a new mock instance
func NewMockPrefixConsumer(ctrl *gomock.Controller) *MockPrefixConsumer {
	mock := &MockPrefixConsumer{ctrl: ctrl}
	mock.recorder = &MockPrefixConsumerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPrefixConsumer) EXPECT() *MockPrefixConsumerMockRecorder {
	return m.recorder
}

// Prefixes mocks base method
func (m *MockPrefixConsumer) Prefixes(arg0 addr.IA, arg1 control.Gateway, arg2 []*net.IPNet) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Prefixes", arg0, arg1, arg2)
}

// Prefixes indicates an expected call of Prefixes
func (mr *MockPrefixConsumerMockRecorder) Prefixes(arg0, arg1, arg2 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prefixes", reflect.TypeOf((*MockPrefixConsumer)(nil).Prefixes), arg0, arg1, arg2)
}

// MockPrefixFetcher is a mock of PrefixFetcher interface
type MockPrefixFetcher struct {
	ctrl     *gomock.Controller
	recorder *MockPrefixFetcherMockRecorder
}

// MockPrefixFetcherMockRecorder is the mock recorder for MockPrefixFetcher
type MockPrefixFetcherMockRecorder struct {
	mock *MockPrefixFetcher
}

// NewMockPrefixFetcher creates a new mock instance
func NewMockPrefixFetcher(ctrl *gomock.Controller) *MockPrefixFetcher {
	mock := &MockPrefixFetcher{ctrl: ctrl}
	mock.recorder = &MockPrefixFetcherMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPrefixFetcher) EXPECT() *MockPrefixFetcherMockRecorder {
	return m.recorder
}

// Prefixes mocks base method
func (m *MockPrefixFetcher) Prefixes(arg0 context.Context, arg1 *net.UDPAddr) ([]*net.IPNet, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Prefixes", arg0, arg1)
	ret0, _ := ret[0].([]*net.IPNet)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Prefixes indicates an expected call of Prefixes
func (mr *MockPrefixFetcherMockRecorder) Prefixes(arg0, arg1 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prefixes", reflect.TypeOf((*MockPrefixFetcher)(nil).Prefixes), arg0, arg1)
}

// MockDataplaneSessionFactory is a mock of DataplaneSessionFactory interface
type MockDataplaneSessionFactory struct {
	ctrl     *gomock.Controller
	recorder *MockDataplaneSessionFactoryMockRecorder
}

// MockDataplaneSessionFactoryMockRecorder is the mock recorder for MockDataplaneSessionFactory
type MockDataplaneSessionFactoryMockRecorder struct {
	mock *MockDataplaneSessionFactory
}

// NewMockDataplaneSessionFactory creates a new mock instance
func NewMockDataplaneSessionFactory(ctrl *gomock.Controller) *MockDataplaneSessionFactory {
	mock := &MockDataplaneSessionFactory{ctrl: ctrl}
	mock.recorder = &MockDataplaneSessionFactoryMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDataplaneSessionFactory) EXPECT() *MockDataplaneSessionFactoryMockRecorder {
	return m.recorder
}

// New mocks base method
func (m *MockDataplaneSessionFactory) New(arg0 byte, arg1 int, arg2 addr.IA, arg3 net.Addr) control.DataplaneSession {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "New", arg0, arg1, arg2, arg3)
	ret0, _ := ret[0].(control.DataplaneSession)
	return ret0
}

// New indicates an expected call of New
func (mr *MockDataplaneSessionFactoryMockRecorder) New(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockDataplaneSessionFactory)(nil).New), arg0, arg1, arg2, arg3)
}

// MockPktWriter is a mock of PktWriter interface
type MockPktWriter struct {
	ctrl     *gomock.Controller
	recorder *MockPktWriterMockRecorder
}

// MockPktWriterMockRecorder is the mock recorder for MockPktWriter
type MockPktWriterMockRecorder struct {
	mock *MockPktWriter
}

// NewMockPktWriter creates a new mock instance
func NewMockPktWriter(ctrl *gomock.Controller) *MockPktWriter {
	mock := &MockPktWriter{ctrl: ctrl}
	mock.recorder = &MockPktWriterMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockPktWriter) EXPECT() *MockPktWriterMockRecorder {
	return m.recorder
}

// Write mocks base method
func (m *MockPktWriter) Write(arg0 gopacket.Packet) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Write", arg0)
}

// Write indicates an expected call of Write
func (mr *MockPktWriterMockRecorder) Write(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockPktWriter)(nil).Write), arg0)
}

// MockWorker is a mock of Worker interface
type MockWorker struct {
	ctrl     *gomock.Controller
	recorder *MockWorkerMockRecorder
}

// MockWorkerMockRecorder is the mock recorder for MockWorker
type MockWorkerMockRecorder struct {
	mock *MockWorker
}

// NewMockWorker creates a new mock instance
func NewMockWorker(ctrl *gomock.Controller) *MockWorker {
	mock := &MockWorker{ctrl: ctrl}
	mock.recorder = &MockWorkerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockWorker) EXPECT() *MockWorkerMockRecorder {
	return m.recorder
}

// Close mocks base method
func (m *MockWorker) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close
func (mr *MockWorkerMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockWorker)(nil).Close))
}

// Run mocks base method
func (m *MockWorker) Run() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Run")
	ret0, _ := ret[0].(error)
	return ret0
}

// Run indicates an expected call of Run
func (mr *MockWorkerMockRecorder) Run() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockWorker)(nil).Run))
}

// MockSessionPolicyParser is a mock of SessionPolicyParser interface
type MockSessionPolicyParser struct {
	ctrl     *gomock.Controller
	recorder *MockSessionPolicyParserMockRecorder
}

// MockSessionPolicyParserMockRecorder is the mock recorder for MockSessionPolicyParser
type MockSessionPolicyParserMockRecorder struct {
	mock *MockSessionPolicyParser
}

// NewMockSessionPolicyParser creates a new mock instance
func NewMockSessionPolicyParser(ctrl *gomock.Controller) *MockSessionPolicyParser {
	mock := &MockSessionPolicyParser{ctrl: ctrl}
	mock.recorder = &MockSessionPolicyParserMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockSessionPolicyParser) EXPECT() *MockSessionPolicyParserMockRecorder {
	return m.recorder
}

// Parse mocks base method
func (m *MockSessionPolicyParser) Parse(arg0 []byte) (control.SessionPolicies, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Parse", arg0)
	ret0, _ := ret[0].(control.SessionPolicies)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Parse indicates an expected call of Parse
func (mr *MockSessionPolicyParserMockRecorder) Parse(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parse", reflect.TypeOf((*MockSessionPolicyParser)(nil).Parse), arg0)
}

// MockRoutingPolicyProvider is a mock of RoutingPolicyProvider interface
type MockRoutingPolicyProvider struct {
	ctrl     *gomock.Controller
	recorder *MockRoutingPolicyProviderMockRecorder
}

// MockRoutingPolicyProviderMockRecorder is the mock recorder for MockRoutingPolicyProvider
type MockRoutingPolicyProviderMockRecorder struct {
	mock *MockRoutingPolicyProvider
}

// NewMockRoutingPolicyProvider creates a new mock instance
func NewMockRoutingPolicyProvider(ctrl *gomock.Controller) *MockRoutingPolicyProvider {
	mock := &MockRoutingPolicyProvider{ctrl: ctrl}
	mock.recorder = &MockRoutingPolicyProviderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRoutingPolicyProvider) EXPECT() *MockRoutingPolicyProviderMockRecorder {
	return m.recorder
}

// RoutingPolicy mocks base method
func (m *MockRoutingPolicyProvider) RoutingPolicy() *routing.Policy {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RoutingPolicy")
	ret0, _ := ret[0].(*routing.Policy)
	return ret0
}

// RoutingPolicy indicates an expected call of RoutingPolicy
func (mr *MockRoutingPolicyProviderMockRecorder) RoutingPolicy() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoutingPolicy", reflect.TypeOf((*MockRoutingPolicyProvider)(nil).RoutingPolicy))
}

// MockRunner is a mock of Runner interface
type MockRunner struct {
	ctrl     *gomock.Controller
	recorder *MockRunnerMockRecorder
}

// MockRunnerMockRecorder is the mock recorder for MockRunner
type MockRunnerMockRecorder struct {
	mock *MockRunner
}

// NewMockRunner creates a new mock instance
func NewMockRunner(ctrl *gomock.Controller) *MockRunner {
	mock := &MockRunner{ctrl: ctrl}
	mock.recorder = &MockRunnerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRunner) EXPECT() *MockRunnerMockRecorder {
	return m.recorder
}

// Run mocks base method
func (m *MockRunner) Run(arg0 context.Context) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Run", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// Run indicates an expected call of Run
func (mr *MockRunnerMockRecorder) Run(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRunner)(nil).Run), arg0)
}

// MockGatewayWatcherFactory is a mock of GatewayWatcherFactory interface
type MockGatewayWatcherFactory struct {
	ctrl     *gomock.Controller
	recorder *MockGatewayWatcherFactoryMockRecorder
}

// MockGatewayWatcherFactoryMockRecorder is the mock recorder for MockGatewayWatcherFactory
type MockGatewayWatcherFactoryMockRecorder struct {
	mock *MockGatewayWatcherFactory
}

// NewMockGatewayWatcherFactory creates a new mock instance
func NewMockGatewayWatcherFactory(ctrl *gomock.Controller) *MockGatewayWatcherFactory {
	mock := &MockGatewayWatcherFactory{ctrl: ctrl}
	mock.recorder = &MockGatewayWatcherFactoryMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockGatewayWatcherFactory) EXPECT() *MockGatewayWatcherFactoryMockRecorder {
	return m.recorder
}

// New mocks base method
func (m *MockGatewayWatcherFactory) New(arg0 addr.IA, arg1 control.GatewayWatcherMetrics) control.Runner {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "New", arg0, arg1)
	ret0, _ := ret[0].(control.Runner)
	return ret0
}

// New indicates an expected call of New
func (mr *MockGatewayWatcherFactoryMockRecorder) New(arg0, arg1 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockGatewayWatcherFactory)(nil).New), arg0, arg1)
}


text:
<TITLE>Olympia Master Item Report</TITLE>

Olympia Master Item Report

(Click on table headers to sort)

Item	Type	Weight	Man Item	Prominent	Animal	Land Cap	Ride Cap	Flying Cap	Who Has	Notes

{% for entry in itemz %}

        {{ entry.name }} [{{ entry.oid }}]
        {{ entry.subkind }}
        {% if entry.weight %}
            {{ entry.weight }}
        {% else %}

        {% endif %}
        {% if entry.man_item %}
            {{ entry.man_item }}
        {% else %}

        {% endif %}
        {% if entry.prominent %}
            {{ entry.prominent }}
        {% else %}

        {% endif %}
        {% if entry.animal %}
            {{ entry.animal }}
        {% else %}

        {% endif %}
        {% if entry.land_capacity %}
            {{ entry.land_capacity }}
        {% else %}

        {% endif %}
        {% if entry.ride_cap %}
            {{ entry.ride_cap }}
        {% else %}

        {% endif %}
        {% if entry.fly_capacity %}
            {{ entry.fly_capacity }}
        {% else %}

        {% endif %}
        {% if entry.who_has_name %}
            {{ entry.who_has_name }} [{{ entry.who_has_oid }}]
        {% else %}
            &nbsp
        {% endif %}
        {% if entry.magic_info or entry.trade_good or entry.subkind == 'tradegood' %}

                {% if entry.use_key == '2' %}
                    Healing Potion
                {% elif entry.use_key == '5' %}
                    Projected Cast: {{ entry.magic_info.loc_kind }} {{ entry.magic_info.loc_name }}
                    {% if entry.magic_info.loc_kind != 'unknown' %}
                        [{{ entry.magic_info.loc_oid }}]
                    {% else %}
                        [{{ entry.magic_info.loc_oid }}]
                    {% endif %}
                {% elif entry.magic_info.magic_type == 'Scroll' %}
                    Scroll:
		    {% if entry.magic_info.scroll_dict %}
		        {{ entry.magic_info.scroll_dict.name }}
                        [{{ entry.magic_info.scroll_dict.oid }}]
		    {% else %}
		        unknown
                    {% endif %}
                {% elif entry.magic_info.magic_type == 'Artifact' %}
                    {% if entry.magic_info.artifact_dict.attack_bonus %}
                        attack +{{ entry.magic_info.artifact_dict.attack_bonus }}
                    {% endif %}
                    {% if entry.magic_info.artifact_dict.defense_bonus %}
                        defense +{{ entry.magic_info.artifact_dict.defense_bonus }}
                    {% endif %}
                    {% if entry.magic_info.artifact_dict.missile_bonus %}
                        missile +{{ entry.magic_info.artifact_dict.missile_bonus }}
                    {% endif %}
                    {% if entry.magic_info.artifact_dict.aura_bonus %}
                        aura +{{ entry.magic_info.artifact_dict.aura_bonus }}
                    {% endif %}
                {% elif entry.magic_info.magic_type == 'Dead Body' %}
                    {% if entry.magic_info.db_oid %}
                        {{ entry.magic_info.db_name }} [{{ entry.magic_info.db_oid }}]
                    {% else %}
                        unknown dead guy
                    {% endif %}
                {% elif entry.magic_info.magic_type == 'Auraculum' %}
                    Aura:
                    {% if entry.magic_info.aura %}
                        {{ entry.magic_info.aura }}
                    {% else %}
                        unknown
                    {% endif %}
                {% endif %}
                {% if entry.subkind == 'tradegood' %}
                    {% if entry.trade_good %}
                        {% if entry.trade_good.sell %}
                            {% for sell_item in entry.trade_good.sell %}
                                sell: {{ sell_item.name }} [{{ sell_item.oid }}]

                            {% endfor %}
                        {% endif %}
                        {% if entry.trade_good.buy %}
                            {% for buy_item in entry.trade_good.buy %}
                                buy: {{ buy_item.name }} [{{ buy_item.oid }}]

                            {% endfor %}
                        {% endif %}
                    {% else %}
                        inactive tradegood
                    {% endif %}
                {% endif %}

        {% else %}

        {% endif %}
        {{ entry.notes|safe }}

{% endfor %}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
  <import resource="file:conf/vscan.xml" />
  <bean id="engine" class="com.htjf.kvtool.vscan.pub.Engine">
    <property name="kvChecker" ref="kvChecker" />
    <property name="filter" ref="decompileFilter" />
  </bean>
  <bean id="kvChecker" class="com.htjf.kvtool.vscan.pub.KVChecker">
    <constructor-arg index="0" ref="dirMonitor" />
    <constructor-arg index="1" value="conf/AKvLibs" />
  </bean>
  <bean id="decompileFilter" class="com.htjf.kvtool.vscan.pub.DecompileFilter">
    <property name="filterMap" ref="filterMap" />
  </bean>
  <bean id="dirMonitor" class="com.htjf.util.mon.DirMonitor">
    <property name="interval" value="5000" />
    <property name="name" value="DirMonitor" />
  </bean>
</beans>


text:
$(function($) {

	// 'this' is the document (adminUI index page) here
	var elm = $(this);

	// Set the language parameter for main search page
	elm.find('#datafariHomePageSearchUiLink').prop('href', "../index.jsp?lang=" + window.i18n.language);

	// Set the language parameter for search page
	elm.find('#datafariSearchUiLink').prop('href', "/Datafari/Search?lang=" + window.i18n.language);

	elm.find('#datafariSearchUiLink').html(window.i18n.msgStore['adminUI-SearchPage']);
	elm.find('#welcomeAdminUiMsg').html(window.i18n.msgStore['adminUI-Welcome']);
	elm.find('#logout-AdminUI').html(window.i18n.msgStore['logoutAdminUiLink']);
	elm.find('#myAccount-AdminUI').html(window.i18n.msgStore['adminUI-MyAccount']);
	elm.find('#alerts-AdminUI').html(window.i18n.msgStore['adminUI-Alerts']);
	elm.find('#favorites-AdminUI').html(window.i18n.msgStore['adminUI-Favorites']);
	elm.find('#connectors-AdminUI').html(window.i18n.msgStore['adminUI-Connectors']);
	elm.find('#statistics-AdminUI').html(window.i18n.msgStore['adminUI-Statistics']);
	elm.find('#usageStatistics-AdminUI').html(window.i18n.msgStore['adminUI-UsageStats']);
	elm.find('#queryStatistics-AdminUI').html(window.i18n.msgStore['adminUI-QueryStats']);
	elm.find('#searchEngineAdmin-AdminUI').html(window.i18n.msgStore['adminUI-SearchEngineAdmin']);
	elm.find('#solrAdmin-AdminUI').html(window.i18n.msgStore['adminUI-SolrAdmin']);
	elm.find('#alertAdmin-AdminUI').html(window.i18n.msgStore['adminUI-AlertAdmin']);
	elm.find('#indexField-AdminUI').html(window.i18n.msgStore['adminUI-IndexField']);
	elm.find('#schemaAnalysis-AdminUI').html(window.i18n.msgStore['adminUI-SchemaAnalysis']);
	elm.find('#sizeLimitation-AdminUI').html(window.i18n.msgStore['adminUI-SizeLimitation']);
	elm.find('#autocompleteConfig-AdminUI').html(window.i18n.msgStore['adminUI-AutocompleteConfig']);
	elm.find('#searchEngineConfig-AdminUI').html(window.i18n.msgStore['adminUI-SearchEngineConfig']);
	elm.find('#promoLinks-AdminUI').html(window.i18n.msgStore['adminUI-PromoLinks']);
	elm.find('#synonyms-AdminUI').html(window.i18n.msgStore['adminUI-Synonyms']);
	// Commented in JSP page
	//elm.find('#stopwords-AdminUI').html(window.i18n.msgStore['adminUI-Stopwords']);
	elm.find('#fieldWeight-AdminUI').html(window.i18n.msgStore['adminUI-FieldWeight']);
	elm.find('#facetConfig-AdminUI').html(window.i18n.msgStore['adminUI-FacetConfig']);
	elm.find('#deduplication-AdminUI').html(window.i18n.msgStore['adminUI-Deduplication']);
	elm.find('#likesFavoritesSearchEng-AdminUI').html(window.i18n.msgStore['adminUI-LikesAndFavorites']);
	elm.find('#servers-AdminUI').html(window.i18n.msgStore['adminUI-Servers']);
	elm.find('#userManagement-AdminUI').html(window.i18n.msgStore['adminUI-UserManagement']);
	elm.find('#ldapConfig-AdminUI').html(window.i18n.msgStore['adminUI-LdapConfig']);
	elm.find('#modifyUsers-AdminUI').html(window.i18n.msgStore['adminUI-ModifyUsers']);
	elm.find('#addUser-AdminUI').html(window.i18n.msgStore['adminUI-AddUser']);

});


text:
{% extends 'base.html' %}
{% load static %}
{% load user_extras %}
{% load node_extras %}
{% block title %}
    <title>Preprint</title>
{% endblock title %}
{% block content %}

                    {% if perms.osf.delete_preprintservice %}
                    {% if not serialized_preprint.node.deleted %}

                            Delete Preprint Node

                                 Data from above link

                    {% else %}

                        <form method="post" action="{% url 'nodes:restore' guid=serialized_preprint.node.id %}">
                            {% csrf_token %}
                            <input class="btn btn-success" type="submit"
                                   value="Restore Preprint Node" />
                        </form>

                {% endif %}
                {% endif %}
            {% if perms.osf.mark_spam %}

                    Confirm Spam

                    {# Data from above link #}

                    Confirm Not Spam

                    {# Data from above link #}

            {% endif %}

                    SHARE Reindex

                    {# Data from above link #}

Preprint Details

To remove contributors and perform other operations, visit the associated node detail page.

                        Field
                        Value

                        GUID
                        {{ serialized_preprint.id }}

                        Title
                        {{ serialized_preprint.node.title }}

                        Node

                            {{ serialized_preprint.node.id }}

                        Public
                        {{ serialized_preprint.node.is_public }}

                        Provider

                            {{ serialized_preprint.provider.name }}
                            {% if perms.osf.change_preprintservice %}

                                    Change preprint provider

                                        <form action="" method="post">
                                            {% csrf_token %}
                                            {{ change_provider_form.as_p }}
                                            <input class="btn-btn-primary" type="submit" value="Submit" />
                                        </form>

                            {% endif %}

                        Subjects

                                {%  for subject in serialized_preprint.subjects %}

{{ subject.text }}

                                {%  endfor %}

                        Date Created
                        {{ serialized_preprint.date_created }} UTC

                        Date Modified
                        {{ serialized_preprint.modified }} UTC

                        Published
                        {{ serialized_preprint.is_published }}

                    {%  if serialized_preprint.is_published %}

                        Date Published
                        {{ serialized_preprint.date_published }} UTC

                    {%  endif %}

                        Creator

                                {{ serialized_preprint.node.creator }}

                        Contributors

                                    User id
                                    Name
                                    Permissions

                            {% for user in serialized_preprint.node.contributors %}

                                            {{ user.id }}

                                    {{ user.name }}
                                    {{ user.permission|capfirst }}

                            {% endfor %}

                        SPAM Pro Tip
                        {{ serialized_preprint.spam_pro_tip }}

                    SPAM Status

                        {% if serialized_preprint.spam_status == SPAM_STATUS.UNKNOWN %}
                            Unknown
                        {% elif serialized_preprint.spam_status == SPAM_STATUS.FLAGGED %}
                            Flagged
                        {% elif serialized_preprint.spam_status == SPAM_STATUS.SPAM %}
                            Spam
                        {% elif serialized_preprint.spam_status == SPAM_STATUS.HAM %}
                            Ham
                        {% endif %}

                        SPAM Data

{{ serialized_preprint.spam_data }}

{% endblock content %}


text:
package org.apache.jena.assembler.test;

import java.util.*;

import org.apache.jena.assembler.* ;
import org.apache.jena.assembler.assemblers.FileManagerAssembler ;
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.util.* ;

public class TestFileManagerAssembler extends AssemblerTestBase
    {
    public TestFileManagerAssembler( String name )
        { super( name ); }

    @Override protected Class<? extends Assembler> getAssemblerClass()
        { return FileManagerAssembler.class; }

    public void testFileModelAssemblerType()
        { testDemandsMinimalType( new FileManagerAssembler(), JA.FileManager );  }

    public void testFileManagerVocabulary()
        {
        assertSubclassOf( JA.FileManager, JA.Object );
        assertDomain( JA.HasFileManager, JA.fileManager );
        assertDomain( JA.FileManager, JA.locationMapper );
        assertRange( JA.LocationMapper, JA.locationMapper );
        }

    public void testCreatesFileManager()
        {
        Resource root = resourceInModel( "r rdf:type ja:FileManager" );
        Assembler a = new FileManagerAssembler();
        Object x = a.open( root );
        assertInstanceOf( FileManager.class, x );
        }

    public void testCreatesFileManagerWithLocationMapper()
        {
        Resource root = resourceInModel( "f rdf:type ja:FileManager; f ja:locationMapper r" );
        @SuppressWarnings("deprecation")
        LocationMapper mapper = new LocationMapper();
        Assembler mock = new NamedObjectAssembler( resource( "r" ), mapper );
        Assembler a = new FileManagerAssembler();
        Object x = a.open( mock, root );
        assertInstanceOf( FileManager.class, x );
        assertSame( mapper, ((FileManager) x).getLocationMapper() );
        }

    /**
        Can't just test for equality of locators list, since locators don't support
        equality. Weak hack: check that the sizes are the same. TODO improve.
     */
    public void testCreatesFileManagerWIthHandlers()
        {
        Resource root = resourceInModel( "f rdf:type ja:FileManager" );
        Assembler a = new FileManagerAssembler();
        FileManager f = (FileManager) a.open( null, root );
        List<Locator> wanted = IteratorCollection.iteratorToList( standardLocators() );
        List<Locator> obtained = IteratorCollection.iteratorToList( f.locators() );
        assertEquals( wanted.size(), obtained.size() );
        assertEquals( wanted, obtained );
        }

    private Iterator<Locator> standardLocators()
        {
        @SuppressWarnings("deprecation")
        FileManager fm = FileManager.createStd();
        return fm.locators();
        }
    }


text:
namespace bench
{
namespace log
{
class teamcity_logger : public logger
{
public:
    void fatal_error(const std::string & message) override
    {
        utils::teamcity::build_problem(message);
    }

    void pause(std::chrono::duration<int> duration) override
    {
        auto seconds = std::chrono::duration_cast<std::chrono::seconds>(duration).count();
        utils::teamcity::message("Wait " + std::to_string(seconds)
                                 + (seconds > 1 ? " seconds" : " second"));
    }

    void schedule(const std::vector<test_instance> &) override
    {
    }

    // Test setup
    void setup_started(const test_instance & test) override
    {
        utils::teamcity::test_started(make_test_name(test));
        utils::teamcity::block_opened("setup");
    }

    void setup_failed(const test_instance & test, const std::string & error) override
    {
        utils::teamcity::message("setup failed", error);
        utils::teamcity::block_closed("setup");
    }

    void setup_finished(const test_instance & test) override
    {
        utils::teamcity::block_closed("setup");
    }

    // Test

    void test_started(const test_instance & test) override
    {
        utils::teamcity::block_opened("test");
    }

    void test_progress(const test_instance & test) override
    {
        utils::teamcity::progressMessage(std::to_string(compute_iteration_count(test))
                                         + " iterations");
    }

    void test_failed(const test_instance & test, const std::string & error) override
    {
        utils::teamcity::message("test failed", error);
        utils::teamcity::block_closed("test");
    }

    void test_finished(const test_instance & test) override
    {
        std::string test_name = make_test_name(test);

        if (test.config.content_size)
        {
            utils::teamcity::build_statistic(test_name + ".throughput.average",
                                             compute_average_throughput(test));
        }
        utils::teamcity::build_statistic(test_name + ".frequency.average",
                                         compute_average_frequency(test));

        utils::teamcity::block_closed("test");
    }

    // Test cleanup

    void cleanup_started(const test_instance & test) override
    {
        utils::teamcity::block_opened("cleanup");
    }

    void cleanup_failed(const test_instance & test, const std::string & error) override
    {
        utils::teamcity::message("cleanup failed", error);
        utils::teamcity::block_closed("cleanup");
        utils::teamcity::test_failed(make_test_name(test), test.error);
        utils::teamcity::test_finished(make_test_name(test));
    }

    void cleanup_finished(const test_instance & test) override
    {
        utils::teamcity::block_closed("cleanup");

        if (test.error.size() > 0)
        {
            utils::teamcity::test_failed(make_test_name(test), test.error);
        }
        utils::teamcity::test_finished(make_test_name(test));
    }

private:
    static std::string make_size_string(size_t size)
    {
        if (size < 1024) return std::to_string(size) + "_B";
        size /= 1024;
        if (size < 1024) return std::to_string(size) + "_kB";
        size /= 1024;
        if (size < 1024) return std::to_string(size) + "_MB";
        size /= 1024;
        return std::to_string(size) + "_GB";
    }

    static std::string make_thread_string(int thread_count)
    {
        if (thread_count > 1)
            return std::to_string(thread_count) + "_threads";
        else
            return "1_thread";
    }

    static std::string make_test_name(const bench::test_instance & test)
    {
        std::string s;
        s = test.tclass.name + "." + make_thread_string(test.config.thread_count);
        if (test.tclass.size_dependent) s += "." + make_size_string(test.config.content_size);
        return s;
    }
};
}
}


text:
build_version=2
version=1.0.2d
android_platform=android-16
package_name=openssl-android

if test "x$ANDROID_NDK" = x ; then
  echo should set ANDROID_NDK before running this script.
  exit 1
fi

if test ! -f packages/openssl-$version.tar.gz; then
  mkdir -p packages
  cd packages
  curl -O https://www.openssl.org/source/openssl-$version.tar.gz
  cd ..
fi

function build_x86_64 {
  toolchain=x86_64-4.9
  toolchain_name=x86_64-linux-android
  arch_cflags=""
  arch_ldflags=""
  arch_dir_name="x86_64"
  openssl_configure_mode="linux-x86_64"

  build
}

function build_armeabi {
  toolchain=arm-linux-androideabi-4.9
  toolchain_name=arm-linux-androideabi
  arch_cflags="-mthumb"
  arch_ldflags=""
  arch_dir_name="armeabi"
  openssl_configure_mode="android"

  build
}

function build_x86 {
  toolchain=x86-4.9
  toolchain_name=i686-linux-android
  arch_cflags="-march=i686 -msse3 -mstackrealign -mfpmath=sse"
  arch_ldflags=""
  arch_dir_name="x86"
  openssl_configure_mode="android-x86"

  build
}

function build_armeabi_v7a {
  toolchain=arm-linux-androideabi-4.9
  toolchain_name=arm-linux-androideabi
  arch_cflags="-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
  arch_ldflags="-march=armv7-a -Wl,--fix-cortex-a8"
  arch_dir_name="armeabi-v7a"
  openssl_configure_mode="android-armv7"

  build
}

function build {
  rm -rf "$current_dir/src"
  mkdir -p "$current_dir/src"
  cd "$current_dir/src"

  tar xzf "$current_dir/packages/openssl-$version.tar.gz"
  cd openssl-$version

  toolchain_path="`pwd`/$toolchain_name"
  $ANDROID_NDK/build/tools/make-standalone-toolchain.sh --platform=$android_platform --toolchain=$toolchain --install-dir="$toolchain_path"
  toolchain_bin_path="$toolchain_path/bin"
  export TOOL=arm-linux-androideabi
  export ndk_toolchain_base_name="$toolchain_bin_path/$toolchain_name"
  export CC=$ndk_toolchain_base_name-gcc
  export CXX=$ndk_toolchain_base_name-g++
  export LINK=${CXX}
  export LD=$ndk_toolchain_base_name-ld
  export AR=$ndk_toolchain_base_name-ar
  export RANLIB=$ndk_toolchain_base_name-ranlib
  export STRIP=$ndk_toolchain_base_name-strip
  export CPPFLAGS="$arch_cflags -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
  export CXXFLAGS="$arch_cflags -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 -frtti -fexceptions "
  export CFLAGS="$arch_cflags -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-strict-aliasing -finline-limit=64 "
  export LDFLAGS="$arch_ldflags"
  ./Configure "$openssl_configure_mode"
  make

  mkdir -p "$current_dir/$package_name-$build_version"
  mkdir -p "$current_dir/$package_name-$build_version/libs/$arch_dir_name"
  cp -r include "$current_dir/$package_name-$build_version"
  cp libcrypto.a libssl.a "$current_dir/$package_name-$build_version/libs/$arch_dir_name"
  cd "$current_dir"
  rm -rf src
}

# start building.
current_dir="`pwd`"
build_armeabi
build_armeabi_v7a
build_x86

cd "$current_dir"
zip -qry "$package_name-$build_version.zip" "$package_name-$build_version"
rm -rf "$package_name-$build_version"


text:
page_type: sample
languages:
  - python
products:
    - azure
    - azure-monitor
urlFragment: query-azuremonitor-samples
---

# Azure Monitor Query client library Python samples

## Samples

The following code samples show common scenarios with the Azure Monitor Query client library.

### Logs query samples

- [Send a single query with LogsQueryClient and handle the response as a table](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py) ([async sample](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py))
- [Send a single query with LogsQueryClient and handle the response in key-value form](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py)
- [Send a single query with LogsQueryClient without pandas](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py)
- [Send a single query with LogsQueryClient across multiple workspaces](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py)
- [Send multiple queries with LogsQueryClient](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py)
- [Send a single query with LogsQueryClient using server timeout](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py)

### Metrics query samples

- [Send a query using MetricsQueryClient](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_metrics_query.py) ([async sample](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metrics_query_async.py))
- [Get a list of metric namespaces](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py) ([async sample](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_namespaces_async.py))
- [Get a list of metric definitions](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_metric_definitions.py) ([async sample](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_definitions_async.py))

## Prerequisites

- Python 3.7 or later
- An [Azure subscription][azure_subscription]
- To query Logs, you need an [Azure Log Analytics workspace][azure_monitor_create_using_portal].
- To query Metrics, you need an Azure resource of any kind (Storage Account, Key Vault, Cosmos DB, etc.).

## Setup

1. Install the latest version of the Azure Monitor Query library:

  ```bash
  pip install azure-monitor-query
  ```

2. Clone or download this sample repository.
3. Open the *samples* folder in Visual Studio Code or your IDE of choice.
4. To run most of this samples, you need `azure-identity` and `pandas`. Although, those dependencies are optional and can be replaced.

  ```bash
  pip install azure-identity pandas
  ```

5. To run the async samples, you need an asynchronous HTTP framework like `aiohttp`:

  ```bash
  pip install aiohttp
  ```

## Run the samples

1. Open a terminal window and `cd` to the directory that the samples are saved in.
2. Set the environment variables specified in the sample file you wish to run.
3. Follow the usage described in the file. For example, `python sample_logs_single_query.py`.

## Next steps

To learn more about Azure Monitor, see the [Azure Monitor service documentation](https://docs.microsoft.com/azure/azure-monitor/).

<!-- LINKS -->

[azure_monitor_create_using_portal]: https://docs.microsoft.com/azure/azure-monitor/logs/quick-create-workspace
[azure_subscription]: https://azure.microsoft.com/free/python/


text:
@protocol SWSyncServiceConnectionDelegate
- (void)connection:(id)arg1 didFailWithError:(id)arg2;
@end


text:
package biz.paluch.spinach.commands;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.Collection;

import org.junit.Ignore;
import org.junit.Test;

import biz.paluch.spinach.TestSettings;
import biz.paluch.spinach.cluster.ClusterNodesParser;
import biz.paluch.spinach.cluster.DisqueNode;

public class ClusterCommandTest extends AbstractCommandTest {

    @Test
    public void clusterMeet() throws Exception {
        String result = disque.clusterMeet(TestSettings.hostAddr(), TestSettings.port(1));
        assertThat(result).isEqualTo("OK");
    }

    @Test
    @Ignore("Run me manually otherwise I will affect all the other tests")
    public void clusterReset() throws Exception {

        assertThat(disque.clusterReset(false)).isEqualTo("OK");
        disque.clusterMeet(TestSettings.hostAddr(), TestSettings.port(1));
    }

    @Test
    public void clusterSaveconfig() throws Exception {
        String result = disque.clusterSaveconfig();
        assertThat(result).isEqualTo("OK");
    }

    @Test
    @Ignore("Run me manually otherwise I will affect all the other tests")
    public void clusterForget() throws Exception {

        String output = disque.clusterNodes();
        Collection<DisqueNode> result = ClusterNodesParser.parse(output);

        DisqueNode otherNode = getOtherNode(result);

        assertThat(disque.clusterForget(otherNode.getNodeId())).isEqualTo("OK");
        disque.clusterMeet(otherNode.getAddr(), otherNode.getPort());
    }

    @Test
    public void clusterMyId() throws Exception {

        String output = disque.clusterNodes();
        Collection<DisqueNode> result = ClusterNodesParser.parse(output);

        DisqueNode ownNode = getOwnNode(result);

        assertThat(disque.clusterMyId()).isEqualTo(ownNode.getNodeId());
    }

    @Test
    public void clusterNodes() throws Exception {
        String output = disque.clusterNodes();

        Collection<DisqueNode> result = ClusterNodesParser.parse(output);
        assertThat(result.size()).isGreaterThan(1);
    }

    @Test
    public void clusterInfo() throws Exception {
        String output = disque.clusterInfo();

        assertThat(output).contains("cluster_state:").contains("cluster_stats_messages_sent");
    }

    private DisqueNode getOtherNode(Collection<DisqueNode> nodes) {
        for (DisqueNode node : nodes) {
            if (node.getFlags().contains(DisqueNode.NodeFlag.MYSELF)) {
                continue;
            }

            return node;
        }

        return null;
    }

    private DisqueNode getOwnNode(Collection<DisqueNode> nodes) {
        for (DisqueNode node : nodes) {
            if (node.getFlags().contains(DisqueNode.NodeFlag.MYSELF)) {
                return node;
            }
        }
        return null;
    }

}


text:
<?php
require_once("report.php");
class Detailed_receivings extends Report
{
	function __construct()
	{
		parent::__construct();
	}

	public function getDataColumns()
	{
		return array('summary' => array($this->lang->line('reports_receiving_id'), $this->lang->line('reports_date'), $this->lang->line('reports_items_received'), $this->lang->line('reports_received_by'), $this->lang->line('reports_supplied_by'), $this->lang->line('reports_total'), $this->lang->line('reports_payment_type'), $this->lang->line('recvs_invoice_number'), $this->lang->line('reports_comments')),
					'details' => array($this->lang->line('reports_item_number'), $this->lang->line('reports_name'), $this->lang->line('reports_category'), $this->lang->line('reports_quantity_purchased'), $this->lang->line('reports_total'), $this->lang->line('reports_discount'))
		);
	}

	public function getDataByReceivingId($receiving_id)
	{
		$this->db->select('receiving_id, DATE_FORMAT(receiving_date, "%d-%m-%Y") AS receiving_date, sum(quantity_purchased) as items_purchased, CONCAT(employee.first_name," ",employee.last_name) as employee_name, suppliers.company_name as supplier_name, sum(subtotal) as subtotal, sum(total) as total, sum(profit) as profit, payment_type, comment, invoice_number', false);
		$this->db->from('receivings_items_temp');
		$this->db->join('people as employee', 'receivings_items_temp.employee_id = employee.person_id');
		$this->db->join('suppliers as suppliers', 'receivings_items_temp.supplier_id = suppliers.person_id', 'left');
		$this->db->where('receiving_id', $receiving_id);
		return $this->db->get()->row_array();
	}

	public function getData(array $inputs)
	{
		$this->db->select('receiving_id, receiving_date, sum(quantity_purchased) as items_purchased, CONCAT(employee.first_name," ",employee.last_name) as employee_name, CONCAT(supplier.first_name," ",supplier.last_name) as supplier_name, sum(total) as total, sum(profit) as profit, payment_type, comment, invoice_number', false);
		$this->db->from('receivings_items_temp');
		$this->db->join('people as employee', 'receivings_items_temp.employee_id = employee.person_id');
		$this->db->join('people as supplier', 'receivings_items_temp.supplier_id = supplier.person_id', 'left');
		$this->db->where('receiving_date BETWEEN '. $this->db->escape($inputs['start_date']). ' and '. $this->db->escape($inputs['end_date']));
		if ($inputs['location_id'] != 'all')
		{
			$this->db->where('item_location', $inputs['location_id']);
		}
		if ($inputs['receiving_type'] == 'receiving')
		{
			$this->db->where('quantity_purchased > 0');
		}
		elseif ($inputs['receiving_type'] == 'returns')
		{
			$this->db->where('quantity_purchased < 0');
		}
		elseif ($inputs['receiving_type'] == 'requisitions')
		{
			$this->db->having('items_purchased = 0');
		}
		$this->db->group_by('receiving_id');
		$this->db->order_by('receiving_date');

		$data = array();
		$data['summary'] = $this->db->get()->result_array();
		$data['details'] = array();

		foreach($data['summary'] as $key=>$value)
		{
			$this->db->select('name, item_number, category, quantity_purchased, serialnumber,total, discount_percent, item_location');
			$this->db->select($this->db->dbprefix('receivings_items_temp').".receiving_quantity");
			$this->db->from('receivings_items_temp');
			$this->db->join('items', 'receivings_items_temp.item_id = items.item_id');
			$this->db->where('receiving_id = '.$value['receiving_id']);
			$data['details'][$key] = $this->db->get()->result_array();
		}

		return $data;
	}

	public function getSummaryData(array $inputs)
	{
		$this->db->select('sum(total) as total');
		$this->db->from('receivings_items_temp');
		$this->db->where('receiving_date BETWEEN '. $this->db->escape($inputs['start_date']). ' and '. $this->db->escape($inputs['end_date']));
		if ($inputs['location_id'] != 'all')
		{
			$this->db->where('item_location', $inputs['location_id']);
		}
		if ($inputs['receiving_type'] == 'receiving')
		{
			$this->db->where('quantity_purchased > 0');
		}
		elseif ($inputs['receiving_type'] == 'returns')
		{
			$this->db->where('quantity_purchased < 0');
		}
		elseif ($inputs['receiving_type'] == 'requisitions')
		{
			$this->db->where('quantity_purchased = 0');
		}
		return $this->db->get()->row_array();
	}
}
?>


text:
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 * Built with http://stenciljs.com
 */
ion-segment {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.segment-button {
  margin-left: 0;
  margin-right: 0;
  text-align: center;
  position: relative;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.segment-wp {
  justify-content: flex-start;
}

.segment-wp .segment-button {
  height: 4rem;
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 4rem;
  text-transform: uppercase;
  color: #000;
  background-color: transparent;
  opacity: 0.5;
  padding: 0 6px;
}

.segment-wp .segment-button.segment-activated {
  opacity: 1;
}

.segment-wp .segment-button ion-icon {
  font-size: 2.6rem;
  line-height: 4rem;
}

.segment-wp.segment-disabled,
.segment-wp .segment-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.toolbar .segment-wp {
  margin: 0 auto;
}

.segment-wp-primary .segment-button {
  color: #327eff;
}

.segment-wp-primary .segment-button.activated, .segment-wp-primary .segment-button.segment-activated {
  border-color: #327eff;
  color: #327eff;
  opacity: 1;
}

.segment-wp-secondary .segment-button {
  color: #32db64;
}

.segment-wp-secondary .segment-button.activated, .segment-wp-secondary .segment-button.segment-activated {
  border-color: #32db64;
  color: #32db64;
  opacity: 1;
}

.segment-wp-danger .segment-button {
  color: #f53d3d;
}

.segment-wp-danger .segment-button.activated, .segment-wp-danger .segment-button.segment-activated {
  border-color: #f53d3d;
  color: #f53d3d;
  opacity: 1;
}

.segment-wp-light .segment-button {
  color: #f4f4f4;
}

.segment-wp-light .segment-button.activated, .segment-wp-light .segment-button.segment-activated {
  border-color: #f4f4f4;
  color: #f4f4f4;
  opacity: 1;
}

.segment-wp-dark .segment-button {
  color: #222;
}

.segment-wp-dark .segment-button.activated, .segment-wp-dark .segment-button.segment-activated {
  border-color: #222;
  color: #222;
  opacity: 1;
}

ion-segment.💎,
ion-segment-button.💎 {
  visibility: inherit;
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>IBM Pool War</title>
	<link rel="shortcut icon" href="../img/favicon.ico" />

    <link href="../css/bootstrap.css" rel="stylesheet">

	<link href="../css/ihover.css" rel="stylesheet">

    <link href="../css/stylish-portfolio.css" rel="stylesheet">

    <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">

  JATIN IS JATIN-MAN. JATIN MAKES CHUCK NORRIS AND RAJINIKANTH ASHAMED. JATIN DOES NOT NEED A SUPERHERO NAME. SUPERHEROES NEED A JATIN-NAME. JATIN DOES NOT LIKE PREM RATAN DHAN PAYO. THAT MAKES HIM JATIN-MAN - THE RIVAL OF SHAKTIMAAN.


text:
package sg.yikjiun.scf4j.set;

/**
 * @author Lee Yik Jiun
 */
public class FastUtilIntSetAdapter implements IntSet {
    private final it.unimi.dsi.fastutil.ints.IntSet set;

    public FastUtilIntSetAdapter(it.unimi.dsi.fastutil.ints.IntSet set) {
        this.set = set;
    }

    public void clear() {
        set.clear();
    }

    public boolean contains(int i) {
        return set.contains(i);
    }

    public boolean isEmpty() {
        return set.isEmpty();
    }

    public boolean add(int i) {
        return set.add(i);
    }

    public boolean remove(int i) {
        return set.remove(i);
    }

    public int size() {
        return set.size();
    }

    public int[] toArray() {
        return set.toIntArray();
    }
}


text:
'''
Created on 10 Feb 2016

@author: BenShelly
'''
import unittest
from rightBet.StakeCalculator import StakeCalculator

class Test(unittest.TestCase):

    def setUp(self):
        self.stakeCalculator = StakeCalculator ()

    def tearDown(self):
        pass

    def stakeTotal(self):
        self.stakeCalcultor.stake(5.00)
        self.assertEquals(self.stakeCalulator.stake(5.00), 5.00, "calculated wrong")

if __name__ == "__main__":
    # import sys;sys.argv = ['', 'Test.testName']
    unittest.main()


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Uses of Package spaceWar
</TITLE>

<META NAME="date" CONTENT="2010-11-19">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Package
spaceWar

Classes in spaceWar used by spaceWar

Obstacle

          Super class for all static objects in the space game.

OwnSpaceCraft

          Maintains state of the users own SpaceCraft.

Sector

          Double buffered drawing canvas for displaying and storing space game state.

SpaceCraft

          Super class for all moving objects in the space game.

SpaceGUIInterface

          Interface to implement in order respond to events from the
 SpaceGameGUI.

Torpedo

          Torpedo class.

      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
package com.badr.infodota.news.api;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

/**
 * User: ABadretdinov
 * Date: 21.04.14
 * Time: 18:24
 */
public class NewsItem implements Serializable, Comparable {
    private String gid;
    private String title;
    private String url;
    //html
    private String contents;
    //author
    private String author;
    //if author is empty author
    @SerializedName("feedlabel")
    private String feedLabel;
    //sort by edate
    private Long date;

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getContents() {
        return contents;
    }

    public void setContents(String contents) {
        this.contents = contents;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getFeedLabel() {
        return feedLabel;
    }

    public void setFeedLabel(String feedLabel) {
        this.feedLabel = feedLabel;
    }

    public Long getDate() {
        return date;
    }

    public void setDate(Long date) {
        this.date = date;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof NewsItem)) return false;

        NewsItem newsItem = (NewsItem) o;

        if (date != null ? !date.equals(newsItem.date) : newsItem.date != null) return false;
        if (gid != null ? !gid.equals(newsItem.gid) : newsItem.gid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = gid != null ? gid.hashCode() : 0;
        result = 31 * result + (date != null ? date.hashCode() : 0);
        return result;
    }

    @Override
    public int compareTo(Object another) {
        if (another instanceof NewsItem) {
            //newer news must be before the older one
            return ((NewsItem) another).getDate().compareTo(date);
        }
        return -1;
    }
}


text:
/**
 * Class: mxDoubleEllipse
 *
 * Extends <mxShape> to implement a double ellipse shape. This shape is
 * registered under <mxConstants.SHAPE_DOUBLE_ELLIPSE> in <mxCellRenderer>.
 * Use the following override to only fill the inner ellipse in this shape:
 *
 * (code)
 * mxDoubleEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
 * {
 *   c.ellipse(x, y, w, h);
 *   c.stroke();
 *
 *   var inset = mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth, Math.min(w / 5, h / 5)));
 *   x += inset;
 *   y += inset;
 *   w -= 2 * inset;
 *   h -= 2 * inset;
 *
 *   if (w > 0 && h > 0)
 *   {
 *     c.ellipse(x, y, w, h);
 *   }
 *
 *   c.fillAndStroke();
 * };
 * (end)
 *
 * Constructor: mxDoubleEllipse
 *
 * Constructs a new ellipse shape.
 *
 * Parameters:
 *
 * bounds - <mxRectangle> that defines the bounds. This is stored in
 * <mxShape.bounds>.
 * fill - String that defines the fill color. This is stored in <fill>.
 * stroke - String that defines the stroke color. This is stored in <stroke>.
 * strokewidth - Optional integer that defines the stroke width. Default is
 * 1. This is stored in <strokewidth>.
 */
function mxDoubleEllipse(bounds, fill, stroke, strokewidth)
{
	mxShape.call(this);
	this.bounds = bounds;
	this.fill = fill;
	this.stroke = stroke;
	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};

/**
 * Extends mxShape.
 */
mxUtils.extend(mxDoubleEllipse, mxShape);

/**
 * Variable: vmlScale
 *
 * Scale for improving the precision of VML rendering. Default is 10.
 */
mxDoubleEllipse.prototype.vmlScale = 10;

/**
 * Function: paintBackground
 *
 * Paints the background.
 */
mxDoubleEllipse.prototype.paintBackground = function(c, x, y, w, h)
{
	c.ellipse(x, y, w, h);
	c.fillAndStroke();
};

/**
 * Function: paintForeground
 *
 * Paints the foreground.
 */
mxDoubleEllipse.prototype.paintForeground = function(c, x, y, w, h)
{
	if (!this.outline)
	{
		var margin = mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth, Math.min(w / 5, h / 5)));
		x += margin;
		y += margin;
		w -= 2 * margin;
		h -= 2 * margin;

		// FIXME: Rounding issues in IE8 standards mode (not in 1.x)
		if (w > 0 && h > 0)
		{
			c.ellipse(x, y, w, h);
		}

		c.stroke();
	}
};

/**
 * Function: getLabelBounds
 *
 * Returns the bounds for the label.
 */
mxDoubleEllipse.prototype.getLabelBounds = function(rect)
{
	var margin = (mxUtils.getValue(this.style, mxConstants.STYLE_MARGIN, Math.min(3 + this.strokewidth,
			Math.min(rect.width / 5 / this.scale, rect.height / 5 / this.scale)))) * this.scale;

	return new mxRectangle(rect.x + margin, rect.y + margin, rect.width - 2 * margin, rect.height - 2 * margin);
};


text:
package com.hmsonline.cassandra.index.dao;

import me.prettyprint.hector.api.Keyspace;

public abstract class AbstractCassandraDao {
    private Keyspace keyspace;

    protected AbstractCassandraDao(Keyspace keyspace) {
        this.keyspace = keyspace;
    }
    public Keyspace getKeyspace() throws Exception {
        return this.keyspace;
    }
}


text:
var ScheduleImport = require('../../api/schedule-import/schedule-import.model');

module.exports = function(seasonId, scheduleExtract, done) {
  ScheduleImport.findOne({ seasonId: seasonId }, function(err, schedule) {
    if (schedule) {
      schedule.games = scheduleExtract;
      schedule.save(done);
    } else {
      ScheduleImport.create({
        seasonId: seasonId,
        games: scheduleExtract
      }, done);
    }
  });
};


text:
package com.wcohen.ss;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.wcohen.ss.api.StringWrapper;

/**
 * Needleman-Wunsch string distance, following Durban et al.
 * Sec 2.3, but using an approximate string distance.
 */

public class ApproxNeedlemanWunsch extends AbstractStringDistance
{
    private static Logger log=LoggerFactory.getLogger(ApproxNeedlemanWunsch.class);

    private static final int DEFAULT_WIDTH = 40;
    private CharMatchScore charMatchScore;
    private double gapCost;
    private MyMatrix mat;
    private int width = DEFAULT_WIDTH;

    public ApproxNeedlemanWunsch() { this(CharMatchScore.DIST_01, 1.0 ); }

    public ApproxNeedlemanWunsch(CharMatchScore charMatchScore,double gapCost) {
        this.charMatchScore = charMatchScore;
        this.gapCost = gapCost;
    }

    public void setWidth(int w) { this.width=w; }

    public double score(StringWrapper s,StringWrapper t) {
        mat = new MyMatrix( s, t );
        // fill matrix forward to prevent deep recursion
        for (int i=1; i<=s.length(); i++) {
            int j = (int)Math.round(i * mat.getScale());
            if (j>=1 && j<=t.length()) {
                double forceComputatationHere = mat.get( i, j);
            }
        }
        return mat.get(s.length(), t.length() );
    }

    public String explainScore(StringWrapper s,StringWrapper t) {
        mat = new MyMatrix( s, t );
        double d = mat.get(s.length(), t.length() );
        mat.setPrintNegativeValues(true);
        return mat.toString() + "\nScore = "+d;
    }

    /** Find a character in the first string, s, that can be aligned
     * with the i-th character in the second string, t. */
    public int getAlignedChar(int iMinusOne,boolean preferHigherIndices)
    {
        // internally to this package, strings are indexed 1...N, so
        // we need to convert from the usual 0...N-1 Java convention
        int i = iMinusOne+1;

        int bestJ = -1;
        double bestScore = -Double.MAX_VALUE;
        for (int j=mat.getFirstStoredEntryInRow(i); j<=mat.getLastStoredEntryInRow(i); j++) {
            if (mat.outOfRange(i,j)) log.error("out of range: "+i+","+j);
            double score = mat.get(i,j);
            if ((score>bestScore) || (score==bestScore && preferHigherIndices)) {
                bestScore = score; bestJ = j;
            }
        }
        // convert back to the usual 0...N-1 Java convention
        return bestJ-1;
    }

    private class MyMatrix extends ApproxMemoMatrix
    {
        public MyMatrix(StringWrapper s,StringWrapper t) {
	    super(s,t,width,-Double.MAX_VALUE);
        }
        public double compute(int i,int j) {
	    if (i==0) return -j*gapCost;
	    if (j==0) return -i*gapCost;
	    return max3( get(i-1,j-1) + charMatchScore.matchScore( sAt(i), tAt(j) ),
                         get(i-1, j) - gapCost,
                         get(i, j-1) - gapCost);
        }
    }

    static public void main(String[] argv) throws Exception
    {
        if (argv.length==3) {
            // -f file1 file2
            String s = readFile(new File(argv[1]));
            String t = readFile(new File(argv[2]));
            long t0 = System.currentTimeMillis();
            double score = new ApproxNeedlemanWunsch().score(s,t);
            long tf = System.currentTimeMillis();
            System.out.println("score = "+score+" runtime = "+((tf-t0)/1000.0)+" sec");
        } else {
            doMain(new ApproxNeedlemanWunsch(), argv);
        }
    }

    private static String readFile(File in) throws IOException
    {
        InputStream inputStream = new FileInputStream(in);
        byte[] bytes = new byte[inputStream.available()];
        inputStream.read(bytes);
        inputStream.close();
        return new String(bytes);
    }
}


text:
const check_valid = require('./scripts/check_valid');

function login() {
	var timeout = setTimeout(function() {
		showErr('Connection Timeout :(');
	}, 10000);
	showLoader();
	check_valid(document.getElementById('username').value, document.getElementById('password').value, function (res) {
		clearTimeout(timeout);
		if (res === true) {
			showLogout();
		}
		else if (res === false) {
			showErr('Incorrect username or password!');
		}
		else{
			showErr('Connection Error :(');
		}
	});
}

function showLoader() {
	document.getElementById('loader').style.display = 'block';
	document.getElementById('logout').style.display = 'none';
	document.getElementById('err').style.display = 'none';
	document.getElementById('form').style.display = 'none';
}

function showLogin() {
	document.getElementById('loader').style.display = 'none';
	document.getElementById('logout').style.display = 'none';
	document.getElementById('err').style.display = 'none';
	document.getElementById('form').style.display = 'block';
}

function showLogout() {
	document.getElementById('loader').style.display = 'none';
	document.getElementById('form').style.display = 'none';
	document.getElementById('err').style.display = 'none';
	document.getElementById('logout').style.display = 'block';
}

function showErr(err_txt) {
	document.getElementById('err_txt').innerHTML = err_txt;
	document.getElementById('loader').style.display = 'none';
	document.getElementById('form').style.display = 'none';
	document.getElementById('logout').style.display = 'none';
	document.getElementById('err').style.display = 'block';
}


text:
namespace Microsoft.Graph
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// The type PostAttachmentsCollectionRequestBuilder.
    /// </summary>
    public partial class PostAttachmentsCollectionRequestBuilder : BaseRequestBuilder, IPostAttachmentsCollectionRequestBuilder
    {
        /// <summary>
        /// Constructs a new PostAttachmentsCollectionRequestBuilder.
        /// </summary>
        /// <param name="requestUrl">The URL for the built request.</param>
        /// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param>
        public PostAttachmentsCollectionRequestBuilder(
            string requestUrl,
            IBaseClient client)
            : base(requestUrl, client)
        {
        }

        /// <summary>
        /// Builds the request.
        /// </summary>
        /// <returns>The built request.</returns>
        public IPostAttachmentsCollectionRequest Request()
        {
            return this.Request(null);
        }

        /// <summary>
        /// Builds the request.
        /// </summary>
        /// <param name="options">The query and header options for the request.</param>
        /// <returns>The built request.</returns>
        public IPostAttachmentsCollectionRequest Request(IEnumerable<Option> options)
        {
            return new PostAttachmentsCollectionRequest(this.RequestUrl, this.Client, options);
        }

        /// <summary>
        /// Gets an <see cref="IAttachmentRequestBuilder"/> for the specified PostAttachment.
        /// </summary>
        /// <param name="id">The ID for the PostAttachment.</param>
        /// <returns>The <see cref="IAttachmentRequestBuilder"/>.</returns>
        public IAttachmentRequestBuilder this[string id]
        {
            get
            {
                return new AttachmentRequestBuilder(this.AppendSegmentToRequestUrl(id), this.Client);
            }
        }

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="45dp"
    android:background="#019b79"
    android:id="@+id/topbar">

    <RelativeLayout
        android:layout_width="match_parent"
        android:background="#ffffff"
        android:layout_height="45dp">
        <ImageButton
            android:id="@+id/topbar_left"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_alignParentLeft="true"
            android:layout_marginLeft="30dp"
            android:background="@drawable/zc_03"/>

        <TextView
            android:id="@+id/topbar_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:textColor="#019b79"
            android:textSize="20sp"
            android:text="个人中心"
           />

        <ImageButton
            android:id="@+id/topbar_right"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_alignParentRight="true"
            android:layout_marginRight="30dp"
            android:background="@drawable/grzx_04"
            />
    </RelativeLayout>

</LinearLayout>


text:
; (function($) {

var extension_name = "Stream on peerflix";
var base_url = "http://127.0.0.1:8783";
var actions = {};
var parent_menu;
var DEBUG = 0;   // set to '1' to see console logging
var logger = function() { if (DEBUG) console.log.apply(console,arguments); };

$(document).ready(function() {
    init_background_page();
});

function init_background_page()
{
  // Create a default context menu with the "refresh" menu item,
  // in case the server is brought up *after* the extension is launched.

  setup_context_menu(null);
  populate_context_menu();
}

function populate_context_menu()
{
  // Ajax to get the shellac.json config data.
  // Clear the current context menu for this extension,
  // then rebuild the context menu from scratch.

  ajax('/config/', {}, {
    type: 'GET',
    dataType: 'json',
    success: function(data) {
      chrome.contextMenus.removeAll( function() {
        parent_menu = null;
        refresh_menuitem = null;
        actions = [];
        setup_context_menu(data);
      });
    }
  });
}

function setup_context_menu(config)
{
  // Create the parent menu item.

  parent_menu = chrome.contextMenus.create({
    title: extension_name,
    contexts: ['link']
  });

  // Create the shell commands.

  if (config != null)
  {
    $.each( config.actions, function(i,action) {
      var child_menu = chrome.contextMenus.create({
        title: action.title,
        onclick: context_onclick,
        parentId: parent_menu,
        contexts: ['link']
      });
      actions[child_menu] = action;
    });
  }
}

function context_onclick( info, tab )
{
  var action = actions[ info.menuItemId ];
  var data = { action: action.name };
  $.each( info, function(k,v) { data["info."+k] = v; } );
  $.each( tab, function(k,v) { data["tab."+k] = v; } );
  ajax('/action/', data, { type:'POST' });
}

function ajax( uri, data, opts )
{
  if (uri == null)
    uri = '/';
  if (opts == null)
    opts = {};

  var defaults = {
    type: 'GET',
    url: base_url+uri,
    data: data,
    dataType: 'html',
    success: function(data) {
      logger("ajax success");
    },
    error: function(xhr,textStatus) {
      logger("ajax error:",xhr);
    }
  };

  $.ajax($.extend({},defaults,opts));
}

})(jQuery);


text: output = [$.rethinkdb, 'connect', $.options]


text:
namespace IPC {
class MessageRouter;
}

namespace content {

// Implementation of the WebSharedWorker APIs. This object is intended to only
// live long enough to allow the caller to send a "connect" event to the worker
// thread. Once the connect event has been sent, all future communication will
// happen via the WebMessagePortChannel, and the WebSharedWorker instance will
// be freed.
class WebSharedWorkerProxy : public blink::WebSharedWorkerConnector,
                             private IPC::Listener {
 public:
  // If the worker not loaded yet, route_id == MSG_ROUTING_NONE
  WebSharedWorkerProxy(IPC::MessageRouter* router, int route_id);
  ~WebSharedWorkerProxy() override;

  // Implementations of WebSharedWorkerConnector APIs
  void connect(blink::WebMessagePortChannel* channel,
               ConnectListener* listener) override;

 private:
  // IPC::Listener implementation.
  bool OnMessageReceived(const IPC::Message& message) override;

  // Disconnects the worker (stops listening for incoming messages).
  void Disconnect();

  // Sends a message to the worker thread (forwarded via the RenderViewHost).
  // If WorkerStarted() has not yet been called, message is queued.
  bool Send(IPC::Message*);

  // Returns true if there are queued messages.
  bool HasQueuedMessages() { return !queued_messages_.empty(); }

  // Sends any messages currently in the queue.
  void SendQueuedMessages();

  void OnWorkerCreated();
  void OnWorkerScriptLoadFailed();
  void OnWorkerConnected();

  // Routing id associated with this worker - used to receive messages from the
  // worker, and also to route messages to the worker (WorkerService contains
  // a map that maps between these renderer-side route IDs and worker-side
  // routing ids).
  int route_id_;

  IPC::MessageRouter* const router_;

  // Stores messages that were sent before the StartWorkerContext message.
  std::vector<IPC::Message*> queued_messages_;

  ConnectListener* connect_listener_;
  bool created_;

  DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerProxy);
};

}  // namespace content

#endif  // CONTENT_RENDERER_WEBSHAREDWORKER_PROXY_H_


text:
/**
 *
 * Switch the state (enabled/disabled) of airplane mode.
 *
 * <example>
    :toggleAirplaneMode.js
    browser.toggleAirplaneMode()
 * </example>
 *
 * @type mobile
 * @for android
 *
 */

export default function toggleAirplaneMode () {
    return this.requestHandler.create({
        path: '/session/:sessionId/appium/device/toggle_airplane_mode',
        method: 'POST'
    })
}