text:
package com.wandrell.tabletop.punkapocalyptic.punkabuilder.view.javafx.renderer;

import javafx.scene.control.ListCell;

import com.wandrell.tabletop.punkapocalyptic.model.inventory.UnitWeapon;
import com.wandrell.tabletop.punkapocalyptic.service.ModelLocalizationService;

public final class WeaponNameAndCostListCell extends ListCell<UnitWeapon> {

    private final ModelLocalizationService localizationService;
    private final String                   patternWeapon = "%s (%d)";

    public WeaponNameAndCostListCell(
            final ModelLocalizationService localizationService) {
        super();

        this.localizationService = localizationService;
    }

    @Override
    protected final void updateItem(final UnitWeapon item, final boolean empty) {
        super.updateItem(item, empty);

        if (item == null || empty) {
            setText(" ");
            setStyle("");
        } else {
            setText(String.format(patternWeapon, localizationService
                    .getWeaponNameString(item.getWeaponTemplate()
                            .getNameToken()), item.getCost()));
        }
    }

}


text:
'use strict';

const Money = require('..');
const Big = require('big.js');
const should = require('should');

describe('Money', () => {

    it('should have a Big amount', () => {
        let money = new Money(10, 'JPY');
        money.should.have.property('amount');
        money.amount.should.be.instanceof(Big);
        money.amount.should.eql(new Big(10));
    });

    it('should have an ISO-4217 currency code', () => {
        let money = new Money(10, 'JPY');
        money.should.have.property('currency', 'JPY');
    });

    it('should be immutable', () => {
        let money = new Money(10, 'JPY');

        should.throws(() => money.amount = 0);
        should.throws(() => money.currency = 'NZD');
    });

    it('should print exact amount and currency code', () => {
        let money = new Money(10.7, 'JPY');
        money.toString().should.equal('10.7 JPY');
    });

    describe('constructor', () => {

        it('should allow an integer amount', () => {
            new Money(10, 'NZD').should.have.property('amount', new Big(10));
        });

        it('should allow a floating point amount', () => {
            new Money(10.123456789, 'NZD').should.have.property('amount', new Big(10.123456789));
        });

        it('should allow a Big amount', () => {
            new Money(new Big(10.123456789), 'NZD').should.have.property('amount', new Big(10.123456789));
        });

        it('should allow ISO-4217 currency code', () => {
            let ok = new Money(0, 'NZD');
            ok.should.be.an.instanceof(Money);

            should.throws(() => new Money(0, 'nzd'));
            should.throws(() => new Money(0, 'NZDX'));
        });

        it('should allow toString() output', () => {
            let a = new Money(10.7, 'JPY'),
                b = new Money(a.toString());
            b.should.eql(a);
        });

        it('should allow ISO-31-0 numbers', () => {
            let a = new Money('12 456,78 EUR');
            a.toString().should.equal('12456.78 EUR');
        });

    });

    describe('Math', () => {

        it('should add when currencies are the same', () => {
            let a = new Money(0.30, 'NZD'),
                b = new Money(-0.20, 'NZD'),
                c = new Money(-0.20, 'USD');

            a.plus(b).amount.should.eql(new Big(0.1));
            a.plus(b).currency.should.equal('NZD');

            should.throws(() => a.plus(c));
        });

        it('should subtract when currencies are the same', () => {
            let a = new Money(0.30, 'NZD'),
                b = new Money(0.20, 'NZD'),
                c = new Money(0.20, 'USD');

            a.minus(b).amount.should.eql(new Big(0.1));
            a.minus(b).currency.should.equal('NZD');

            should.throws(() => a.minus(c));
        });

        it('should multiply with a Number', () => {
            let a = new Money(0.30, 'NZD');

            a.times(10).amount.should.eql(new Big(3.0));
            a.times(10).currency.should.equal('NZD');
            a.times(10.0).amount.should.eql(new Big(3.0));
            a.times(10.0).currency.should.equal('NZD');
            a.times(10.1).amount.should.eql(new Big(3.03));
            a.times(10.1).currency.should.equal('NZD');

            should.throws(() => a.times('10.1'));
            should.throws(() => a.times(new Money(10, 'NZD')));
        });

        it('should round to the precision of the currency', () => {
            let a = new Money(123.577, 'NZD');
            let b = new Money(123.577, 'JPY');

            a.round().toString().should.equal('123.58 NZD');
            b.round().toString().should.equal('124 JPY');
        });

        it('should round to the specified number of decimal places', () => {
            let a = new Money(123.57719, 'NZD');

            a.round().toString().should.equal('123.58 NZD');
            a.round(4).toString().should.equal('123.5772 NZD');

            should.throws(() => a.round('up'));
            should.throws(() => a.round(4.5));
        });

        it('should use bankers rounding', () => {
            new Money(3.0, 'JPY').round().toString().should.equal('3 JPY');
            new Money(3.1, 'JPY').round().toString().should.equal('3 JPY');
            new Money(3.2, 'JPY').round().toString().should.equal('3 JPY');
            new Money(3.3, 'JPY').round().toString().should.equal('3 JPY');
            new Money(3.4, 'JPY').round().toString().should.equal('3 JPY');
            new Money(3.5, 'JPY').round().toString().should.equal('4 JPY');
            new Money(3.6, 'JPY').round().toString().should.equal('4 JPY');
            new Money(3.7, 'JPY').round().toString().should.equal('4 JPY');
            new Money(3.8, 'JPY').round().toString().should.equal('4 JPY');
            new Money(3.9, 'JPY').round().toString().should.equal('4 JPY');

            new Money(4.0, 'JPY').round().toString().should.equal('4 JPY');
            new Money(4.1, 'JPY').round().toString().should.equal('4 JPY');
            new Money(4.2, 'JPY').round().toString().should.equal('4 JPY');
            new Money(4.3, 'JPY').round().toString().should.equal('4 JPY');
            new Money(4.4, 'JPY').round().toString().should.equal('4 JPY');
            new Money(4.5, 'JPY').round().toString().should.equal('4 JPY');
            new Money(4.6, 'JPY').round().toString().should.equal('5 JPY');
            new Money(4.7, 'JPY').round().toString().should.equal('5 JPY');
            new Money(4.8, 'JPY').round().toString().should.equal('5 JPY');
            new Money(4.9, 'JPY').round().toString().should.equal('5 JPY');
        });

        it('should support cryptocurriencies', () => {
            new Money(0.123456789, 'BTC').round().toString().should.equal('0.12345679 BTC');
            new Money(0.123456789, 'XBT').round().toString().should.equal('0.12345679 XBT');
            new Money(0.123456789, 'ETH').round().toString().should.equal('0.12 ETH');
            new Money(0.123456789, 'XMR').round().toString().should.equal('0.12345679 XMR');
            new Money(0.123456789, 'XRP').round().toString().should.equal('0.12345679 XRP');
        });

        it('should allocate to a ratio', () => {
            let funds = new Money(10, 'JPY');
            let shares = funds.allocate([1, 1, 1]);
            shares.should.have.length(3);
            shares[0].toString().should.equal('4 JPY');
            shares[1].toString().should.equal('3 JPY');
            shares[2].toString().should.equal('3 JPY');

            shares = new Money(0.10, 'USD').allocate([70, 30]);
            shares.should.have.length(2);
            shares[0].toString().should.equal('0.07 USD');
            shares[1].toString().should.equal('0.03 USD');

            shares = new Money(0.01, 'USD').allocate([70, 20, 10]);
            shares.should.have.length(3);
            shares[0].toString().should.equal('0.01 USD');
            shares[1].toString().should.equal('0 USD');
            shares[2].toString().should.equal('0 USD');

            shares = new Money(100, 'USD').allocate([1, 1, 1]);
            shares.should.have.length(3);
            shares[0].toString().should.equal('33.34 USD');
            shares[1].toString().should.equal('33.33 USD');
            shares[2].toString().should.equal('33.33 USD');

            should.throws(() => funds.allocate());
            should.throws(() => funds.allocate([]));
        });

    });

    describe('Logic', () => {
        it('should compare when currency codes are the same', () => {
            let a = new Money(30, 'NZD');
            let b = new Money(40, 'NZD');
            let c = new Money(50, 'USD');

            a.compare(a).should.equal(0);
            a.compare(b).should.equal(-1);
            b.compare(a).should.equal(1);

            a.eq(a).should.equal(true);
            a.eq(b).should.equal(false);

            a.ne(a).should.equal(false);
            a.ne(b).should.equal(true);

            a.lt(a).should.equal(false);
            a.lt(b).should.equal(true);
            b.lt(a).should.equal(false);

            a.lte(a).should.equal(true);
            a.lte(b).should.equal(true);
            b.lte(a).should.equal(false);

            a.gt(a).should.equal(false);
            a.gt(b).should.equal(false);
            b.gt(a).should.equal(true);

            a.gte(a).should.equal(true);
            a.gte(b).should.equal(false);
            b.gte(a).should.equal(true);

            should.throws(() => a.compare(c));
        });

        it('should test for zero', () => {
            new Money(-1, 'NZD').isZero().should.equal(false);
            new Money(0, 'NZD').isZero().should.equal(true);
            new Money(1, 'NZD').isZero().should.equal(false);
        });

        it('should test for not zero', () => {
            new Money(-1, 'NZD').isNotZero().should.equal(true);
            new Money(0, 'NZD').isNotZero().should.equal(false);
            new Money(1, 'NZD').isNotZero().should.equal(true);
        });

        it('should test for positive', () => {
            new Money(-1, 'NZD').isPositive().should.equal(false);
            new Money(0, 'NZD').isPositive().should.equal(false);
            new Money(1, 'NZD').isPositive().should.equal(true);
        });

        it('should test for negative', () => {
            new Money(-1, 'NZD').isNegative().should.equal(true);
            new Money(0, 'NZD').isNegative().should.equal(false);
            new Money(1, 'NZD').isNegative().should.equal(false);
        });

        it('should return false when currencies are different and testing equality', () => {
            let a = new Money(30, 'NZD');
            let b = new Money(30, 'NZD');
            let c = new Money(30, 'USD');

            a.eq(b).should.equal(true);
            a.eq(c).should.equal(false);
        });

        it('should return true when currencies are different and testing inequality', () => {
            let a = new Money(30, 'NZD');
            let b = new Money(30, 'NZD');
            let c = new Money(30, 'USD');

            a.ne(b).should.equal(false);
            a.ne(c).should.equal(true);
        });

    });

    describe('Serialisation', () => {

        it('should roundtrip JSON', () => {
            let a = new Money(100, 'NZD'),
                json = JSON.stringify(a),
                b = new Money(JSON.parse(json));
            a.should.eql(b);
        });

    });

    describe('Localisation', () => {
        it('should format to a undefined locale', () => {
            let money = new Money(1234.7, 'JPY');
            money.toLocaleString().should.match(/¥/);
            money.toLocaleString().should.match(/35/);
        });

        it('should format to the specified locale', () => {
            let money = new Money(1234.7, 'EUR');

            money.toLocaleString('en-US').should.equal('€1,234.70');
            money.toLocaleString('en-NZ').should.equal('€1,234.70');
            money.toLocaleString('fr-FR').should.equal('1\u00a0234,70\u00a0€');
        });

        it('should format non-latin digits', () => {
            let money = new Money(1234.7, 'EUR');

            money.toLocaleString('en-US').should.equal('€1,234.70');
            money.toLocaleString('en-US-u-nu-thai').should.equal('€๑,๒๓๔.๗๐');
        });

        it('should format to the specified locale with options', () => {
            let money = new Money(1234.7, 'EUR'),
                options = { currencyDisplay: 'code' };

            money.toLocaleString('en-US').should.equal('€1,234.70');
            money.toLocaleString('en-US', options).should.match(/EUR.?1,234\.70/);
        });

        it('should format with maximumFractionDigits', () => {
            let money = new Money(1234.777, 'EUR'),
                options = { maximumFractionDigits: 3 };

            money.toLocaleString('en-US').should.equal('€1,234.78');
            money.toLocaleString('en-US', options).should.equal('€1,234.777');
        });

        it('should use a default locale and options', () => {
            let originalLocale = Money.defaultLocale,
                originalLocaleOptions = Money.defaultLocaleOptions,
                money = new Money(1234.7, 'EUR');
            money.toLocaleString().should.not.equal('€๑,๒๓๔.๗๐๐๐');

            Money.defaultLocale = () => 'en-US-u-nu-thai';
            Money.defaultLocaleOptions = () => { return {
                minimumFractionDigits: 4,
                maximumFractionDigits: 4,
            };};
            money.toLocaleString().should.equal('€๑,๒๓๔.๗๐๐๐');

            Money.defaultLocale = originalLocale;
            Money.defaultLocaleOptions = originalLocaleOptions;
        });
    });

    describe('Forex', () => {

        var forexService;
        beforeEach(function() {
            forexService = Money.forexService;
        });
        afterEach(function() {
            Money.forexService = forexService;
        });

        it('should return a Promise', () => {
            let nzd = new Money('100 NZD');
            nzd.to('CNY').should.be.a.Promise();
        });

        it('should reject invalid currency code', () => {
            let nzd = new Money('100 NZD');
            return nzd.to('CNY-XXX')
                .should.be.rejectedWith({ message: "'CNY-XXX' is not a valid ISO-4217 currency code" });
        });

        it('should fulfill Promise with money in the converted currency', () => {
            let nzd = new Money('100 NZD');
            return nzd.to('CNY').should
                .finally.be.instanceOf(Money)
                .and.have.property('currency', 'CNY');
        });

        it('should reject an undefined exchange rate', () => {
            let nzd = new Money('100 NZD');
            return nzd.to('ABC')
                .should.be.rejectedWith({ message: "Undefined exchange rate for NZD to ABC" });
        });

        it('should reject an exchange rate that is not a number', () => {
            let nzd = new Money('100 NZD');
            Money.forexService = () => Promise.resolve('foo');
            return nzd.to('CNY')
                .should.be.rejected();
        });

        it('should always convert to same currency', () => {
            let nzd = new Money('100 NZD');
            return nzd.to('NZD').should.finally.equal(nzd);
        });

    });

});

