text:
package ua.stqa.training.selenium.tests;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.Select;
import ua.stqa.training.selenium.model.Customer;

/**
 * Created by amalinkovskiy on 6/22/2017.
 */
public class TestRegisterCustomer extends TestBase{
    @Test
    public void registerNewCustomer(){
        driver.get("http://localhost/litecart/en/create_account");
        Customer customer = new Customer();
        customer.setFirstName("John");
        customer.setLastName("Kolpstoff");
        customer.setAddress1("Wall st. 5086");
        customer.setPostcode("12345");
        customer.setCity("new York");
        customer.setCountry("United States");
        Long now = System.currentTimeMillis();
        String email = String.format("user1%s@localhost", now);
        customer.setEmail(email);
        customer.setPhone("04445566");
        customer.setPassword("ForTheBestSecurity7^5");

        driver.findElement(By.cssSelector("input[name='firstname']")).sendKeys(customer.getFirstName());
        driver.findElement(By.cssSelector("input[name='lastname']")).sendKeys(customer.getLastName());
        driver.findElement(By.cssSelector("input[name='address1']")).sendKeys(customer.getAddress1());
        driver.findElement(By.cssSelector("input[name='postcode']")).sendKeys(customer.getPostcode());
        driver.findElement(By.cssSelector("input[name='city']")).sendKeys(customer.getCity());
        WebElement element = driver.findElement(By.cssSelector("select[name='country_code']"));
        Select countrySelect = new Select(element);
        countrySelect.selectByVisibleText("Uganda");

//        WebElement zoneElement = driver.findElement(By.cssSelector("select[name='zone_code']"));
//        Select zoneSelect = new Select(zoneElement);
//        zoneSelect.selectByVisibleText("Alabama");

        driver.findElement(By.cssSelector("input[name='email']")).sendKeys(customer.getEmail());
        driver.findElement(By.cssSelector("input[name='phone']")).clear();
        driver.findElement(By.cssSelector("input[name='phone']")).sendKeys(customer.getPhone());
        driver.findElement(By.cssSelector("input[name='password']")).sendKeys(customer.getPassword());
        driver.findElement(By.cssSelector("input[name='confirmed_password']")).sendKeys(customer.getPassword());

        driver.findElement(By.cssSelector("button[name='create_account']")).click();
        driver.findElement(By.cssSelector("a[href='http://localhost/litecart/en/logout']")).click();
        driver.findElement(By.cssSelector("form[name='login_form'] input[name='email']")).sendKeys(customer.getEmail());
        driver.findElement(By.cssSelector("form[name='login_form'] input[name='password']")).sendKeys(customer.getPassword());
        driver.findElement(By.cssSelector("form[name='login_form'] button[name='login']")).click();

    }

}


text:
using System.Configuration;
using NUnit.Framework;

namespace SequelocityDotNet.Tests.MySql.SequelocityTests
{
    [TestFixture]
    public class CreateDbConnectionTests
    {
        [Test]
        public void Should_Create_A_DbConnection_When_Supplied_A_ConnectionString_And_A_Provider_Name()
        {
            // Arrange
            string connectionString = ConfigurationManager.ConnectionStrings[ ConnectionStringsNames.MySqlConnectionString ].ConnectionString;

            const string dbProviderFactoryInvariantName = "MySql.Data.MySqlClient";

            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionString, dbProviderFactoryInvariantName );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

        [Test]
        public void Should_Create_A_DbConnection_When_Supplied_A_ConnectionString_Name()
        {
            // Arrange
            string connectionString = ConnectionStringsNames.MySqlConnectionString;

            // Act
            var dbConnection = Sequelocity.CreateDbConnection( connectionString );

            // Assert
            Assert.NotNull( dbConnection );

            // Cleanup
            dbConnection.Dispose();
        }

        [Test]
        public void Should_Throw_A_ConnectionStringNotFoundException_When_Passed_A_Null_ConnectionString()
        {
            // Arrange
            const string connectionString = null;

            const string dbProviderFactoryInvariantName = "MySql.Data.MySqlClient";

            // Act
            TestDelegate action = () => Sequelocity.CreateDbConnection( connectionString, dbProviderFactoryInvariantName );

            // Assert
            Assert.Throws<Sequelocity.ConnectionStringNotFoundException>( action );
        }

        [Test]
        public void Should_Throw_A_DbProviderFactoryNotFoundException_When_Passed_A_Null_DbProviderFactoryInvariantName()
        {
            // Arrange
            string connectionString = ConfigurationManager.ConnectionStrings[ ConnectionStringsNames.MySqlConnectionString ].ConnectionString;

            const string dbProviderFactoryInvariantName = null;

            TestHelpers.ClearDefaultConfigurationSettings();

            // Act
            TestDelegate action = () => Sequelocity.CreateDbConnection( connectionString, dbProviderFactoryInvariantName );

            // Assert
            Assert.Throws<Sequelocity.DbProviderFactoryNotFoundException>( action );
        }

        [Test]
        public void Should_Null_The_DbCommand_On_Dispose()
        {
            // Arrange
            DatabaseCommand databaseCommand = Sequelocity.GetDatabaseCommand( ConnectionStringsNames.MySqlConnectionString );

            // Act
            databaseCommand.Dispose();

            // Assert
            Assert.Null( databaseCommand.DbCommand );
        }

