text:
'use strict';

var forms = require('../lib/forms');
var test = require('tape');

var testWrap = function (tag) {
    test(tag, function (t) {
        var f = forms.create({ fieldname: forms.fields.string() });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field">' +
                'Fieldname' +
                '<input type="text" name="fieldname" id="id_fieldname" />' +
            '</' + tag + '>'
        );
        t.end();
    });

    test(tag + ' required', function (t) {
        var f = forms.create({
            fieldname: forms.fields.string({ required: true })
        });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field required">' +
                'Fieldname' +
                '<input type="text" name="fieldname" id="id_fieldname" />' +
            '</' + tag + '>'
        );
        t.end();
    });

    test(tag + ' bound', function (t) {
        t.plan(1);
        var form = forms.create({ name: forms.fields.string() });
        form.bind({ name: 'val' }).validate(function (err, f) {
            t.equal(
                f.toHTML(forms.render[tag]),
                '<' + tag + ' class="field">' +
                    'Name' +
                    '<input type="text" name="name" id="id_name" value="val" />' +
                '</' + tag + '>'
            );
            t.end();
        });
    });

    test(tag + ' bound error', function (t) {
        t.plan(4);
        var formObject = forms.create({
            field_name: forms.fields.string({
                validators: [function (form, field, callback) {
                    callback('validation error');
                }]
            }),
            field_name_error_after: forms.fields.string({
                errorAfterField: true,
                validators: [function (form, field, callback) {
                    callback('validation error after field');
                }]
            })
        });
        formObject.bind({ field_name: 'val', field_name_error_after: 'foo' }).validate(function (err, f) {
            t.equal(
                f.toHTML(forms.render[tag]),
                '<' + tag + ' class="field error">' +
                    '
validation error
' +
                    'Field name' +
                    '<input type="text" name="field_name" id="id_field_name" value="val" />' +
                '</' + tag + '>' +
                '<' + tag + ' class="field error">' +
                    'Field name error after' +
                    '<input type="text" name="field_name_error_after" id="id_field_name_error_after" value="foo" />' +
                    '
validation error after field
' +
                '</' + tag + '>'
            );
        });

        // Error rendering disabled
        var f2 = forms.create({
            field_name: forms.fields.string({
                hideError: true,
                validators: [function (form, field, callback) {
                    callback('validation error');
                }]
            }),
            field_name_error_after: forms.fields.string({
                hideError: true,
                errorAfterField: true,
                validators: [function (form, field, callback) {
                    callback('validation error after field');
                }]
            })
        });
        f2.bind({ field_name: 'val', field_name_error_after: 'foo' }).validate(function (err, f) {
            t.equal(
                f.toHTML(forms.render[tag]),
                '<' + tag + ' class="field error">' +
                    'Field name' +
                    '<input type="text" name="field_name" id="id_field_name" value="val" />' +
                '</' + tag + '>' +
                '<' + tag + ' class="field error">' +
                    'Field name error after' +
                    '<input type="text" name="field_name_error_after" id="id_field_name_error_after" value="foo" />' +
                '</' + tag + '>'
            );

            t.equal(f.fields.field_name.errorHTML(),
                '
validation error
'
            );

            t.equal(f.fields.field_name_error_after.errorHTML(),
                '
validation error after field
'
            );
        });

        t.end();
    });

    test(tag + ' multipleCheckbox', function (t) {
        var f = forms.create({
            fieldname: forms.fields.string({
                choices: { one: 'item one' },
                widget: forms.widgets.multipleCheckbox(),
                legendClasses: ['test1', 'test2'],
                fieldsetClasses: ['test3', 'test4']
            })
        });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field">' +
                '<fieldset class="test3 test4">' +
                    '<legend class="test1 test2">Fieldname</legend>' +
                    '<input type="checkbox" name="fieldname" id="id_fieldname_one" value="one" />' +
                    'item one' +
                '</fieldset>' +
            '</' + tag + '>'
        );
        t.end();
    });

    test(tag + ' multipleRadio', function (t) {
        var f = forms.create({
            fieldname: forms.fields.string({
                choices: { one: 'item one' },
                widget: forms.widgets.multipleRadio(),
                legendClasses: ['test1', 'test2'],
                fieldsetClasses: ['test3', 'test4']
            })
        });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field">' +
                '<fieldset class="test3 test4">' +
                    '<legend class="test1 test2">Fieldname</legend>' +
                    '<input type="radio" name="fieldname" id="id_fieldname_one" value="one" />' +
                    'item one' +
                '</fieldset>' +
            '</' + tag + '>'
        );
        t.end();
    });

    test(tag + ' label custom id', function (t) {
        var f = forms.create({
            fieldname: forms.fields.string({
                id: 'custom-id'
            })
        });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field">' +
                'Fieldname' +
                '<input type="text" name="fieldname" id="custom-id" />' +
            '</' + tag + '>'
        );
        t.end();
    });

    test(tag + ' label no id', function (t) {
        var f = forms.create({
            fieldname: forms.fields.string({
                id: false
            })
        });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field">' +
                'Fieldname' +
                '<input type="text" name="fieldname" />' +
            '</' + tag + '>'
        );
        t.end();
    });

    test(tag + ' hidden label', function (t) {
        var f = forms.create({
            fieldname: forms.fields.string({
                widget: forms.widgets.hidden()
            })
        });
        t.equal(
            f.toHTML(forms.render[tag]),
            '<' + tag + ' class="field">' +
                '<input type="hidden" name="fieldname" id="id_fieldname" />' +
            '</' + tag + '>'
        );
        t.end();
    });
};

testWrap('div');
testWrap('p');
testWrap('li');

test('table', function (t) {
    var f = forms.create({ fieldname: forms.fields.string() });
    t.equal(
        f.toHTML(forms.render.table),
        '
' +
            'Fieldname	' +
            '' +
                '<input type="text" name="fieldname" id="id_fieldname" />' +
            '	' +
        '
'
    );
    t.end();
});

test('table required', function (t) {
    var f = forms.create({
        fieldname: forms.fields.string({ required: true })
    });
    t.equal(
        f.toHTML(forms.render.table),
        '
' +
            'Fieldname	' +
            '' +
                '<input type="text" name="fieldname" id="id_fieldname" />' +
            '	' +
        '
'
    );
    t.end();
});

test('table bound', function (t) {
    t.plan(1);
    var form = forms.create({ name: forms.fields.string() });
    form.bind({ name: 'val' }).validate(function (err, f) {
        t.equal(
            f.toHTML(forms.render.table),
            '
' +
                'Name	' +
                '' +
                    '<input type="text" name="name" id="id_name" value="val" />' +
                '	' +
            '
'
        );
        t.end();
    });
});

test('table bound error', function (t) {
    t.plan(4);
    var formObject = forms.create({
        field_name: forms.fields.string({
            validators: [function (form, field, callback) {
                callback('validation error');
            }]
        }),
        field_name_error_after: forms.fields.string({
            errorAfterField: true,
            validators: [function (form, field, callback) {
                callback('validation error after field');
            }]
        })
    });
    formObject.bind({ field_name: 'val', field_name_error_after: 'foo' }).validate(function (err, f) {
        t.equal(
            f.toHTML(forms.render.table),
            '
' +
                'Field name	' +
                '' +
                    '
validation error
' +
                    '<input type="text" name="field_name" id="id_field_name" value="val" />' +
                '	' +
            '
' +
            '
' +
                'Field name error after	' +
                '' +
                    '<input type="text" name="field_name_error_after" id="id_field_name_error_after" value="foo" />' +
                    '
validation error after field
' +
                '	' +
            '
'
        );
    });

    // Error rendering disabled
    var f2 = forms.create({
        field_name: forms.fields.string({
            hideError: true,
            validators: [function (form, field, callback) {
                callback('validation error');
            }]
        }),
        field_name_error_after: forms.fields.string({
            errorAfterField: true,
            hideError: true,
            validators: [function (form, field, callback) {
                callback('validation error after field');
            }]
        })
    });
    f2.bind({ field_name: 'val', field_name_error_after: 'foo' }).validate(function (err, f) {
        t.equal(
            f.toHTML(forms.render.table),
            '
' +
                'Field name	' +
                '' +
                    '<input type="text" name="field_name" id="id_field_name" value="val" />' +
                '	' +
            '
' +
            '
' +
                'Field name error after	' +
                '' +
                    '<input type="text" name="field_name_error_after" id="id_field_name_error_after" value="foo" />' +
                '	' +
            '
'
        );

        t.equal(f.fields.field_name.errorHTML(),
            '
validation error
'
        );
        t.equal(f.fields.field_name_error_after.errorHTML(),
            '
validation error after field
'
        );
    });

    t.end();
});


text:
require 'workling/remote/invokers/base'

#
#  A basic polling invoker.
#
module Workling
  module Remote
    module Invokers
      class WorklingRabbitMQSubscriber < Workling::Remote::Invokers::Base
        cattr_accessor :sleep_time
        #
        #  set up client, sleep time
        #
        def initialize(routing, client_class)
          super
          WorklingRabbitMQSubscriber.sleep_time = Workling.config[:sleep_time] || 0.2
        end

        #
        #  Starts main Invoker Loop. The invoker runs until stop() is called.
        #
        def listen
          connect do
            routes.each do |queue|
              @client.subscribe(queue) do |args|
                run(queue, args)
              end
            end
          end
          while (!Thread.current[:shutdown]) do
            sleep(self.class.sleep_time)
          end
        end

        #
        #  Gracefully stops the Invoker. The currently executing Jobs should be allowed
        #  to finish.
        #
        def stop
          Thread.current[:shutdown] = true
        end
      end
    end
  end