redpajama_set_name: RedPajamaGithub


text:
<?php

// BatnaArchiSiebelBundle:Host:edit.html.twig
return array (
);


text:
<?php
namespace pmill\LaravelAwsCognito\Controllers;

use Illuminate\Http\JsonResponse;
use pmill\AwsCognito\CognitoClient;

class ResetPasswordController
{
    /**
     * @var CognitoClient
     */
    protected $cognitoClient;

    /**
     * ResetPasswordController constructor.
     *
     * @param CognitoClient $cognitoClient
     */
    public function __construct(CognitoClient $cognitoClient)
    {
        $this->cognitoClient = $cognitoClient;
    }

    /**
     * @return JsonResponse
     */
    public function resetPassword()
    {
        $confirmationCode = request()->json('confirmation_code');
        $username = request()->json('username');
        $proposedPassword = request()->json('proposed_password');

        $this->cognitoClient->resetPassword($confirmationCode, $username, $proposedPassword);
        return response()->json(['success' => true]);
    }
}


text:
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tab.html">
<link rel="import" href="../bower_components/iron-pages/iron-pages.html">
<link rel="script" href="i18n.js">

<dom-module id="aoa-edit">
    <template>

        <paper-tabs selected="{{tab}}">
            <paper-tab>{{translate('COMPANY')}}</paper-tab>
            <paper-tab>{{translate('DRIVER')}}</paper-tab>
            <paper-tab>{{translate('CLERK')}}</paper-tab>
            <paper-tab>{{translate('SETTINGS')}}</paper-tab>
        </paper-tabs>
        <iron-pages selected="{{tab}}">

Company

Driver

Clerk

                <paper-dropdown-menu label="{{translate('FORM_LANGUAGE')}}">
                    <paper-listbox class="dropdown-content">
                        <template is="dom-repeat" items="{{config.languages}}">
                            <paper-item>{{item.language}}</paper-item>
                        </template>
                    </paper-listbox>
                </paper-dropdown-menu>

                <paper-button raised on-tap="save">{{translate('FORM_SAVE')}}</paper-button>

        </iron-pages>
    </template>
</dom-module>


text:
//
//  RWDatabaseManager.m
//  Test0701
//
//  Created by Ranger on 16/7/1.
//  Copyright © 2016年 Centaline. All rights reserved.
//

#import "RWDatabaseManager.h"
#import "RWDatabase.h"
#import "CocoaCracker.h"

#ifdef DEBUG
# define DBLog(...) NSLog(__VA_ARGS__);
#else
# define DBLog(...);
#endif

@interface RWDatabaseManager () {
    dispatch_queue_t _dbQueue;
    RWDatabase *_database;
}

@property (nonatomic, strong) NSDictionary *propertyTypeMap;

@end

@implementation RWDatabaseManager

+ (instancetype)shareInstance {
    static id instance;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [self new];
    });
    return instance;
}

- (instancetype)init {
    if (self == [super init]) {

    }
    return self;
}

#pragma mark-  open data base

- (void)open:(NSString *)dbPath dict:(NSDictionary<NSString *, Class> *)tableDict {
    [self open:dbPath dict:tableDict done:nil];
}

- (void)open:(NSString *)dbPath dict:(NSDictionary<NSString *, Class> *)tableDict done:(void(^)(BOOL success))done {
    if (_database) {
        [_database close];
        _database = nil;
    }

    _dbQueue = dispatch_queue_create("com.rangerchiong.com.rwdatabase", DISPATCH_QUEUE_SERIAL);

    DBLog(@"数据库文件路径 : %@", dbPath);
    _database = [RWDatabase databaseWithPath:dbPath];
    _database.shouldCacheStatements = YES;

    if (!_database.open) {
        !done ?: done(NO);
        return;
    }
    else {
        dispatch_async(_dbQueue, ^{
            __block BOOL result = YES;
            if (tableDict) {
                [tableDict enumerateKeysAndObjectsUsingBlock:^(NSString *key, Class cls, BOOL *stop) {
                    if (![_database tableExists:key]) {
                        if (![self makeCreateSql:key tableModelClass:cls]) {
                            DBLog(@"数据库表格: [%@] 创建失败", key);
                            *stop = YES;
                            result = NO;
                        }
                    }
                }];
            }else {
                DBLog(@"传入的字典['modelName' : 'modelClass']不能为空");
                result = NO;
            }

            dispatch_async(dispatch_get_main_queue(), ^{
                !done ?: done(result);
            });
        });
    }
}

#pragma mark-   删除表

- (void)dropTable:(NSString *)tableName {
    [self dropTable:tableName done:nil];
}

- (void)dropTable:(NSString *)tableName done:(void(^)(BOOL success))done {
    dispatch_async(_dbQueue, ^{
        BOOL bRet = NO;
        bRet = [self makeDropSql:tableName];
        if (bRet) {
            DBLog(@"删除 [ %@ ] 表成功", tableName);
        } else {
            DBLog(@"删除表失败 [%@]", tableName);
        }
        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done(bRet);
        });
    });
}

#pragma mark-   插入数据

- (void)insert:(NSString *)tableName models:(NSArray<NSDictionary *> *)modelArr {
    [self insert:tableName models:modelArr done:nil];
}

- (void)insert:(NSString *)tableName models:(NSArray<NSDictionary *> *)modelArr done:(void(^)(BOOL success))done {

    dispatch_async(_dbQueue, ^{
        [_database beginTransaction];
        BOOL bRet = NO;
        @try {
            for (NSDictionary *keyValues in modelArr) {
                bRet = [self makeInsertSql:tableName keyValues:keyValues];
                if (!bRet) {
                    DBLog(@"向[%@] 表中插入 [%@] 的数据 失败", tableName, keyValues);
                    break;
                }
            }
        }
        @catch (NSException *exception) {
            [_database rollback];
        }
        @finally {
            if (!bRet) {
                [_database rollback];
            }
            else {
                [_database commit];
            }
        }

        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done(bRet);
        });
    });
}

- (void)deleteData:(NSString *)tableName conditions:(NSArray<NSDictionary *> *)conditions {
    [self deleteData:tableName conditions:conditions done:nil];
}

- (void)deleteData:(NSString *)tableName conditions:(NSArray<NSDictionary *> *)conditions done:(void(^)(BOOL success))done {
    dispatch_async(_dbQueue, ^{
        [_database beginTransaction];
        BOOL bRet = NO;
        @try {
            for (NSDictionary *condition in conditions) {
                bRet = [self makeDeleteSql:tableName condition:condition];
                if (!bRet) {
                    DBLog(@"删除[%@]表的数据 失败 condition:%@", tableName, condition);
                    break;
                }
            }
        }
        @catch (NSException *exception) {
            [_database rollback];
        }
        @finally {
            if (!bRet) {
                [_database rollback];
            }
            else {
                [_database commit];
            }
        }

        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done(bRet);
        });
    });
}

#pragma mark-   更新数据

- (void)update:(NSString *)tableName param:(NSDictionary *)param condition:(NSDictionary *)condition {
    [self update:tableName param:param condition:condition done:nil];
}

- (void)update:(NSString *)tableName
         param:(NSDictionary *)param
     condition:(NSDictionary *)condition
          done:(void(^)(BOOL success))done {
    dispatch_async(_dbQueue, ^{
        [_database beginTransaction];
        BOOL bRet = NO;
        @try {
            bRet = [self makeUpdateSql:tableName param:param condition:condition];
            if (!bRet) {
                DBLog(@"更新[%@]表的数据 失败 condition:%@", tableName, condition);
            }
        }
        @catch (NSException *exception) {
            [_database rollback];
        }
        @finally {
            if (!bRet) {
                [_database rollback];
            }
            else {
                [_database commit];
            }
        }

        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done(bRet);
        });
    });
}

#pragma mark-   查找数据
// 查找表中所有数据
- (void)queryAll:(NSString *)tableName perRow:(nullable void(^)(NSDictionary *dict))block done:(dispatch_block_t)done {
    dispatch_async(_dbQueue, ^{
        RWResultSet *result = [_database executeQuery:[self queryAllStatement:tableName]];
        while ([result next]) {
            NSDictionary *dict = [result resultDictionary];
            !block ?: block(dict);
        }
        [result close];

        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done();
        });
    });
}

// 根据条件查找表中数据
- (void)query:(NSString *)tableName condition:(NSDictionary *)condition perRow:(nullable void(^)(NSDictionary *dict))block done:(dispatch_block_t)done {
    dispatch_async(_dbQueue, ^{
        RWResultSet *result = [self makeQuerySql:tableName condition:condition];
        while ([result next]) {
            NSDictionary *dict = [result resultDictionary];
            !block ?: block(dict);
        }
        [result close];

        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done();
        });
    });
}

// 按照传入的字段指定顺序查找表中数据
- (void)query:(NSString *)tableName condition:(NSArray<NSString *> *)condition isOrder:(BOOL)isOrder perRow:(void(^)(NSDictionary *dict))block done:(dispatch_block_t)done {
    dispatch_async(_dbQueue, ^{
        RWResultSet *result = [self makeQuerySql:tableName condition:condition isOrder:isOrder];
        while ([result next]) {
            NSDictionary *dict = [result resultDictionary];
            !block ?: block(dict);
        }
        [result close];

        dispatch_async(dispatch_get_main_queue(), ^{
            !done ?: done();
        });
    });
}