        [Test]
        public void Should_Null_The_DbCommand_On_Dispose_In_A_Using_Statement()
        {
            // Arrange
            DatabaseCommand databaseCommand;

            // Act
            using( databaseCommand = Sequelocity.GetDatabaseCommand( ConnectionStringsNames.MySqlConnectionString ) )
            {

            }

            // Assert
            Assert.Null( databaseCommand.DbCommand );
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
@implementation NoSuccessCommand
inject(@"flagAndStringObject")

- (void)execute {
    [self performSelector:@selector(doSth) withObject:nil afterDelay:0.1];
}

- (void)doSth {
    self.flagAndStringObject.string = [self.flagAndStringObject.string stringByAppendingString:@"error"];
    [self.delegate command:self didExecuteWithSuccess:NO];
}

@end


text:
  Hudson 1.20 and earlier used to create redundant directories inside the workspace.
  For example, if the CVS module name is "foo/bar", it first created "foo/bar" and
  then put everything below. With this option checked off, there will be no more
  such unnecessary intermediate directories.

  If you have multiple modules to check out, this option is forced (otherwise they'll overlap.)

  This affects other path specifiers, such as artifact archivers --- you now specify
  "build/foo.jar" instead of "foo/build/foo.jar".


text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var lodash_1 = require('lodash');
var httpRequest = require('request');
var loge_1 = require('loge');
var querystring_1 = require('querystring');
var url_1 = require('url');
var stream_1 = require('stream');
var zlib_1 = require('zlib');
var streaming_1 = require('streaming');
var codes_1 = require('./codes');
var credentials_1 = require('./credentials');
// logger.level = Level.debug;
loge_1.logger.level = loge_1.Level.info;
function isDefined(value) {
    return value !== undefined;
}
/**
@param {object} object - The object with some potentially 'undefined' values
@returns {object} - A shallow copy of object with no 'undefined' values.
*/
function compactObject(object) {
    // Object.keys(object).filter(key => object[key] === undefined).forEach(key => delete object[key]);
    var compactedObject = {};
    for (var key in object) {
        if (object[key] !== undefined) {
            compactedObject[key] = object[key];
        }
    }
    return compactedObject;
}
function readJSON(readableStream, callback) {
    streaming_1.readToEnd(readableStream, function (error, chunks) {
        if (error)
            return callback(error);
        var parseError;
        var body = chunks.join('');
        try {
            body = JSON.parse(body);
        }
        catch (exc) {
            parseError = new Error("Could not parse response as JSON: \"" + body + "\"; " + exc.toString);
        }
        callback(parseError, body);
    });
}
exports.readJSON = readJSON;
var TwitterError = (function (_super) {
    __extends(TwitterError, _super);
    function TwitterError(statusCode, errorMessages) {
        _super.call(this);
        this.name = 'TwitterError';
        var _a = lodash_1.find(codes_1.TwitterAPIHTTPStatusCodes, function (_a) {
            var code = _a.code;
            return code == statusCode;
        }), text = _a.text, description = _a.description;
        this.message = statusCode + " " + text + " (" + description + "): " + errorMessages.join(', ');
    }
    return TwitterError;
})(Error);
exports.TwitterError = TwitterError;
exports.TwitterAPIFatalHTTPStatusCodes = [400, 401, 403, 406, 410, 420, 422, 429, 500, 502, 503, 504];
function request(options, callback) {
    lodash_1.defaults(options, { host: 'api.twitter.com', method: 'GET', retriesRemaining: 10, query: {} });
    // delete undefined query values
    options.query = compactObject(options.query);
    loge_1.logger.debug("request(" + JSON.stringify(options) + ")");
    // exit quickly if the endpoint is malformed
    var twitterAPIEndpoint = lodash_1.find(codes_1.TwitterAPIEndpoints, function (_a) {
        var regExp = _a.regExp;
        return regExp.test(options.endpoint);
    });
    if (twitterAPIEndpoint === undefined) {
        return callback(new Error("\"" + options.endpoint + "\" is not a valid Twitter API Endpoint"));
    }
    // intercept errors here in case we want to retry the request
    function handleError(error) {
        if (error && options.retriesRemaining > 0) {
            // options = {...options, retriesRemaining: options.retriesRemaining - 1}
            options.retriesRemaining--;
            if (error instanceof TwitterError) {
                loge_1.logger.warning(error.toString() + "... retrying");
                return request(options, callback);
            }
            else if (error['code'] == 'ETIMEDOUT') {
                loge_1.logger.warning("ETIMEDOUT: " + error.toString() + "... retrying");
                return request(options, callback);
            }
            else if (error['code'] == 'ECONNRESET') {
                loge_1.logger.warning("ECONNRESET: " + error.toString() + "... retrying");
                return request(options, callback);
            }
        }
        callback(error);
    }
    credentials_1.getOAuth(function (error, oauth) {
        if (error)
            return callback(error);
        var httpRequestOptions = {
            url: url_1.format({
                protocol: 'https:',
                slashes: true,
                host: options.host,
                pathname: "/1.1/" + options.endpoint + ".json",
                query: options.query,
            }),
            headers: options.headers,
            form: options.form,
            method: options.method,
            timeout: 10000,
            oauth: oauth,
        };
        loge_1.logger.debug("httpRequest(" + JSON.stringify(httpRequestOptions) + ")");
        httpRequest(httpRequestOptions)
            .on('response', function (response) {
            // we don't want to treat all non-200 responses as errors; for example,
            // with /users/lookup, a 404 indicates that there were no matches at all.
            if (lodash_1.includes(exports.TwitterAPIFatalHTTPStatusCodes, response.statusCode)) {
                // Twitter error responses look like:
                // {"errors":[{"message":"Sorry, that page does not exist","code":34}]}
                readJSON(response, function (error, body) {
                    if (error)
                        return handleError(error);
                    var errorMessages = body.errors.map(function (_a) {
                        var message = _a.message;
                        return message;
                    });
                    handleError(new TwitterError(response.statusCode, errorMessages));
                });
            }
            else {
                callback(null, response);
            }
        })
            .on('error', handleError);
    });
}
exports.request = request;
/**
Retrieve up to 100 "fully-hydrated" tweets in one request. It will return a list
of the same length as the input, replacing missing (e.g., deleted) tweets with
two fields: 'id_str' and 'missing'.

https://dev.twitter.com/rest/reference/get/statuses/lookup

@param {string[]} id_strs - array of tweet ID strings to fetch
@param {function} callback - callback when finished
*/
function getStatuses(id_strs, callback) {
    request({
        method: 'POST',
        endpoint: 'statuses/lookup',
        form: {
            // The lookup endpoint returns a list of {<tweet>} objects by default.
            // When map is "true", it returns a payload like: {id: { "123": {<tweet>}, "456": {<tweet>} } }
            map: true,
            id: id_strs.join(','),
        },
    }, function (error, response) {
        if (error)
            return callback(error);
        streaming_1.readToEnd(response, function (error, chunks) {
            if (error)
                return callback(error);
            var body = chunks.join('');
            var statusLookup = JSON.parse(body).id;
            // statuses_map[id_str] will be null for all requested statuses that can't be found
            var statuses = id_strs.map(function (id_str) { return statusLookup[id_str] || { id_str: id_str, missing: true }; });
            loge_1.logger.debug("Fetched " + statuses.length + " statuses");
            callback(null, statuses);
        });
    });
}
exports.getStatuses = getStatuses;
/**
Get the user objects for a list of user_ids and/or screen_names.

users is a list of {id_str: '18116587'} or {screen_name: 'chbrown'} objects.

Apparently Twitter is happy with both/either.

This API method can only handle 100 screen_names at a time
*/
function getUsers(users, callback) {
    request({
        method: 'POST',
        endpoint: 'users/lookup',
        form: {
            user_id: users.map(function (user) { return user.id_str; }).filter(isDefined).join(','),
            screen_name: users.map(function (user) { return user.screen_name; }).filter(isDefined).join(','),
        },
    }, function (error, response) {
        if (error)
            return callback(error);
        streaming_1.readToEnd(response, function (error, chunks) {
            if (error)
                return callback(error);
            var body = chunks.join('');
            // HTTP 404 => consider all users missing
            var fullUsers = (response.statusCode === 404) ? [] : JSON.parse(body);
            // extend the original objects so that we end up with the same ordering
            var mergedUsers = users.map(function (user) {
                if (user.id_str !== undefined) {
                    return lodash_1.find(fullUsers, function (fullUser) { return fullUser.id_str == user.id_str; });
                }
                else {
                    // search by screen_name must be case insensitive
                    var needle = user.screen_name.toLowerCase();
                    return lodash_1.find(fullUsers, function (fullUser) { return fullUser.screen_name.toLowerCase() == needle; });
                }
            });
            callback(null, mergedUsers);
        });
    });
}
exports.getUsers = getUsers;
/**
https://dev.twitter.com/rest/reference/get/statuses/user_timeline
*/
function getUserStatuses(user, max_id, callback) {
    request({
        endpoint: 'statuses/user_timeline',
        query: {
            user_id: user.id_str,
            screen_name: user.screen_name,
            count: 200,
            trim_user: true,
            exclude_replies: false,
            contributor_details: true,
            include_rts: true,
            max_id: max_id,
        },
    }, function (error, response) {
        if (error)
            return callback(error);
        readJSON(response, callback);
    });
}
exports.getUserStatuses = getUserStatuses;
/**
https://dev.twitter.com/rest/reference/get/followers/ids

@param {User} user - Whose followers we will find.
@returns {string[]} a list of user IDs for every user following the specified user.
*/
function getUserFollowers(user, callback) {
    request({
        endpoint: 'followers/ids',
        query: {
            user_id: user.id_str,
            screen_name: user.screen_name,
            stringify_ids: 'true',
        },
    }, function (error, response) {
        if (error)
            return callback(error);
        readJSON(response, function (error, body) {
            if (error)
                return callback(error);
            callback(null, body.ids);
        });
    });
}
exports.getUserFollowers = getUserFollowers;
/**
https://dev.twitter.com/rest/reference/get/friends/ids

@param {User} user - Whose followees we will find.
@returns {string[]} a list of user IDs for every user followed by specified user.
*/
function getUserFriends(user, callback) {
    request({
        endpoint: 'friends/ids',
        query: {
            user_id: user.id_str,
            screen_name: user.screen_name,
            stringify_ids: 'true',
        },
    }, function (error, response) {
        if (error)
            return callback(error);
        readJSON(response, function (error, body) {
            if (error)
                return callback(error);
            callback(null, body.ids);
        });
    });
}
exports.getUserFriends = getUserFriends;
/**
Returns all the information about a known place.
*/
function getPlaceInformation(place_id, callback) {
    request({ endpoint: "geo/id/" + place_id }, function (error, response) {
        if (error)
            return callback(error);
        readJSON(response, callback);
    });
}
exports.getPlaceInformation = getPlaceInformation;
/**
Creating a StatusStream immediately starts an infinite Twitter stream.
*/
var StatusStream = (function (_super) {
    __extends(StatusStream, _super);
    function StatusStream(options) {
        var _this = this;
        if (options === void 0) { options = {}; }
        _super.call(this, { objectMode: false });
        this.options = options;
        lodash_1.defaults(this.options, { decompress: false, interval: 86400 });
        request({
            host: 'stream.twitter.com',
            method: 'POST',
            endpoint: this.options.filter ? 'statuses/filter' : 'statuses/sample',
            headers: {
                // The User-Agent header is required, if we want Twitter to respect our
                // accept-encoding value.
                'User-Agent': this.options.userAgent,
                // the 'request' library deletes headers with undefined values
                'Accept-Encoding': this.options.compress ? 'deflate, gzip' : undefined,
            },
            form: querystring_1.parse(this.options.filter || this.options.sample || ''),
        }, function (error, response) {
            if (error) {
                _this.emit('error', error);
                _this.push(null);
                return;
            }
            // Decompress if needed. This must run from within the response
            // listener since we need the response headers.
            var outputStream = response;
            var encoding = response.headers['content-encoding'];
            if (encoding == 'gzip') {
                loge_1.logger.debug('gunzipping HTTP response');
                var gunzip = zlib_1.createGunzip();
                outputStream = outputStream.pipe(gunzip);
            }
            else if (encoding == 'deflate') {
                loge_1.logger.debug('inflating HTTP response');
                var inflate = zlib_1.createInflate();
                outputStream = outputStream.pipe(gunzip);
            }
            outputStream.pipe(_this);
        });
    }
    return StatusStream;
})(stream_1.PassThrough);
exports.StatusStream = StatusStream;


text:
LIBJTBASEDIR = ../..
include $(LIBJTBASEDIR)/libjt.mk

MACHINE = $(shell $(CC) -dumpmachine)
HOSTMACHINE = $(shell uname -m | sed -e 's-armv7l-arm-g')
BUILDHOSTMACHINE = $(shell echo "$(MACHINE)" | grep -e "$(HOSTMACHINE)")
OBJDIR = obj-$(MACHINE)
DEPDIR = dep-$(MACHINE)
BINDIR = bin-$(MACHINE)
TESTDIR = test-$(MACHINE)
PICTURES = yt_powered
MODS = navigator log transfer gui
OBJS = $(addprefix $(OBJDIR)/,$(addsuffix .o,$(MODS)))
DEPS = $(addprefix $(DEPDIR)/,$(addsuffix .d,$(MODS)))

PROGRAM = $(BINDIR)/ytnavigator

CPPFLAGS += -I../include
CPPFLAGS += -DDEBUG -g
BFDTARGET = $(shell LANG=C $(OBJCOPY) --help | grep -e "supported targets:" | sed -e 's-^.*supported targets: *--g' | cut -d ' ' -f 1)
BFDARCH = $(shell LANG=C $(OBJDUMP) --help | grep -e "supported architectures:" | sed -e 's-^.*supported architectures: *--g' | cut -d ' ' -f 1)
VERIFYCERT = yes

ifneq ($(VERIFYCERT),yes)
CPPFLAGS += -DNOVERIFYCERT
endif

ifneq ($(shell $(PKG_CONFIG) --exists sdl; echo -n $$?),0)
$(error sdl not found)
else
PKGS += sdl
endif
ifneq ($(shell $(PKG_CONFIG) --exists SDL_image; echo -n $$?),0)
$(error SDL_image not found)
else
PKGS += SDL_image
endif
ifneq ($(shell $(PKG_CONFIG) --exists SDL_ttf; echo -n $$?),0)
#$(error SDL_ttf not found)
LDLIBS += -lSDL_ttf
else
PKGS += SDL_ttf
endif
CPPFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKGS))
LDLIBS += $(shell $(PKG_CONFIG) --libs $(PKGS))

.PHONY: test all clean

ifneq ($(BUILDHOSTMACHINE),)
test: all
	echo $(BUILDHOSTMACHINE)
	mkdir -p $(TESTDIR)
	(cd $(TESTDIR) && bash -x ../youtubeplayer.sh ../$(PROGRAM) ../pictures)
endif

all: $(PROGRAM)

install: all
	install -D $(PROGRAM) $(CHROOTDIR)$(PREFIX)/bin/
	sed -i youtubeplayer.sh -e "s#DEFAULTPREFIX=.*\$$#DEFAULTPREFIX=\"$(PREFIX)\"#g"
	install -D youtubeplayer.sh "$(CHROOTDIR)$(PREFIX)/bin/"
	mkdir -p "$(CHROOTDIR)$(PREFIX)/share/ytnavigator"
	install -D pictures/*.jpg $(CHROOTDIR)$(PREFIX)/share/ytnavigator/

$(PROGRAM): $(OBJS) $(filter %.a,$(LDLIBS)) $(filter %.o,$(LDLIBS))
	@mkdir -p $(BINDIR)
	$(CC) $(LDFLAGS) -o $@ $^ $(filter-out %.o,$(filter-out %.a,$(LDLIBS)))

clean:
	rm -rf $(BINDIR) $(OBJDIR) $(DEPDIR)

$(OBJDIR)/%.o: src/%.c
	@mkdir -p $(OBJDIR)
	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
	@mkdir -p $(DEPDIR)
	$(CC) -MM -MT $@ $(CPPFLAGS) $(CFLAGS) -o $(DEPDIR)/$*.d $^

$(OBJDIR)/%.o: pictures/%.jpg
	@mkdir -p $(OBJDIR)
	$(OBJCOPY) -I binary -O $(BFDTARGET) -B $(BFDARCH) $< $@

-include $(DEPS)


text:
#pragma once
#include <aws/elasticache/ElastiCache_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace ElastiCache
{
namespace Model
{

  /**
   *
Describes a name-value pair that is used to update the value of a
   * parameter.

See Also:
   AWS
   * API Reference

   */
  class AWS_ELASTICACHE_API ParameterNameValue
  {
  public:
    ParameterNameValue();
    ParameterNameValue(const Aws::Utils::Xml::XmlNode& xmlNode);
    ParameterNameValue& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
    void OutputToStream(Aws::OStream& oStream, const char* location) const;