end
Workling::Remote.invoker = Workling::Remote::Invokers::WorklingRabbitMQSubscriber

redpajama_set_name: RedPajamaGithub


text:
#include "py/mpstate.h"
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/stackctrl.h"

void mp_stack_ctrl_init(void) {
    volatile int stack_dummy;
    MP_STATE_VM(stack_top) = (char*)&stack_dummy;
}

void mp_stack_set_top(void *top) {
    MP_STATE_VM(stack_top) = top;
}

mp_uint_t mp_stack_usage(void) {
    // Assumes descending stack
    volatile int stack_dummy;
    return MP_STATE_VM(stack_top) - (char*)&stack_dummy;
}

#if MICROPY_STACK_CHECK

void mp_stack_set_limit(mp_uint_t limit) {
    MP_STATE_VM(stack_limit) = limit;
}

void mp_exc_recursion_depth(void) {
    nlr_raise(mp_obj_new_exception_arg1(&mp_type_RuntimeError,
        MP_OBJ_NEW_QSTR(MP_QSTR_maximum_space_recursion_space_depth_space_exceeded)));
}

void mp_stack_check(void) {
    if (mp_stack_usage() >= MP_STATE_VM(stack_limit)) {
        mp_exc_recursion_depth();
    }
}

#endif // MICROPY_STACK_CHECK


text:
<?php

namespace PandaLove\Http\Requests;

use Illuminate\Support\Facades\Input;

class AddDestinyGamertagRequest extends Request
{
    protected $errorBag = 'destiny';

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        Input::merge(array_map('trim', Input::all()));

        return [
            'gamertag' => 'required|min:3|destiny-tag-exists',
        ];
    }
}


text:
package com.haxademic.demo.data;

import com.haxademic.core.app.P;
import com.haxademic.core.app.PAppletHax;
import com.haxademic.core.data.patterns.ISequencerPattern;
import com.haxademic.core.data.patterns.PatternInterval;
import com.haxademic.core.data.patterns.PatternNoise;
import com.haxademic.core.data.patterns.PatternRandom;
import com.haxademic.core.data.patterns.PatternSine;
import com.haxademic.core.data.patterns.PatternTechno;

public class Demo_PatternTester
extends PAppletHax {
	public static void main(String args[]) { arguments = args; PAppletHax.main(Thread.currentThread().getStackTrace()[1].getClassName()); }

	protected boolean[][] steps;
	protected ISequencerPattern[] patterns;
	protected String[] patternNames;
	protected int NUM_STEPS = 16;

	protected void firstFrame() {
		// build pattern generators
		patterns = new ISequencerPattern[] {
			new PatternNoise(),
			new PatternSine(),
			new PatternInterval(),
			new PatternRandom(0.5f, 4),
			new PatternRandom(0.3f, 1),
			new PatternTechno(),
		};

		// build pattern display names
		patternNames = new String[] {
			"PatternNoise",
			"PatternSine",
			"PatternInterval",
			"PatternRandom(0.5f, 4)",
			"PatternRandom(0.3f, 1)",
			"PatternTechno",
		};

		// build steps
		steps = new boolean[patterns.length][];
		for (int i = 0; i < steps.length; i++) {
			steps[i] = new boolean[NUM_STEPS];
			for (int j = 0; j < steps[i].length; j++) {
				steps[i][j] = false;
			}
		}
	}

	protected void applyPatterns() {
		for (int i = 0; i < patterns.length; i++) {
			patterns[i].newPattern(steps[i]);
		}
	}

	protected void drawApp() {
		background(0);

		// apply pattern generators
		if(p.frameCount % 100 == 10) applyPatterns();
		//		patterns[0].newPattern(steps[0]);
		//		patterns[1].newPattern(steps[1]);
		//		patterns[2].newPattern(steps[2]);

		// show values
		int stepSize = p.width / NUM_STEPS;
		for (int i = 0; i < patterns.length; i++) {
			int rowY = i * 100;
			int rowCellY = rowY + 20;
			int rowX = 0;
			p.stroke(255);

			// text
			p.fill(255);
			p.text(patternNames[i], rowX, rowY, p.width, 40);

			// draw grid
			for (int j = 0; j < steps[i].length; j++) {
				if(steps[i][j] == true) {
					p.fill(30,200,200);
				} else {
					p.fill(50);
				}
				p.rect(rowX, rowCellY, stepSize, stepSize);
				rowX += stepSize;
			}

			// draw source value
			p.fill(255, 127);
			p.noStroke();
			for (int j = 0; j < p.width; j += 1) {
				float sourceVal = patterns[i].valueForStep(P.map(j, 0, p.width, 0, NUM_STEPS), NUM_STEPS);
				p.rect(j - 1, rowCellY + stepSize - (stepSize * sourceVal) - 1, 2, 2);
			}
		}

	}
}


text:
function AddManager(data) {
    if (data != '' & data != null) {
        jQuery('input[id$="ManagerAction"]').val("add");
        jQuery('input[id$="ManagerData"]').val(data);
        jQuery('form:first').submit();
    }
}

function DeleteManager(data) {
    if (confirm("Are you sure that you want to delete this item?")) {
        jQuery('input[id$="ManagerAction"]').val("delete");
        jQuery('input[id$="ManagerData"]').val(data);
        jQuery('form:first').submit();
    }
}

function DeleteSelectedSPObjecManager($selector) {
    if (confirm("Are you sure that you want to delete all selected items?")) {
        var itemsCollection = '';
        $selector.find('.scrollable-content').find('.check-item').each(function () {
            if (this.checked) {
                itemId = jQuery(this).attr('itemid');
                itemsCollection += itemId + '&';
            }
        });
        jQuery('input[id$="ManagerAction"]').val("delete");
        jQuery('input[id$="ManagerData"]').val(itemsCollection);
        jQuery('form:first').submit();
    }
}


text:
OnioNS is a distributed, privacy-enhanced, metadata-free, and highly usable DNS for Tor hidden services. OnioNS allows hidden service operators to select a meaningful and globally-unique domain name for their service, which users can then reference from the Tor Browser. The system is powered by the Tor network, relies on a distributed database, and provides anonymity to both operators and users. This project aims to address the major usability issue that has been with Tor hidden services since their introduction in 2002.

### Repository Details [![Build Status](https://travis-ci.org/Jesse-V/OnioNS-common.svg?branch=master)](https://travis-ci.org/Jesse-V/OnioNS-common)

This repository provides the common shared library for the other OnioNS packages, -HS, -server, and -client.

This repository is a much older version of the software. The work continues on the json-rpc branch on all four repositories. The json-rpc branch contains a major but experimental network protocol that uses JSON-RPC-CPP as the underlying transport. That branch also contains the latest design specifications, as described in OnioNS-literature.

I will ask for volunteers when the software is ready to go. In the meantime, please feel to examine my latest commits for any security issues or other concerns.

Yes, I know the network is down. It's currently private because the code is moving around. Once the dust settles, the nodes will come back online.

### Supported Systems

#### Linux

**Debian 7 and 8, Ubuntu 14.04 - 15.10, Mint 17 - 17.2, Fedora 21 - 23**

i386, amd64, and armhf architectures are supported, so it should run on 32-bit, 64-bit, and ARM machines. I'm also supporting ARM boards such as the Pi, BBB, Odroid, etc.

#### Windows

Not currently supported. I have long-term plans of porting this repository and OnioNS-client to Windows, but no intentions to port the other packages to Windows.

#### OS-X and *BSD

Not currently supported, support planned in the far future. I am willing to provide upstream support to anyone who wishes to port the software over there. I have not attempted to compile this code on any BSD system. My current primary focus is developing the Linux edition.

### Installation

Please do not install the software from this branch as it is likely obsolete and will not be supported. See the json-rpc branch instead.


text:
MONGODB_ADMIN_USER=${MONGODB_ADMIN_USER:-"admin"}
MONGODB_ADMIN_PASS=${MONGODB_ADMIN_PASS:-"4dmInP4ssw0rd"}

MONGODB_APPLICATION_DATABASE=${MONGODB_APPLICATION_DATABASE:-"admin"}
MONGODB_APPLICATION_USER=${MONGODB_APPLICATION_USER:-"restapiuser"}
MONGODB_APPLICATION_PASS=${MONGODB_APPLICATION_PASS:-"r3sT4pIp4ssw0rd"}

RET=1
while [[ RET -ne 0 ]]; do
    echo "=> Waiting for confirmation of MongoDB service startup..."
    sleep 5
    mongo admin --eval "help" >/dev/null 2>&1
    RET=$?
done

echo "=> Creating admin user with a password in MongoDB"
mongo admin --eval "db.createUser({user: '$MONGODB_ADMIN_USER', pwd: '$MONGODB_ADMIN_PASS', roles:[{role:'root',db:'admin'}]});"

sleep 3

if [ "$MONGODB_APPLICATION_DATABASE" != "admin" ]; then
    echo "=> Creating an ${MONGODB_APPLICATION_DATABASE} user with a password in MongoDB"
    mongo admin -u $MONGODB_ADMIN_USER -p $MONGODB_ADMIN_PASS << EOF