#pragma mark-   make sql statements methods

- (BOOL)makeCreateSql:(NSString *)tableName tableModelClass:(Class)cls {
    __block NSString *tmpSql = @"";
    [[CocoaCracker handle:cls] copyPropertyInfo:^(NSString *pName, NSString *pType) {
        NSString *tmpStr = [self typeNameWithPropertyAttri:pType];
        tmpSql = [tmpSql stringByAppendingString:[NSString stringWithFormat:@" ,%@ %@", pName, tmpStr]];
    } copyAttriEntirely:NO];

    if (!tmpSql.length) return NO;

    NSString *sql = [self createStatement:tableName params:tmpSql];
    BOOL result = [_database executeUpdate:sql];

    return result;
}

- (BOOL)makeInsertSql:(NSString *)tableName keyValues:(NSDictionary *)keyValues {
    /***    INSERT INTO tableName [insertKey] VALUES [insertValue]   ***/
    __block NSString *insertKey = @"" , *insertValue = @"";

    [keyValues enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL * stop) {
        insertKey = [insertKey stringByAppendingString:[NSString stringWithFormat:@",%@ ", key]];
        insertValue = [insertValue stringByAppendingString:[NSString stringWithFormat:@",:%@ ", key]];
    }];

    // 结束遍历时  将开头多余的","删掉
    if (!insertKey.length) return NO;
    insertKey = [insertKey substringFromIndex:1];

    if (!insertValue.length) return NO;
    insertValue = [insertValue substringFromIndex:1];
    NSString *sql = [self insertStatement:tableName key:insertKey value:insertValue];
    BOOL bRet = [_database executeUpdate:sql withParameterDictionary:keyValues];

    return bRet;
}

- (BOOL)makeUpdateSql:(NSString *)tableName param:(NSDictionary *)param condition:(NSDictionary *)condition {

    __block NSString *paramStr = @"";
    [param enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL * stop) {
        paramStr = [paramStr stringByAppendingString:[NSString stringWithFormat:@",%@ = %@",key, param[key]]];
    }];
    if (!paramStr.length) return NO;
    paramStr = [paramStr substringFromIndex:1];

    __block NSString *conditionStr = @"";
    [condition enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL * stop) {
        conditionStr = [conditionStr stringByAppendingString:[NSString stringWithFormat:@" AND %@ = %@",key, condition[key]]];
    }];
    if (!conditionStr.length) return NO;
    conditionStr = [conditionStr substringFromIndex:5];

    NSString *sql = [self updateStatement:tableName params:paramStr condition:conditionStr];
    BOOL bRet = [_database executeUpdate:sql ];
    return bRet;
}

- (BOOL)makeDropSql:(NSString *)tableName {
    BOOL result = [_database tableExists:tableName];
    if (result) {
        NSString *sql = [self dropTableStatement:tableName];
        result = [_database executeUpdate:sql];
    }
    else {
        DBLog(@"表[%@]不存在", tableName);
    }
    return result;
}

- (BOOL)makeDeleteSql:(NSString *)tableName condition:(NSDictionary *)condition {
    __block NSString *keyValue = @"";
    [condition enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL * stop) {
        keyValue = [keyValue stringByAppendingString:[NSString stringWithFormat:@" AND %@ = '%@'",key, value]];
    }];

    if (!keyValue.length) return NO;
    keyValue = [keyValue substringFromIndex:5];

    NSString *sql = [self deleteStatement:tableName condition:keyValue];
    BOOL result = [_database executeUpdate:sql];
    return result;
}

- (RWResultSet *)makeQuerySql:(NSString *)tableName condition:(NSDictionary *)condition {
    __block NSString *keyValue = @"";
    [condition enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL * stop) {
        keyValue = [keyValue stringByAppendingString:[NSString stringWithFormat:@" AND %@ = '%@'",key, value]];
    }];

    if (!keyValue.length) return nil;
    keyValue = [keyValue substringFromIndex:5];

    NSString *sql = [self queryStatement:tableName condition:keyValue];
    DBLog(@"%@", sql);
    return [_database executeQuery:sql];
}

- (RWResultSet *)makeQuerySql:(NSString *)tableName condition:(NSArray *)condition isOrder:(BOOL)isOrder {
    NSString *conditionStr = @"";
    for (NSString *key in condition) {
        conditionStr = [conditionStr stringByAppendingString:[NSString stringWithFormat:@",%@ %@",key, isOrder ? @"DESC" : @"ASC"]];
    }
    if (!conditionStr.length) return nil;
    conditionStr = [conditionStr substringFromIndex:1];
    NSString *sql = [self queryOrderlyStatement:tableName condition:conditionStr];
    DBLog(@"%@", sql);
    return [_database executeQuery:sql];
}

#pragma mark-   sql statements

// craete sql
- (NSString *)createStatement:(NSString *)tableName params:(NSString *)params {
    return [NSString stringWithFormat:@"CREATE TABLE IF NOT EXISTS %@ (id Integer PRIMARY KEY %@)", tableName, params];
}

// insert sql
- (NSString *)insertStatement:(NSString *)tableName key:(NSString *)key value:(NSString *)value {
    return [NSString stringWithFormat:@"INSERT INTO %@ (%@) VALUES (%@)", tableName, key, value];
}

// delete sql
- (NSString *)deleteStatement:(NSString *)tableName condition:(NSString *)condition {
    return [NSString stringWithFormat:@"DELETE FROM %@ WHERE %@", tableName, condition];
}

- (NSString *)dropTableStatement:(NSString *)tableName {
    return [NSString stringWithFormat:@"DROP TABLE %@", tableName];
}

// update
- (NSString *)updateStatement:(NSString *)tableName params:(NSString *)params condition:(NSString *)condition {
    return [NSString stringWithFormat:@"UPDATE %@ SET %@ WHERE %@", tableName, params, condition];
}

// query sql
- (NSString *)queryAllStatement:(NSString *)tableName {
    return [NSString stringWithFormat:@"SELECT * FROM %@", tableName];
}

// select * from Contacts limit 15 offset 20     表示: 从Contacts表跳过20条记录选出15条记录
- (NSString *)queryStatement:(NSString *)tableName showRecords:(NSInteger)rNum stepRecords:(NSInteger)sNum {
    return [NSString stringWithFormat:@"SELECT * FROM %@ LIMIT %ld offset %ld ", tableName, rNum, sNum];
}

- (NSString *)queryStatement:(NSString *)tableName condition:(NSString *)condition {
    return [NSString stringWithFormat:@"SELECT * FROM %@ WHERE %@", tableName, condition];
}

- (NSString *)queryOrderlyStatement:(NSString *)tableName condition:(NSString *)condition {
    return [NSString stringWithFormat:@"SELECT * FROM %@ ORDER BY %@", tableName, condition];
}

#pragma mark-  property map

- (NSString *)typeNameWithPropertyAttri:(NSString *)pAttri {
    NSString *pType;

    if ([pAttri hasPrefix:@"@"]) {
        // 去除符号 @ 和 "
        pAttri = [[pAttri stringByReplacingOccurrencesOfString:@"\"" withString:@""] substringFromIndex:1];
        pType = self.propertyTypeMap[pAttri];
    }
    else pType = self.propertyTypeMap[pAttri];
    if (!pType.length) DBLog(@"%@ 不是支持的属性类型", pAttri);
    return pType;
}

- (NSDictionary *)propertyTypeMap {
    return _propertyTypeMap ? _propertyTypeMap : @{
                                                 @"NSString" : @"text",
                                                 @"NSDate" : @"text",
                                                 @"NSData" : @"blob",
                                                 @"NSNumber" : @"integer",
                                                 @"q" : @"integer",
                                                 @"Q" : @"integer",
                                                 @"i" : @"integer",
                                                 @"I" : @"integer",
                                                 @"B" : @"integer",
                                                 @"c" : @"integer",
                                                 @"S" : @"integer",
                                                 @"s" : @"integer",
                                                 @"d" : @"real",
                                                 @"f" : @"real"
                                                };
}

@end


text:
'use strict';
(function(){
 module.exports ={
		socketPath : '/run/mysqld/mysqld.sock',
		user     : 'frf',
		password : '',
		database : 'frf_private',
		multipleStatements: true
};
}());


text:
import copy, unittest, os, sys
import PyOpenColorIO as OCIO

class ViewTransformTest(unittest.TestCase):

    def test_default_contructor(self):
        """
        Test the constructor.
        """
        for ref_type in OCIO.ReferenceSpaceType.__members__.values():
            vt = OCIO.ViewTransform(ref_type)
            self.assertEqual(vt.getReferenceSpaceType(), ref_type)
            self.assertEqual(vt.getName(), '')
            self.assertEqual(vt.getFamily(), '')
            self.assertEqual(vt.getDescription(), '')
            self.assertEqual(len(vt.getCategories()), 0)
            for dir in OCIO.ViewTransformDirection.__members__.values():
                self.assertEqual(vt.getTransform(dir), None)

        vt = OCIO.ViewTransform()
        self.assertEqual(vt.getReferenceSpaceType(), OCIO.REFERENCE_SPACE_SCENE)

        vt = OCIO.ViewTransform(referenceSpace=OCIO.REFERENCE_SPACE_DISPLAY)
        self.assertEqual(vt.getReferenceSpaceType(), OCIO.REFERENCE_SPACE_DISPLAY)

        vt = OCIO.ViewTransform(name='test')
        self.assertEqual(vt.getName(), 'test')

        vt = OCIO.ViewTransform(family='family')
        self.assertEqual(vt.getFamily(), 'family')

        vt = OCIO.ViewTransform(description='description')
        self.assertEqual(vt.getDescription(), 'description')

        vt = OCIO.ViewTransform(categories=['cat1', 'cat2'])
        cats = vt.getCategories()
        self.assertEqual(len(cats), 2)
        self.assertEqual(cats[0], 'cat1')
        self.assertEqual(cats[1], 'cat2')

        mat = OCIO.MatrixTransform()
        vt = OCIO.ViewTransform(toReference=mat)
        self.assertTrue(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE).equals(mat))

        vt = OCIO.ViewTransform(fromReference=mat)
        self.assertTrue(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE).equals(mat))

    def test_copy(self):
        """
        Test the deepcopy() method.
        """
        vt = OCIO.ViewTransform()
        vt.setName('test name')
        vt.setFamily('test family')
        vt.setDescription('test description')
        mat = OCIO.MatrixTransform()
        vt.setTransform(mat, OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE)
        vt.setTransform(direction=OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE, transform=mat)
        vt.addCategory('cat1')

        other = copy.deepcopy(vt)
        self.assertFalse(other is vt)

        self.assertEqual(other.getName(), vt.getName())
        self.assertEqual(other.getFamily(), vt.getFamily())
        self.assertEqual(other.getDescription(), vt.getDescription())
        self.assertTrue(other.getTransform(OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE).equals(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE)))
        self.assertTrue(other.getTransform(OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE).equals(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE)))
        self.assertEqual(list(other.getCategories()), list(vt.getCategories()))

    def test_name(self):
        """
        Test get/setName.
        """
        vt = OCIO.ViewTransform()
        self.assertEqual(vt.getName(), '')

        vt.setName('test name')
        self.assertEqual(vt.getName(), 'test name')

    def test_family(self):
        """
        Test get/setFamily.
        """
        vt = OCIO.ViewTransform()
        self.assertEqual(vt.getFamily(), '')

        vt.setFamily('test family')
        self.assertEqual(vt.getFamily(), 'test family')

    def test_description(self):
        """
        Test get/setDescription.
        """
        vt = OCIO.ViewTransform()
        self.assertEqual(vt.getDescription(), '')

        vt.setDescription('test description')
        self.assertEqual(vt.getDescription(), 'test description')

    def test_transform(self):
        """
        Test get/setTransform.
        """
        vt = OCIO.ViewTransform()
        self.assertEqual(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE), None)
        self.assertEqual(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE), None)

        mat = OCIO.MatrixTransform()
        vt.setTransform(mat, OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE)
        self.assertTrue(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE).equals(mat))

        vt.setTransform(None, OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE)
        self.assertEqual(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_TO_REFERENCE), None)

        vt.setTransform(direction=OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE, transform=mat)
        self.assertTrue(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE).equals(mat))

        vt.setTransform(transform=None, direction=OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE)
        self.assertEqual(vt.getTransform(OCIO.VIEWTRANSFORM_DIR_FROM_REFERENCE), None)

    def test_categories(self):
        """
        Test hasCategory, addCategory, removeCategory, getCategories, and clearCategories.
        """
        vt = OCIO.ViewTransform()
        self.assertEqual(len(vt.getCategories()), 0)

        vt.addCategory('cat1')
        self.assertEqual(len(vt.getCategories()), 1)
        self.assertEqual(vt.getCategories()[0], 'cat1')
        self.assertTrue(vt.hasCategory('cat1'))
        # Category is not case sensitive.
        self.assertTrue(vt.hasCategory('cAt1'))
        self.assertFalse(vt.hasCategory('cat2'))
        vt.addCategory('cat1')
        self.assertEqual(len(vt.getCategories()), 1)
        vt.addCategory('CAT1')
        self.assertEqual(len(vt.getCategories()), 1)

        vt.addCategory('CAT2')
        cats = vt.getCategories()
        self.assertEqual(len(cats), 2)
        # Original case is preserved.
        self.assertEqual(cats[0], 'cat1')
        self.assertEqual(cats[1], 'CAT2')

        vt.removeCategory('cat3')
        self.assertEqual(len(vt.getCategories()), 2)
        vt.removeCategory('CAT1')
        self.assertEqual(len(vt.getCategories()), 1)

        vt.addCategory('CAT3')
        vt.addCategory('CAT4')
        self.assertEqual(len(vt.getCategories()), 3)

        vt.clearCategories()
        self.assertEqual(len(vt.getCategories()), 0)