    /**
     *
The name of the parameter.

     */
    inline const Aws::String& GetParameterName() const{ return m_parameterName; }

    /**
     *
The name of the parameter.

     */
    inline void SetParameterName(const Aws::String& value) { m_parameterNameHasBeenSet = true; m_parameterName = value; }

    /**
     *
The name of the parameter.

     */
    inline void SetParameterName(Aws::String&& value) { m_parameterNameHasBeenSet = true; m_parameterName = std::move(value); }

    /**
     *
The name of the parameter.

     */
    inline void SetParameterName(const char* value) { m_parameterNameHasBeenSet = true; m_parameterName.assign(value); }

    /**
     *
The name of the parameter.

     */
    inline ParameterNameValue& WithParameterName(const Aws::String& value) { SetParameterName(value); return *this;}

    /**
     *
The name of the parameter.

     */
    inline ParameterNameValue& WithParameterName(Aws::String&& value) { SetParameterName(std::move(value)); return *this;}

    /**
     *
The name of the parameter.

     */
    inline ParameterNameValue& WithParameterName(const char* value) { SetParameterName(value); return *this;}

    /**
     *
The value of the parameter.

     */
    inline const Aws::String& GetParameterValue() const{ return m_parameterValue; }

    /**
     *
The value of the parameter.

     */
    inline void SetParameterValue(const Aws::String& value) { m_parameterValueHasBeenSet = true; m_parameterValue = value; }

    /**
     *
The value of the parameter.

     */
    inline void SetParameterValue(Aws::String&& value) { m_parameterValueHasBeenSet = true; m_parameterValue = std::move(value); }

    /**
     *
The value of the parameter.

     */
    inline void SetParameterValue(const char* value) { m_parameterValueHasBeenSet = true; m_parameterValue.assign(value); }

    /**
     *
The value of the parameter.

     */
    inline ParameterNameValue& WithParameterValue(const Aws::String& value) { SetParameterValue(value); return *this;}

    /**
     *
The value of the parameter.

     */
    inline ParameterNameValue& WithParameterValue(Aws::String&& value) { SetParameterValue(std::move(value)); return *this;}

    /**
     *
The value of the parameter.

     */
    inline ParameterNameValue& WithParameterValue(const char* value) { SetParameterValue(value); return *this;}

  private:

    Aws::String m_parameterName;
    bool m_parameterNameHasBeenSet;

    Aws::String m_parameterValue;
    bool m_parameterValueHasBeenSet;
  };

} // namespace Model
} // namespace ElastiCache
} // namespace Aws


text:
package org.schoellerfamily.geoservice.model;

import java.io.Serializable;
import java.util.Comparator;

/**
 * Sort geoservice items by modern place name. Consider doing a sort
 * that includes country, state, etc.
 *
 * @author Dick Schoeller
 */
public class GeoServiceItemComparator
        implements Comparator<GeoServiceItem>, Serializable {
    /** */
    private static final long serialVersionUID = 1L;

    /**
     * {@inheritDoc}
     */
    @Override
    public int compare(final GeoServiceItem o1, final GeoServiceItem o2) {
        return o1.getModernPlaceName().compareTo(o2.getModernPlaceName());
    }
}


text:
module ChefAutomate
  class Fetcher < Compliance::Fetcher
    name 'chef-automate'

    # it positions itself before `compliance` fetcher
    # only load it, if you want to use audit cookbook in Chef Solo with Chef Automate
    priority 502

    def self.resolve(target)
      uri = if target.is_a?(String) && URI(target).scheme == 'compliance'
              URI(target)
            elsif target.respond_to?(:key?) && target.key?(:compliance)
              URI("compliance://#{target[:compliance]}")
            end

      return nil if uri.nil?

      # we have detailed information available in our lockfile, no need to ask the server
      if target.respond_to?(:key?) && target.key?(:url)
        profile_fetch_url = target[:url]
        config = {}
      else
        # verifies that the target e.g base/ssh exists
        profile = sanitize_profile_name(uri)
        owner, id = profile.split('/')
        profile_path = if target.respond_to?(:key?) && target.key?(:version)
                         "/compliance/profiles/#{owner}/#{id}/version/#{target[:version]}/tar"
                       else
                         "/compliance/profiles/#{owner}/#{id}/tar"
                       end
        dc = Chef::Config[:data_collector]
        url = URI(dc[:server_url])
        url.path = profile_path
        profile_fetch_url = url.to_s

        raise 'No data-collector token set, which is required by the chef-automate fetcher. ' \
          'Set the `data_collector.token` configuration parameter in your client.rb ' \
          'or use the "chef-server-automate" reporter which does not require any ' \
          'data-collector settings and uses Chef Server to fetch profiles.' if dc[:token].nil?

        config = {
          'token' => dc[:token],
        }
      end

      new(profile_fetch_url, config)
    rescue URI::Error => _e
      nil
    end

    # returns a parsed url for `admin/profile` or `compliance://admin/profile`
    # TODO: remove in future, copied from inspec to support older versions of inspec
    def self.sanitize_profile_name(profile)
      uri = if URI(profile).scheme == 'compliance'
              URI(profile)
            else
              URI("compliance://#{profile}")
            end
      uri.to_s.sub(%r{^compliance:\/\/}, '')
    end

    def initialize(url, opts)
      options = {
        'insecure' => true,
        'token' => opts['token'],
        'server_type' => 'automate',
        'automate' => {
          'ent' => 'default',
          'token_type' => 'dctoken',
        },
      }
      super(url, options)
    end

    def to_s
      'Chef Automate for Chef Solo Fetcher'
    end
  end
end


text:
import {RouterConfig} from "@angular/router";
import {nsProvideRouter} from "nativescript-angular/router"
import {LoginPage} from "./pages/login/login.component";
import {ListPage} from "./pages/list/list.component";

export const routes: RouterConfig = [
  { path: "", component: LoginPage },
  { path: "list", component: ListPage }
];

export const APP_ROUTER_PROVIDERS = [
  nsProvideRouter(routes, {})
];


text:
import glob
import os
import re
import subprocess

from Bio import SeqIO

def get_original_paths():
    genbank_path_list = glob.glob("./originals/genbank/*.gbf")
    fasta_path_list = glob.glob("./originals/fasta/*.fsa")
    return genbank_path_list, fasta_path_list

def file_name_from_genbank_description(name):
    """
    Acidovorax-127 (UID4105), whole genome shotgun sequence." --> Acidovorax-127
    """
    # Note that the - in the brackets has to come at the end.
    m = re.search("([\w\s-]+) \([\w]+\), [\w.]+", name)
    if m:
        return m.group(1)
    else:
        return "???"

def file_name_from_fasta_description(name):
    """
    Ga0081612_1001 [organism=Methylophilus methylotrophus-127-2 (UID203)] [tech=wgs] [topology=linear] [gcode=11] [completedness=partial] [project=0]
    --> Methylophilus_methylotrophus-127-2
    """
    # Note that the - in the brackets has to come at the end.
    m = re.search("[\w_]+ \[organism=([\w\s-]+) \([\w]+\)\]", name)
    if m:
        return m.group(1)
    else:
        return "???"

def new_genbank_name(genbank_path):
    seq_records = SeqIO.parse(genbank_path, "genbank")
    # seq_records is a generator.  Just use the first one.
    for seq_record in seq_records:
        print(seq_record.description)
        new_name = file_name_from_genbank_description(seq_record.description)
        # we don't actually want to loop over the rest, so break out
        break
    # replace spaces with _:
    new_name = new_name.replace(" ", "_")
    return new_name

def new_fasta_name(fasta_path):
    seq_records = SeqIO.parse(fasta_path, "fasta")
    for seq_record in seq_records:
        print(seq_record.description)
        new_name = file_name_from_fasta_description(seq_record.description)
        # we don't actually want to loop over the rest, so break out
        break
    # replace spaces with _:
    new_name = new_name.replace(" ", "_")
    print("new name for {}: {}".format(fasta_path, new_name))
    return new_name

def copy_genbank_with_new_name(genbank_path):
    new_path = "./bins/" + \
         new_genbank_name(genbank_path) + '.gbf'
    print("copying {} to {}".format(genbank_path, new_path))
    subprocess.check_call(['cp', genbank_path, new_path])
    assert os.path.isfile(new_path)

def copy_fasta_with_new_name(fasta_path):
    # use .fna to be consistent with Dave/Fazui bin suffixes.
    new_path = "./bins/" + new_fasta_name(fasta_path) + '.fasta'
    print("copying {} to {}".format(fasta_path, new_path))
    subprocess.check_call(['cp', fasta_path, new_path])
    assert os.path.isfile(new_path)

def copy_all_files():
    genbank_path_list, fasta_path_list = get_original_paths()
    for gbf in genbank_path_list:
        copy_genbank_with_new_name(gbf)
    for fna in fasta_path_list:
        copy_fasta_with_new_name(fna)

if __name__ == "__main__":
    print('running script')
    copy_all_files()


text:
  Haraucourt est
       un village
       situé dans le département de Meurthe-et-Moselle en Lorraine. Elle totalisait 669 habitants en 2008.

À Haraucourt, la valorisation moyenne à la vente d'un appartement se situe à zero € du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 1 568 € du m². À la location la valeur moyenne se situe à 0 € du m² mensuel.

Si vous pensez emmenager à Haraucourt, vous pourrez facilement trouver une maison à acheter.

À proximité de Haraucourt sont localisées les villes de
Gellenoncourt à 2 km, 35 habitants,
Courbesseaux localisée à 3 km, 202 habitants,
Buissoncourt à 2 km, 245 habitants,
Flainval à 5 km, 191 habitants,
Lenoncourt à 4 km, 544 habitants,
Sommerviller à 3 km, 923 habitants,
 entre autres. De plus, Haraucourt est située à seulement treize km de Nancy.

Le parc de logements, à Haraucourt, se décomposait en 2011 en treize appartements et 272 maisons soit
 un marché relativement équilibré.


text:
/* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */
#ifndef strtab_INCLUDED
#define strtab_INCLUDED
/* ====================================================================
 * ====================================================================
 *
 * Module: strtab.h
 * $Revision: 1.4 $
 * $Date: 2008/07/31 00:19:10 $
 * $Author: ciancu $
 * $Source: bitbucket.org:berkeleylab/upc-translator.git/open64/osprey1.0/common/com/strtab.h $
 *
 * Description:
 *
 * String table external interface.
 *
 * ====================================================================
 * ====================================================================
 */

#ifndef symtab_idx_INCLUDED
#include "symtab_idx.h"
#endif

// From a user point of view, the string table is a collection of unique
// strings, each of which can be indentified by STR_IDX.  The actual
// implementation is transparent to the user.

// init an empty table; use by producer (e.g., front end)
// size is string buffer size in bytes
extern void
Initialize_Strtab (UINT32 size);