use $MONGODB_APPLICATION_DATABASE
db.createUser({user: '$MONGODB_APPLICATION_USER', pwd: '$MONGODB_APPLICATION_PASS', roles:[{role:'dbOwner', db:'$MONGODB_APPLICATION_DATABASE'}]})
EOF
fi

sleep 1

echo "=> Done!"
touch /data/db/.mongodb_password_set

echo "========================================================================"
echo "You can now connect to the admin MongoDB server using:"
echo ""
echo "    mongo admin -u $MONGODB_ADMIN_USER -p $MONGODB_ADMIN_PASS --host <host> --port <port>"
echo ""
echo "Please remember to change the admin password as soon as possible!"
echo "========================================================================"


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('lexicon', '306_0133_and_others_to_et_al'),
    ]

    operations = [
        migrations.AddField(
            model_name='language',
            name='exampleLanguage',
            field=models.BooleanField(default=0),
        ),
    ]


text:
// Copyright (c) 2017, Baidu.com, Inc. All Rights Reserved

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

package com.baidu.palo.catalog;

import com.baidu.palo.catalog.Replica.ReplicaState;
import com.baidu.palo.common.io.Writable;

import com.google.common.collect.Sets;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

/**
 * This class represents the olap tablet related metadata.
 */
public class Tablet extends MetaObject implements Writable {
    private static final Logger LOG = LogManager.getLogger(Tablet.class);

    private long id;
    private List<Replica> replicas;

    private long checkedVersion;
    private long checkedVersionHash;

    private boolean isConsistent;

    public Tablet() {
        this(0L, new ArrayList<Replica>());
    }

    public Tablet(long tabletId) {
        this(tabletId, new ArrayList<Replica>());
    }

    public Tablet(long tabletId, List<Replica> replicas) {
        this.id = tabletId;
        this.replicas = replicas;
        if (this.replicas == null) {
            this.replicas = new ArrayList<Replica>();
        }

        checkedVersion = -1L;
        checkedVersionHash = -1L;

        isConsistent = true;
    }

    public long getId() {
        return this.id;
    }

    public long getCheckedVersion() {
        return this.checkedVersion;
    }

    public long getCheckedVersionHash() {
        return this.checkedVersionHash;
    }

    public void setCheckedVersion(long checkedVersion, long checkedVersionHash) {
        this.checkedVersion = checkedVersion;
        this.checkedVersionHash = checkedVersionHash;
    }

    public void setIsConsistent(boolean good) {
        this.isConsistent = good;
    }

    public boolean isConsistent() {
        return isConsistent;
    }

    private boolean deleteRedundantReplica(long backendId, long version) {
        boolean delete = false;
        boolean hasBackend = false;
        Iterator<Replica> iterator = replicas.iterator();
        while (iterator.hasNext()) {
            Replica replica = iterator.next();
            if (replica.getBackendId() == backendId) {
                hasBackend = true;
                if (replica.getVersion() <= version) {
                    iterator.remove();
                    delete = true;
                }
            }
        }

        return delete || !hasBackend;
    }

    public void addReplica(Replica replica) {
        if (deleteRedundantReplica(replica.getBackendId(), replica.getVersion())) {
            replicas.add(replica);
            Catalog.getCurrentInvertedIndex().addReplica(id, replica);
        }
    }

    public List<Replica> getReplicas() {
        return this.replicas;
    }

    public Set<Long> getBackendIds() {
        Set<Long> beIds = Sets.newHashSet();
        for (Replica replica : replicas) {
            beIds.add(replica.getBackendId());
        }
        return beIds;
    }

    // for query
    public List<Replica> getQueryableReplicas(long committedVersion, long committedVersionHash) {
        List<Replica> queryableReplicas = new LinkedList<Replica>();
        for (Replica replica : replicas) {
            ReplicaState state = replica.getState();
            if (state == ReplicaState.NORMAL || state == ReplicaState.SCHEMA_CHANGE) {
                if (replica.getVersion() > committedVersion
                        || (replica.getVersion() == committedVersion
                        && replica.getVersionHash() == committedVersionHash)) {
                    queryableReplicas.add(replica);
                }
            }
        }
        return queryableReplicas;
    }

    public Replica getReplicaById(long replicaId) {
        for (Replica replica : replicas) {
            if (replica.getId() == replicaId) {
                return replica;
            }
        }
        return null;
    }

    public Replica getReplicaByBackendId(long backendId) {
        for (Replica replica : replicas) {
            if (replica.getBackendId() == backendId) {
                return replica;
            }
        }
        return null;
    }

    public boolean deleteReplica(Replica replica) {
        if (replicas.contains(replica)) {
            replicas.remove(replica);
            Catalog.getCurrentInvertedIndex().deleteReplica(id, replica.getBackendId());
            return true;
        }
        return false;
    }

    public boolean deleteReplicaByBackendId(long backendId) {
        Iterator<Replica> iterator = replicas.iterator();
        while (iterator.hasNext()) {
            Replica replica = iterator.next();
            if (replica.getBackendId() == backendId) {
                iterator.remove();
                Catalog.getCurrentInvertedIndex().deleteReplica(id, backendId);
                return true;
            }
        }
        return false;
    }

    @Deprecated
    public Replica deleteReplicaById(long replicaId) {
        Iterator<Replica> iterator = replicas.iterator();
        while (iterator.hasNext()) {
            Replica replica = iterator.next();
            if (replica.getId() == replicaId) {
                LOG.info("delete replica[" + replica.getId() + "]");
                iterator.remove();
                return replica;
            }
        }
        return null;
    }

    // for test only
    public void clearReplica() {
        this.replicas.clear();
    }

    public void setTabletId(long tabletId) {
        this.id = tabletId;
    }

    public static void sortReplicaByVersionDesc(List<Replica> replicas) {
        // sort replicas by version. higher version in the tops
        Collections.sort(replicas, Replica.VERSION_DESC_COMPARATOR);
    }

    public String toString() {
        return "tabletId=" + this.id;
    }

    public void write(DataOutput out) throws IOException {
        super.write(out);

        out.writeLong(id);
        int replicaCount = replicas.size();
        out.writeInt(replicaCount);
        for (int i = 0; i < replicaCount; ++i) {
            replicas.get(i).write(out);
        }

        out.writeLong(checkedVersion);
        out.writeLong(checkedVersionHash);
        out.writeBoolean(isConsistent);
    }

    public void readFields(DataInput in) throws IOException {
        super.readFields(in);

        id = in.readLong();
        int replicaCount = in.readInt();
        for (int i = 0; i < replicaCount; ++i) {
            Replica replica = Replica.read(in);
            if (deleteRedundantReplica(replica.getBackendId(), replica.getVersion())) {
                replicas.add(replica);
            }
        }

        if (Catalog.getCurrentCatalogJournalVersion() >= 6) {
            checkedVersion = in.readLong();
            checkedVersionHash = in.readLong();
            isConsistent = in.readBoolean();
        }
    }

    public static Tablet read(DataInput in) throws IOException {
        Tablet tablet = new Tablet();
        tablet.readFields(in);
        return tablet;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Tablet)) {
            return false;
        }

        Tablet tablet = (Tablet) obj;

        if (replicas != tablet.replicas) {
            if (replicas.size() != tablet.replicas.size()) {
                return false;
            }
            int size = replicas.size();
            for (int i = 0; i < size; i++) {
                if (!tablet.replicas.contains(replicas.get(i))) {
                    return false;
                }
            }
        }
        return id == tablet.id;
    }
}


text:
#ifndef _OgreMetalMultiRenderTarget_H_
#define _OgreMetalMultiRenderTarget_H_

#include "OgreMetalPrerequisites.h"
#include "OgreRenderTexture.h"

#include "OgreMetalRenderTargetCommon.h"

namespace Ogre
{
    class _OgreMetalExport MetalMultiRenderTarget : public MultiRenderTarget
    {
        MetalRenderTargetCommon *mMetalRenderTargetCommon[OGRE_MAX_MULTIPLE_RENDER_TARGETS];
        uint8                   mNumMRTs;

    public:
        MetalMultiRenderTarget( const String &name );
        virtual ~MetalMultiRenderTarget();

        // MultiRenderTarget overloads.
        virtual void bindSurfaceImpl( size_t attachment, RenderTexture *target );
        virtual void unbindSurfaceImpl( size_t attachment );

        // RenderTarget overloads.
        virtual bool requiresTextureFlipping() const { return false; }
        virtual void getCustomAttribute( const String& name, void *pData );
    };
}

#endif


text:
For each integration test you need to define the following pytest fixtures.
They **must** all be *session* scoped.

* `web3`
* `empty_block`
* `block_with_txn`
* `math_contract`
* `unlocked_account`
* `funded_account_for_raw_txn`
* `math_contract_deploy_txn_hash`
* `mined_txn_hash`
* `emitter_contract`
* `block_with_txn_with_log`
* `txn_hash_with_log`

* `unlockable_account`
* `unlockable_account_pw`

The details for these fixtures are as follows.

### Fixture Details

#### `web3`

A Web3 instance configured to connect to the backend for the integration test.

#### `empty_block`

A block as returned by `web3.eth.getBlock` that has no transactions.

#### `block_with_txn`

A block as returned by `web3.eth.getBlock` that has a single transaction.