text:
#include <boost/format.hpp>

#include "ValidSchema.hh"
#include "Schema.hh"
#include "Node.hh"

namespace avro {

    ValidSchema::ValidSchema(const Schema &schema) :
    node_(schema.root())
{
    validate(node_);
}

ValidSchema::ValidSchema() :
   node_(NullSchema().root())
{ }

void
ValidSchema::setSchema(const Schema &schema)
{
    const NodePtr &node(schema.root());
    validate(schema.root());
    node_ = node;
}

bool
ValidSchema::validate(const NodePtr &node)
{
    if(!node) {
        node_.reset(new NodePrimitive(AVRO_NULL));
    }

    if(!node->isValid()) {
        throw Exception( boost::format("Schema is invalid, due to bad node of type %1%") % node->type());
    }
    if(node->hasName()) {
        if(node->type() == AVRO_SYMBOLIC) {
            if(!symbolMap_.hasSymbol(node->name())) {
                throw Exception( boost::format("Symbolic name \"%1%\" is unknown") % node->name());
            }
            return true;
        }
        bool registered = symbolMap_.registerSymbol(node);
        if(!registered) {
            return false;
        }
    }
    node->lock();
    size_t leaves = node->leaves();
    for(size_t i = 0; i < leaves; ++i) {
        const NodePtr &leaf(node->leafAt(i));

        if(! validate(leaf)) {
            node->setLeafToSymbolic(i);
        }
    }

    return true;
}

void
ValidSchema::toJson(std::ostream &os) const
{
    node_->printJson(os, 0);
    os << '\n';
}

void
ValidSchema::toFlatList(std::ostream &os) const
{
    node_->printBasicInfo(os);
}

} // namespace avro


text:
ADDR="https://raw.githubusercontent.com/dtmilano/AndroidViewClient/master/src/com/dtmilano/android/adb"
for file in androidkeymap.py adbclient.py
do
	wget $ADDR/$file -O $file
done


text:
package org.testifyproject.core.util.logger;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Properties;

import org.slf4j.helpers.Util;
import org.testifyproject.core.util.logger.OutputChoice.OutputChoiceType;

/**
 * This class holds configuration values for {@link SimpleLogger}. The values are computed at
 * runtime. See {@link SimpleLogger} documentation for more information.
 *
 * @author Ceki Gülcü
 * @author Scott Sanders
 * @author Rod Waldhoff
 * @author Robert Burrell Donkin
 * @author Cédrik LIME
 *
 * @since 1.7.25
 */
public class SimpleLoggerConfiguration {

    private static final String CONFIGURATION_FILE = "simplelogger.properties";

    static final int DEFAULT_LOG_LEVEL_DEFAULT = SimpleLogger.LOG_LEVEL_INFO;
    int defaultLogLevel = DEFAULT_LOG_LEVEL_DEFAULT;

    private static final boolean SHOW_DATE_TIME_DEFAULT = true;
    boolean showDateTime = SHOW_DATE_TIME_DEFAULT;

    private static final String DATE_TIME_FORMAT_STR_DEFAULT = null;
    private static String dateTimeFormatStr = DATE_TIME_FORMAT_STR_DEFAULT;

    DateFormat dateFormatter = null;

    private static final boolean SHOW_THREAD_NAME_DEFAULT = true;
    boolean showThreadName = SHOW_THREAD_NAME_DEFAULT;

    final static boolean SHOW_LOG_NAME_DEFAULT = true;
    boolean showLogName = SHOW_LOG_NAME_DEFAULT;

    private static final boolean SHOW_SHORT_LOG_NAME_DEFAULT = false;
    boolean showShortLogName = SHOW_SHORT_LOG_NAME_DEFAULT;

    private static final boolean LEVEL_IN_BRACKETS_DEFAULT = false;
    boolean levelInBrackets = LEVEL_IN_BRACKETS_DEFAULT;

    private static final String LOG_FILE_DEFAULT = "System.err";
    private String logFile = LOG_FILE_DEFAULT;
    OutputChoice outputChoice = null;

    private static final boolean CACHE_OUTPUT_STREAM_DEFAULT = false;
    private boolean cacheOutputStream = CACHE_OUTPUT_STREAM_DEFAULT;

    private static final String WARN_LEVELS_STRING_DEFAULT = "WARN";
    String warnLevelString = WARN_LEVELS_STRING_DEFAULT;

    private final Properties properties = new Properties();

    void init() {
        loadProperties();

        String defaultLogLevelString =
                getStringProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, null);

        if (defaultLogLevelString != null) {
            defaultLogLevel = stringToLevel(defaultLogLevelString);
        }

        showLogName = getBooleanProperty(SimpleLogger.SHOW_LOG_NAME_KEY,
                SimpleLoggerConfiguration.SHOW_LOG_NAME_DEFAULT);
        showShortLogName = getBooleanProperty(SimpleLogger.SHOW_SHORT_LOG_NAME_KEY,
                SHOW_SHORT_LOG_NAME_DEFAULT);
        showDateTime = getBooleanProperty(SimpleLogger.SHOW_DATE_TIME_KEY,
                SHOW_DATE_TIME_DEFAULT);
        showThreadName = getBooleanProperty(SimpleLogger.SHOW_THREAD_NAME_KEY,
                SHOW_THREAD_NAME_DEFAULT);
        dateTimeFormatStr = getStringProperty(SimpleLogger.DATE_TIME_FORMAT_KEY,
                DATE_TIME_FORMAT_STR_DEFAULT);
        levelInBrackets = getBooleanProperty(SimpleLogger.LEVEL_IN_BRACKETS_KEY,
                LEVEL_IN_BRACKETS_DEFAULT);
        warnLevelString = getStringProperty(SimpleLogger.WARN_LEVEL_STRING_KEY,
                WARN_LEVELS_STRING_DEFAULT);

        logFile = getStringProperty(SimpleLogger.LOG_FILE_KEY, logFile);

        cacheOutputStream = getBooleanProperty(SimpleLogger.CACHE_OUTPUT_STREAM_STRING_KEY,
                CACHE_OUTPUT_STREAM_DEFAULT);
        outputChoice = computeOutputChoice(logFile, cacheOutputStream);

        if (dateTimeFormatStr != null) {
            try {
                dateFormatter = new SimpleDateFormat(dateTimeFormatStr);
            } catch (IllegalArgumentException e) {
                Util.report("Bad date format in " + CONFIGURATION_FILE
                        + "; will output relative time", e);
            }
        }
    }

    private void loadProperties() {
        // add props from the resource simplelogger.properties
        InputStream in = AccessController.doPrivileged((PrivilegedAction<InputStream>) () -> {
            ClassLoader threadCL = Thread.currentThread().getContextClassLoader();
            if (threadCL != null) {
                return threadCL.getResourceAsStream(CONFIGURATION_FILE);
            } else {
                return ClassLoader.getSystemResourceAsStream(CONFIGURATION_FILE);
            }
        });

        if (null != in) {
            try {
                properties.load(in);
            } catch (java.io.IOException e) {
                // ignored
            } finally {
                try {
                    in.close();
                } catch (java.io.IOException e) {
                    // ignored
                }
            }
        }
    }

    String getStringProperty(String name, String defaultValue) {
        String prop = getStringProperty(name);
        return (prop == null) ? defaultValue : prop;
    }

    boolean getBooleanProperty(String name, boolean defaultValue) {
        String prop = getStringProperty(name);
        return (prop == null) ? defaultValue : "true".equalsIgnoreCase(prop);
    }

    String getStringProperty(String name) {
        String prop = null;
        try {
            prop = System.getProperty(name);
        } catch (SecurityException e) {
        }
        return (prop == null) ? properties.getProperty(name) : prop;
    }

    static int stringToLevel(String levelStr) {
        if ("trace".equalsIgnoreCase(levelStr)) {
            return SimpleLogger.LOG_LEVEL_TRACE;
        } else if ("debug".equalsIgnoreCase(levelStr)) {
            return SimpleLogger.LOG_LEVEL_DEBUG;
        } else if ("info".equalsIgnoreCase(levelStr)) {
            return SimpleLogger.LOG_LEVEL_INFO;
        } else if ("warn".equalsIgnoreCase(levelStr)) {
            return SimpleLogger.LOG_LEVEL_WARN;
        } else if ("error".equalsIgnoreCase(levelStr)) {
            return SimpleLogger.LOG_LEVEL_ERROR;
        } else if ("off".equalsIgnoreCase(levelStr)) {
            return SimpleLogger.LOG_LEVEL_OFF;
        }
        // assume INFO by default
        return SimpleLogger.LOG_LEVEL_INFO;
    }

    private static OutputChoice computeOutputChoice(String logFile, boolean cacheOutputStream) {
        if ("System.err".equalsIgnoreCase(logFile)) {
            if (cacheOutputStream) {
                return new OutputChoice(OutputChoiceType.CACHED_SYS_ERR);
            } else {
                return new OutputChoice(OutputChoiceType.SYS_ERR);
            }
        } else if ("System.out".equalsIgnoreCase(logFile)) {
            if (cacheOutputStream) {
                return new OutputChoice(OutputChoiceType.CACHED_SYS_OUT);
            } else {
                return new OutputChoice(OutputChoiceType.SYS_OUT);
            }
        } else {
            try {
                FileOutputStream fos = new FileOutputStream(logFile);
                PrintStream printStream = new PrintStream(fos);
                return new OutputChoice(printStream);
            } catch (FileNotFoundException e) {
                Util.report("Could not open [" + logFile + "]. Defaulting to System.err", e);
                return new OutputChoice(OutputChoiceType.SYS_ERR);
            }
        }
    }

}