// initialized the string table with the strtab from an input file
extern void
Initialize_Strtab (const char *buf, UINT32 size);

// add string to string table
extern STR_IDX
Save_Str (const char *str);

// concat two strings and then add to string table
extern STR_IDX
Save_Str2 (const char *s1, const char *s2);

// concat two strings and an int and add to string table
extern STR_IDX
Save_Str2i (const char *s1, const char *s2, UINT i);

extern char *
Index_To_Str (STR_IDX idx);

struct STRING_TABLE
{
    char &operator[] (STR_IDX idx) {
	return *Index_To_Str (idx);
    }
};

// New code should use Str_Table[idx] to get the string from an index
extern STRING_TABLE Str_Table;

extern UINT32
STR_Table_Size ();

// for compatibility
inline char *
Index_To_Str (STR_IDX idx, void *)	{ return Index_To_Str (idx); }

#define Str_To_Index(s,t)	(s)

// for character array table
extern UINT32
TCON_strtab_size ();

extern char *
TCON_strtab_buffer ();

extern void
Initialize_TCON_strtab (UINT32 size);

extern void
Initialize_TCON_strtab (const char *buf, UINT32 size);

// (similar to strncpy) s1 might not be null-termianted
extern UINT32
Save_StrN (const char *s1, UINT32 len);

extern char *
Index_to_char_array (UINT32 idx);

#ifdef MONGOOSE_BE

#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2)))
#include <ext/hash_map>
using __gnu_cxx::hash_map;
using __gnu_cxx::hash;
using std::equal_to;
using std::pair;
#else
#include <hash_map.h>
#endif

#ifndef mempool_allocator_INCLUDED
#include "mempool_allocator.h"
#endif

// merge in a strtab read from an input file with the current string table;
// returns a mapping from the string indices of the "buf" to the
// corresponding string indices in the merged table.

class STR_IDX_MAP {
private:
#ifndef __GNUC__
  typedef hash_map<STR_IDX, STR_IDX, hash<STR_IDX>, equal_to<STR_IDX>,
      mempool_allocator<STR_IDX> > rep_type;
#else
  typedef hash_map<STR_IDX, STR_IDX, hash<STR_IDX>, equal_to<STR_IDX>,
      mempool_allocator<pair<const STR_IDX, STR_IDX> > > rep_type;
#endif
  rep_type rep;

public:

  typedef rep_type::allocator_type allocator_type;

  STR_IDX_MAP(rep_type::size_type n = 0,
              rep_type::hasher hf = rep_type::hasher(),
              rep_type::key_equal eq  = rep_type::key_equal(),
              rep_type::allocator_type a = rep_type::allocator_type())
    : rep(n, hf, eq, a)
    {}

    STR_IDX& operator[](STR_IDX idx) { return rep[idx]; }
  STR_IDX operator[](STR_IDX idx) const {
    rep_type::const_iterator i = rep.find(idx);
    return i != rep.end() ? i->second : STR_IDX(0);
  }
};

extern void
Merge_Strtab (const char *buf, UINT32 size, STR_IDX_MAP& map);

extern void
Merge_TCON_Strtab (const char *buf, UINT32 size, STR_IDX_MAP& map);

#endif // MONGOOSE_BE

#endif /* strtab_INCLUDED */


text:
<!DOCTYPE HTML>

  <meta name="viewport" content="width=device-width, initial-scale=1" />

  <link rel="shortcut icon" href="assets/images/hackathon_logo.png"/>

  <title>{{page.title}}</title>
  <link rel="stylesheet" type="text/css" href="assets/styles/{{page.css}}" />

      <menu id="nav">
        <menuitem>Home</menuitem>
        <menuitem>Pictures</menuitem>
        <menuitem>FAQ</menuitem>
      </menu>

          Dream. Think. Learn. Explore. Teach. Collaborate. Innovate. Advocate.
          Code. Build. Hack. WSU.

  Top

    {{content}}


text:
class TestInputStreamFile : public testing::Test {
protected:
    static void SetUpTestCase() {}
    static void TearDownTestCase() {}
};

TEST_F(TestInputStreamFile, normal) {
    {
        baidu::galaxy::file::InputStreamFile is("/proc/cpuinfo");
        EXPECT_TRUE(is.IsOpen());
        EXPECT_FALSE(is.Eof());

        while (!is.Eof()) {
            std::string line;
            baidu::galaxy::util::ErrorCode ec = is.ReadLine(line);
            EXPECT_EQ(ec.Code(), 0) << ec.Message();
            //std::cerr << line;
        }
    }
    {
        // run as root or permission denied
        baidu::galaxy::file::InputStreamFile is("/proc/1/environ");
        baidu::galaxy::util::ErrorCode err;
        is.GetLastError(err);

        EXPECT_TRUE(is.IsOpen()) << err.Message();
        EXPECT_FALSE(is.Eof());
        std::string content;

        while (!is.Eof()) {
            char buf[1024];
            size_t size = sizeof buf;
            baidu::galaxy::util::ErrorCode ec = is.Read(buf, size);
            EXPECT_EQ(ec.Code(), 0);
            content.append(buf, size);
        }
    }
}

TEST_F(TestInputStreamFile, exception) {
    {
        baidu::galaxy::file::InputStreamFile is("/proc/not_exist_file");
        EXPECT_FALSE(is.IsOpen());
    }
}
#endif


text:
<?php

phutil_register_library('proselint', __FILE__);


text:
<?php

namespace Viteloge\FrontendBundle\Form\Type {

    use Symfony\Component\Form\AbstractType;
    use Symfony\Component\Form\FormBuilderInterface;
    use Symfony\Component\OptionsResolver\OptionsResolverInterface;
    use Viteloge\FrontendBundle\Component\Enum\SubjectEnum;

    class ContactType extends AbstractType {

        public function buildForm(FormBuilderInterface $builder, array $options) {
            $subjectEnum = new SubjectEnum();
            $builder
                ->add('firstname')
                ->add('lastname')
                ->add('company')
                ->add('phone')
                ->add('email')
                ->add('message', 'textarea')
                ->add('subject', 'choice', array(
                    'choices' => $subjectEnum->choices(),
                    'expanded' => false,
                    'multiple' => false,
                    'required' => true,
                    'empty_value' => 'contact.empty_value',
                    'preferred_choices' => array()
                ))
                ->add('address', 'textarea')
                ->add('postalCode')
                ->add('city')
                ->add('send', 'submit');
        }

        public function setDefaultOptions(OptionsResolverInterface $resolver){
            $resolver->setDefaults(array(
                'data_class' => 'Viteloge\FrontendBundle\Entity\Contact',
                'intention' => 'task_form',
            ));
        }

        public function getName() {
            return 'viteloge_frontend_contact';
        }

    }

}


text:
using System.IO;
using MbUnit.Framework;
using NHibernate;
using Rhino.Commons.ForTesting;
using Rhino.Commons.Test.Repository;

namespace Rhino.Commons.Test
{
	[TestFixture]
	public class WithTransactionFixture : DatabaseTestFixtureBase
	{

		[TestFixtureSetUp]
		public void OneTimeTestInitialize()
		{
			string path = Path.GetFullPath(@"Repository\Windsor.config");
			InitializeNHibernateAndIoC(PersistenceFramework.NHibernate, path, MappingInfo.FromAssemblyContaining<Parent>());
		}

		[SetUp]
		public void TestInitialize()
		{
			CurrentContext.CreateUnitOfWork();
		}

		[TearDown]
		public void TestCleanup()
		{
			CurrentContext.DisposeUnitOfWork();
		}

		protected static ISession session
		{
			get
			{
				return UnitOfWork.CurrentSession;
			}
		}

		[Test]
		public void NoTransactionDoesNotCommitParent()
		{
			Parent p = new Parent();
			p.Name = "Joe";
			session.Save(p);
			session.Clear();
			Parent p2 = session.Get<Parent>(p.Id);
			Assert.IsNull(p2);
		}

		[Test]
		public void WithTransactionCommitsParent()
		{
			Parent p = new Parent();
			p.Name = "Joe";
			With.Transaction(delegate()
			{
				session.Save(p);
			});
			session.Clear();
			Parent p2 = session.Get<Parent>(p.Id);
			Assert.IsNotNull(p2);

		}

		[Test]
		public void WithHeldTransactionDoesNotCommitParent()
		{
			Parent p = new Parent();
			p.Name = "Joe";
			With.AutoRollbackTransaction(delegate()
			{
				session.Save(p);
				session.Flush();
				session.Clear();
				Parent p2 = session.Get<Parent>(p.Id);
				Assert.IsNotNull(p2);
			});
			session.Clear();
			Parent p3 = session.Get<Parent>(p.Id);
			Assert.IsNull(p3);
		}

	}
}


text:
package javolution.text;

import java.io.IOException;
import java.io.Reader;

/**
 *
A character stream whose source is a Text.

 *
 This class is similar to {@link java.io.StringReader} but
 *     operates on {@link Text} instances and is not synchronized.

 *
 * @author javalama
 * @version 6.1, January 17, 2014
 */
public class TextReader extends Reader {

	private Text text;
	private int length;
	private int next = 0;
	private int mark = 0;

	/**
	 * Creates a new reader.
	 *
	 * @param text  Text providing the character stream
	 */
	public TextReader(Text text) {
		this.text = text;
		this.length = text.length();
	}

	/**
	 * Reads a single character.
	 *
	 * @return     The character read, or -1 if the end of the stream has been
	 *             reached
	 *
	 * @exception  IOException  If an I/O error occurs
	 */
	public int read() throws IOException {
		if (next >= length)
			return -1;
		return text.charAt(next++);
	}

	/**
	 * Reads characters into a portion of an array.
	 *
	 * @param      cbuf  Destination buffer
	 * @param      off   Offset at which to start writing characters
	 * @param      len   Maximum number of characters to read
	 *
	 * @return     The number of characters read, or -1 if the end of the
	 *             stream has been reached
	 *
	 * @exception  IOException  If an I/O error occurs
	 */
	public int read(char cbuf[], int off, int len) throws IOException {
		if ((off < 0) || (off > cbuf.length) || (len < 0)
				|| ((off + len) > cbuf.length) || ((off + len) < 0))
			throw new IndexOutOfBoundsException();
		if (len == 0)
			return 0;
		if (next >= length)
			return -1;
		int n = Math.min(length - next, len);
		text.getChars(next, next + n, cbuf, off);
		next += n;
		return n;
	}

	/**
	 * Skips the specified number of characters in the stream. Returns
	 * the number of characters that were skipped.
	 *
	 *
The ns parameter may be negative, even though the
	 * skip method of the {@link Reader} superclass throws
	 * an exception in this case. Negative values of ns cause the
	 * stream to skip backwards. Negative return values indicate a skip
	 * backwards. It is not possible to skip backwards past the beginning of
	 * the string.
	 *
	 *
If the entire string has been read or skipped, then this method has
	 * no effect and always returns 0.
	 *
	 * @exception  IOException  If an I/O error occurs
	 */
	public long skip(long ns) throws IOException {
		if (next >= length)
			return 0;
		// Bound skip by beginning and end of the source
		long n = Math.min(length - next, ns);
		n = Math.max(-next, n);
		next += n;
		return n;
	}