#### `math_contract`

An deployed Contract instance of the *Math* contract found in
`web3.utils.module_testing.math_contract`.

#### `unlocked_account`

The address of an account which is *unlocked*.

#### `funded_account_for_raw_txn`

An account which has not sent any transactions (nonce of 0) which has enough
ether for sending a single transaction.

#### `math_contract_deploy_txn_hash`

The transaction hash used to deploy the `math_contract`.

#### `mined_txn_hash`

The transaction hash of a transaction which has been mined.

#### `emitter_contract`

An deployed Contract instance of the *Emitter* contract found in
`web3.utils.module_testing.emitter_contract`.

#### `block_with_txn_with_log`

A block with a transaction with a single log entry.

#### `txn_hash_with_log`

The hash of a transaction which fires a single log entry.

#### `unlockable_account`

The address of an account that can be unlocked using the `unlockable_account_pw`

#### `unlockable_account_pw`

The password that can be used to unlock the `unlockable_account`


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model.character.spellcaster;

/**
 *
 * @author Dr.Chase
 */
public class Totem {
    String name;
    String description;
    String environment;
    String advantages;
    String disadvantages;
    TotemTypeEnum type;
}


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

namespace Microsoft.Azure.Storage.Queue
{
    using Microsoft.Azure.Storage.Core;
    using Microsoft.Azure.Storage.Core.Util;
    using Microsoft.Azure.Storage.Shared.Protocol;
    using System;
    using System.Diagnostics.CodeAnalysis;
    using System.Globalization;
    using System.Threading.Tasks;
    using System.Xml;
    using System.Xml.Schema;
    using System.Xml.Serialization;

    /// <summary>
    /// Represents a continuation token returned by the Queue service.
    /// </summary>
#if WINDOWS_DESKTOP && !WINDOWS_PHONE
    [Serializable]

    // If an XmlSerializer is used rather than directly calling ReadXml() or WriteXml(), it will write this as the root token when serializing,
    // and assume to see this as the root token when deserializing
    [XmlRoot(Constants.ContinuationConstants.ContinuationTopElement, IsNullable = false)]
#endif
    [SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1001:CommasMustBeSpacedCorrectly", Justification = "Reviewed.")]
    public sealed class QueueContinuationToken : IContinuationToken
    {
        private string version = Constants.ContinuationConstants.CurrentVersion;
        private string type = Constants.ContinuationConstants.QueueType;

        /// <summary>
        /// Gets or sets the version for continuing results for CloudQueue enumeration operations.
        /// </summary>
        /// <value>The version.</value>
        private string Version
        {
            get
            {
                return this.version;
            }

            set
            {
                this.version = value;
                if (this.version != Constants.ContinuationConstants.CurrentVersion)
                {
                    throw new XmlException(string.Format(CultureInfo.InvariantCulture, SR.UnexpectedElement, this.version));
                }
            }
        }

        /// <summary>
        /// Gets or sets the type element (blob, queue, table, file) for continuing results for CloudQueue enumeration operations.
        /// </summary>
        /// <value>The type element.</value>
        private string Type
        {
            get
            {
                return this.type;
            }

            set
            {
                this.type = value;
                if (this.type != Constants.ContinuationConstants.QueueType)
                {
                    throw new XmlException(SR.UnexpectedContinuationType);
                }
            }
        }

        /// <summary>
        /// Gets or sets the next marker for continuing results for <see cref="CloudQueue"/> enumeration operations.
        /// </summary>
        /// <value>A string containing the NextMarker value.</value>
        public string NextMarker { get; set; }

        /// <summary>
        /// Gets or sets the storage location that the continuation token applies to.
        /// </summary>
        /// <value>A <see cref="StorageLocation"/> enumeration value.</value>
        public StorageLocation? TargetLocation { get; set; }

#if WINDOWS_DESKTOP
        /// <summary>
        /// Gets an XML representation of an object.
        /// </summary>
        /// <returns>
        /// An <see cref="T:System.Xml.Schema.XmlSchema"/> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"/> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"/> method.
        /// </returns>
        public XmlSchema GetSchema()
        {
            return null;
        }

        /// <summary>
        /// Generates a serializable continuation token from its XML representation.
        /// </summary>
        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"/> stream from which the continuation token is deserialized.</param>
        public async Task ReadXmlAsync(XmlReader reader)
        {
            CommonUtility.AssertNotNull("reader", reader);

            // Read the xml root node
            await reader.MoveToContentAsync().ConfigureAwait(false);
            await reader.ReadStartElementAsync().ConfigureAwait(false);

            // Read the additional xml node that will be present if an XmlSerializer was used to serialize this token
            await reader.MoveToContentAsync().ConfigureAwait(false);
            if (reader.Name == Constants.ContinuationConstants.ContinuationTopElement)
            {
                await reader.ReadStartElementAsync().ConfigureAwait(false);
            }

            // Read the ContinuationToken content
            while (await reader.IsStartElementAsync().ConfigureAwait(false))
            {
                switch (reader.Name)
                {
                    case Constants.ContinuationConstants.VersionElement:
                        this.Version = await reader.ReadElementContentAsStringAsync().ConfigureAwait(false);
                        break;

                    case Constants.ContinuationConstants.NextMarkerElement:
                        this.NextMarker = await reader.ReadElementContentAsStringAsync().ConfigureAwait(false);
                        break;

                    case Constants.ContinuationConstants.TargetLocationElement:
                        string targetLocation = await reader.ReadElementContentAsStringAsync().ConfigureAwait(false);
                        StorageLocation location;
                        if (Enum.TryParse(targetLocation, out location))
                        {
                            this.TargetLocation = location;
                        }
                        else if (!string.IsNullOrEmpty(targetLocation))
                        {
                            throw new XmlException(string.Format(CultureInfo.InvariantCulture, SR.UnexpectedLocation, targetLocation));
                        }

                        break;

                    case Constants.ContinuationConstants.TypeElement:
                        this.Type = await reader.ReadElementContentAsStringAsync().ConfigureAwait(false);
                        break;

                    default:
                        throw new XmlException(string.Format(CultureInfo.InvariantCulture, SR.UnexpectedElement, reader.Name));
                }
            }
        }

        /// <summary>
        /// Converts a serializable continuation token into its XML representation.
        /// </summary>
        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"/> stream to which the continuation token is serialized.</param>
        public void WriteXml(XmlWriter writer)
        {
            CommonUtility.AssertNotNull("writer", writer);

            writer.WriteStartElement(Constants.ContinuationConstants.ContinuationTopElement);

            writer.WriteElementString(Constants.ContinuationConstants.VersionElement, this.Version);

            writer.WriteElementString(Constants.ContinuationConstants.TypeElement, this.Type);

            if (this.NextMarker != null)
            {
                writer.WriteElementString(Constants.ContinuationConstants.NextMarkerElement, this.NextMarker);
            }

            writer.WriteElementString(Constants.ContinuationConstants.TargetLocationElement, this.TargetLocation.ToString());

            writer.WriteEndElement(); // End ContinuationToken
        }
#endif
    }
}


text:
namespace SAGE
{
	template<typename Ret, typename... Args> class Delegate
	{
		public:
			template<typename U> Delegate& Add(const U& p_Function)
			{
				m_Functions.push_back(std::function<Ret(Args...)>(p_Function));

				return *this;
			}

			template<typename U> Delegate& Remove(const U& p_Function)
			{
				m_Functions.erase(m_Functions.remove(m_Functions.begin(), m_Functions.end(), p_Function), m_Functions.end());

				return *this;
			}

			template<typename U> Delegate& RemoveAll()
			{
				m_Functions.clear();

				return *this;
			}

			std::vector<Ret> operator()(Args... p_Parameters)
			{
				std::vector<Ret> ret;
				for (auto func : m_Functions)
					m_Functions.push_back(func(p_Parameters...));

				return ret;
			}

		private:
			std::vector<std::function<Ret(Args...)>> m_Functions;
	};