text:
<?php

defined('GANTRY_VERSION') or die;

gantry_import('core.config.gantryformgroup');

class GantryFormGroupColumns extends GantryFormGroup
{
    protected $type = 'columns';
    protected $baseetype = 'group';

	public function getInput()
	{
        $buffer = '';

		$class = $this->element['class'];
		$name = $this->id;

		$buffer .= "
\n";

		// Columns
		$leftOpen = "
\n";
		$rightOpen = "
\n";
		$noneOpen = "
\n";

		$divClose = "
\n";

        foreach ($this->fields as $field) {

			$position = ($field->element['position']) ? (string) $field->element['position'] : 'none';
			$position .= "Open";
			$bufferItem = "";

			$fieldName = $this->fieldname."-".$field->element['name'];

			$bufferItem .= "
type."\">\n";
            if ($field->show_label) $bufferItem .= "".$field->getLabel()."\n";
            $bufferItem .= $field->getInput();
            $bufferItem .= "
\n";

			$$position .= $bufferItem;
        }

		$buffer .= $leftOpen . $divClose . $rightOpen . $divClose . $noneOpen . $divClose;
		$buffer .= "
\n";

        return $buffer;

    }
}


text:
package de.tudarmstadt.awesome.erclaerung.feature;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.uima.fit.util.JCasUtil;
import org.apache.uima.jcas.JCas;

import com.google.common.base.Charsets;
import com.google.common.io.Files;

import de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token;
import de.tudarmstadt.ukp.dkpro.tc.api.exception.TextClassificationException;
import de.tudarmstadt.ukp.dkpro.tc.api.features.DocumentFeatureExtractor;
import de.tudarmstadt.ukp.dkpro.tc.api.features.Feature;
import de.tudarmstadt.ukp.dkpro.tc.api.features.FeatureExtractorResource_ImplBase;

/**
 * Uses a predefined list to create a feature distribution.
 *
 * @author Manuel
 *
 */
public class ManualWordListDFE extends FeatureExtractorResource_ImplBase implements DocumentFeatureExtractor {

	public static final String FN_MANUAL_PREFIX = "Manual_";