	/**
	 * Tells whether this stream is ready to be read.
	 *
	 * @return True if the next read() is guaranteed not to block for input
	 *
	 * @exception  IOException  If the stream is closed
	 */
	public boolean ready() throws IOException {
		return true;
	}

	/**
	 * Tells whether this stream supports the mark() operation, which it does.
	 */
	public boolean markSupported() {
		return true;
	}

	/**
	 * Marks the present position in the stream.  Subsequent calls to reset()
	 * will reposition the stream to this point.
	 *
	 * @param  readAheadLimit  Limit on the number of characters that may be
	 *                         read while still preserving the mark.  Because
	 *                         the stream's input comes from a string, there
	 *                         is no actual limit, so this argument must not
	 *                         be negative, but is otherwise ignored.
	 *
	 * @exception  IllegalArgumentException  If readAheadLimit is < 0
	 * @exception  IOException  If an I/O error occurs
	 */
	public void mark(int readAheadLimit) throws IOException {
		if (readAheadLimit < 0)
			throw new IllegalArgumentException("Read-ahead limit < 0");
		mark = next;
	}

	/**
	 * Resets the stream to the most recent mark, or to the beginning of the
	 * string if it has never been marked.
	 *
	 * @exception  IOException  If an I/O error occurs
	 */
	public void reset() throws IOException {
		next = mark;
	}

	/**
	 * Closes the stream and releases any system resources associated with
	 * it. Once the stream has been closed, further read(),
	 * ready(), mark(), or reset() invocations will throw an IOException.
	 * Closing a previously closed stream has no effect.
	 */
	public void close() {
		text = null;
	}
}


text:
var auth = require('../../src/util/authenticated.js');

var httpMocks = require('node-mocks-http');
var logger = require('../../src/util/logger.js');
var util = require('util');

describe('Middleware test for authentication', function() {
	it('check passport authentication - happy path', function(done) {
		var request = httpMocks.createRequest({
			method: 'GET',
			url: '/test/path',
			isAuthenticated: function(){ return true;}
		});
		var response = httpMocks.createResponse();
		auth.cookie(request, response, function next(error) {
			if (error) {
				expect("error received").toBe(error);
			};
			expect(response.statusCode).toEqual(200);
			done();
		});
	});

	it('check passport authentication - not authenticated', function(done) {
		var request = httpMocks.createRequest({
			method: 'GET',
			url: '/test/path',
			isAuthenticated: function(){ return false;}
		});
		var response = httpMocks.createResponse();
		response.redirect = function(url) {
			expect(url).toEqual('/login');
			done();
		};
		auth.cookie(request, response, function next(error) {
			if (error) {
				expect("error received").toBe(error);
			};
			// you should not get here
			expect(response.statusCode).not.toEqual(200);
			done();
		});
	});

	it("check environment for API_KEYS", function() {
		var str = process.env.API_KEYS;
		expect(str).toBeDefined();
		expect(typeof(str)).toBe("string");
		var obj = JSON.parse(str);
		logger.info("API_KEYS: " + util.inspect(obj));
		expect(typeof(obj.includes)).toBe("function");
		expect(obj.length).toBeGreaterThan(0);
	})
});


text:
require 'helper'

describe Kounta do
  subject { Kounta }

  it 'should be able to call a configure block' do
    subject.configure do |config|
      expect(config).to be(Kounta)
    end
  end

  it 'should have a version' do
    expect(Kounta::VERSION).to_not be_nil
  end

  it 'should be able to configure logging' do
    expect(Kounta.enable_logging).to be(false)
    Kounta.enable_logging = true
    expect(Kounta.enable_logging).to be(true)
    Kounta.enable_logging = false
    expect(Kounta.enable_logging).to be(false)
  end
end


text:
package at.ac.tuwien.infosys.java2wadl.testinheritance;

import javax.ws.rs.POST;
import javax.ws.rs.Path;

@Path("/sub")
public class SubResource extends SuperResource {

	@SuppressWarnings("unused")
	private TestObj obj = null;

	@POST
	public void setObj(TestObj obj) {
		this.obj = obj;
	}

}


text:
from django.conf.urls import include, url

urlpatterns = [
    url(r'', include('conman.routes.urls')),
]


text:
(function(MainService) {

    MainService.module
        .factory('BeerService', function($http) {
            return {
                beerOrder: function(beer, userUid, success) {
                    $http({
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: MainService.httpUrl + 'api/todos',
                        method: "POST",
                        data: {
                            text: beer,
                            user: userUid
                        },

                    }).success(success);

                }
            }
        });

})(MainService);


text:
$(function(){

    // I don't like messing around with prototypes, but this one *is* a nice polyfill :) ...
    if (typeof String.prototype.startsWith !== 'function') {
        String.prototype.startsWith = function(prefix) {
            return this.indexOf(prefix) === 0;
        };
    }

	// Initialise Fancytree
	$("#dom-tree").fancytree({
		extensions: [],
		checkbox: false,
		selectMode: 2,
		source: {
			url: "json/mch-carousel-dom-tree.json",
			complete: notifyParentIFrame
		},
		wide: {
			iconWidth: "26px",     // Adjust this if @fancy-icon-width != "16px"
			iconSpacing: "0px", // Adjust this if @fancy-icon-spacing != "3px"
			levelOfs: "16px"     // Adjust this if ul padding != "16px"
		},

		collapse: function() {
			notifyParentIFrame();
		},

		expand: function() {
			notifyParentIFrame();
		},

		activate: function(event, data){
			var d,
			    sd,
			    ico;
			// Blank out the icon first.
			// Problem: if the server is slow at providing the new icon image,
			//   the old icon will still appear with the new text for a consireable
			//   amount of time, and this is quite confusing.
			// Solution: clear the icon first thing, then, when the new icon arrives
			//   from the server, it will be displayed correctly. It's definitely
			//   preferrable to see an empty square for "a considerable amount of time",
			//   than something that has nothing to do with the new content.
			$('#dom-doc .dom-style-icon').prop('src', '');
			if((d=data.node.data) && d.description) {
				var sideBySide = $('#dom-doc').css('float')==='right';
				$('#dom-doc .dom-description').html(d.description);
				if(d.styleable) {
					// Pick the icon and the default description for the style.
					switch(d.styleable) {
						case 'yes':
							ico = 'images/Light_green_check.svg';
							sd = '
You may style this element as you see fit.
';
							break;
						case 'no':
							ico = 'images/Information-icon.svg';
						    sd = '
Usually there is no need to style this element.
';
						    break;
						case 'dont':
							ico = 'images/StopSign-nofont.svg';
							sd = '
Refrain from styling this element unless you really know what you are doing.
';
							break;
						case 'warning':
							ico = 'images/ryanlerch-Warning-Deer-Roadsign.svg';
							sd = '
There should be a manually-entered description for this element! You might want to report an issue in GitHub for this, I\'d be very grateful :-) ...
';
							break;
						default:
							ico = 'images/h0us3s-Signs-Hazard-Warning-17.svg';
							sd = '';
					}

					// But if styling details are present, override the default description
					if(d.styleDetails) {
						if(d.styleDetails.startsWith('+'))
							sd += d.styleDetails.substr(1);
						else
							sd = d.styleDetails;
					}
					$('#dom-doc .dom-style-details').html(sd);
					$('#dom-doc .dom-style-icon').prop('src', ico);
					$('#dom-doc .dom-style-info').css('display', 'block');
					$('#dom-doc').scrollTop(0); // Reset to top, for mobile devices
				}
				else
					$('#dom-doc .dom-style-info').css('display', 'none');

				// Check where we are in the DOM tree and reposition #dom-doc if it's smaller
				//   than #dom-tree
				var hTree = parseInt($('#dom-tree').css('height')),
					hDoc = parseInt($('#dom-doc').css('height'));
				if(hTree <= hDoc)
					$('#dom-doc').css('top', 0);
				else {
					var liTop = $(data.node.li).position().top;
					$('#dom-doc').css('top', Math.max(0, Math.min(hTree-hDoc, liTop-20)));
				}

				// Force to display #dom-doc
				$('#dom-doc').css('display', 'block');
			}
			else {
				// Hide all of #dom-doc and clean-up
				$('#dom-doc').css('display', 'none');
				$('#dom-doc .dom-description').html('');
				$('#dom-doc .dom-style-icon').prop('src', '');
				$('#dom-doc .dom-style-details').html('');
			}

			notifyParentIFrame();
		},

		iconClass: function(event, data){
			var t = data.node.data.tag;
			if(!t)
				return def();
			switch(t) {
				case 'img':
					return data.node.folder ? 'image-highlight' : 'image';
				case 'a':
					return 'hyperlink';
				case 'p':
					return 'paragraph';
			}
			return def();

			function def() {
				return data.node.folder ? 'div-highlight' : 'div';
			}
		}
	});
	$('#expand-all').on({
		click: function() {
		$("#dom-tree").fancytree("getRootNode").visit(function(node){
        		node.setExpanded(true);
      		});
      	},
		dblckick: ignoreDoubleClick
	});
	$('#expand-all')[0].onselectstart = ignoreDoubleClick;

	function notifyParentIFrame() {
		var sideBySide = $('#dom-doc').css('float')==='right';
		console.log(sideBySide);

		// Not sure why getting the height is so complicated... maybe
		//   because #dom-tree has not collapsed/expanded yet?
		var treeHeight = $($('#dom-tree').children()[0]).height() + 10,
		    newBodyHeight;
		if(sideBySide) {
			newBodyHeight = Math.max(treeHeight, $('#dom-doc').height());
		}
		else {
		    var parentWindowHeight;
			if(parent.getWindowHeight)
				parentWindowHeight = parent.getWindowHeight();
			else
				parentWindowHeight = 99999;
			newBodyHeight = Math.min(parentWindowHeight, treeHeight*2.23);
		}
		newBodyHeight = Math.max(newBodyHeight, 100);

		$('body').height(newBodyHeight);
		if(parent.adjustIFrame)
			parent.adjustIFrame(newBodyHeight);
	}

	function ignoreDoubleClick(e) {
		e.preventDefault();
	}
});

function gotoNode(id) {
	var tree = $("#dom-tree").fancytree("getTree");
	var node = tree.getNodeByKey(id);
	node.setActive(true);
}


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

<title>H-Index</title>
<meta name="date" content="2015-05-30">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I J K L M N O P R S T U V W X Y

H

hasComputed() - Method in class pacman.controllers.Controller

This method is used to check whether the controller computed a move since the last
 update of the game.

hasReceivedExtraLife - Variable in class pacman.game.internal.PacMan

HelloWeka - Class in weka.api

HelloWeka() - Constructor for class weka.api.HelloWeka

HumanController - Class in pacman.controllers

HumanController(KeyBoardInput) - Constructor for class pacman.controllers.HumanController