	template<typename... Args> class Delegate<void, Args...>
	{
		public:
			template<typename U> Delegate& Add(const U& p_Function)
			{
				m_Functions.push_back(std::function<void(Args...)>(p_Function));

				return *this;
			}

			template<typename U> Delegate& Remove(const U& p_Function)
			{
				m_Functions.erase(m_Functions.remove(m_Functions.begin(), m_Functions.end(), p_Function), m_Functions.end());

				return *this;
			}

			template<typename U> Delegate& RemoveAll()
			{
				m_Functions.clear();

				return *this;
			}

			void operator()(Args... params)
			{
				for (auto func : m_Functions)
					func(params...);
			}

		private:
			std::vector<std::function<void(Args...)>> m_Functions;
	};
}

#endif


text:
<?php

/*
 * Following code will insert a offer into the database
 */

// array for JSON response
$response = array();

// check for required fields
if (isset($_POST['userid']) && isset($_POST['listingid']) && isset($_POST['offer_price']) && isset($_POST['offer_other']) && isset($_POST['comment']) &&
	!empty($_POST['userid']) && !empty($_POST['listingid']) && !empty($_POST['offer_price']) && !empty($_POST['offer_other']) && !empty($_POST['comment'])) {

	//Connect to database
	require_once('db_connect.php');
    $db = new DB_CONNECT();
    $data = $db->connect();

    //Get form information
    $userid = $_POST['userid'];
    $listingid = $_POST['listingid'];
    $offer_price = $_POST['offer_price'];
	$offer_other = $_POST['offer_other'];
	$comment = $_POST['comment'];
	$uid = $_POST['uid'];

    // mysql inserting a new row
    $result = mysqli_query($data,"INSERT INTO gs_offers(userid,listingid,offer_price,offer_other,accepted,comment,status,best_offer,review_submitted) VALUES('$userid', '$listingid', '$offer_price','$offer_other','NULL','$comment',0,0,0)");

    // check if row inserted or not
    if ($result) {
        // successfully inserted into database
        $response["success"] = 1;
        $response["message"] = "Offer successfully created";

        // echoing JSON response
        echo json_encode($response);
    } else {
        // failed to insert row
        $response["success"] = 0;
        $response["message"] = "Oops! An error occurred.";
		$response["query"] = "INSERT INTO gs_offers(userid,listingid,offer_price,offer_other,accepted,comment,status,best_offer,review_submitted) VALUES('$userid', '$listingid', '$offer_price','$offer_other','NULL','$comment',0,0,0)";

        // echoing JSON response
        echo json_encode($response);
    }
} else {
    // required field is missing
    $response["success"] = 0;
    $response["message"] = "Required field(s) is missing";

    // echoing JSON response
    echo json_encode($response);
}
?>


text:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input.Touch;
#endregion

namespace MahjongXNA
{
    /// <summary>
    /// The screen manager is a component which manages one or more GameScreen
    /// instances. It maintains a stack of screens, calls their Update and Draw
    /// methods at the appropriate times, and automatically routes input to the
    /// topmost active screen.
    /// </summary>
    public class ScreenManager : DrawableGameComponent
    {
        #region Fields

        List<GameScreen> screens = new List<GameScreen>();
        List<GameScreen> screensToUpdate = new List<GameScreen>();

        InputState input = new InputState();

        SpriteBatch spriteBatch;
        SpriteFont font;
        Texture2D blankTexture;

        bool isInitialized;

        bool traceEnabled;

        #endregion

        #region Properties

        /// <summary>
        /// A default SpriteBatch shared by all the screens. This saves
        /// each screen having to bother creating their own local instance.
        /// </summary>
        public SpriteBatch SpriteBatch
        {
            get { return spriteBatch; }
        }

        /// <summary>
        /// A default font shared by all the screens. This saves
        /// each screen having to bother loading their own local copy.
        /// </summary>
        public SpriteFont Font
        {
            get { return font; }
        }

        /// <summary>
        /// If true, the manager prints out a list of all the screens
        /// each time it is updated. This can be useful for making sure
        /// everything is being added and removed at the right times.
        /// </summary>
        public bool TraceEnabled
        {
            get { return traceEnabled; }
            set { traceEnabled = value; }
        }

        #endregion

        #region Initialization

        /// <summary>
        /// Constructs a new screen manager component.
        /// </summary>
        public ScreenManager(Game game)
            : base(game)
        {
            // we must set EnabledGestures before we can query for them, but
            // we don't assume the game wants to read them.
            TouchPanel.EnabledGestures = GestureType.None;
        }

        /// <summary>
        /// Initializes the screen manager component.
        /// </summary>
        public override void Initialize()
        {
            base.Initialize();

            isInitialized = true;
        }

        /// <summary>
        /// Load your graphics content.
        /// </summary>
        protected override void LoadContent()
        {
            // Load content belonging to the screen manager.
            ContentManager content = Game.Content;

            spriteBatch = new SpriteBatch(GraphicsDevice);
            font = content.Load<SpriteFont>("menufont");
            blankTexture = content.Load<Texture2D>("blank");

            // Tell each of the screens to load their content.
            foreach (GameScreen screen in screens)
            {
                screen.LoadContent();
            }
        }

        /// <summary>
        /// Unload your graphics content.
        /// </summary>
        protected override void UnloadContent()
        {
            // Tell each of the screens to unload their content.
            foreach (GameScreen screen in screens)
            {
                screen.UnloadContent();
            }
        }

        #endregion

        #region Update and Draw

        /// <summary>
        /// Allows each screen to run logic.
        /// </summary>
        public override void Update(GameTime gameTime)
        {
            // Read the keyboard and gamepad.
            input.Update();

            // Make a copy of the master screen list, to avoid confusion if
            // the process of updating one screen adds or removes others.
            screensToUpdate.Clear();

            foreach (GameScreen screen in screens)
                screensToUpdate.Add(screen);

            bool otherScreenHasFocus = !Game.IsActive;
            bool coveredByOtherScreen = false;

            // Loop as long as there are screens waiting to be updated.
            while (screensToUpdate.Count > 0)
            {
                // Pop the topmost screen off the waiting list.
                GameScreen screen = screensToUpdate[screensToUpdate.Count - 1];

                screensToUpdate.RemoveAt(screensToUpdate.Count - 1);

                // Update the screen.
                screen.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);

                if (screen.ScreenState == ScreenState.TransitionOn ||
                    screen.ScreenState == ScreenState.Active)
                {
                    // If this is the first active screen we came across,
                    // give it a chance to handle input.
                    if (!otherScreenHasFocus)
                    {
                        screen.HandleInput(input);

                        otherScreenHasFocus = true;
                    }

                    // If this is an active non-popup, inform any subsequent
                    // screens that they are covered by it.
                    if (!screen.IsPopup)
                        coveredByOtherScreen = true;
                }
            }

            // Print debug trace?
            if (traceEnabled)
                TraceScreens();
        }

        /// <summary>
        /// Prints a list of all the screens, for debugging.
        /// </summary>
        void TraceScreens()
        {
            List<string> screenNames = new List<string>();

            foreach (GameScreen screen in screens)
                screenNames.Add(screen.GetType().Name);

            Debug.WriteLine(string.Join(", ", screenNames.ToArray()));
        }

        /// <summary>
        /// Tells each screen to draw itself.
        /// </summary>
        public override void Draw(GameTime gameTime)
        {
            foreach (GameScreen screen in new List<GameScreen>(screens))
            {
                if (screen.ScreenState == ScreenState.Hidden)
                    continue;

                screen.Draw(gameTime);
            }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// Adds a new screen to the screen manager.
        /// </summary>
        public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer)
        {
            screen.ControllingPlayer = controllingPlayer;
            screen.ScreenManager = this;
            screen.IsExiting = false;

            // If we have a graphics device, tell the screen to load content.
            if (isInitialized)
            {
                screen.LoadContent();
            }

            screens.Add(screen);

            // update the TouchPanel to respond to gestures this screen is interested in
            TouchPanel.EnabledGestures = screen.EnabledGestures;
        }

        /// <summary>
        /// Removes a screen from the screen manager. You should normally
        /// use GameScreen.ExitScreen instead of calling this directly, so
        /// the screen can gradually transition off rather than just being
        /// instantly removed.
        /// </summary>
        public void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.
            if (isInitialized)
            {
                screen.UnloadContent();
            }

            screens.Remove(screen);
            screensToUpdate.Remove(screen);

            // if there is a screen still in the manager, update TouchPanel
            // to respond to gestures that screen is interested in.
            if (screens.Count > 0)
            {
                //TouchPanel.EnabledGestures = screens[screens.Count - 1].EnabledGestures;
            }
        }

        /// <summary>
        /// Expose an array holding all the screens. We return a copy rather
        /// than the real master list, because screens should only ever be added
        /// or removed using the AddScreen and RemoveScreen methods.
        /// </summary>
        public GameScreen[] GetScreens()
        {
            return screens.ToArray();
        }

        /// <summary>
        /// Helper draws a translucent black fullscreen sprite, used for fading
        /// screens in and out, and for darkening the background behind popups.
        /// </summary>
        public void FadeBackBufferToBlack(float alpha)
        {
            Viewport viewport = GraphicsDevice.Viewport;

            spriteBatch.Begin();

            spriteBatch.Draw(blankTexture,
                             new Rectangle(0, 0, viewport.Width, viewport.Height),
                             Color.Black * alpha);

            spriteBatch.End();
        }

        #endregion
    }
}