	public List<Feature> extract(JCas jcas) throws TextClassificationException {
		List<String> tokens = JCasUtil.toText(JCasUtil.select(jcas, Token.class));
		List<Feature> featList = new ArrayList<Feature>();
		File wordListFile = new File("src/main/resources/manual_list/manualList.txt");
		List<String> lines = null;
		try {
			lines = Files.readLines(wordListFile, Charsets.UTF_8);
		}
		catch (IOException e) {
			e.printStackTrace();
		}
		Map<String, Integer> occurences = new HashMap<String, Integer>(lines.size() * 2);

		// Collect manual word List
		for (String line : lines) {
			if (line == "" || line.contains("Insert") || line.contains("Delete") || line.contains("Substitution"))
				; // Do nothing
			else if (line.contains("->")) {
				String[] words = line.split("->");
				occurences.put(words[0], 0);
				occurences.put(words[1], 0);
			}
			else {
				occurences.put(line.trim(), 0);
			}
		}
		for (String token : tokens) {
			String tokenLower = token.toLowerCase();
			if (occurences.keySet().contains(tokenLower)) {
				occurences.put(tokenLower, occurences.get(tokenLower) + 1);
			}
		}
		for (String key : occurences.keySet()) {
			featList.add(new Feature(FN_MANUAL_PREFIX + key, occurences.get(key) * 1000 / occurences.keySet().size()));
		}

		return featList;
	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="fr.eyal.datalib.sample.netflix"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="17" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.Netflix" >

        <meta-data android:name="android.app.default_searchable" android:value="fr.eyal.datalib.sample.netflix.SearchableActivity" />

        <activity
            android:name="fr.eyal.datalib.sample.netflix.NetflixActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name="fr.eyal.datalib.sample.netflix.SearchableActivity"
            android:parentActivityName="fr.eyal.datalib.sample.netflix.NetflixActivity"
            android:launchMode="singleTop" >
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
            <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
        </activity>

        <service android:name="fr.eyal.datalib.sample.netflix.data.service.NetflixService" >
        </service>

        <provider
            android:name="fr.eyal.datalib.sample.netflix.data.model.NetflixProvider"
            android:authorities="fr.eyal.datalib.sample.netflix.datacache.provider"
            android:exported="false" >
        </provider>

        <activity
            android:name="fr.eyal.datalib.sample.netflix.MovieActivity"
            android:label="@string/title_activity_movie"
            android:parentActivityName="fr.eyal.datalib.sample.netflix.NetflixActivity" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="fr.eyal.datalib.sample.netflix.NetflixActivity" />
        </activity>
        <activity
            android:name="fr.eyal.datalib.sample.netflix.CategoryTopActivity"
            android:parentActivityName="fr.eyal.datalib.sample.netflix.NetflixActivity" >
        </activity>
    </application>

</manifest>


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>App Engine PHP SDK: google\appengine\ext\session\MemcacheSessionHandler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="common.css" rel="stylesheet" type="text/css"/>

App Engine PHP SDK
    v1 rev.445

The PHP runtime is available as an experimental Preview feature.

google

appengine

ext

session

MemcacheSessionHandler

Public Member Functions |
Static Public Member Functions |
Public Attributes |
List of all members

google\appengine\ext\session\MemcacheSessionHandler Class Reference

Inheritance diagram for google\appengine\ext\session\MemcacheSessionHandler:

  <map id="google\appengine\ext\session\MemcacheSessionHandler_map" name="google\appengine\ext\session\MemcacheSessionHandler_map">
</map>

Public Member Functions

 	__construct ($memcacheContainer=null)

 	open ($savePath, $sessionName)

 	close ()

 	read ($id)

 	write ($id, $data)

 	destroy ($id)

 	gc ($maxlifetime)

Static Public Member Functions

static 	configure ($memcacheContainer=null)

Public Attributes

const 	SESSION_PREFIX = '_ah_sess_'

Detailed Description

A session handler interface using the GAE Memcache API.

Constructor & Destructor Documentation

          google\appengine\ext\session\MemcacheSessionHandler::__construct
          (

          $memcacheContainer = null	)

Constructs the session handler instance.

Parameters

MemcacheContainer	$memcacheContainer	Optional, for mocking in tests

Member Function Documentation

          google\appengine\ext\session\MemcacheSessionHandler::close
          (
          	)

Closes the session handler.

Returns

bool true if successful, false otherwise

          static google\appengine\ext\session\MemcacheSessionHandler::configure
          (

          $memcacheContainer = null	)

static

Configure the session handler to use the Memcache API.

Parameters

MemcacheContainer	$memcacheContainer	Optional, for mocking in tests

Set so that it is clear that Memcache is being used for session handling, as retrieving session.save_handler just returns "user".

          google\appengine\ext\session\MemcacheSessionHandler::destroy
          (

          $id	)

Destroy the data associated with a particular session ID.

Parameters

string	$id	Session ID associated with the data to be destroyed

Returns

bool true if successful, false otherwise

          google\appengine\ext\session\MemcacheSessionHandler::gc
          (

          $maxlifetime	)

Garbage collection method - always returns true as this is handled by the Memcache expire function.

Parameters

int	$maxlifetime	Not used

Returns

bool true if successful, false otherwise

          google\appengine\ext\session\MemcacheSessionHandler::open
          (

          $savePath,

          $sessionName

          )

Opens the session handler.

Parameters

string	$savePath	Not used

string	$sessionName	Not ued

Returns

bool true if successful, false otherwise

          google\appengine\ext\session\MemcacheSessionHandler::read
          (

          $id	)

Read an element from Memcache with the given ID.

Parameters

string	$id	Session ID associated with the data to be retrieved

Returns

string data associated with that ID or bool false on failure

          google\appengine\ext\session\MemcacheSessionHandler::write
          (

          $id,

          $data

          )

Write an element to Memcache with the given ID and data.

Parameters

string	$id	Session ID associated with the data to be stored

string	$data	Data to be stored

Returns

bool true if successful, false otherwise

The documentation for this class was generated from the following file:

code/googleappengine-read-only/python/php/sdk/google/appengine/ext/session/MemcacheSessionHandler.php

<address class="footer">
    Maintained by tzmartin
</address>


text:
These material was presented at the Cloud Metabolomics 2017 course held at CRS4 in Sardinia on September 2017.

This tutorial is divided in two parts:
- Cloud 101 slides and demos to give a general understanding and vocabulary of cloud computing elements (30 minutes).
- PhenoMeNal overview slides and demos/practical of the PhenoMeNal Portal, deployment and public instance (1 hour).

## Cloud 101 Slides

Duration: 25 minutes

Slides available [here](https://drive.google.com/open?id=0B3GjpBpPCNBcMEpfT1ZBMmtqS1E).

## OpenStack dashboard demo

Duration: 5 minutes (running 30 min.)

A quick walk through inside a cloud provider's web dashboard/control panel, to give an idea of what you get.

## PhenoMeNal Slides

Duration: 15 minutes (running 45 min.)

Slides available [here](https://drive.google.com/open?id=0B3GjpBpPCNBcZks2cEVzYURBT1k).

## PhenoMeNal Portal practical

Duration: 15 minutes (running 60 minutes)

- Following these [steps](Portal-practical.md).

## Fluxomics workflow practical

Duration: 25 minutes (running 1:25)

- Show how to build the Fluxomics workflow (following these [steps](build-fluxomics-workflow.md)).
- Show how to execute the Fluxomics workflow (following the [tutorial](https://github.com/phnmnl/phenomenal-h2020/wiki/fluxomics-workflow)) on the [public instance](https://public.phenomenal-h2020.eu/) or a deployed instance of your own.

## Closing remarks

Duration: 5 minutes


text:
'use strict';
var findexquire     =  require('../findexquire');
var functionComment =  require('function-comment');
var cardinal        =  require('cardinal');
var log             =  require('../log');
var fs              =  require('fs');

function newlinesIn(src) {
  if (!src) return 0;
  var newlines = src.match(/\n/g);

  return newlines ? newlines.length : 0;
}

function getComment (file, fnsrc, lineno) {
  var src = fs.readFileSync(file, 'utf8');
  try {
   return functionComment(src, lineno);
  } catch (e) {
    log.sillyln(e);
    return null;
  }
}

module.exports = function plugSrc(repl /* not used */) {
  Function.prototype.__defineGetter__('src', function () {
    var fnsrc   =  this.toString();
    var locs    =  findexquire.find(fnsrc);

    var comment =  ''
      , lineno
      , firstline;

    // make anonymous functions parsable
    fnsrc = fnsrc.replace(/^function[ ]+\(/, 'function fn(');

    if (locs) {
      locs.forEach(function (loc) {
        fnsrc += '\n// ' + loc.file + ':' + loc.start.line + ':' + loc.start.column;
      });

      if (locs.length === 1) lineno = locs[0].start.line;
    }

    if (lineno) {
      comment = getComment(locs[0].file, fnsrc, lineno);

      if (comment && comment.startline > 0) {
        fnsrc = comment.comment + '\n' + fnsrc;
        firstline = comment.startline
      } else {
        firstline = lineno;
      }
    }

    var lineInfo = { linenos: !!lineno, firstline: firstline };
    try {
      return {
          __replpad_print_raw__: cardinal.highlight(fnsrc, lineInfo)
        , lineInfo: lineInfo
      };
    } catch (e) {
      log.sillyln(e);
      return { __replpad_print_raw__: fnsrc, lineInfo: lineInfo };
    }
  });
};


text:
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Text, Left, Body, Right, List, ListItem } from 'native-base';
import { Actions } from 'react-native-router-flux';

import { openDrawer, closeDrawer } from '../../actions/drawer';
import styles from './styles';

const {
  pushRoute,
} = actions;
const datas = [
  {
    route: 'basicSeg',
    text: 'Segments inside Header',
  },
  {
    route: 'advSeg',
    text: 'Segments Outside Header ',
  },
];
class NBSegment extends Component {

  static propTypes = {
    openDrawer: React.PropTypes.func,
    pushRoute: React.PropTypes.func,
    navigation: React.PropTypes.shape({
      key: React.PropTypes.string,
    }),
  }

  pushRoute(route) {
    this.props.pushRoute({ key: route, index: 1 }, this.props.navigation.key);
  }

  render() {
    return (
      <Container style={styles.container}>
        <Header>
          <Left>
            <Button transparent onPress={this.props.openDrawer}>
              <Icon name="menu" />
            </Button>
          </Left>
          <Body>
            <Title>Segments</Title>
          </Body>
          <Right />

        </Header>

        <Content>
          <List
            dataArray={datas} renderRow={data =>
              <ListItem button onPress={() => { Actions[data.route](); this.props.closeDrawer() }} >
                <Text>{data.text}</Text>
                <Right>
                  <Icon name="arrow-forward" style={{ color: '#999' }} />
                </Right>
              </ListItem>
            }
          />
        </Content>
      </Container>
    );
  }
}

function bindAction(dispatch) {
  return {
    openDrawer: () => dispatch(openDrawer()),
    closeDrawer: () => dispatch(closeDrawer()),
    pushRoute: (route, key) => dispatch(pushRoute(route, key)),
  };
}

const mapStateToProps = state => ({
  navigation: state.cardNavigation,
  themeState: state.drawer.themeState,
});

export default connect(mapStateToProps, bindAction)(NBSegment);


text:
notionApp.controller ( 'PoolController', function($scope,$timeout,$stateParams, $state, $modal, $http, authorization) {
  $scope.pool = $scope.$parent.pool;
  console.log ( "PoolController for ", $stateParams.poolKey );
  console.log ( "Pool is: ", $scope.pool);
  $scope.model = $scope.pool.toJSON();
  $scope.authorization = authorization;
  $scope.okToDelete = false;

  // Grab the devices
  $scope.deviceCollection = new DeviceCollection();
  $scope.deviceCollection.urlRoot = '/rest/pool/' + $stateParams.poolKey + '/device';
  $scope.deviceCollection.fetch({async:false});
  pool = $scope.pool;
  devices = $scope.deviceCollection;

  $scope.edit = function() {
    $modal.open ( {
      templateUrl: 'partials/pool.edit.html',
      scope: $scope,
      controller: function($scope, $modalInstance) {
        $scope.title = "Edit " + $scope.pool.get('name');
        $scope.hideAETitle = true;
        $scope.save = function() {
          $scope.pool.save ( $scope.model );
          $modalInstance.close();
        };
        $scope.cancel = function() { $modalInstance.dismiss(); };
      }
    });
  };

  // Devices
  $scope.editDevice = function(device) {
    console.log("EditDevice");
    var newDevice = !device;
    if ( !device ) {
      console.log("Create new device");
      device = new DeviceModel();
    }
    $scope.device = device;
    $scope.deviceModel = device.toJSON();
    $modal.open ( {
      templateUrl: 'partials/device.edit.html',
      scope: $scope,
      controller: function($scope, $modalInstance) {
        if ( newDevice ) {
          $scope.title = "Create a new device";
        } else {
          $scope.title = "Edit the device";
        }
        $scope.save = function(){
          device.set ( $scope.deviceModel );
          $scope.deviceCollection.add(device);
          device.save();
          $modalInstance.close();
        };
        $scope.cancel = function() { $modalInstance.dismiss(); };
      }
    });
  };

  $scope.deleteDevice = function(device) {
    $scope.device = device;
    $scope.deviceModel = device.toJSON();
    $modal.open ({
      templateUrl: 'partials/modal.html',
      controller: function($scope, $modalInstance) {
        $scope.title = "Delete device?";
        $scope.message = "Delete the device: " + device.format();
        $scope.ok = function(){
          device.destroy({
            success: function(model, response) {
              console.log("Dismissing modal");
              $modalInstance.dismiss();
              $scope.$apply();
            },
            error: function(model, response) {
              alert ( "Failed to delete Device: " + response.message );
            }
          });
        };
        $scope.cancel = function() { $modalInstance.dismiss(); };
      }
    });
  };

  // Test a DICOM triplet against all the defined devices
  $scope.testResult = { query: false, retrieve: false, store: false };
  $scope.testDeviceMatch = function() {

    var re = /([^@]*)@([^:]*):(\d*)/;
    var t = re.exec ( $scope.testDeviceFull);
    console.log(t);
    if ( t === null || t.length != 4 ) {
      toastr.error ("Could not parse DICOM information: " + $scope.testDeviceFull + "<br> Should be AET@Hostname:port");
      return;
    }
    var testDevice = { applicationEntityTitle: t[1], hostName: t[2], port: t[3]};
    console.log("checking " + $scope.testDevice + " to server");
    $http.post ( '/rest/pool/' + $scope.pool.get('poolKey') + '/device/match', testDevice)
    .success(function(data,status){
      console.log("Got test data back", data);
      $scope.testResult = data;
    });
  };

  // CTP Configuration
  $scope.ctp = new CTPModel();
  $scope.ctp.urlRoot = '/rest/pool/' + $scope.pool.get('poolKey') + '/ctp';
  $scope.ctp.fetch({async:false});
  $scope.ctpScript = $scope.ctp.get("script");
  $scope.saveCTP = function() {
    $scope.ctp.set('script', $scope.ctpScript);
    $scope.ctp.sync("update", $scope.ctp).done ( function(data) {
      toastr.success ( "Saved CTP script" );
    })
    .fail ( function ( xhr, status, error ) {
      toastr.error ( "Failed to save script: " + status );
    });
  };

  // Scripts
  $scope.scriptModel = new ScriptModel();
  $scope.scriptModel.urlRoot = '/rest/pool/' + $scope.pool.get('poolKey') + '/script';
  $scope.scriptModel.fetch({async:false});
  $scope.script = $scope.scriptModel.get("script");
  console.log("Got script: ", $scope.scriptModel);

  $scope.saveScript = function(){
    console.log ( "Saving script ", $scope.script);
    $scope.scriptModel.set("script", $scope.script);
    $scope.scriptModel.sync('update', $scope.scriptModel).done ( function(data) {
      toastr.success ( "Saved Anonymization script" );
    })
    .fail ( function ( xhr, status, error ) {
      toastr.error ( "Failed to save script: " + status );
    });
  };
  $scope.aceLoaded = function(editor) {
    console.log ( "Ace loaded" );
    editor.commands.addCommand({
      name: 'save',
      bindKey: {win: 'Ctrl-S', mac: 'Command-S'},
      exec: $scope.save
    });

    // Try
    editor.commands.addCommand({
      name: 'exec',
      bindKey: {win: 'Ctrl-Return', mac: 'Command-Return'},
      exec: $scope.try
    });
  };

  $scope.tryScript = function() {
    // Cal the rest API and give it a go
    console.log ( "Trying script on the server");
    $scope.scriptModel.set("script", $scope.script);
    var url = "/rest/pool/" + $scope.pool.get('poolKey') + '/script/try';
    $.ajax ({
      contentType: 'application/json',
      type: 'PUT',
      url: url,
      data: JSON.stringify($scope.scriptModel),
      success: function ( data ) {
        console.log("Tried script, got back ", data);
        $scope.$apply ( function() {
          $scope.tryResult = data.result;
          toastr.success("Script result: " + data.result);
        });
      }
    });
  };

  $scope.deletePool = function(device) {
    var model = $scope.model;
    var poolsController = $scope.$parent.$parent;
    $modal.open ({
      templateUrl: 'partials/modal.html',
      controller: function($scope, $modalInstance) {
        $scope.title = "Delete pool " + model.name + "?";
        $scope.message = "This will delete the pool " + model.name + " including all data!  You will no longer be able to send to, receive from, retrieve studies, find the anonymization map or do anything with the images in the pool.  They will be GONE FOREVER.";
        $scope.ok = function(){
          $http.delete ( "/rest/pool/" + model.poolKey )
          .success(function(data,status,headers,config){
              $modalInstance.dismiss();
              poolsController.refresh();
              console.log("PoolsController", poolsController);
              $state.go("^.^.index");

          })
          .error(function(data,status,headers,config){
            alert ( "Failed to delete Device: " + data.message );
          });
        };
        $scope.cancel = function() { $modalInstance.dismiss(); };
      }
    });
  };

});


text:
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.  All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

package com.google.protobuf;

import com.google.protobuf.ArrayDecoders.Registers;
import java.io.IOException;

/**
 * A runtime schema for a single protobuf message. A schema provides operations on message instances
 * such as serialization/deserialization.
 */
@ExperimentalApi
interface Schema<T> {
  /** Writes the given message to the target {@link Writer}. */
  void writeTo(T message, Writer writer) throws IOException;

  /**
   * Reads fields from the given {@link Reader} and merges them into the message. It doesn't make
   * the message immutable after parsing is done. To make the message immutable, use {@link
   * #makeImmutable}.
   */
  void mergeFrom(T message, Reader reader, ExtensionRegistryLite extensionRegistry)
      throws IOException;

  /**
   * Like the above but parses from a byte[] without extensions. Entry point of fast path. Note that
   * this method may throw IndexOutOfBoundsException if the input data is not valid protobuf wire
   * format. Protobuf public API methods should catch and convert that exception to
   * InvalidProtocolBufferException.
   */
  void mergeFrom(T message, byte[] data, int position, int limit, Registers registers)
      throws IOException;

  /** Marks repeated/map/extension/unknown fields as immutable. */
  void makeImmutable(T message);

  /** Checks whether all required fields are set. */
  boolean isInitialized(T message);

  /** Creates a new instance of the message class. */
  T newInstance();

  /** Determine of the two messages are equal. */
  boolean equals(T message, T other);

  /** Compute a hashCode for the message. */
  int hashCode(T message);

  /**
   * Merge values from {@code other} into {@code message}. This method doesn't make the message
   * immutable. To make the message immutable after merging, use {@link #makeImmutable}.
   */
  void mergeFrom(T message, T other);

  /** Compute the serialized size of the message. */
  int getSerializedSize(T message);
}


text:
package org.pentaho.di.trans.steps.mongodbinput;

import com.mongodb.AggregationOutput;
import com.mongodb.DBObject;
import com.mongodb.ServerAddress;
import com.mongodb.util.JSON;
import org.pentaho.di.core.Const;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.row.RowDataUtil;
import org.pentaho.di.core.row.RowMeta;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.trans.Trans;
import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.trans.step.BaseStep;
import org.pentaho.di.trans.step.StepDataInterface;
import org.pentaho.di.trans.step.StepInterface;
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.StepMetaInterface;
import org.pentaho.mongo.MongoDbException;
import org.pentaho.mongo.wrapper.MongoWrapperUtil;
import org.pentaho.mongo.wrapper.field.MongodbInputDiscoverFieldsImpl;

import java.util.List;

public class MongoDbInput extends BaseStep implements StepInterface {
  private static Class<?> PKG = MongoDbInputMeta.class; // for i18n purposes,
  // needed by
  // Translator2!!
  // $NON-NLS-1$

  private MongoDbInputMeta meta;
  private MongoDbInputData data;

  private boolean m_serverDetermined;
  private Object[] m_currentInputRowDrivingQuery = null;

  public MongoDbInput( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans ) {
    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
  }

  @Override public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
    try {
      if ( meta.getExecuteForEachIncomingRow() && m_currentInputRowDrivingQuery == null ) {
        m_currentInputRowDrivingQuery = getRow();

        if ( m_currentInputRowDrivingQuery == null ) {
          // no more input, no more queries to make
          setOutputDone();
          return false;
        }

        if ( !first ) {
          initQuery();
        }
      }

      if ( first ) {
        data.outputRowMeta = new RowMeta();
        meta.getFields( data.outputRowMeta, getStepname(), null, null, MongoDbInput.this );

        initQuery();
        first = false;

        data.init();
      }

      boolean
          hasNext =
          ( ( meta.getQueryIsPipeline() ? data.m_pipelineResult.hasNext() : data.cursor.hasNext() ) && !isStopped() );
      if ( hasNext ) {
        DBObject nextDoc = null;
        Object[] row = null;
        if ( meta.getQueryIsPipeline() ) {
          nextDoc = data.m_pipelineResult.next();
        } else {
          nextDoc = data.cursor.next();
        }

        if ( !meta.getQueryIsPipeline() && !m_serverDetermined ) {
          ServerAddress s = data.cursor.getServerAddress();
          if ( s != null ) {
            m_serverDetermined = true;
            logBasic(
                BaseMessages.getString( PKG, "MongoDbInput.Message.QueryPulledDataFrom", s.toString() ) ); //$NON-NLS-1$
          }
        }

        if ( meta.getOutputJson() || meta.getMongoFields() == null || meta.getMongoFields().size() == 0 ) {
          String json = nextDoc.toString();
          row = RowDataUtil.allocateRowData( data.outputRowMeta.size() );
          int index = 0;

          row[index++] = json;
          putRow( data.outputRowMeta, row );
        } else {
          Object[][] outputRows = data.mongoDocumentToKettle( nextDoc, MongoDbInput.this );

          // there may be more than one row if the paths contain an array
          // unwind
          for ( int i = 0; i < outputRows.length; i++ ) {
            putRow( data.outputRowMeta, outputRows[i] );
          }
        }
      } else {
        if ( !meta.getExecuteForEachIncomingRow() ) {
          setOutputDone();

          return false;
        } else {
          m_currentInputRowDrivingQuery = null; // finished with this row
        }
      }

      return true;
    } catch ( Exception e ) {
      if ( e instanceof KettleException ) {
        throw (KettleException) e;
      } else {
        throw new KettleException( e ); //$NON-NLS-1$
      }
    }
  }

  protected void initQuery() throws KettleException, MongoDbException {

    // close any previous cursor
    if ( data.cursor != null ) {
      data.cursor.close();
    }

    // check logging level and only set to false if
    // logging level at least detailed
    if ( log.isDetailed() ) {
      m_serverDetermined = false;
    }

    String query = environmentSubstitute( meta.getJsonQuery() );
    String fields = environmentSubstitute( meta.getFieldsName() );
    if ( Const.isEmpty( query ) && Const.isEmpty( fields ) ) {
      if ( meta.getQueryIsPipeline() ) {
        throw new KettleException( BaseMessages
            .getString( MongoDbInputMeta.PKG, "MongoDbInput.ErrorMessage.EmptyAggregationPipeline" ) ); //$NON-NLS-1$
      }

      data.cursor = data.collection.find();
    } else {

      if ( meta.getQueryIsPipeline() ) {
        if ( Const.isEmpty( query ) ) {
          throw new KettleException( BaseMessages
              .getString( MongoDbInputMeta.PKG, "MongoDbInput.ErrorMessage.EmptyAggregationPipeline" ) ); //$NON-NLS-1$
        }

        if ( meta.getExecuteForEachIncomingRow() && m_currentInputRowDrivingQuery != null ) {
          // do field value substitution
          query = fieldSubstitute( query, getInputRowMeta(), m_currentInputRowDrivingQuery );
        }

        logDetailed( BaseMessages.getString( PKG, "MongoDbInput.Message.QueryPulledDataFrom", query ) );

        List<DBObject> pipeline = MongodbInputDiscoverFieldsImpl.jsonPipelineToDBObjectList( query );
        DBObject firstP = pipeline.get( 0 );
        DBObject[] remainder = null;
        if ( pipeline.size() > 1 ) {
          remainder = new DBObject[pipeline.size() - 1];
          for ( int i = 1; i < pipeline.size(); i++ ) {
            remainder[i - 1] = pipeline.get( i );
          }
        } else {
          remainder = new DBObject[0];
        }

        AggregationOutput result = data.collection.aggregate( firstP, remainder );
        data.m_pipelineResult = result.results().iterator();
      } else {
        if ( meta.getExecuteForEachIncomingRow() && m_currentInputRowDrivingQuery != null ) {
          // do field value substitution
          query = fieldSubstitute( query, getInputRowMeta(), m_currentInputRowDrivingQuery );

          fields = fieldSubstitute( fields, getInputRowMeta(), m_currentInputRowDrivingQuery );
        }

        logDetailed( BaseMessages.getString( PKG, "MongoDbInput.Message.ExecutingQuery", query ) );

        DBObject dbObject = (DBObject) JSON.parse( Const.isEmpty( query ) ? "{}" //$NON-NLS-1$
            : query );
        DBObject dbObject2 = (DBObject) JSON.parse( fields );
        data.cursor = data.collection.find( dbObject, dbObject2 );
      }
    }
  }

  @Override public boolean init( StepMetaInterface stepMetaInterface, StepDataInterface stepDataInterface ) {
    if ( super.init( stepMetaInterface, stepDataInterface ) ) {
      meta = (MongoDbInputMeta) stepMetaInterface;
      data = (MongoDbInputData) stepDataInterface;

      String hostname = environmentSubstitute( meta.getHostnames() );
      int port = Const.toInt( environmentSubstitute( meta.getPort() ), MongoDbInputData.MONGO_DEFAULT_PORT );
      String db = environmentSubstitute( meta.getDbName() );
      String collection = environmentSubstitute( meta.getCollection() );

      try {
        if ( Const.isEmpty( db ) ) {
          throw new Exception( BaseMessages.getString( PKG, "MongoInput.ErrorMessage.NoDBSpecified" ) ); //$NON-NLS-1$
        }

        if ( Const.isEmpty( collection ) ) {
          throw new Exception(
              BaseMessages.getString( PKG, "MongoInput.ErrorMessage.NoCollectionSpecified" ) ); //$NON-NLS-1$
        }

        if ( !Const.isEmpty( meta.getAuthenticationUser() ) ) {
          String
              authInfo =
              ( meta.getUseKerberosAuthentication() ? BaseMessages
                  .getString( PKG, "MongoDbInput.Message.KerberosAuthentication",
                      environmentSubstitute( meta.getAuthenticationUser() ) ) : BaseMessages
                      .getString( PKG, "MongoDbInput.Message.NormalAuthentication",
                        environmentSubstitute( meta.getAuthenticationUser() ) ) );

          logBasic( authInfo );
        }

        // init connection constructs a MongoCredentials object if necessary
        data.clientWrapper = MongoWrapperUtil.createMongoClientWrapper( meta, this, log );
        data.collection = data.clientWrapper.getCollection( db, collection );

        if ( !( (MongoDbInputMeta) stepMetaInterface ).getOutputJson() ) {
          ( (MongoDbInputData) stepDataInterface )
              .setMongoFields( ( (MongoDbInputMeta) stepMetaInterface ).getMongoFields() );
        }

        return true;
      } catch ( Exception e ) {
        logError( BaseMessages
            .getString( PKG, "MongoDbInput.ErrorConnectingToMongoDb.Exception", hostname, "" //$NON-NLS-1$ //$NON-NLS-2$
                    + port, db, collection ), e );
        return false;
      }
    } else {
      return false;
    }
  }

  @Override public void dispose( StepMetaInterface smi, StepDataInterface sdi ) {
    if ( data.cursor != null ) {
      try {
        data.cursor.close();
      } catch ( MongoDbException e ) {
        log.logError( e.getMessage() );
      }
    }
    if ( data.clientWrapper != null ) {
      try {
        data.clientWrapper.dispose();
      } catch ( MongoDbException e ) {
        log.logError( e.getMessage() );
      }
    }

    super.dispose( smi, sdi );
  }
}


text:
package org.apache.solr.spelling.suggest.fst;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.search.suggest.Lookup;
import org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester;
import org.apache.lucene.search.suggest.analyzing.BlendedInfixSuggester;
import org.apache.lucene.search.suggest.analyzing.BlendedInfixSuggester.BlenderType;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.core.SolrCore;
import org.apache.solr.schema.FieldType;

/**
 * Factory for {@link BlendedInfixLookupFactory}
 * @lucene.experimental
 */
public class BlendedInfixLookupFactory extends AnalyzingInfixLookupFactory {

  /**
   * Blender type used to calculate weight coefficient using the position
   * of the first matching word
   * </p>
   * Available blender types are: </br>
   *  linear: weight*(1 - 0.10*position) [default]</br>
   *  reciprocal: weight/(1+position)
   */
  private static final String BLENDER_TYPE = "blenderType";

  /**
   * Factor to multiply the number of searched elements
   * Default is 10
   */
  private static final String NUM_FACTOR = "numFactor";

  /**
   * Default path where the index for the suggester is stored/loaded from
   * */
  private static final String DEFAULT_INDEX_PATH = "blendedInfixSuggesterIndexDir";

  /**
   * File name for the automaton.
   */
  private static final String FILENAME = "bifsta.bin";

  @Override
  public Lookup create(NamedList params, SolrCore core) {
    // mandatory parameter
    Object fieldTypeName = params.get(QUERY_ANALYZER);
    if (fieldTypeName == null) {
      throw new IllegalArgumentException("Error in configuration: " + QUERY_ANALYZER + " parameter is mandatory");
    }
    FieldType ft = core.getLatestSchema().getFieldTypeByName(fieldTypeName.toString());
    if (ft == null) {
      throw new IllegalArgumentException("Error in configuration: " + fieldTypeName.toString() + " is not defined in the schema");
    }
    Analyzer indexAnalyzer = ft.getIndexAnalyzer();
    Analyzer queryAnalyzer = ft.getQueryAnalyzer();

    // optional parameters

    String indexPath = params.get(INDEX_PATH) != null
    ? params.get(INDEX_PATH).toString()
    : DEFAULT_INDEX_PATH;
    if (new File(indexPath).isAbsolute() == false) {
      indexPath = core.getDataDir() + File.separator + indexPath;
    }

    int minPrefixChars = params.get(MIN_PREFIX_CHARS) != null
    ? Integer.parseInt(params.get(MIN_PREFIX_CHARS).toString())
    : AnalyzingInfixSuggester.DEFAULT_MIN_PREFIX_CHARS;

    BlenderType blenderType = getBlenderType(params.get(BLENDER_TYPE));

    int numFactor = params.get(NUM_FACTOR) != null
    ? Integer.parseInt(params.get(NUM_FACTOR).toString())
    : BlendedInfixSuggester.DEFAULT_NUM_FACTOR;

    try {
      return new BlendedInfixSuggester(core.getSolrConfig().luceneMatchVersion,
                                       FSDirectory.open(new File(indexPath).toPath()),
                                       indexAnalyzer, queryAnalyzer, minPrefixChars,
                                       blenderType, numFactor, true) {
        @Override
        public List<LookupResult> lookup(CharSequence key, Set<BytesRef> contexts, int num, boolean allTermsRequired, boolean doHighlight) throws IOException {
          List<LookupResult> res = super.lookup(key, contexts, num, allTermsRequired, doHighlight);
          if (doHighlight) {
            List<LookupResult> res2 = new ArrayList<>();
            for(LookupResult hit : res) {
              res2.add(new LookupResult(hit.highlightKey.toString(),
                                        hit.highlightKey,
                                        hit.value,
                                        hit.payload,
                                        hit.contexts));
            }
            res = res2;
          }

          return res;
        }
      };
    } catch (IOException e) {
      throw new RuntimeException();
    }
  }

  @Override
  public String storeFileName() {
    return FILENAME;
  }

  private BlenderType getBlenderType(Object blenderTypeParam) {
    BlenderType blenderType = BlenderType.POSITION_LINEAR;
    if (blenderTypeParam != null) {
      String blenderTypeStr = blenderTypeParam.toString();
      if (blenderTypeStr.equalsIgnoreCase("reciprocal")) {
        blenderType = BlenderType.POSITION_RECIPROCAL;
      }
    }
    return blenderType;
  }
}


text:
set -euo pipefail

mkdir -p static/fonts
cp node_modules/font-awesome/fonts/* ./static/fonts
cp node_modules/font-awesome/css/font-awesome.min.css ./static/css

cp node_modules/flatpickr/dist/flatpickr.min.css ./static/css


text:
namespace BulletSharp
{
	ref class CollisionShape;
	ref class CompoundShapeChild;
	ref class Dbvt;
	ref class DbvtNode;
	ref class DbvtProxy;

	public ref class ListDebugView
	{
	private:
		System::Collections::IEnumerable^ _list;

	public:
		ListDebugView(System::Collections::IEnumerable^ list);

		[DebuggerBrowsable(DebuggerBrowsableState::RootHidden)]
		property System::Collections::ArrayList^ Items
		{
			System::Collections::ArrayList^ get();
		}
	};

	public ref class Vector3ListDebugView
	{
	private:
		IList<Vector3>^ _list;

	public:
		Vector3ListDebugView(IList<Vector3>^ list);

		[DebuggerBrowsable(DebuggerBrowsableState::RootHidden)]
		property array<Vector3>^ Items
		{
			array<Vector3>^ get();
		}
	};

	generic<class T>
	public ref class ListEnumerator : System::Collections::IEnumerator, IEnumerator<T>
	{
	private:
		IList<T>^ _list;
		int i;
		int _count;

	public:
		ListEnumerator(IList<T>^ list);
		~ListEnumerator(){}

		property T GenericCurrent
		{
			virtual T get() = IEnumerator<T>::Current::get;
		}

		property Object^ Current
		{
			virtual Object^ get() = IEnumerator::Current::get;
		}

		virtual bool MoveNext();
		virtual void Reset();
	};

	generic<class T>
	public ref class GenericList abstract : IList<T>
	{
	internal:
		void* _native;

	protected:
		int _length;
		bool _isReadOnly;

	internal:
		GenericList(void* array, int length);
		GenericList(const void* array, int length);

	public:
		virtual void Add(T item);
		virtual void Clear();
		virtual bool Contains(T item);
		virtual void CopyTo(array<T>^ array, int arrayIndex) = 0;
		virtual System::Collections::IEnumerator^ GetObjectEnumerator() = System::Collections::IEnumerable::GetEnumerator;
		virtual IEnumerator<T>^ GetEnumerator() = IEnumerable<T>::GetEnumerator;
		virtual int IndexOf(T item);
		virtual void Insert(int index, T item);
		virtual bool Remove(T item);
		virtual void RemoveAt(int index);

		property int Count
		{
			virtual int get();
		}

		property T default [int]
		{
			virtual T get (int index) = 0;
			virtual void set(int index, T value) = 0;
		}

		property bool IsReadOnly
		{
			virtual bool get();
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class BoolArray : GenericList<bool>
	{
	internal:
		BoolArray(bool* boolArray, int length);
		BoolArray(const bool* boolArray, int length);

	public:
		virtual bool Contains(bool item) override;
		virtual void CopyTo(array<bool>^ array, int arrayIndex) override;
		virtual int IndexOf(bool item) override;

		property bool default[int]
		{
			virtual bool get(int index) override;
			virtual void set(int index, bool value) override;
		}
	};

#ifndef DISABLE_SOFTBODY
	namespace SoftBody
	{
		ref class Body;

		[DebuggerDisplay("Count = {Count}")]
		[DebuggerTypeProxy(ListDebugView::typeid)]
		public ref class BodyArray : GenericList<Body^>
		{
		internal:
			BodyArray(btSoftBody::Body* bodyArray, int length);
			BodyArray(const btSoftBody::Body* bodyArray, int length);

		public:
			virtual void CopyTo(array<Body^>^ array, int arrayIndex) override;

			property Body^ default[int]
			{
				virtual Body^ get(int index) override;
				virtual void set(int index, Body^ value) override;
			}
		};
	};
#endif

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class CompoundShapeChildArray : GenericList<CompoundShapeChild^>
	{
	private:
		List<CompoundShapeChild^>^ _backingList;
		int _updateRevision;

	internal:
		CompoundShapeChildArray(btCompoundShape* compoundShape);

		void BuildBackingList();

	public:
		void AddChildShape(Matrix% localTransform, CollisionShape^ shape);
		virtual void CopyTo(array<CompoundShapeChild^>^ array, int arrayIndex) override;
		void RemoveChildShape(CollisionShape^ shape);
		void RemoveChildShapeByIndex(int childShapeIndex);

		property CompoundShapeChild^ default[int]
		{
			virtual CompoundShapeChild^ get(int index) override;
			virtual void set(int index, CompoundShapeChild^ value) override;
		}

		property int Count
		{
			virtual int get() override;
		}
	};

#ifndef DISABLE_DBVT
	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class DbvtArray : GenericList<Dbvt^>
	{
	internal:
		DbvtArray(btDbvt* dbvtArray, int length);
		DbvtArray(const btDbvt* dbvtArray, int length);

	public:
		virtual void CopyTo(array<Dbvt^>^ array, int arrayIndex) override;

		property Dbvt^ default[int]
		{
			virtual Dbvt^ get(int index) override;
			virtual void set(int index, Dbvt^ value) override;
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class DbvtNodePtrArray : GenericList<DbvtNode^>
	{
	internal:
		DbvtNodePtrArray(btDbvtNode** nodePtrArray, int length);
		DbvtNodePtrArray(const btDbvtNode** nodePtrArray, int length);

	public:
		virtual void CopyTo(array<DbvtNode^>^ array, int arrayIndex) override;

		property DbvtNode^ default[int]
		{
			virtual DbvtNode^ get(int index) override;
			virtual void set(int index, DbvtNode^ value) override;
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class DbvtProxyPtrArray : GenericList<DbvtProxy^>
	{
	internal:
		DbvtProxyPtrArray(btDbvtProxy** proxyPtrArray, int length);
		DbvtProxyPtrArray(const btDbvtProxy** proxyPtrArray, int length);

	public:
		virtual void CopyTo(array<DbvtProxy^>^ array, int arrayIndex) override;

		property DbvtProxy^ default[int]
		{
			virtual DbvtProxy^ get(int index) override;
			virtual void set(int index, DbvtProxy^ value) override;
		}
	};
#endif

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class FloatArray : GenericList<float>
	{
	internal:
		FloatArray(float* floatArray, int length);
		FloatArray(const float* floatArray, int length);

	public:
		FloatArray(int length);

		virtual bool Contains(float item) override;
		virtual void CopyTo(array<float>^ array, int arrayIndex) override;
		virtual int IndexOf(float item) override;

		property float default[int]
		{
			virtual float get(int index) override;
			virtual void set(int index, float value) override;
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class IntArray : GenericList<int>
	{
	internal:
		IntArray(int* intArray, int length);
		IntArray(const int* intArray, int length);

	public:
		IntArray(int length);

		virtual bool Contains(int item) override;
		virtual void CopyTo(array<int>^ array, int arrayIndex) override;
		virtual int IndexOf(int item) override;

		property int default[int]
		{
			virtual int get(int index) override;
			virtual void set(int index, int value) override;
		}
	};

#ifndef DISABLE_SOFTBODY
	namespace SoftBody
	{
		ref class Node;

		[DebuggerDisplay("Count = {Count}")]
		[DebuggerTypeProxy(ListDebugView::typeid)]
		public ref class NodePtrArray : GenericList<Node^>
		{
		internal:
			NodePtrArray(btSoftBody::Node** nodePtrArray, int length);
			NodePtrArray(const btSoftBody::Node** nodePtrArray, int length);

		public:
			virtual void CopyTo(array<Node^>^ array, int arrayIndex) override;

			property Node^ default[int]
			{
				virtual Node^ get(int index) override;
				virtual void set(int index, Node^ value) override;
			}
		};
	};
#endif

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class ScalarArray : GenericList<btScalar>
	{
	internal:
		ScalarArray(btScalar* scalarArray, int length);
		ScalarArray(const btScalar* scalarArray, int length);

	public:
		ScalarArray(int length);

		virtual bool Contains(btScalar item) override;
		virtual void CopyTo(array<btScalar>^ array, int arrayIndex) override;
		virtual int IndexOf(btScalar item) override;

		property btScalar default[int]
		{
			virtual btScalar get(int index) override;
			virtual void set(int index, btScalar value) override;
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class UIntArray : GenericList<unsigned int>
	{
	internal:
		UIntArray(unsigned int* uintArray, int length);
		UIntArray(const unsigned int* uintArray, int length);

	public:
		virtual bool Contains(unsigned int item) override;
		virtual void CopyTo(array<unsigned int>^ array, int arrayIndex) override;
		virtual int IndexOf(unsigned int item) override;

		property unsigned int default[int]
		{
			virtual unsigned int get(int index) override;
			virtual void set(int index, unsigned int value) override;
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(ListDebugView::typeid)]
	public ref class UShortArray : GenericList<unsigned short>
	{
	internal:
		UShortArray(unsigned short* uShortArray, int length);
		UShortArray(const unsigned short* uShortArray, int length);

	public:
		virtual bool Contains(unsigned short item) override;
		virtual void CopyTo(array<unsigned short>^ array, int arrayIndex) override;
		virtual int IndexOf(unsigned short item) override;

		property unsigned short default[int]
		{
			virtual unsigned short get(int index) override;
			virtual void set(int index, unsigned short value) override;
		}
	};

	[DebuggerDisplay("Count = {Count}")]
	[DebuggerTypeProxy(Vector3ListDebugView::typeid)]
	public ref class Vector3Array : GenericList<Vector3>
	{
	private:
		int _vectorStride;

	internal:
		Vector3Array(btVector3* vector3Array, int length);
		Vector3Array(const btVector3* vector3Array, int length);

	public:
		Vector3Array(int length);

		virtual void CopyTo(array<Vector3>^ array, int arrayIndex) override;
		virtual int IndexOf(Vector3 item) override;

		property Vector3 default[int]
		{
			virtual Vector3 get(int index) override;
			virtual void set(int index, Vector3 value) override;
		}

		property int Stride
		{
			int get();
			void set(int value);
		}
	};
};


text:
========
Settings
========

Nacelle comes with some default settings that you can override to configure your app.
These can be found in ``nacelle/conf/default_settings.py``

Create a file named ``settings.py`` in the root of your project folder and override the settings there


text:
FROM diegoteam/cf-cli:latest
MAINTAINER Roberto Jimenez Sanchez, <jszroberto@gmail.com>

# Install CATs

RUN /bin/bash -l -c "go get -d github.com/cloudfoundry/cf-acceptance-tests"

ADD bin/* /root/bin/
RUN chmod +x /root/bin/*

ENTRYPOINT bash -l -c "load.env run.cats"