A B C D E F G H I J K L M N O P R S T U V W X Y

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
package com.consol.citrus.websocket.config.annotation;

import com.consol.citrus.TestActor;
import com.consol.citrus.config.annotation.AbstractAnnotationConfigParser;
import com.consol.citrus.context.ReferenceResolver;
import com.consol.citrus.endpoint.resolver.EndpointUriResolver;
import com.consol.citrus.websocket.client.WebSocketClient;
import com.consol.citrus.websocket.client.WebSocketClientBuilder;
import com.consol.citrus.websocket.message.WebSocketMessageConverter;
import org.springframework.util.StringUtils;

/**
 * @author Christoph Deppisch
 * @since 2.5
 */
public class WebSocketClientConfigParser extends AbstractAnnotationConfigParser<WebSocketClientConfig, WebSocketClient> {

    /**
     * Constructor matching super.
     * @param referenceResolver
     */
    public WebSocketClientConfigParser(ReferenceResolver referenceResolver) {
        super(referenceResolver);
    }

    @Override
    public WebSocketClient parse(WebSocketClientConfig annotation) {
        WebSocketClientBuilder builder = new WebSocketClientBuilder();

        builder.requestUrl(annotation.requestUrl());

        if (StringUtils.hasText(annotation.messageConverter())) {
            builder.messageConverter(getReferenceResolver().resolve(annotation.messageConverter(), WebSocketMessageConverter.class));
        }

        if (StringUtils.hasText(annotation.endpointResolver())) {
            builder.endpointResolver(getReferenceResolver().resolve(annotation.endpointResolver(), EndpointUriResolver.class));
        }

        builder.pollingInterval(annotation.pollingInterval());

        builder.timeout(annotation.timeout());

        if (StringUtils.hasText(annotation.actor())) {
            builder.actor(getReferenceResolver().resolve(annotation.actor(), TestActor.class));
        }

        return builder.initialize().build();
    }
}


text:
<?php
require_once(ROOT . 'inc/core/webpage.inc.php');
$site_authorization_conf = ROOT . 'site.authorization.config.inc.php';
if (file_exists($site_authorization_conf)) {
    require_once($site_authorization_conf);
}

/**
* 网站项目的验证服务提供对象。
*/
class SiteAuthorizationProvider implements IAuthorizationProvider{
    /*- IAuthorizationProvider 接口实现 START -*/
    /*- IInjectEnable 接口实现 START -*/
    /**
     * 设置属性值。
     */
    public function __set($prop, $val){
        $this->$prop = $val;
    }
    /*- IInjectEnable 接口实现 END -*/

	/**
	* 进行最初的拦截,进行认证。
	* @param $permissions {Array} 当前用户所拥有的许可列表。
	*/
	public function intercept($permissions){
        /*
        print_r($_SERVER['QUERY_STRING']);
        print_r($_SERVER['REQUEST_URI']);
        print_r($_SERVER['SCRIPT_NAME']);
        print_r($_SERVER['PHP_SELF']);*/
        $current_path = $_SERVER['PHP_SELF'];
        if (function_exists(get_authorization_config)) {
            $config = get_authorization_config();
            $auth_url = $config['gateway']['url'];
            $auth_param = $config['gateway']['param'];
            $directories = $config['directories'];

            /*默认为允许访问*/
            $allow = true;
            $allow_permissions = $this->getCurrentRequiredPermissions($current_path, array(), $directories);
            if (count($allow_permissions) > 0) {
                $allow = false;
                foreach ($permissions as $idx => $permission) {
                    if (in_array($permission, $allow_permissions)) {
                        $allow = true;
                    }
                }
            }
            if (!$allow) {
                $url = "$auth_url?$auth_param=" . urlencode($current_path);
                Header("Location: $url");
                exit();
            }
        }
        }
    /*- IAuthorizationProvider 接口实现 END -*/

    /*- 私有方法 START -*/
    private function getCurrentRequiredPermissions($path, $permissions, $directories){
        $path = trim($path, "/");
        foreach ($directories as $directory => $settions) {
            $allow_permissions = array();
            if (stripos($path, $directory) !== false) {
                if (array_key_exists('allow', $settions)) {
                    $allow_permissions = $settions['allow'];
                }
                if (array_key_exists('directories', $settions) && (count($settions['directories']) > 0)) {
                    $sub_path = substr($path, strlen($directory));
                    /*下一级的权限配置覆盖上一级的权限配置*/
                    $allow_permissions = $this->getCurrentRequiredPermissions($sub_path, $permissions, $settions['directories']);
                }
            }
            /*同级的权限配置合并*/
            $permissions = array_merge($permissions, $allow_permissions);
        }
        $permissions = array_unique($permissions);
        return $permissions;
    }
    /*- 私有方法 END -*/
}
?>


text:
  <TITLE>
  EMBOSS: degapseq
  </TITLE>

degapseq

    Function

    Description

degapseq reads one or more sequences and writes them out again but stripped of any non-alphabetic characters.  It's main purpose is to remove gap characters from aligned sequences, but it will also remove such things as the symbol for translation STOP ('*') in a protein sequence.

    Usage

    Command line arguments

    Input file format

degapseq reads one or more nucleotide or protein sequences.

    Output file format

The output is a sequence with no gaps.

    Data files

None.

    Notes

There are many different formats for storing molecular sequences in files. Some formats are specifically for aligned sequences, where gaps are inserted into the sequences for purposes of alignment. Gaps are indicated with different characters depending on the format in question, but commonly include '.', '-' and '~'.  Some formats use more than one type of character to indicate different types of gaps, for example gaps at the sequence ends, internal gaps, gaps inserted by a program and gaps inserted manually by a person editing the alignment may all be denoted with different characters.

EMBOSS uses the dash character ('-') only to indicate gaps. When an EMBOSS program reads a sequence with gaps, all gap characters are changed internally to a dash ('-').  Thus any distinguishing characters for different gap types are convered to a '-' on output.

    References

None.

    Warnings

It will remove '*' characters from protein sequences as well as removing
the gap characters.

    Diagnostic Error Messages

None.

    Exit status

It always exits with status 0.

    Known bugs

None.

    Author(s)

    History

    Target users

    Comments


text:
namespace v8 {
namespace internal {

int Deoptimizer::patch_size() {
  // Size of the code used to patch lazy bailout points.
  // Patching is done by Deoptimizer::DeoptimizeFunction.
  return 4 * kInstructionSize;
}

void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
  // Empty because there is no need for relocation information for the code
  // patching in Deoptimizer::PatchCodeForDeoptimization below.
}

void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
  // Invalidate the relocation information, as it will become invalid by the
  // code patching below, and is not needed any more.
  code->InvalidateRelocation();

  // TODO(jkummerow): if (FLAG_zap_code_space), make the code object's
  // entry sequence unusable (see other architectures).

  DeoptimizationInputData* deopt_data =
      DeoptimizationInputData::cast(code->deoptimization_data());
  Address code_start_address = code->instruction_start();
#ifdef DEBUG
  Address prev_call_address = NULL;
#endif
  // For each LLazyBailout instruction insert a call to the corresponding
  // deoptimization entry.
  for (int i = 0; i < deopt_data->DeoptCount(); i++) {
    if (deopt_data->Pc(i)->value() == -1) continue;

    Address call_address = code_start_address + deopt_data->Pc(i)->value();
    Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY);

    PatchingAssembler patcher(isolate, call_address,
                              patch_size() / kInstructionSize);
    patcher.ldr_pcrel(ip0, (2 * kInstructionSize) >> kLoadLiteralScaleLog2);
    patcher.blr(ip0);
    patcher.dc64(reinterpret_cast<intptr_t>(deopt_entry));

    DCHECK((prev_call_address == NULL) ||
           (call_address >= prev_call_address + patch_size()));
    DCHECK(call_address + patch_size() <= code->instruction_end());
#ifdef DEBUG
    prev_call_address = call_address;
#endif
  }
}

void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) {
  // Set the register values. The values are not important as there are no
  // callee saved registers in JavaScript frames, so all registers are
  // spilled. Registers fp and sp are set to the correct values though.
  for (int i = 0; i < Register::NumRegisters(); i++) {
    input_->SetRegister(i, 0);
  }

  // TODO(all): Do we also need to set a value to csp?
  input_->SetRegister(jssp.code(), reinterpret_cast<intptr_t>(frame->sp()));
  input_->SetRegister(fp.code(), reinterpret_cast<intptr_t>(frame->fp()));

  for (int i = 0; i < DoubleRegister::kMaxNumRegisters; i++) {
    input_->SetDoubleRegister(i, 0.0);
  }

  // Fill the frame content from the actual data on the frame.
  for (unsigned i = 0; i < input_->GetFrameSize(); i += kPointerSize) {
    input_->SetFrameSlot(i, Memory::uint64_at(tos + i));
  }
}

bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
  // There is no dynamic alignment padding on ARM64 in the input frame.
  return false;
}

void Deoptimizer::SetPlatformCompiledStubRegisters(
    FrameDescription* output_frame, CodeStubDescriptor* descriptor) {
  ApiFunction function(descriptor->deoptimization_handler());
  ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_);
  intptr_t handler = reinterpret_cast<intptr_t>(xref.address());
  int params = descriptor->GetHandlerParameterCount();
  output_frame->SetRegister(x0.code(), params);
  output_frame->SetRegister(x1.code(), handler);
}

void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
  for (int i = 0; i < DoubleRegister::kMaxNumRegisters; ++i) {
    double double_value = input_->GetDoubleRegister(i);
    output_frame->SetDoubleRegister(i, double_value);
  }
}

#define __ masm()->