text:
[SublimeJSCSFormatter](https://github.com/TheSavior/SublimeJSCSFormatter) for Sublime Text 3
=================

Sublime Text 3 Plugin to autoformat your javascript code according to the JSCS configuration files you already have.

## Installation

### Linter installation
JSCS (with autoformatting) must be installed on your system before this plugin will work. To install `jscs`, do the following:

1. Install [Node.js](http://nodejs.org) (and [npm](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) on Linux).

1. Install `jscs` by typing the following in a terminal:
   ```
   npm install -g jscs
   ```

1. If you are using `nvm` and `zsh`, ensure that the line to load `nvm` is in `.zshenv` and not `.zshrc`.

1. If you are using `zsh` and `oh-my-zsh`, do not load the `nvm` plugin for `oh-my-zsh`.

### Plugin installation

Please use [Package Control](https://sublime.wbond.net/installation) to install the linter plugin. This will ensure that the plugin will be updated when new versions are available. If you want to install from source so you can modify the source code, you probably know what you are doing so we won't cover that here.

To install via Package Control, do the following:

1. Within Sublime Text, bring up the [Command Palette](http://docs.sublimetext.info/en/sublime-text-3/extensibility/command_palette.html) and type `install`. Among the commands you should see `Package Control: Install Package`. If that command is not highlighted, use the keyboard or mouse to select it. There will be a pause of a few seconds while Package Control fetches the list of available plugins.

1. When the plugin list appears, type `jscs format`. Among the entries you should see `JSCSFormatter`. If that entry is not highlighted, use the keyboard or mouse to select it.

## Commands
**Command palette:**

- JSCSFormatter: Format this file

**Shortcut key:**

* Linux/Windows: [Ctrl + Shift + H]
* Mac: [Cmd + Shift + H]

## Settings

By default, JSCSFormatter will supply the following settings:

```javascript
{
  // The Nodejs installation path
  "node_path": {
    "windows": "node.exe",
    "linux": "/usr/bin/nodejs",
    "osx": "/usr/local/bin/node"
  },

  // The location of the the globally installed jscs package
  "jscs_path": {
    "windows": "%APPDATA%/npm/node_modules/jscs/bin/jscs",
    "linux": "/usr/bin/jscs",
    "osx": "/usr/local/bin/jscs"
  },

  // Specify this path to a JSCS config file to override the default behavior.
  // Passed to JSCS as --config. Read more here:
  // http://jscs.info/overview.html#-config-
  "config_path": "",

  // Automatically format when a file is saved.
  "format_on_save": false,

  // Only attempt to format files with whitelisted extensions on save.
  // Leave empty to disable the check
  "format_on_save_extensions": [
    "js",
    "jsx",
    "es",
    "es6",
    "babel"
  ]
}
```

* Modify any settings within the `Preferences -> Package Settings -> JSCS Formatter -> Settings - User` file.

**Project-specific settings override**

To override global plugin configuration for a specific project, add a settings object with a `JSCS-Formatter` key in your `.sublime-project`. This file is accessible via `Project -> Edit Project`.

For example:

```
{
  "folders": [
    {
      "path": "."
    }
  ],
  "settings": {
    "JSCS-Formatter": {
      "format_on_save": true
    }
  }
}
```

**Setting up paths in Sublime with NVM**

1. Find path of Node and JSCS
   ```
   npm config get prefix
   ```

2. Return to Sublime
Modify the file at `Preferences > Package Settings > JSCS-Formatter > Settings-User`.
Update the `node_path` and `jscs_path` settings.

```javascript
{
  "node_path": {
    "linux": "/home/YOURUSER/.nvm/versions/node/v6.9.2/bin/node",
  },

  "jscs_path": {
    "linux": "/home/YOURUSER/.nvm/versions/node/v6.9.2/bin/jscs",
  },
}
```

## Contributing

If you find any bugs feel free to report them [here](https://github.com/TheSavior/SublimeJSCSFormatter/issues).

Pull requests are also encouraged.


text:
@interface TransferenciasViewController : UITableViewController

@end


text:
<?php

declare(strict_types=1);

namespace app\assets;

use yii\web\AssetBundle;

class UserDetailedStatsCellAsset extends AssetBundle
{
    public $sourcePath = '@app/resources/.compiled/stat.ink';
    public $css = [
        'user-stat-by-map-rule-detail.css',
    ];
    public $depends = [
        AppAsset::class,
    ];
}


text: Enable the Ceilometer Alarm Notification service


text:
'use strict';
var expect = require('chai').expect;
describe('Game setup', function(){
  var dcPinochle;
  beforeEach(function(){
    dcPinochle = require('../../api/js/dcPinochle');
  });
  it('provides a method for creating a game object', function(){
    var play = dcPinochle.startHand(5);
    console.dir(play);
    expect(play.player1.id).to.be.eq(1);
  })
});


text:
layout: info2
title: New Zealand Accommodation, Accomodation in New Zealand, Motels, Hotels
keywords: New Zealand Accommodation, Accomodation, Hotels, apartments, Motels, Lodges
description: New Zealand Accommodation including New Zealand apartments motels hotels accomodation bed and breakfasts holiday parks plus more.

slug: banner-accom
banner-descr-main: The Classic Villa, Christchurch
more-link: christchurch-accomodation
permalink: /accommodation.html
lat-long: -41.1606, 172.4060

breadcrumbs: True
name: New Zealand Accommodation
island:
region:

sub-image-slug: pic-accommodation.jpg
sub-image-alt: Punga Cove Marlborough Sounds

side-nav:
- attractions.html: New Zealand Attractions
- destinations.html: New Zealand Destinations

contains_anchors: True
---

{{ page.name }}

New Zealand offers many accomodation options for you to choose from. Whether you are looking for hotels, motels, bed and breakfasts, luxury lodges, apartments and more, our accommodation guide has a great selection of quality lodgings.

Our guide covers everything from budget motels through to super-luxury hotels / lodges. We have a wide range of hosted accommodation to choose from in the main tourist destinations such as Queenstown, Wanaka, Rotorua and Nelson. We also offer a large selection of Apartments and Hotels in Auckland, Christchurch, Wellington and Dunedin to choose from.

North Island | South Island | Stewart Island

North Island Accommodation

Auckland Accommodation

Find the perfect place to stay in New Zealand's largest city. Everything from quality motels / holiday lodgings to luxury hotels and apartments.

				Learn more

Wellington Accommodation

Find the ideal place to stay in New Zealand's capital city of Wellington. Choose from Hotels, Motels, Bed and Breakfasts plus more.

				Learn more

Rotorua Accommodation

Find a place to stay in the Geothermal wonderland of Rotorua. Accommodation guide lists everything from well-appointed motels to luxury lodges and hotels.

				Learn more

Bay Of Plenty Accommodation

Find the ideal place to stay in the beautiful Bay of Plenty. Tauranga hotels, Mt Maunganui apartments, motels plus holiday parks near Whakatane.

				Learn more

Coromandel Accommodation

Lodging guide to staying in the beautiful Coromandel Peninsula. Whitianga motels, apartments, holiday parks in Waihi, Hot Water beach and more.

				Learn more

Waikato Accommodation

Comprehensive lodging guide to Hamilton city in the Waikato. Choose from centrally located Hotels, motels, apartments and much more.

				Learn more

Hawkes Bay Accommodation

Accomodation guide to sunny Hawkes Bay including Gisborne motor inns, Napier Hotels / apartments and Hastings motels and lodges.

				Learn more

New Plymouth Accommodation

Lodging guide to staying in the Taranaki city of New Plymouth. Everything from boutique hotels, motels through to beachside villas and holiday parks.

				Learn more

Northland Accommodation

Online accommodation guide to staying in the picturesque far-north Northland. Listings include Paihia hotels, motels and apartments near Waitangi.

				Learn more

Ruapehu Accommodation

Find a great place to stay in Whakapapa and Ohakune. Everything from motorlodges / apartments to luxury ski hotel resorts and budget holiday parks.

				Learn more

Taupo Accommodation

Large lodging guide to staying in the picturesque Lake Taupo region. Select from a variety of accomodation types such as Hotels, motels and Luxury lodges.

				Learn more

South Island Accommodation

Christchurch Accommodation

Comprehensive lodging guide to the South Island's largest city, Christchurch. Lists a range of accommodation including Hotels, motels, apartments and more.

				Learn more

Queenstown

Find a place to stay in Queenstown, New Zealand's adventure capital. Lodgings include centrally-located Hotels, luxury holiday homes / apartments and Resorts.

				Learn more

Dunedin Accommodation

Comprehensive lodging guide to the southern city of Dunedin. Includes centrally located hotels, motels and apartments plus Otago Peninsula accommodation.

				Learn more

Abel Tasman Accommodation

Find the perfect place to stay in the beautiful Abel Tasman National Park. Choose from accomodation in Mapua, Motels in Marahau plus Motueka and Kaiteriteri.

				Learn more

Akaroa Accommodation

Lodging guide to staying in peaceful, picturesque Akaroa. Choose from options including luxury motels, apartments, plus a farmstay and family holiday park.

				Learn more

Blenheim Accommodation

Find an ideal place to stay in the sunshine capital of New Zealand. Luxury Hotels, motels, plus hosted bed breakfast accommodation surrounded by vineyards and more.

				Learn more

Central Otago Accommodation

Online guide to finding a range of quality accommodation options in Alexandra, Cromwell and on the scenic Otago Central Rail Trail.

				Learn more

Fiordland Accommodation

Find the ideal place to stay in Te Anau and Milford Sound. Select from a list of Luxury Hotels, Motels, BnB's plus budget holiday park / backpacker lodgings.

				Learn more

Franz Josef Glacier Accommodation

Find suitable lodgings close to the spectacular Fox Glacier and Franz Josef Glacier. Includes hotels, rainforest retreats, budget holiday accomodation and more.

				Learn more

Kaikoura Accommodation

Lodging guide to the vibrant, sea-side town of Kaikoura. Choose from central motels, apartments offering superb views plus self-catering, budget accommodation.

				Learn more

Hanmer Springs Accommodation

Find the perfect place to stay in the picturesque thermal resort town of Hanmer Springs. Motels, cabins, hotels, holiday houses and more.

				Learn more

Lake Tekapo

Comprehensive listing of accommodation providers including luxury hotels, lake-view apartments, B&B's, holiday homes and holday parks / camping grounds.

				Learn more

Marlborough Sounds

Lodging guide to staying in the peaceful and beautiful Marlborough Sounds. Also includes Picton motels plus budget holiday park and powered campervan sites.

				Learn more

Mt Cook Accommodation

Find accommodation in the alpine wonderland of Aoraki Mt Cook National Park. Hermitage Hotels with Mount Cook views, motels and budget holiday park lodgings.

				Learn more

Nelson Accommodation

Guide to finding a nice place to stay in the sunny, picturesque city of Nelson. Also lists Richmond and Nelson Lakes National Park lodgings.

				Learn more

Oamaru Accommodation

Lodging guide to the sea-side North-Otago town of Oamaru. Choose from centrally located motels, holiday parks or luxury farmstay accommodation.

				Learn more

Southland Accommodation

Online guide to finding a range of quality accommodation options in Invercargill and the Catlins. Choose from central-city hotels / motels or hosted homestays.

				Learn more

Twizel Accommodation

Find a nice place to stay in or near Twizel. Select from a list of Hotels, Chalet Motels, budget holiday parks or rural, high-country station lodgings.

				Learn more

Wanaka Accommodation

Find a place to stay in the stunning alpine resort town of Wanaka. Includes luxury lodges, quality apartments plus bed and breakfast's with mountain views.

				Learn more

West Coast Accommodation

Lodging guide to staying on the rugged, captivating West Coast. Choose from accommodation options in Westport, Punakaiki, Greymouth and Hokitika.

				Learn more

Stewart Island

Stewart Island Accommodation

Online guide to finding a place to stay in Stewart Island. Choose from motels, hosted accommodation surrounded by native bush and delightful self-contained cottages.

				Learn more


text:
package org.apache.servicecomb.faultinjection;

/**
 * Handles the all constant values for fault injection.
 */
public class FaultInjectionConst {

  public static final int FAULT_INJECTION_DEFAULT_VALUE = -1;

  public static final int FAULT_INJECTION_ERROR = -1;

  public static final String CONSUMER_FAULTINJECTION = "servicecomb.governance.Consumer.";

  public static final String CONSUMER_FAULTINJECTION_GLOBAL = "servicecomb.governance.Consumer._global.";

  public static final String CONSUMER_FAULTINJECTION_POLICY_PROTOCOLS = "policy.fault.protocols.";
}


text:
using System;
using Amazon.DynamoDBv2;
using Microsoft.Extensions.Logging;
using WorkflowCore.Interface;
using WorkflowCore.Providers.AWS.Services;
using WorkflowCore.UnitTests;
using Xunit;

namespace WorkflowCore.Tests.DynamoDB
{
    [Collection("DynamoDb collection")]
    public class DynamoPersistenceProviderFixture : BasePersistenceFixture
    {
        DynamoDbDockerSetup _dockerSetup;
        private IPersistenceProvider _subject;

        public DynamoPersistenceProviderFixture(DynamoDbDockerSetup dockerSetup)
        {
            _dockerSetup = dockerSetup;
        }

        protected override IPersistenceProvider Subject
        {
            get
            {
                if (_subject == null)
                {
                    var cfg = new AmazonDynamoDBConfig { ServiceURL = DynamoDbDockerSetup.ConnectionString };
                    var provisioner = new DynamoDbProvisioner(DynamoDbDockerSetup.Credentials, cfg, "unittests", new LoggerFactory());
                    var client = new DynamoPersistenceProvider(DynamoDbDockerSetup.Credentials, cfg, provisioner, "unittests", new LoggerFactory());
                    client.EnsureStoreExists();
                    _subject = client;
                }
                return _subject;
            }
        }
    }
}


text:
### functions for Errorhandling
Function Get-SIOWebException
    {
    [CmdletBinding(SupportsShouldProcess=$true)]
    Param
    (
        $ExceptionMessage
    )
        $type = $MyInvocation.MyCommand.Name -replace "Get-","" -replace "WebException",""
        switch -Wildcard ($ExceptionMessage)
            {
            "*SSL/TLS secure channel*"
                {
                Write-Host -ForegroundColor Magenta $ExceptionMessage
                Write-Warning "SSL/TLS secure channel error indicates untrasted certificates. Connect using -trustCert Option !"
                }

            "*400*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "400 Bad Request Badly formed URI, parameters, headers, or body content. Essentially a request syntax error."
                }
            "*401*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "Session expired or wrong User/Password ?
    for Gateway commands use: Connect-SIOGateway
    for all other use: Connect-SIOmdm"

                }

            "*403*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "403 Forbidden Not allowed - ScaleIO Gateway is disabled. Enable the gateway by editing the file
<gateway installation directory>/webapps/ROOT/WEB-INF/classes/gatewayUser.properties
The parameter features.enable_gateway must be set to true, and then you must restart the scaleio-gateway service."
                }
            "*404*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "404 Not Found Resource doesn't exist - either an invalid type name for instances list (GET, POST) or an invalid ID for a specific instance (GET, POST /action)"
                }
            "*405*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "405 Method Not Allowed This code will be returned if you try to use a method that is not documented as a supported method."
                }
            "*406*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "406 Not Acceptable Accept headers do not meet requirements (for example, output format, version,language)
"
                }
            "*409*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "409 Conflict The request could not be completed due to a conflict with the current state of the resource.
This code is only allowed in situations where it is expected that the usermight be able to resolve the conflict and resubmit the request.
The response body SHOULD include enough information for the user to correct the issue."
                }
            "*422*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "422 Unprocessable Entity