void Deoptimizer::TableEntryGenerator::Generate() {
  GeneratePrologue();

  // TODO(all): This code needs to be revisited. We probably only need to save
  // caller-saved registers here. Callee-saved registers can be stored directly
  // in the input frame.

  // Save all allocatable floating point registers.
  CPURegList saved_fp_registers(
      CPURegister::kFPRegister, kDRegSizeInBits,
      RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
          ->allocatable_double_codes_mask());
  __ PushCPURegList(saved_fp_registers);

  // We save all the registers expcept jssp, sp and lr.
  CPURegList saved_registers(CPURegister::kRegister, kXRegSizeInBits, 0, 27);
  saved_registers.Combine(fp);
  __ PushCPURegList(saved_registers);

  __ Mov(x3, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
  __ Str(fp, MemOperand(x3));

  const int kSavedRegistersAreaSize =
      (saved_registers.Count() * kXRegSize) +
      (saved_fp_registers.Count() * kDRegSize);

  // Floating point registers are saved on the stack above core registers.
  const int kFPRegistersOffset = saved_registers.Count() * kXRegSize;

  // Get the bailout id from the stack.
  Register bailout_id = x2;
  __ Peek(bailout_id, kSavedRegistersAreaSize);

  Register code_object = x3;
  Register fp_to_sp = x4;
  // Get the address of the location in the code object. This is the return
  // address for lazy deoptimization.
  __ Mov(code_object, lr);
  // Compute the fp-to-sp delta, and correct one word for bailout id.
  __ Add(fp_to_sp, masm()->StackPointer(),
         kSavedRegistersAreaSize + (1 * kPointerSize));
  __ Sub(fp_to_sp, fp, fp_to_sp);

  // Allocate a new deoptimizer object.
  __ Ldr(x0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
  __ Mov(x1, type());
  // Following arguments are already loaded:
  //  - x2: bailout id
  //  - x3: code object address
  //  - x4: fp-to-sp delta
  __ Mov(x5, ExternalReference::isolate_address(isolate()));

  {
    // Call Deoptimizer::New().
    AllowExternalCallThatCantCauseGC scope(masm());
    __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6);
  }

  // Preserve "deoptimizer" object in register x0.
  Register deoptimizer = x0;

  // Get the input frame descriptor pointer.
  __ Ldr(x1, MemOperand(deoptimizer, Deoptimizer::input_offset()));

  // Copy core registers into the input frame.
  CPURegList copy_to_input = saved_registers;
  for (int i = 0; i < saved_registers.Count(); i++) {
    __ Peek(x2, i * kPointerSize);
    CPURegister current_reg = copy_to_input.PopLowestIndex();
    int offset = (current_reg.code() * kPointerSize) +
        FrameDescription::registers_offset();
    __ Str(x2, MemOperand(x1, offset));
  }

  // Copy FP registers to the input frame.
  for (int i = 0; i < saved_fp_registers.Count(); i++) {
    int dst_offset = FrameDescription::double_registers_offset() +
        (i * kDoubleSize);
    int src_offset = kFPRegistersOffset + (i * kDoubleSize);
    __ Peek(x2, src_offset);
    __ Str(x2, MemOperand(x1, dst_offset));
  }

  // Remove the bailout id and the saved registers from the stack.
  __ Drop(1 + (kSavedRegistersAreaSize / kXRegSize));

  // Compute a pointer to the unwinding limit in register x2; that is
  // the first stack slot not part of the input frame.
  Register unwind_limit = x2;
  __ Ldr(unwind_limit, MemOperand(x1, FrameDescription::frame_size_offset()));
  __ Add(unwind_limit, unwind_limit, __ StackPointer());

  // Unwind the stack down to - but not including - the unwinding
  // limit and copy the contents of the activation frame to the input
  // frame description.
  __ Add(x3, x1, FrameDescription::frame_content_offset());
  Label pop_loop;
  Label pop_loop_header;
  __ B(&pop_loop_header);
  __ Bind(&pop_loop);
  __ Pop(x4);
  __ Str(x4, MemOperand(x3, kPointerSize, PostIndex));
  __ Bind(&pop_loop_header);
  __ Cmp(unwind_limit, __ StackPointer());
  __ B(ne, &pop_loop);

  // Compute the output frame in the deoptimizer.
  __ Push(x0);  // Preserve deoptimizer object across call.

  {
    // Call Deoptimizer::ComputeOutputFrames().
    AllowExternalCallThatCantCauseGC scope(masm());
    __ CallCFunction(
        ExternalReference::compute_output_frames_function(isolate()), 1);
  }
  __ Pop(x4);  // Restore deoptimizer object (class Deoptimizer).

  // Replace the current (input) frame with the output frames.
  Label outer_push_loop, inner_push_loop,
      outer_loop_header, inner_loop_header;
  __ Ldrsw(x1, MemOperand(x4, Deoptimizer::output_count_offset()));
  __ Ldr(x0, MemOperand(x4, Deoptimizer::output_offset()));
  __ Add(x1, x0, Operand(x1, LSL, kPointerSizeLog2));
  __ B(&outer_loop_header);

  __ Bind(&outer_push_loop);
  Register current_frame = x2;
  __ Ldr(current_frame, MemOperand(x0, 0));
  __ Ldr(x3, MemOperand(current_frame, FrameDescription::frame_size_offset()));
  __ B(&inner_loop_header);

  __ Bind(&inner_push_loop);
  __ Sub(x3, x3, kPointerSize);
  __ Add(x6, current_frame, x3);
  __ Ldr(x7, MemOperand(x6, FrameDescription::frame_content_offset()));
  __ Push(x7);
  __ Bind(&inner_loop_header);
  __ Cbnz(x3, &inner_push_loop);

  __ Add(x0, x0, kPointerSize);
  __ Bind(&outer_loop_header);
  __ Cmp(x0, x1);
  __ B(lt, &outer_push_loop);

  __ Ldr(x1, MemOperand(x4, Deoptimizer::input_offset()));
  DCHECK(!saved_fp_registers.IncludesAliasOf(crankshaft_fp_scratch) &&
         !saved_fp_registers.IncludesAliasOf(fp_zero) &&
         !saved_fp_registers.IncludesAliasOf(fp_scratch));
  int src_offset = FrameDescription::double_registers_offset();
  while (!saved_fp_registers.IsEmpty()) {
    const CPURegister reg = saved_fp_registers.PopLowestIndex();
    __ Ldr(reg, MemOperand(x1, src_offset));
    src_offset += kDoubleSize;
  }

  // Push state from the last output frame.
  __ Ldr(x6, MemOperand(current_frame, FrameDescription::state_offset()));
  __ Push(x6);

  // TODO(all): ARM copies a lot (if not all) of the last output frame onto the
  // stack, then pops it all into registers. Here, we try to load it directly
  // into the relevant registers. Is this correct? If so, we should improve the
  // ARM code.

  // TODO(all): This code needs to be revisited, We probably don't need to
  // restore all the registers as fullcodegen does not keep live values in
  // registers (note that at least fp must be restored though).

  // Restore registers from the last output frame.
  // Note that lr is not in the list of saved_registers and will be restored
  // later. We can use it to hold the address of last output frame while
  // reloading the other registers.
  DCHECK(!saved_registers.IncludesAliasOf(lr));
  Register last_output_frame = lr;
  __ Mov(last_output_frame, current_frame);

  // We don't need to restore x7 as it will be clobbered later to hold the
  // continuation address.
  Register continuation = x7;
  saved_registers.Remove(continuation);

  while (!saved_registers.IsEmpty()) {
    // TODO(all): Look for opportunities to optimize this by using ldp.
    CPURegister current_reg = saved_registers.PopLowestIndex();
    int offset = (current_reg.code() * kPointerSize) +
        FrameDescription::registers_offset();
    __ Ldr(current_reg, MemOperand(last_output_frame, offset));
  }

  __ Ldr(continuation, MemOperand(last_output_frame,
                                  FrameDescription::continuation_offset()));
  __ Ldr(lr, MemOperand(last_output_frame, FrameDescription::pc_offset()));
  __ InitializeRootRegister();
  __ Br(continuation);
}

// Size of an entry of the second level deopt table.
// This is the code size generated by GeneratePrologue for one entry.
const int Deoptimizer::table_entry_size_ = 2 * kInstructionSize;

void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
  UseScratchRegisterScope temps(masm());
  Register entry_id = temps.AcquireX();

  // Create a sequence of deoptimization entries.
  // Note that registers are still live when jumping to an entry.
  Label done;
  {
    InstructionAccurateScope scope(masm());

    // The number of entry will never exceed kMaxNumberOfEntries.
    // As long as kMaxNumberOfEntries is a valid 16 bits immediate you can use
    // a movz instruction to load the entry id.
    DCHECK(is_uint16(Deoptimizer::kMaxNumberOfEntries));

    for (int i = 0; i < count(); i++) {
      int start = masm()->pc_offset();
      USE(start);
      __ movz(entry_id, i);
      __ b(&done);
      DCHECK(masm()->pc_offset() - start == table_entry_size_);
    }
  }
  __ Bind(&done);
  __ Push(entry_id);
}

void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) {
  SetFrameSlot(offset, value);
}

void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) {
  SetFrameSlot(offset, value);
}

void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) {
  // No embedded constant pool support.
  UNREACHABLE();
}

#undef __

}  // namespace internal
}  // namespace v8


text:
#pragma once

#include "Otter.h"

class SamplePlugin : public Otter::IPlugin
{
public:
	SamplePlugin(void);
	virtual ~SamplePlugin(void);

public:

	/* Creates a control from the provided control data
	 */
	virtual Otter::Control* CreateControl(Otter::Scene* pScene, const Otter::ControlData* pControlData, Otter::Control* pParent);

	/* Destroys a previously created control
	 */
	virtual bool DestroyControl(Otter::Control* pControl);
};


text:
import {inject} from 'aurelia-framework';
import DNA from './../util/dNA';
import _ from './../../jspm_packages/npm/underscore@1.8.3/underscore-min'
import {Base} from './base.js'

export class ComplementingDNAStrand extends Base {
	constructor() {
		super();
		this.dNA = DNA;

		// view model's model from Base.js
		this.title = 'Complementing a Strand of DNA';
		this.input = '';
		this.output = '';
		this.inputLabel = 'DNA String';
		this.outputLabel = "complement"
		this.placeholder = 'DNA String';
		this.processButtonText = 'complement';
		this.Id = 'REVC';
	}

	process () {
		this.output = this.reverseComplement(this.input);
		let x = 0;
	}

	reverseComplement(input) {
		if (input.length === 0 || input.length > 1000) {
			super.error();
			return `DNA String must be between 1 and 1000 and not: ${input.length}`;
		}

		if (!this.dNA.isValid(input, true)) {
			super.error();
			return 'DNA String is not valid';
		}

		return this.dNA.reverseComplement(input, true);
	}
}


text:
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module    : QStyleOptionToolButton.hs
    Copyright : (c) David Harley 2010
    Project   : qtHaskell
    Version   : 1.1.4
    Modified  : 2010-09-02 17:02:30

    Warning   : this file is machine generated - do not modify.
--}
-----------------------------------------------------------------------------

module Qtc.Gui.QStyleOptionToolButton (
  QqStyleOptionToolButton(..)
  ,QqStyleOptionToolButton_nf(..)
  ,qStyleOptionToolButton_delete
  )
  where

import Qth.ClassTypes.Core
import Qtc.Enums.Base
import Qtc.Enums.Core.Qt
import Qtc.Enums.Gui.QStyleOptionToolButton

import Qtc.Classes.Base
import Qtc.Classes.Qccs
import Qtc.Classes.Core
import Qtc.ClassTypes.Core
import Qth.ClassTypes.Core
import Qtc.Classes.Gui
import Qtc.ClassTypes.Gui

class QqStyleOptionToolButton x1 where
  qStyleOptionToolButton :: x1 -> IO (QStyleOptionToolButton ())

instance QqStyleOptionToolButton (()) where
 qStyleOptionToolButton ()
  = withQStyleOptionToolButtonResult $
    qtc_QStyleOptionToolButton

foreign import ccall "qtc_QStyleOptionToolButton" qtc_QStyleOptionToolButton :: IO (Ptr (TQStyleOptionToolButton ()))

instance QqStyleOptionToolButton ((QStyleOptionToolButton t1)) where
 qStyleOptionToolButton (x1)
  = withQStyleOptionToolButtonResult $
    withObjectPtr x1 $ \cobj_x1 ->
    qtc_QStyleOptionToolButton1 cobj_x1

foreign import ccall "qtc_QStyleOptionToolButton1" qtc_QStyleOptionToolButton1 :: Ptr (TQStyleOptionToolButton t1) -> IO (Ptr (TQStyleOptionToolButton ()))

class QqStyleOptionToolButton_nf x1 where
  qStyleOptionToolButton_nf :: x1 -> IO (QStyleOptionToolButton ())

instance QqStyleOptionToolButton_nf (()) where
 qStyleOptionToolButton_nf ()
  = withObjectRefResult $
    qtc_QStyleOptionToolButton

instance QqStyleOptionToolButton_nf ((QStyleOptionToolButton t1)) where
 qStyleOptionToolButton_nf (x1)
  = withObjectRefResult $
    withObjectPtr x1 $ \cobj_x1 ->
    qtc_QStyleOptionToolButton1 cobj_x1

instance QarrowType (QStyleOptionToolButton a) (()) where
 arrowType x0 ()
  = withQEnumResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_arrowType cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_arrowType" qtc_QStyleOptionToolButton_arrowType :: Ptr (TQStyleOptionToolButton a) -> IO CLong

instance Qfeatures (QStyleOptionToolButton a) (()) (IO (ToolButtonFeatures)) where
 features x0 ()
  = withQFlagsResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_features cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_features" qtc_QStyleOptionToolButton_features :: Ptr (TQStyleOptionToolButton a) -> IO CLong

instance Qfont (QStyleOptionToolButton a) (()) where
 font x0 ()
  = withQFontResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_font cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_font" qtc_QStyleOptionToolButton_font :: Ptr (TQStyleOptionToolButton a) -> IO (Ptr (TQFont ()))

instance Qicon (QStyleOptionToolButton a) (()) (IO (QIcon ())) where
 icon x0 ()
  = withQIconResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_icon cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_icon" qtc_QStyleOptionToolButton_icon :: Ptr (TQStyleOptionToolButton a) -> IO (Ptr (TQIcon ()))

instance QqiconSize (QStyleOptionToolButton a) (()) where
 qiconSize x0 ()
  = withQSizeResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_iconSize cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_iconSize" qtc_QStyleOptionToolButton_iconSize :: Ptr (TQStyleOptionToolButton a) -> IO (Ptr (TQSize ()))

instance QiconSize (QStyleOptionToolButton a) (()) where
 iconSize x0 ()
  = withSizeResult $ \csize_ret_w csize_ret_h ->
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_iconSize_qth cobj_x0 csize_ret_w csize_ret_h

foreign import ccall "qtc_QStyleOptionToolButton_iconSize_qth" qtc_QStyleOptionToolButton_iconSize_qth :: Ptr (TQStyleOptionToolButton a) -> Ptr CInt -> Ptr CInt -> IO ()

instance Qpos (QStyleOptionToolButton a) (()) (IO (Point)) where
 pos x0 ()
  = withPointResult $ \cpoint_ret_x cpoint_ret_y ->
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_pos_qth cobj_x0 cpoint_ret_x cpoint_ret_y

foreign import ccall "qtc_QStyleOptionToolButton_pos_qth" qtc_QStyleOptionToolButton_pos_qth :: Ptr (TQStyleOptionToolButton a) -> Ptr CInt -> Ptr CInt -> IO ()

instance Qqpos (QStyleOptionToolButton a) (()) (IO (QPoint ())) where
 qpos x0 ()
  = withQPointResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_pos cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_pos" qtc_QStyleOptionToolButton_pos :: Ptr (TQStyleOptionToolButton a) -> IO (Ptr (TQPoint ()))

instance QsetArrowType (QStyleOptionToolButton a) ((ArrowType)) where
 setArrowType x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_setArrowType cobj_x0 (toCLong $ qEnum_toInt x1)

foreign import ccall "qtc_QStyleOptionToolButton_setArrowType" qtc_QStyleOptionToolButton_setArrowType :: Ptr (TQStyleOptionToolButton a) -> CLong -> IO ()

instance QsetFeatures (QStyleOptionToolButton a) ((ToolButtonFeatures)) where
 setFeatures x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_setFeatures cobj_x0 (toCLong $ qFlags_toInt x1)

foreign import ccall "qtc_QStyleOptionToolButton_setFeatures" qtc_QStyleOptionToolButton_setFeatures :: Ptr (TQStyleOptionToolButton a) -> CLong -> IO ()

instance QsetFont (QStyleOptionToolButton a) ((QFont t1)) where
 setFont x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withObjectPtr x1 $ \cobj_x1 ->
    qtc_QStyleOptionToolButton_setFont cobj_x0 cobj_x1

foreign import ccall "qtc_QStyleOptionToolButton_setFont" qtc_QStyleOptionToolButton_setFont :: Ptr (TQStyleOptionToolButton a) -> Ptr (TQFont t1) -> IO ()

instance QsetIcon (QStyleOptionToolButton a) ((QIcon t1)) where
 setIcon x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withObjectPtr x1 $ \cobj_x1 ->
    qtc_QStyleOptionToolButton_setIcon cobj_x0 cobj_x1

foreign import ccall "qtc_QStyleOptionToolButton_setIcon" qtc_QStyleOptionToolButton_setIcon :: Ptr (TQStyleOptionToolButton a) -> Ptr (TQIcon t1) -> IO ()

instance QqsetIconSize (QStyleOptionToolButton a) ((QSize t1)) where
 qsetIconSize x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withObjectPtr x1 $ \cobj_x1 ->
    qtc_QStyleOptionToolButton_setIconSize cobj_x0 cobj_x1

foreign import ccall "qtc_QStyleOptionToolButton_setIconSize" qtc_QStyleOptionToolButton_setIconSize :: Ptr (TQStyleOptionToolButton a) -> Ptr (TQSize t1) -> IO ()

instance QsetIconSize (QStyleOptionToolButton a) ((Size)) where
 setIconSize x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withCSize x1 $ \csize_x1_w csize_x1_h ->
    qtc_QStyleOptionToolButton_setIconSize_qth cobj_x0 csize_x1_w csize_x1_h

foreign import ccall "qtc_QStyleOptionToolButton_setIconSize_qth" qtc_QStyleOptionToolButton_setIconSize_qth :: Ptr (TQStyleOptionToolButton a) -> CInt -> CInt -> IO ()

instance QsetPos (QStyleOptionToolButton a) ((Point)) where
 setPos x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withCPoint x1 $ \cpoint_x1_x cpoint_x1_y ->
    qtc_QStyleOptionToolButton_setPos_qth cobj_x0 cpoint_x1_x cpoint_x1_y

foreign import ccall "qtc_QStyleOptionToolButton_setPos_qth" qtc_QStyleOptionToolButton_setPos_qth :: Ptr (TQStyleOptionToolButton a) -> CInt -> CInt -> IO ()

instance QqsetPos (QStyleOptionToolButton a) ((QPoint t1)) where
 qsetPos x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withObjectPtr x1 $ \cobj_x1 ->
    qtc_QStyleOptionToolButton_setPos cobj_x0 cobj_x1

foreign import ccall "qtc_QStyleOptionToolButton_setPos" qtc_QStyleOptionToolButton_setPos :: Ptr (TQStyleOptionToolButton a) -> Ptr (TQPoint t1) -> IO ()

instance QsetText (QStyleOptionToolButton a) ((String)) where
 setText x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    withCWString x1 $ \cstr_x1 ->
    qtc_QStyleOptionToolButton_setText cobj_x0 cstr_x1

foreign import ccall "qtc_QStyleOptionToolButton_setText" qtc_QStyleOptionToolButton_setText :: Ptr (TQStyleOptionToolButton a) -> CWString -> IO ()

instance QsetToolButtonStyle (QStyleOptionToolButton a) ((ToolButtonStyle)) where
 setToolButtonStyle x0 (x1)
  = withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_setToolButtonStyle cobj_x0 (toCLong $ qEnum_toInt x1)

foreign import ccall "qtc_QStyleOptionToolButton_setToolButtonStyle" qtc_QStyleOptionToolButton_setToolButtonStyle :: Ptr (TQStyleOptionToolButton a) -> CLong -> IO ()

instance Qtext (QStyleOptionToolButton a) (()) (IO (String)) where
 text x0 ()
  = withStringResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_text cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_text" qtc_QStyleOptionToolButton_text :: Ptr (TQStyleOptionToolButton a) -> IO (Ptr (TQString ()))

instance QtoolButtonStyle (QStyleOptionToolButton a) (()) where
 toolButtonStyle x0 ()
  = withQEnumResult $
    withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_toolButtonStyle cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_toolButtonStyle" qtc_QStyleOptionToolButton_toolButtonStyle :: Ptr (TQStyleOptionToolButton a) -> IO CLong

qStyleOptionToolButton_delete :: QStyleOptionToolButton a -> IO ()
qStyleOptionToolButton_delete x0
  = withObjectPtr x0 $ \cobj_x0 ->
    qtc_QStyleOptionToolButton_delete cobj_x0

foreign import ccall "qtc_QStyleOptionToolButton_delete" qtc_QStyleOptionToolButton_delete :: Ptr (TQStyleOptionToolButton a) -> IO ()


text:
package gov.nih.nci.caadapter.hl7.vocabulary;

import gov.nih.nci.caadapter.common.ApplicationException;

/**
 * This class defines ...
 *
 * @author OWNER: Kisung Um
 * @author LAST UPDATE $Author: wangeug $
 * @version Since caAdapter v3.3
 *          revision    $Revision: 1.5 $
 *          date        Apr 25, 2008
 *          Time:       12:31:37 AM $
 */
public class VocabularyGeneralUtilities
{

    /**
     * Logging constant used to identify source of log entry, that could be later used to create
     * logging mechanism to uniquely identify the logged class.
     */
    private static final String LOGID = ": VocabularyGeneralUtilities.java,v $";

    /**
     * String that identifies the class version and solves the serial version UID problem.
     * This String is for informational purposes only and MUST not be made final.
     *
     * @see JBuilder vice javac serial version UID
     */
    public static String RCSID = ": /share/content/cvsroot/hl7sdk/src/gov/nih/nci/hl7/common/standard/impl/VocabularyGeneralUtilities.java,v 1.00 Apr 25, 2008 12:31:37 AM umkis Exp $";

    public static V3VocabularySeeker vocabulrarySeeker = null;

    private VocabularyGeneralUtilities()
	{//never instantiable
        getV3VocabularySeeker();
    }

    /**
	 * Return V3VocabularySeeker object.
	 * @return V3VocabularySeeker.
	 */
	public static final V3VocabularySeeker getV3VocabularySeeker()
	{
        if (vocabulrarySeeker == null)
        {
            try
            {
                vocabulrarySeeker = new V3VocabularySeeker();
            }
            catch(ApplicationException ae)
            {
                System.err.println("V3 Vocabulary tree building failure... : " + ae.getMessage());
            }
        }
        return vocabulrarySeeker;
	}

}

/**
 * HISTORY : $Log: not supported by cvs2svn $
 */