Semantically invalid content on a POST, which could be a range error, inconsistent properties, or something similar"
                }
            "*428*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "Most likely this signals an unconfigured MDM or unapproved Certificates"
                }
            "*500*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "500 Internal Server Error
This code is returned for internal errors - file an AR. It also is returned in some platform management cases when PAPI cannot return a decent error. Best practice is to avoid filing an AR.
"
                }
            "*501*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "501 Not Implemented Not currently used"
                }
            "*503*"
                {
                Write-Warning $ExceptionMessage
                Write-Warning "503 Service Unavailable"
                }
            default
                {
                Write-Warning "general error"
                $_ | fl *
                }
            }

    }


text:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Configuration;
using System.Collections.Generic;

using LWAS.Extensible.Interfaces.WorkFlow;

using Security = LWAS.Infrastructure.Security;
using LWAS.WebParts.Editors;
using LWAS.Developer;

public partial class AccessControl_Users : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        //if ("admin" != Security.User.CurrentUser.Name)
        //    Response.Redirect("../", true);

        base.OnInit(e);

        this.usersGrid.MilestoneHandler += new MilestoneEventHandler(usersGrid_MilestoneHandler);
    }

    protected override void OnPreLoad(EventArgs e)
    {
        InitUsers();

        base.OnPreLoad(e);
    }

    void usersGrid_MilestoneHandler(IChronicler chronicler, string key)
    {
        if ("firstload" == key)
            usersGrid.Command = "view";
        if ("reset" == key)
        {
            string user = null;
            if (null != this.usersGrid.CurrentItem)
                user = (string)((Dictionary<string, object>)usersGrid.CurrentItem.Data)["Name"];
            if (!String.IsNullOrEmpty(user))
            {
                this.passwordSet.App = this.Master.IdentifyApp();
                this.passwordSet.UserName = user;
                this.passwordSet.Show();
            }
        }
    }

    protected void InitUsers()
    {
        string file = ConfigurationManager.AppSettings["USERS"];
        if (String.IsNullOrEmpty(file)) throw new InvalidOperationException("USERS key not set in config file");

        this.usersGrid.DataSource = new UsersDataSource(file, null);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.ettrema</groupId>
        <artifactId>milton</artifactId>
        <version>1.7.2-SNAPSHOT</version>
    </parent>
    <groupId>com.ettrema</groupId>
    <artifactId>milton-api</artifactId>
    <packaging>jar</packaging>
    <name>Milton WebDav API</name>
    <dependencies>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>eu.medsea.mimeutil</groupId>
            <artifactId>mime-util</artifactId>
            <version>${mime-util.version}</version>
        </dependency>

        <dependency>
            <scope>test</scope>
            <groupId>easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <scope>test</scope>
            <groupId>easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <scope>test</scope>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.1_3</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.8.2</version>
        </dependency>
    </dependencies>
</project>


text:
package mil.emp3.mapengine.listeners;

import mil.emp3.mapengine.events.MapInstanceFeatureAddedEvent;

/**
 * Listener interface for event generated when a feature is added to the map
 */
public interface MapInstanceFeatureAddedEventListener {
    /**
     * Callback method called when MapInstanceFeatureAddedEvent is triggered.
     * @param event
     */
    void onEvent(MapInstanceFeatureAddedEvent event);
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AH.IPD.MODEL
{
   public class AdvanceDepositRO
    {
        public string DepositeType { get; set; }
        public int Amount { get; set; }
        public DateTime DepositDate { get; set; }
        public string DepositBy { get; set; }
        public string TransNo { get; set; }

    }
}


text:
package com.azure.resourcemanager.apimanagement.implementation;

import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.apimanagement.fluent.TenantConfigurationsClient;
import com.azure.resourcemanager.apimanagement.fluent.models.OperationResultContractInner;
import com.azure.resourcemanager.apimanagement.fluent.models.TenantConfigurationSyncStateContractInner;
import com.azure.resourcemanager.apimanagement.models.ConfigurationIdName;
import com.azure.resourcemanager.apimanagement.models.DeployConfigurationParameters;
import com.azure.resourcemanager.apimanagement.models.OperationResultContract;
import com.azure.resourcemanager.apimanagement.models.SaveConfigurationParameter;
import com.azure.resourcemanager.apimanagement.models.TenantConfigurationSyncStateContract;
import com.azure.resourcemanager.apimanagement.models.TenantConfigurations;

public final class TenantConfigurationsImpl implements TenantConfigurations {
    private static final ClientLogger LOGGER = new ClientLogger(TenantConfigurationsImpl.class);

    private final TenantConfigurationsClient innerClient;

    private final com.azure.resourcemanager.apimanagement.ApiManagementManager serviceManager;

    public TenantConfigurationsImpl(
        TenantConfigurationsClient innerClient,
        com.azure.resourcemanager.apimanagement.ApiManagementManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public OperationResultContract deploy(
        String resourceGroupName,
        String serviceName,
        ConfigurationIdName configurationName,
        DeployConfigurationParameters parameters) {
        OperationResultContractInner inner =
            this.serviceClient().deploy(resourceGroupName, serviceName, configurationName, parameters);
        if (inner != null) {
            return new OperationResultContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public OperationResultContract deploy(
        String resourceGroupName,
        String serviceName,
        ConfigurationIdName configurationName,
        DeployConfigurationParameters parameters,
        Context context) {
        OperationResultContractInner inner =
            this.serviceClient().deploy(resourceGroupName, serviceName, configurationName, parameters, context);
        if (inner != null) {
            return new OperationResultContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public OperationResultContract save(
        String resourceGroupName,
        String serviceName,
        ConfigurationIdName configurationName,
        SaveConfigurationParameter parameters) {
        OperationResultContractInner inner =
            this.serviceClient().save(resourceGroupName, serviceName, configurationName, parameters);
        if (inner != null) {
            return new OperationResultContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public OperationResultContract save(
        String resourceGroupName,
        String serviceName,
        ConfigurationIdName configurationName,
        SaveConfigurationParameter parameters,
        Context context) {
        OperationResultContractInner inner =
            this.serviceClient().save(resourceGroupName, serviceName, configurationName, parameters, context);
        if (inner != null) {
            return new OperationResultContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public OperationResultContract validate(
        String resourceGroupName,
        String serviceName,
        ConfigurationIdName configurationName,
        DeployConfigurationParameters parameters) {
        OperationResultContractInner inner =
            this.serviceClient().validate(resourceGroupName, serviceName, configurationName, parameters);
        if (inner != null) {
            return new OperationResultContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public OperationResultContract validate(
        String resourceGroupName,
        String serviceName,
        ConfigurationIdName configurationName,
        DeployConfigurationParameters parameters,
        Context context) {
        OperationResultContractInner inner =
            this.serviceClient().validate(resourceGroupName, serviceName, configurationName, parameters, context);
        if (inner != null) {
            return new OperationResultContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public TenantConfigurationSyncStateContract getSyncState(
        String resourceGroupName, String serviceName, ConfigurationIdName configurationName) {
        TenantConfigurationSyncStateContractInner inner =
            this.serviceClient().getSyncState(resourceGroupName, serviceName, configurationName);
        if (inner != null) {
            return new TenantConfigurationSyncStateContractImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public Response<TenantConfigurationSyncStateContract> getSyncStateWithResponse(
        String resourceGroupName, String serviceName, ConfigurationIdName configurationName, Context context) {
        Response<TenantConfigurationSyncStateContractInner> inner =
            this.serviceClient().getSyncStateWithResponse(resourceGroupName, serviceName, configurationName, context);
        if (inner != null) {
            return new SimpleResponse<>(
                inner.getRequest(),
                inner.getStatusCode(),
                inner.getHeaders(),
                new TenantConfigurationSyncStateContractImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    private TenantConfigurationsClient serviceClient() {
        return this.innerClient;
    }

    private com.azure.resourcemanager.apimanagement.ApiManagementManager manager() {
        return this.serviceManager;
    }
}


text:
package net.lospi.juno.estimation.proposal.diagonal.delete;

import net.lospi.juno.elements.Chain;
import net.lospi.juno.elements.MinistepChainCalculator;
import net.lospi.juno.estimation.proposal.ProposalRatioCalculator;
import net.lospi.juno.stat.CachedNaturalLogarithm;

public class DiagonalNetworkMinistepDeletionProposalRatioCalculator
        implements ProposalRatioCalculator<DiagonalNetworkMinistepDeletionModification> {
    private CachedNaturalLogarithm naturalLogarithm;
    private final MinistepChainCalculator ministepChainCalculator;

    public DiagonalNetworkMinistepDeletionProposalRatioCalculator(CachedNaturalLogarithm naturalLogarithm,
                                                                  MinistepChainCalculator ministepChainCalculator) {
        this.naturalLogarithm = naturalLogarithm;
        this.ministepChainCalculator = ministepChainCalculator;
    }

    @Override
    public double calculateLogProposalRatio(double insertionProbability,
                                            DiagonalNetworkMinistepDeletionModification modification, Chain chain) {
        int diagonalLinksCount = ministepChainCalculator.getDiagonalLinksCount(chain);
        return naturalLogarithm.apply(insertionProbability)
                + naturalLogarithm.apply(diagonalLinksCount)
                - naturalLogarithm.apply(1D - insertionProbability)
                - naturalLogarithm.apply(chain.getSize())
                - naturalLogarithm.apply(chain.getActorAspectCount());
    }
}


text:
package org.fujion.spring;

import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

/**
 * This class registers the XML namespace parser for the component scanner.
 */
public class EventTypeXmlHandler extends NamespaceHandlerSupport {

    @Override
    public void init() {
        registerBeanDefinitionParser("eventtype-scan", new EventTypeXmlParser());
    }

}


text:
import ProteinAnalyzer as pa
import fileManager as files
import matplotlib.pyplot as plt
import simulation

print('End of Summer Presentation Files')

simNames = pa.selectMultipleSimulations()
simNames2 = pa.selectMultipleSimulations()
sims = []
sims2 = []
simNames3 = pa.selectMultipleSimulations()
sims3 = []

for count in range(0, len(simNames)):
    fileSet = files.getSimulationFiles(simNames[count])
    sim1 = pa.createSimAnalysis(fileSet)
    sim1.loadLog()
    sim1.loadRMSD()
    sims.append(sim1)

for count in range(1, len(simNames)):
    sims[0].combine(sims[count])

# sims[0].rmsd.calculateFrameTimes(0, sims[0].log.getEndTime() - sims[0].log.getStartTime())
plt.plot(sims[0].log.times, sims[0].log.pot_energy)

for count in range(0, len(simNames2)):
    fileSet2 = files.getSimulationFiles(simNames2[count])
    sim2 = pa.createSimAnalysis(fileSet2)
    sim2.loadLog()
    sim2.loadRMSD()
    sims2.append(sim2)

for num in range(1, len(simNames2)):
    sims2[0].combine(sims2[num])

# sims2[0].rmsd.calculateFrameTimes(0, sims2[0].log.getEndTime() - sims2[0].log.getStartTime())
# plt.plot(sims2[0].rmsd.times, sims2[0].rmsd.RMSDs)
plt.plot(sims2[0].log.times, sims2[0].log.pot_energy)

'''for count in range(0, len(simNames)):
    fileSet = files.getSimulationFiles(simNames3[count])
    sim3 = pa.createSimAnalysis(fileSet)
    sim3.loadLog()
    sim3.loadRMSD()
    sims3.append(sim3)

for count in range(1, len(simNames)):
    sims3[0].combine(sims[count])

plt.plot(sims3[0].log.times, sims3[0].log.pot_energy)'''

avePotEnergy = sims[0].calcAvePotentialEnergy()
avePotEnergy2 = sims2[0].calcAvePotentialEnergy()
#avePotEnergy3 = sims3[0].calcAvePotentialEnergy()
print("The Average Potential Energy of sim 1 is: ", avePotEnergy)
print("The Average Potential Energy of sim 2 is: ", avePotEnergy2)
#print("The Average Potential Energy of sim 3 is: ", avePotEnergy3)

plt.show()

'''print('Data')

aveDAT = sims[0].calcAveDAT()
stdDevDAT = sims[0].calcStdDevDAT()

print("The Average of the 300 Data is: ", aveDAT)
print("The Standard Deviation of the 300 Data:", stdDevDAT)

aveDATs = []
stdDevDATs = []

aveDATs.append(aveDAT)
stdDevDATs.append(stdDevDAT)

objects = ('300 K', '500 K', '300 K Complex')

aveDAT2 = sims2[0].calcAveDAT()
stdDevDAT2 = sims2[0].calcStdDevDAT()

print("The Average of the 300 Data is: ", aveDAT2)
print("The Standard Deviation of the 300 Data:", stdDevDAT2)

aveDATs.append(aveDAT2)
stdDevDATs.append(stdDevDAT2)

aveDAT3 = sims3[0].calcAveDAT()
stdDevDAT3 = sims3[0].calcStdDevDAT()

print("The Average of the 500 Data is: ", aveDAT3)
print("The Standard Deviation of the 500 Data:", stdDevDAT3)

aveDATs.append(aveDAT3)
stdDevDATs.append(stdDevDAT3)

sims[0].graphErrorBars(objects, aveDATs, stdDevDATs)'''


text:
echo hello
nohup sleep 77 &>/dev/null &
sleep 30