text:
% mv_classify unit test

rng(42)
tol = 10e-10;
mf = mfilename;

% In the first part we will replicate behaviour of the other high-level
% functions (mv_classify_across_time, mv_classify_timextime) to mv_classify
% output

nsamples = 100;
nfeatures = 10;
nclasses = 2;
prop = [];
scale = 1;
do_plot = 0;
[X, clabel] = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot);

%% compare to mv_classify_across_time
nsamples = 50;
ntime = 100;
nfeatures = 10;
nclasses = 2;
prop = [];
scale = 0.0001;
do_plot = 0;

% Generate data
X2 = zeros(nsamples, nfeatures, ntime);
[~,clabel2] = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot);

for tt=1:ntime
    X2(:,:,tt) = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot);
end

% mv_classify_across_time
rng(21)   % reset rng to get the same random folds
cfg = [];
cfg.feedback = 0;
acc1 = mv_classify_across_time(cfg, X2, clabel2);

% mv_classify
rng(21)   % reset rng to get the same random folds
cfg.sample_dimension = 1;
cfg.feature_dimension = 2;
acc2 = mv_classify(cfg, X2, clabel2);

print_unittest_result('compare to mv_classify_across_time', acc1, acc2, tol);

%% compare to mv_classify_timextime

% mv_classify_timextime
rng(22)
cfg = [];
cfg.feedback = 0;
acc1 = mv_classify_timextime(cfg, X2, clabel2);

% mv_classify
rng(22)
cfg.sample_dimension = 1;
cfg.feature_dimension = 2;
cfg.generalization_dimension = 3;
acc2 = mv_classify(cfg, X2, clabel2);

print_unittest_result('compare to mv_classify_timextime', acc1, acc2, tol);

%% Check output size for searchlight with neighbour matrix that is non-square [1 search dim]
X = randn(30, 20, 29);
clabel = double(randn(size(X,1),1) > 0) + 1;

% create random matrix with neighbours
nb1 = eye(size(X,2));
nb1 = nb1(1:end-6, :); % remove a few rows to make it non-square

cfg = [];
cfg.sample_dimension    = 1;
cfg.feature_dimension   = 3;
cfg.repeat              = 1;
cfg.feedback            = 0;
cfg.neighbours          = nb1;
perf = mv_classify(cfg, X, clabel);

print_unittest_result('[1 search dim] size(perf) for non-square neighbours', size(nb1,1), size(perf,1), tol);

%% Check output size for searchlight with neighbour matrix that is non-square [2 search dim]
X = randn(30, 20, 15, 29);
clabel = double(randn(size(X,1),1) > 0) + 1;

% create random matrix with neighbours
nb1 = eye(size(X,2));
nb2 = eye(size(X,4));

% remove a few rows
nb1 = nb1(1:end-9, :);
nb2 = nb2(1:end-3, :);

cfg = [];
cfg.sample_dimension    = 1;
cfg.feature_dimension   = 3;
cfg.repeat              = 1;
cfg.feedback            = 0;
cfg.neighbours          = {nb1 nb2};
perf = mv_classify(cfg, X, clabel);

print_unittest_result('[2 search dim] size(perf) for non-square neighbours', [size(nb1,1) size(nb2,1)], size(perf), tol);

%% Create a dataset where classes can be perfectly discriminated for only some time points [two-class]
nsamples = 100;
ntime = 300;
nfeatures = 10;
nclasses = 2;
prop = [];
scale = 0.0001;
do_plot = 0;

can_discriminate = 50:100;
cannot_discriminate = setdiff(1:ntime, can_discriminate);

% Generate data
X = zeros(nsamples, nfeatures, ntime);
[~,clabel] = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot);

for tt=1:ntime
    if ismember(tt, can_discriminate)
        scale = 0.0001;
        if tt==can_discriminate(1)
            [X(:,:,tt),~,~,M]  = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot);
        else
            % reuse the class centroid to make sure that the performance
            % generalises
            X(:,:,tt)  = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot, M);
        end
    else
        scale = 10e1;
        X(:,:,tt) = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, do_plot);
    end
end

cfg = [];
cfg.feedback = 0;
cfg.sample_dimension    = 1;
cfg.feature_dimension   = 2;
cfg.generalization_dimension   = 3;

[acc, result] = mv_classify(cfg, X, clabel);

% imagesc(acc), title(mf,'interpreter','none')
% figure,imagesc(acc)

% performance should be around 100% for the discriminable time points, and
% around 50% for the non-discriminable ones
acc_discriminable = mean(mean( acc(can_discriminate, can_discriminate)));
acc_nondiscriminable = mean(mean( acc(cannot_discriminate, cannot_discriminate)));

tol = 0.03;
print_unittest_result('[two-class] CV discriminable times = 1?', 1, acc_discriminable, tol);
print_unittest_result('[two-class] CV non-discriminable times = 0.5?', 0.5, acc_nondiscriminable, tol);

%% Check different metrics and classifiers for 2 classes -- just run to see if there's errors (use 5 dimensions with 3 search dims)
X2 = randn(12, 5, 3, 4, 2);
clabel = ones(size(X2,1), 1);
clabel(ceil(end/2):end) = 2;

cfg = [];
cfg.sample_dimension     = 1;
cfg.feature_dimension    = 2;
cfg.generalization_dimension = 4;
cfg.metric = 'acc';

cfg.feedback = 0;

for metric = {'acc','auc','confusion','dval','f1','kappa','precision','recall','tval'}
    for classifier = {'lda', 'logreg', 'multiclass_lda', 'svm', 'ensemble','kernel_fda','naive_bayes'}
        if any(ismember(classifier,{'kernel_fda' 'multiclass_lda','naive_bayes'})) && any(ismember(metric, {'tval','dval','auc'}))
            continue
        end
        fprintf('%s - %s\n', metric{:}, classifier{:})

        cfg.metric      = metric{:};
        cfg.classifier  = classifier{:};
        cfg.k           = 5;
        cfg.repeat      = 1;
        tmp = mv_classify(cfg, X2, clabel);
    end
end

%% Check different metrics and classifiers for 3 classes -- just run to see if there's errors (use 5 dimensions with 3 search dims)
X2 = randn(18, 5, 5, 4, 2);
clabel = ones(size(X2,1), 1);
clabel(7:end) = 2;
clabel(13:end) = 3;

cfg = [];
cfg.sample_dimension     = 1;
cfg.feature_dimension    = 2;
cfg.generalization_dimension = 4;
cfg.metric = 'acc';

cfg.feedback = 0;

for metric = {'acc','confusion','f1','kappa','precision','recall'}
    for classifier = {'multiclass_lda','kernel_fda','naive_bayes'}
        fprintf('%s - %s\n', metric{:}, classifier{:})

        cfg.metric      = metric{:};
        cfg.classifier  = classifier{:};
        cfg.k           = 5;
        cfg.repeat      = 1;
        tmp = mv_classify(cfg, X2, clabel);
    end
end

%% Check different cross-validation types [just run to check for errors]

% 4 input dimensions with 2 search dims
sz = [8, 26, 5, 3];
X2 = randn(sz);

cfg = [];
cfg.sample_dimension     = 2;
cfg.feature_dimension    = 3;
cfg.generalization_dimension    = 1;
cfg.cv                   = 'kfold';
cfg.k                    = 2;
cfg.feedback             = 0;

clabel = ones(sz(cfg.sample_dimension), 1);
clabel(ceil(end/2):end) = 2;

for cv = {'kfold' ,'leaveout', 'holdout', 'none'}
    fprintf('--%s--\n', cv{:})
    cfg.cv = cv{:};
    mv_classify(cfg, X2, clabel);
end

%% Check whether output dimensions are correct for 4D data

% 4 input dimensions with 2 search dims
sz = [19, 2, 3, 40];
X2 = randn(sz);
clabel = ones(sz(1), 1);
clabel(ceil(end/2):end) = 2;

cfg = [];
cfg.sample_dimension     = 1;
cfg.feature_dimension    = 3;
cfg.cv                   = 'kfold';
cfg.feedback             = 0;

perf = mv_classify(cfg, X2, clabel);
szp = size(perf);

print_unittest_result('size(perf) correct for 4D data', sz([2,4]), szp, tol);

% same but without cross-validation
cfg.cv                   = 'none';

perf = mv_classify(cfg, X2, clabel);
szp = size(perf);

print_unittest_result('[without crossval] is size(perf) correct for 4 input dimensions?', sz([2,4]), szp, tol);

%% Check whether output dimensions are correct cfg.flatten_features = 1 for 4D data

% 4 input dimensions with 2 search dims
sz = [9, 12, 2, 13];
X2 = randn(sz);
clabel = ones(sz(1), 1);
clabel(ceil(end/2):end) = 2;

cfg = [];
cfg.sample_dimension    = 1;
cfg.feature_dimension   = [2 3];
cfg.cv                  = 'kfold';
cfg.k                   = 2;
cfg.feedback            = 0;
cfg.flatten_features    = 1;

perf = mv_classify(cfg, X2, clabel);
szp = size(perf);

print_unittest_result('size(perf) 4D data, 2 feature dim and cfg.flatten_features=1', [sz(4) 1], szp, tol);

%% Check whether output dimensions are correct cfg.flatten_features = 1 for 5D data

% 4 input dimensions with 2 search dims
sz = [9, 12, 2, 3, 4];
X2 = randn(sz);
clabel = ones(sz(2), 1);
clabel(ceil(end/2):end) = 2;

cfg = [];
cfg.sample_dimension    = 2;
cfg.feature_dimension   = [1 5];
cfg.cv                  = 'kfold';
cfg.k                   = 2;
cfg.feedback            = 0;
cfg.flatten_features    = 1;

perf = mv_classify(cfg, X2, clabel);
szp = size(perf);

print_unittest_result('size(perf) 5D data, 2 feature dim and cfg.flatten_features=1', sz(3:4), szp, tol);

%% 5 input dimensions with 2 search dims + 1 generalization dim - are output dimensions as expected?
sz = [11, 8, 9, 7, 6];
X2 = randn(sz);

cfg = [];
cfg.classifier              = 'lda';
cfg.hyperparameter          = [];
cfg.hyperparameter.lambda   = 0.1;
cfg.feedback                = 0;
cfg.cv                      = 'kfold';
cfg.k                       = 2;
cfg.repeat                  = 1;

% try out all possible positions for samples, generalization, and features

nd = ndims(X2);
for sd=1:nd   % sample dimension
    cfg.sample_dimension     = sd;
    clabel = ones(sz(sd), 1);
    clabel(ceil(end/2):end) = 2;

    for ff=1:nd-1  % feature dimension
        fd = mod(sd+ff-1,nd)+1;
        cfg.feature_dimension    = fd;
        search_dim = setdiff(1:nd, [sd, fd]);

        for gg=1:nd-2   % generalization dimension
            gd = search_dim(gg);
            cfg.generalization_dimension = gd;
            search_dim_without_gen = setdiff(search_dim, gd);
            perf = mv_classify(cfg, X2, clabel);
            szp = size(perf);
            print_unittest_result(sprintf('[5 dimensions] sample dim %d, feature dim %d, gen dim %d', sd, fd, gd), sz([search_dim_without_gen, gd ,gd]), szp, tol);
        end
    end
end

%% append dimensions - check dimensions
nsamples = 40;
ntime = 20;
nfeatures = 5;
nclasses = 2;
prop = [];
scale = 0.0001;

% Generate data
X = zeros(nsamples, nfeatures, ntime, ntime+10);
[X ,clabel] = simulate_gaussian_data(nsamples, nfeatures, nclasses, prop, scale, 0);
X(:,:,ntime,ntime+10) = X;

% mv_classify_across_time
rng(21)   % reset rng to get the same random folds
cfg = [];
cfg.classifier              = 'naive_bayes';
cfg.sample_dimension        = 1;
cfg.feature_dimension       = 2;
cfg.feedback                = 0;
cfg.repeat                  = 1;
cfg.k                       = 2;

cfg.append                  = 1;
perf = mv_classify(cfg, X, clabel);

print_unittest_result('[cfg.append=1] size of perf', [size(X,3) size(X,4)], size(perf), tol);

%% append dimensions - check dimensions for cv = 'none'
rng(21)
cfg = [];
cfg.classifier              = 'naive_bayes';
cfg.sample_dimension        = 1;
cfg.feature_dimension       = 2;
cfg.feedback                = 0;
cfg.cv                      = 'none';

cfg.append                  = 1;
perf = mv_classify(cfg, X, clabel);

print_unittest_result('[cfg.append=1, cv=''none''] size of perf', [size(X,3) size(X,4)], size(perf), tol);

%% append vs no append should give same result
% appending dimensions should give the same result as not appending them,
% but it should be faster -> so far only possible with naive_bayes
nsamples = 20;
ntime = 20;
nfeatures = 5;
amplitudes = [5, 10];

X1 = simulate_erp_peak(nsamples, ntime, 10, 1, amplitudes(1), randn(nfeatures, 1)); % class 1
X2 = simulate_erp_peak(nsamples*2, ntime, 10, 1, amplitudes(2), randn(nfeatures, 1)); % class 2
X= [X1; X2];
clabel = [ones(nsamples, 1); ones(nsamples*2, 1)*2];

% mv_classify_across_time
cfg = [];
cfg.classifier              = 'naive_bayes';
cfg.sample_dimension        = 1;
cfg.feature_dimension       = 2;
cfg.feedback                = 0;
cfg.repeat                  = 1;
cfg.k                       = 2;

rng(21)   % reset rng to get the same random folds
cfg.append                  = 1;
perf1 = mv_classify(cfg, X, clabel);

rng(21)   % reset rng to get the same random folds
cfg.append                  = 0;
perf2 = mv_classify(cfg, X, clabel);

print_unittest_result('append vs no append should give same result', perf1, perf2, tol);

%% append vs no append should give same result, cv = 'none'
% mv_classify_across_time
rng(21)   % reset rng to get the same random folds
cfg = [];
cfg.classifier              = 'naive_bayes';
cfg.sample_dimension        = 1;
cfg.feature_dimension       = 2;
cfg.feedback                = 0;
cfg.cv                      = 'none';

cfg.append                  = 1;
perf1 = mv_classify(cfg, X, clabel);

cfg.append                  = 0;
perf2 = mv_classify(cfg, X, clabel);

print_unittest_result('[cv =''none''] append vs no append should give same result', perf1, perf2, tol);

%% Transfer classification (cross decoding)
tmp1 = simulate_erp_peak(nsamples, ntime, 10, 1, amplitudes(1), randn(nfeatures, 1)); % class 1
tmp2 = simulate_erp_peak(nsamples*2, ntime, 10, 1, amplitudes(2), randn(nfeatures, 1)); % class 2
X= [tmp1; tmp2];
clabel = [ones(nsamples, 1); ones(nsamples*2, 1)*2];

% Cross decoding with the same dataset should yield the same result
% as cv = none
cfg = [];
cfg.cv = 'none';
cfg.feedback = 0;
perf1 = mv_classify(cfg, X, clabel);
perf2 = mv_classify(cfg, X, clabel, X, clabel);

print_unittest_result('transfer classification with same data vs cv=none', perf1, perf2, tol);

cfg.generalization_dimension = 3;
perf1 = mv_classify(cfg, X, clabel);
perf2 = mv_classify(cfg, X, clabel, X, clabel);
print_unittest_result('transfer classification with same data vs cv=none (with generalization)', perf1, perf2, tol);

% sample dimension = 2 should not affect cross classification
X_perm = permute(X, [2 1 3]); % samples is now second dimension
X1 = X(1:2:end, :, :);
X2 = X(2:2:end, :, :);
X_perm1 = X_perm(:, 1:2:end, :);
X_perm2 = X_perm(:, 2:2:end, :);

perf      = mv_classify(cfg, X1, clabel(1:2:end), X2, clabel(2:2:end));
cfg.feature_dimension = 1;
cfg.sample_dimension = 2;
perf_perm = mv_classify(cfg, X_perm1, clabel(1:2:end), X_perm2, clabel(2:2:end));
print_unittest_result('transfer classification with sample dimension = 1 vs 2', perf, perf_perm, tol);

% dval: splitting the second dataset into separate classes should give the same result as testing on both classes at the same time
tmp1 = simulate_erp_peak(nsamples-10, ntime, 10, 1, amplitudes(1), randn(nfeatures, 1)); % class 1
tmp2 = simulate_erp_peak(nsamples*2-10, ntime, 10, 1, amplitudes(2), randn(nfeatures, 1)); % class 2
X2= [tmp1; tmp2];
clabel2 = [ones(nsamples-10, 1); ones(nsamples*2-10, 1)*2];

X1 = X(:,:,1:2);
X2 = X2(:,:,1:3);
clabel2_1 = clabel2(clabel2==1);
clabel2_2 = clabel2(clabel2==2);
X2_1 = X2(clabel2==1,:,:);
X2_2 = X2(clabel2==2,:,:);

cfg = [];
cfg.metric = 'dval';
cfg.generalization_dimension = 3;
cfg.feedback = 0;
perf   = mv_classify(cfg, X1, clabel, X2, clabel2);
perf_1 = mv_classify(cfg, X1, clabel, X2_1, clabel2_1);
perf_2 = mv_classify(cfg, X1, clabel, X2_2, clabel2_2);
print_unittest_result('transfer classification: testing both classes vs only class 1', perf(:,1), perf_1(:,1), tol);
print_unittest_result('transfer classification: testing both classes vs only class 2', perf(:,2), perf_2(:,2), tol);

% cross decoding with generalization
ntime2 = ntime + 10;
tmp1 = simulate_erp_peak(nsamples-10, ntime2, 10, 1, amplitudes(1), randn(nfeatures, 1)); % class 1
tmp2 = simulate_erp_peak(nsamples*2-10, ntime2, 10, 1, amplitudes(2), randn(nfeatures, 1)); % class 2
X2= [tmp1; tmp2];
clabel2 = [ones(nsamples-10, 1); ones(nsamples*2-10, 1)*2];

cfg = [];
cfg.generalization_dimension = 3;
cfg.feedback = 0;
perf   = mv_classify(cfg, X, clabel, X2, clabel2);

print_unittest_result('transfer classification with generalization', [size(X,3) size(X2,3)], size(perf), tol);


text:
from __future__ import division, absolute_import, print_function
from future.builtins import super

from iris_sdk.models.base_resource import BaseResource
from iris_sdk.models.data.lidbs import LidbsData
from iris_sdk.models.lidb import Lidb

XML_NAME_LIDBS = "ListOrderIdUserIdDate"
XPATH_LIDBS = "/lidbs"

class Lidbs(BaseResource, LidbsData):

    """ CNAM Update (LIDB) order """

    _node_name = XML_NAME_LIDBS
    _xpath = XPATH_LIDBS

    def __init__(self, parent=None, client=None):
        super().__init__(parent, client)
        LidbsData.__init__(self, self)

    def create(self, data=None, save=True):
        lidb = Lidb(self).set_from_dict(data)
        if save and (data is not None):
            lidb.save()
        return lidb

    def get(self, id, params=None):
        return Lidb(self).get(id, params=params)

    def list(self, params):
        return self._get_data(params=params).order_id_user_id_date

redpajama_set_name: RedPajamaGithub


text:
            Variants

            {{v.ExternalID}}

                <quantityfield calculated="calcVariantLineItems" lineitem="variantLineItems[v.InteropID]" class="quantity" /> {{variantLineItems[v.InteropID].qtyError}} {{variantLineItems[v.InteropID].LineTotal | currency}}

                    {{v.QuantityAvailable + ' in stock'}}

                    {{v.Description}}


text:
package qora;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;

import qora.block.Block;
import settings.Settings;
import network.Peer;
import network.message.BlockMessage;
import network.message.Message;
import network.message.MessageFactory;

public class BlockBuffer extends Thread
{
	private static final int BUFFER_SIZE = 20;

	private List<byte[]> signatures;
	private Peer peer;
	private int counter;
	private boolean error;
	private Map<byte[], BlockingQueue<Block>> blocks;

	private boolean run = true;

	public BlockBuffer(List<byte[]> signatures, Peer peer)
	{
		this.signatures = signatures;
		this.peer = peer;
		this.counter = 0;
		this.error = false;

		this.blocks = new HashMap<byte[], BlockingQueue<Block>>();
		this.start();
	}

	public void run()
	{
	    Thread.currentThread().setName("BlockBuffer");

		while(this.run)
		{
			for(int i=0; i<this.signatures.size() && i<this.counter + BUFFER_SIZE; i++)
			{
				byte[] signature = this.signatures.get(i);

				//CHECK IF WE HAVE ALREADY LOADED THIS BLOCK
				if(!this.blocks.containsKey(signature))
				{
					//LOAD BLOCK
					this.loadBlock(signature);
				}
			}

			try
			{
				Thread.sleep(10);
			}
			catch (InterruptedException e)
			{
				//ERROR SLEEPING
			}
		}
	}

	private void loadBlock(final byte[] signature)
	{
		//CREATE QUEUE
		final BlockingQueue<Block> blockingQueue = new ArrayBlockingQueue<Block>(1);
		this.blocks.put(signature, blockingQueue);

		//LOAD BLOCK IN THREAD
		new Thread(){
			public void run()
			{
				//CREATE MESSAGE
				Message message = MessageFactory.getInstance().createGetBlockMessage(signature);

				//SEND MESSAGE TO PEER
				BlockMessage response = (BlockMessage) peer.getResponse(message);

				//CHECK IF WE GOT RESPONSE
				if(response == null)
				{
					//ERROR
					error = true;
					return;
				}

				//CHECK BLOCK SIGNATURE
				// Don't check block signature as blocks may arrive out-of-order
				// and signature might depend on processing of previous blocks
				/*
				if(!response.getBlock().isSignatureValid())
				{
					error = true;
					return;
				}
				*/

				//ADD TO LIST
				blockingQueue.add(response.getBlock());
			}
		}.start();
	}

	public Block getBlock(byte[] signature) throws Exception
	{
		//CHECK ERROR
		if(this.error)
		{
			throw new Exception("Block buffer error");
		}

		//UPDATE COUNTER
		this.counter = this.signatures.indexOf(signature);

		//CHECK IF ALREADY LOADED BLOCK
		if(!this.blocks.containsKey(signature))
		{
			//LOAD BLOCK
			this.loadBlock(signature);
		}

		//GET BLOCK
		return this.blocks.get(signature).poll(Settings.getInstance().getConnectionTimeout(), TimeUnit.MILLISECONDS);
	}

	public void stopThread()
	{
		try
		{
			this.run = false;
			this.join();
		}
		catch (InterruptedException e)
		{
			//INTERRUPTED
		}
	}

}


text:
*   Log lines for partial renders and started template renders are now
    emitted at the `DEBUG` level instead of `INFO`.

    Completed template renders are still logged at the `INFO` level.

    *DHH*

*   ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.

    *Juanito Fatas*

*   Added `phone_to` helper method to create a link from mobile numbers

    *Pietro Moro*

*   annotated_source_code returns an empty array so TemplateErrors without a
    template in the backtrace are surfaced properly by DebugExceptions.

    *Guilherme Mansur*, *Kasper Timm Hansen*

*   Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.

    *Guilherme Mansur*, *Gannon McGibbon*

*   `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`

    *Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*

*   Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.

    *Younes SERRAJ*

Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.


text:
def given(message, options = {})
 if block_given? && !options[:pending]
  notify(:step_started, self, :given, message, options)
  yield
  notify(:step_succeeded, self, :given, message, options)
 else

  notify(:pending, self,:given, message, options)

 end
end

def notify(notification, example, type, message, options)
  RSpec.world.reporter.notify(notification, example, type, message, options)
end


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports System.Threading
Imports Microsoft.CodeAnalysis.Options
Imports Microsoft.CodeAnalysis.PooledObjects
Imports Microsoft.CodeAnalysis.Structure
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic.Structure.MetadataAsSource
    Friend Class MetadataRegionDirectiveStructureProvider
        Inherits AbstractSyntaxNodeStructureProvider(Of RegionDirectiveTriviaSyntax)

        Private Shared Function GetBannerText(regionDirective As RegionDirectiveTriviaSyntax) As String
            Dim text = regionDirective.Name.ToString().Trim(""""c)

            If text.Length = 0 Then
                Return regionDirective.HashToken.ToString() & regionDirective.RegionKeyword.ToString()
            End If

            Return text
        End Function

        Protected Overrides Sub CollectBlockSpans(regionDirective As RegionDirectiveTriviaSyntax,
                                                  spans As ArrayBuilder(Of BlockSpan),
                                                  options As OptionSet,
                                                  cancellationToken As CancellationToken)
            Dim match = regionDirective.GetMatchingStartOrEndDirective(cancellationToken)
            If match IsNot Nothing Then
                Dim span = TextSpan.FromBounds(regionDirective.SpanStart, match.Span.End)
                spans.AddIfNotNull(CreateBlockSpan(
                    span, span,
                    GetBannerText(regionDirective),
                    autoCollapse:=True, type:=BlockTypes.PreprocessorRegion,
                    isCollapsible:=True, isDefaultCollapsed:=False))
            End If
        End Sub

        Protected Overrides Function SupportedInWorkspaceKind(kind As String) As Boolean
            Return kind = WorkspaceKind.MetadataAsSource
        End Function
    End Class
End Namespace


text:
import {
  bootstrapDiagram,
  inject
} from 'test/TestHelper';

import modelingModule from 'lib/features/modeling';

describe('features/modeling - create connection', function() {

  beforeEach(bootstrapDiagram({
    modules: [
      modelingModule
    ]
  }));

  var rootShape,
      parentShape,
      sourceShape,
      targetShape,
      newConnection;

  beforeEach(inject(function(elementFactory, canvas) {

    rootShape = elementFactory.createRoot({
      id: 'root'
    });

    canvas.setRootElement(rootShape);

    parentShape = elementFactory.createShape({
      id: 'parent',
      x: 100, y: 100, width: 300, height: 300
    });

    canvas.addShape(parentShape, rootShape);

    sourceShape = elementFactory.createShape({
      id: 'sourceShape',
      x: 110, y: 110, width: 40, height: 40
    });

    canvas.addShape(sourceShape, parentShape);

    targetShape = elementFactory.createShape({
      id: 'targetShape',
      x: 210, y: 110, width: 40, height: 40
    });

    canvas.addShape(targetShape, parentShape);

    newConnection = elementFactory.createConnection({
      id: 'newConnection'
    });

  }));

  describe('basics', function() {

    describe('should create', function() {

      it('execute', inject(function(modeling, elementRegistry) {

        // when
        modeling.connect(sourceShape, targetShape, newConnection);

        var connection = elementRegistry.get('newConnection');

        // then
        expect(connection.id).to.eql('newConnection');

        expect(connection.waypoints).to.eql([
          { x: 130, y: 130 },
          { x: 230, y: 130 }
        ]);
      }));

      it('undo', inject(function(modeling, commandStack, elementRegistry) {

        // given
        modeling.connect(sourceShape, targetShape, newConnection);

        // when
        commandStack.undo();

        // then
        expect(parentShape.children).not.to.contain(newConnection);
        expect(newConnection.parent).not.to.exist;

        expect(elementRegistry.get('newConnection')).not.to.exist;
      }));

    });

    it('should have a parent', inject(function(modeling) {

      // given
      modeling.createConnection(sourceShape, targetShape, newConnection, rootShape);

      // when
      var parent = newConnection.parent;

      // then
      expect(parent).to.equal(rootShape);
    }));

    it('should have parentIndex', inject(function(modeling) {

      // given
      modeling.createConnection(sourceShape, targetShape, 0, newConnection, parentShape);

      // when
      var children = parentShape.children;

      // then
      expect(children).to.eql([
        newConnection,
        sourceShape,
        targetShape
      ]);
    }));

  });

});


text:
  Saint-Maurice-du-Désert est
       un village
       localisé dans le département de l'Orne en Basse-Normandie. On dénombrait 687 habitants en 2008.

Si vous envisagez de demenager à Saint-Maurice-du-Désert, vous pourrez facilement trouver une maison à vendre.

À Saint-Maurice-du-Désert, la valeur moyenne à l'achat d'un appartement s'évalue à zero € du m² en vente. la valorisation moyenne d'une maison à l'achat se situe à 1 231 € du m². À la location la valeur moyenne se situe à 8,6 € du m² mensuel.

Le parc de logements, à Saint-Maurice-du-Désert, se décomposait en 2011 en sept appartements et 312 maisons soit
 un marché plutôt équilibré.

À proximité de Saint-Maurice-du-Désert sont positionnées géographiquement les villes de
La Coulonche située à 6 km, 500 habitants,
La Ferté-Macé à 3 km, 6 201 habitants,
Bagnoles-de-l'Orne située à 6 km, 2 488 habitants,
Magny-le-Désert à 6 km, 1 418 habitants,
Lignou située à 7 km, 138 habitants,
Beauvain à 6 km, 274 habitants,
 entre autres. De plus, Saint-Maurice-du-Désert est située à seulement 20 km de Flers.

La commune compte quelques  aménagements, elle dispose, entre autres, de un terrain de sport.


text:
package com.amazonaws.services.sns.model.transform;

import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Map.Entry;

import javax.xml.stream.events.XMLEvent;

import com.amazonaws.services.sns.model.*;
import com.amazonaws.transform.Unmarshaller;
import com.amazonaws.transform.MapEntry;
import com.amazonaws.transform.StaxUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*;

/**
 * SetTopicAttributesResult StAX Unmarshaller
 */
public class SetTopicAttributesResultStaxUnmarshaller implements
        Unmarshaller<SetTopicAttributesResult, StaxUnmarshallerContext> {

    public SetTopicAttributesResult unmarshall(StaxUnmarshallerContext context)
            throws Exception {
        SetTopicAttributesResult setTopicAttributesResult = new SetTopicAttributesResult();
        int originalDepth = context.getCurrentDepth();
        int targetDepth = originalDepth + 1;

        if (context.isStartOfDocument())
            targetDepth += 1;

        while (true) {
            XMLEvent xmlEvent = context.nextEvent();
            if (xmlEvent.isEndDocument())
                return setTopicAttributesResult;

            if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

            } else if (xmlEvent.isEndElement()) {
                if (context.getCurrentDepth() < originalDepth) {
                    return setTopicAttributesResult;
                }
            }
        }
    }

    private static SetTopicAttributesResultStaxUnmarshaller instance;

    public static SetTopicAttributesResultStaxUnmarshaller getInstance() {
        if (instance == null)
            instance = new SetTopicAttributesResultStaxUnmarshaller();
        return instance;
    }
}


text:
module M {
    export interface E { }
    interface I { }
}
module M {
    export interface E { } // ok
    interface I { } // ok
}

// Doesn't match export visibility, but it's in a different parent, so it's ok
module M {
    interface E { } // ok
    export interface I { } // ok
}

module N {
    interface I { }
    interface I { } // ok
    export interface E { }
    export interface E { } // ok
}

module N2 {
    interface I { }
    export interface I { } // error
    export interface E { }
    interface E { } // error
}

// Should report error only once for instantiated module
module M {
    module inst {
        var t;
    }
    export module inst { // one error
        var t;
    }
}

// Variables of the same / different type
module M2 {
    var v: string;
    export var v: string; // one error (visibility)
    var w: number;
    export var w: string; // two errors (visibility and type mismatch)
}

module M {
    module F {
        var t;
    }
    export function F() { } // Only one error for duplicate identifier (don't consider visibility)
}

module M {
    class C { }
    module C { }
    export module C { // Two visibility errors (one for the clodule symbol, and one for the merged container symbol)
        var t;
    }
}

// Top level
interface D { }
export interface D { }

//// [duplicateSymbolsExportMatching.js]
define(["require", "exports"], function (require, exports) {
    // Should report error only once for instantiated module
    var M;
    (function (M) {
        var inst;
        (function (inst) {
            var t;
        })(inst || (inst = {}));
        var inst;
        (function (inst) {
            var t;
        })(inst = M.inst || (M.inst = {}));
    })(M || (M = {}));
    // Variables of the same / different type
    var M2;
    (function (M2) {
        var v;
        var w;
    })(M2 || (M2 = {}));
    var M;
    (function (M) {
        var F;
        (function (F) {
            var t;
        })(F || (F = {}));
        function F() { }
        M.F = F; // Only one error for duplicate identifier (don't consider visibility)
    })(M || (M = {}));
    var M;
    (function (M) {
        var C = (function () {
            function C() {
            }
            return C;
        })();
        var C;
        (function (C) {
            var t;
        })(C = M.C || (M.C = {}));
    })(M || (M = {}));
});


text:
yatsm.regression.pickles package
================================

Submodules
----------

.. toctree::

   yatsm.regression.pickles.serialize

Module contents
---------------

.. automodule:: yatsm.regression.pickles
    :members:
    :undoc-members:
    :show-inheritance:


text:
Enter shipping address

    <form (ngSubmit)="submitForm()">

Full name:

        <input type="text" [(ngModel)]="fullname" name="fullname" placeholder="Enter Full Name" class="form-control" id="fullname">

Address line 1:

        <input type="text" [(ngModel)]="addressline1" name="addressline1" placeholder="Enter Address Line 1" class="form-control" id="addressline1">

Address line 2:

        <input type="text" [(ngModel)]="addressline2" name="addressline2" placeholder="Enter Address Line 2" class="form-control" id="addressline2">

City:

        <input type="text" [(ngModel)]="city" name="city" placeholder="Enter City" class="form-control" id="city">

State/Province/Region:

        <input type="text" [(ngModel)]="state" name="state" placeholder="Enter State/Province/Region" class="form-control" id="state">

ZIP:

        <input type="text" [(ngModel)]="zip" name="zip" placeholder="Enter Zip Code" class="form-control" id="zip">

Country

        <input type="text" [(ngModel)]="country" name="country" placeholder="Enter Country" class="form-control" id="country">

Phone number:

        <input type="text" [(ngModel)]="phonenumber" name="phonenumber" placeholder="Enter Phone Nmber" class="form-control" id="phone">

        <input type="checkbox"> Remember me

Enter payment information

Card number:

        <input type="text" [(ngModel)]="cardnumber" name="cardnumber" class="form-control" placeholder="Enter Card Number" id="cardnumber">

Name on card:

        <input type="text" [(ngModel)]="nameoncard" name="nameoncard" class="form-control" placeholder="Enter Name on Card" id="nameoncard">

Expiration date:

        <input type="text" [(ngModel)]="expirationdate" name="expirationdate" class="form-control" placeholder="Enter Card Expiration Date" id="expirationdate">

CVV:

        <input type="text" [(ngModel)]="cvv" name="cvv" class="form-control" placeholder="Enter 3-digit card verification value" id="cvv">

      <button type="submit" class="btn btn-primary">Submit</button>
    </form>


text:
shared_examples 'App::Views::InterestingFiles' do
  let(:controller)       { CMSScanner::Controller::InterestingFiles.new }
  let(:tpl_vars)         { { url: target_url } }
  let(:interesting_file) { CMSScanner::InterestingFile }

  describe 'findings' do
    let(:view) { 'findings' }
    let(:opts) { { confidence: 10, found_by: 'Spec' } }

    context 'when empty results' do
      let(:expected_view) { 'empty' }

      it 'outputs the expected string' do
        @tpl_vars = tpl_vars.merge(findings: [])
      end
    end

    it 'outputs the expected string' do
      findings = CMSScanner::Finders::Findings.new

      findings <<
        interesting_file.new('F1', opts) <<
        interesting_file.new('F2', opts.merge(references: %w(R1), interesting_entries: %w(IE1))) <<
        interesting_file.new('F2', opts.merge(found_by: 'Spec2')) <<
        interesting_file.new('F3',
                             opts.merge(references: %w(R1 R2), interesting_entries: %w(IE1 IE2))) <<
        interesting_file.new('F3', opts.merge(found_by: 'Spec2', confidence: 100)) <<
        interesting_file.new('F3', opts.merge(found_by: 'Spec3')) <<
        interesting_file.new('F4', opts.merge(confidence: 0)) <<
        interesting_file.new('F4', opts.merge(confidence: 0, found_by: 'Spec2'))

      @tpl_vars = tpl_vars.merge(findings: findings)
    end
  end
end


text:
CREATE TABLE passwords (
       pkey serial, -- PRIMARY KEY;
       username text, -- varchar (32) INDEX NOT NULL;
       password text, -- varchar (256) NOT NULL;
       modified_date timestamp, -- INDEX;
       disabled boolean -- NOT NULL;
       -- UNIQUE(username, password);
);
CREATE INDEX passwords_pkey ON passwords (pkey);
CREATE INDEX passwords_username ON passwords (username);

-- passwords aren't changed, instead a new password is added for the
-- user, and the old one is set disabled=true, with modified_date
-- updated.

-- Multiple masters can be used, with consistency conflicts on a
-- (username, password) pair being automatically resolved by whichever
-- modified_date is higher.

-- When registering a username, the password is inserted into all
-- masters with the disabled flag set to true.
-- It then reads back all the passwords for that username, and if
-- there are any more than expected, it deletes the rows and signals
-- failure, otherwise, it enables the rows.

CREATE TABLE primarykey (
       pkey serial,
       fingerprint bytea
);
CREATE INDEX primarykey_pkey ON primarykey (pkey);
CREATE INDEX primarykey_fingerprint ON primarykey (fingerprint);

-- This table is more of a cache - it could be determined by looking
-- up 'gpg --with-fingerprint --with-colons --list-keys | grep ^fpr'
-- and keeping only our own keys (the ultimate ones)
-- Currently assumed to be max one key per user
CREATE TABLE pubkey_own (
       pkey serial,
       username text,
       primarykey integer,
       write_token bytea
);
CREATE INDEX pubkey_own_pkey ON pubkey_own (pkey);
CREATE INDEX pubkey_own_username ON pubkey_own (username);

-- This table is more of a cache - it could be determined by looking
-- up 'gpg --with-fingerprint --with-colons --list-keys | grep ^fpr'
-- and removing our own keys (the ultimate ones)
CREATE TABLE pubkey_alias (
       pkey serial,
       username text,
       primarykey integer,
       identifier text
);
CREATE INDEX pubkey_alias_pkey ON pubkey_alias (pkey);
CREATE INDEX pubkey_alias_username ON pubkey_alias (username);

-- -----------------------------------------------
-- NODES

CREATE TABLE sha256 (
       pkey serial,
       sha256 bytea
);
CREATE INDEX sha256_pkey ON sha256 (pkey);
CREATE INDEX sha256_sha256 ON sha256 (sha256);

-- The idea of simply allowing anyone with the groupkey to access the
-- content is very slightly flawed, because it may have originally
-- come from eg. a local upload, unpublished.  For now however, the
-- assumption holds
CREATE TABLE nodes (
       pkey serial,
       sha256 integer,
       -- if true, only users in the recipients table can decrypt it
       isPubEnc boolean,
       -- the group key this is encrypted to, or null if not sym
       -- encrypted. Any sym encrypted items which can't be decrypted
       -- simply aren't recorded at all.
       groupkey integer,
       -- 64bit purported signing key, or null if no signature
       -- XXX: not useful now, but may be helpful for display, or for
       -- whittling down set of possible keys.
       signkeyId bytea,
       -- primarykey pkey of the signing key if signature is present
       -- and verified, null otherwise
       signkey integer,
       parent integer, -- parent, or null
       root integer, -- the ancestor with no parent, or self. NULL if we don't know yet.
       -- "parent" field contains the upvoted item. may be null if we
       -- don't know yet
       tag smallint
);
CREATE INDEX nodes_pkey ON nodes (pkey);
CREATE INDEX nodes_sha256 ON nodes (sha256);
CREATE INDEX nodes_parent ON nodes (parent);
CREATE INDEX nodes_tag ON nodes (tag);

-- we specifically remember the content that appears in channels which
-- is encrypted to private keys
CREATE TABLE channels_private (
       pkey serial index,
       -- the pubkey who's fingerprint channel this was in. This
       -- assumes such content was not found any other place like a
       -- group channel, but for now that holds - those are ignored.
       -- Note: some bastard could post the same content in their own
       -- fingerprint channel, so it'll end up twice here.
       pubkey integer,
       node integer
);

-- In fact, for anonymous recipients, we won't know which pubkey it
-- was encrypted to, just that the user could decrypt it. For now,
-- this is unambiguous since each user has just one private key
-- Later on we can just have one entry per key that a user holds

-- since a node can have multiple recipients
CREATE TABLE recipients (
       pkey serial,
       pubkey integer, -- a public key the node is encrypted to, if known
       node integer
);
CREATE INDEX recipients_pkey ON recipients (pkey);
CREATE INDEX recipients_pubkey_node ON recipients (pubkey, node);

-- since the recipients list is unknown, needn't be exhaustive, just
-- ones that might have been us but aren't.
CREATE TABLE not_recipients (
       pkey serial,
       pubkey integer, -- a public key the node is definitely not encrypted to, if known
       node integer
);
CREATE INDEX not_recipients_pkey ON not_recipients (pkey);
CREATE INDEX not_recipients_pubkey_node ON not_recipients (pubkey, node);

CREATE TABLE imported_pubkey (
       pkey serial,
       node integer,
       primarykey integer
);
CREATE INDEX imported_pubkey_pkey ON imported_pubkey (pkey);
CREATE INDEX imported_pubkey_node_primarykey ON imported_pubkey (node, primarykey);

-- -----------------------------------------------
-- SECRETS

-- write_token = sha512(secret).low(144).string('base64')
-- read_token  = sha256(write_token).string('base64')
-- key_id      = sha256(write_token).low(32).string('hex').upper()
CREATE TABLE secrets (
       pkey serial, -- PRIMARY KEY;
       secret bytea, -- NOT NULL
       -- both token columns are just cached evaluations:
       -- write_token = sha512(secret).low(144)
       -- read_token  = sha256(write_token.toString('base64'))
       write_token bytea, -- NOT NULL
       read_token bytea -- NOT NULL
       -- UNIQUE(username, identifier)
);
CREATE INDEX secrets_pkey ON secrets (pkey);
-- for insert where not exists. Doing this on write_token or
-- read_token should be safe, but I don't want to take the risk of
-- collision.
CREATE INDEX secrets_secret ON secrets (secret);

CREATE TABLE secrets_alias (
       pkey serial,
       username text,
       secret integer,
       identifier text,
       -- eg. if someone compromised the key and spams using it
       ignore_new boolean -- NOT NULL
);

CREATE INDEX secrets_alias_pkey ON secrets_alias (pkey);
CREATE INDEX secrets_alias_username ON secrets_alias (username);


text:
name: Baikal Cal-/CardDAV Server
---
## Baikal Cal-/CardDAV Server auf Uberspace einrichten
### Voraussetzungen

- PHP 5.5
- MySQL oder SQLite
- Apache oder Nginx

### Installation und Konfiguration des Webservers

Die aktuelle Version kann von [Github](https://github.com/fruux/Baikal/releases) geladen werden. Anschließend entpacken und auf den Server kopieren.
Analog kann man auch per Git pullen.

Den Installationsprozess mittels Eingabe `http://euredomain.de/baikal/html` starten. Der Prozess ist selbsterklärend.

Wenn Baikal über eine Subdomain erreichbar sein soll, müssen in den Settings die Pfade für *CalDAV base URI* und *CardDAV base URI* in "/cal.php/" bzw. "/card.php/" angepasst werden.

### SSL

Um das Aufrufen der Administrationsseite und Synchronisation über https:// zu erzwingen, muss die .htaccess, wie nachfolgend aufgeführt, geändert werden.

	# Disabling cache management
	# that could cause problems with DAV requests
	# Useful only for Apache servers, with AllowOverride All
	# (ie, .htaccess files enabled)

	# Allow HTTP headers with Apache/FastCGI
	# See http://code.google.com/p/sabredav/wiki/Authentication#Apache_+_(Fast)CGI

	<IfModule mod_rewrite.c>
	    RewriteCond %{HTTPS} !=on
	    RewriteCond %{ENV:HTTPS} !=on
	    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
	</IfModule>

	<IfModule mod_expires.c>
		ExpiresActive Off
	</IfModule>

### Client-Nutzung

Für die Nutzung werden folgende Pfade benötigt:

	http://dav.euredomain.de/cal.php/calendars/NUTZER/CAL_TOKEN/
    http://dav.euredomain.de/card.php/addressbooks/NUTZER/CARD_TOKEN/


text:
import { createContext, PropsWithChildren, useState, useEffect } from 'react'

type Languages = keyof I18n.I18nDefinition

export interface I18nContextDef {
  language: Languages
  updateLanguage(language: Languages): void
}

export const I18nContext = createContext({
  language: 'en_us',
  updateLanguage: (language: Languages) => {},
} as I18nContextDef)

export function I18nProvider({ children }: PropsWithChildren<{}>) {
  const [language, setLanguage] = useState<Languages>('en_us')

  useEffect(() => {
    const language = window.localStorage.getItem('activeLanguage')

    if (language) {
      setLanguage(language as Languages)
    }
  }, [])

  function updateLanguage(language: Languages) {
    window.localStorage.setItem('activeLanguage', language)

    setLanguage(language)
  }

  return (
    <I18nContext.Provider value={{ language, updateLanguage }}>
      {children}
    </I18nContext.Provider>
  )
}


text:
// Provides control sap.m.ToolbarLayoutData.
sap.ui.define(['jquery.sap.global', './library', 'sap/ui/core/LayoutData'],
	function(jQuery, library, LayoutData) {
	"use strict";

	/**
	 * Constructor for a new ToolbarLayoutData.
	 *
	 * @param {string} [sId] ID for the new control, generated automatically if no ID is given
	 * @param {object} [mSettings] Initial settings for the new control
	 *
	 * @class
	 * Defines layout data for the toolbar items.
	 * @extends sap.ui.core.LayoutData
	 * @version 1.36.6
	 *
	 * @constructor
	 * @public
	 * @since 1.20
	 * @alias sap.m.ToolbarLayoutData
	 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
	 */
	var ToolbarLayoutData = LayoutData.extend("sap.m.ToolbarLayoutData", /** @lends sap.m.ToolbarLayoutData.prototype */ { metadata : {

		library : "sap.m",
		properties : {

			/**
			 * Determines whether the control, when in a toolbar, is shrinkable or not. For controls with fixed width (100px, 5rem, etc...) this property is ignored.
			 *
			 * Note: Nested layout controls should not be shrinkable.
			 */
			shrinkable : {type : "boolean", group : "Behavior", defaultValue : false},

			/**
			 * Sets the minimum width of the toolbar item.
			 */
			minWidth : {type : "sap.ui.core.CSSSize", group : "Dimension", defaultValue : null},

			/**
			 * Sets the maximum width of the toolbar item.
			 */
			maxWidth : {type : "sap.ui.core.CSSSize", group : "Dimension", defaultValue : null}
		}
	}});

	/*
	 * Returns the parent's live style object from DOM.
	 * Here the parent is the control who is setting the layout data
	 *
	 * @returns {Object}
	 * @protected
	 */
	ToolbarLayoutData.prototype.getParentStyle = function() {
		var oParent = this.getParent();
		if (!oParent || !oParent.getDomRef) {
			return {};
		}

		var oDomRef = oParent.getDomRef();
		return oDomRef ? oDomRef.style : {};
	};

	/*
	 * If the control that is using ToolbarLayoutData has been already rendered,
	 * then this function can be used to apply layout data properties to the related control
	 *
	 * @returns {sap.m.ToolbarLayoutData}
	 * @protected
	 */
	ToolbarLayoutData.prototype.applyProperties = function() {
		var oStyle = this.getParentStyle();
		oStyle.minWidth = this.getMinWidth();
		oStyle.maxWidth = this.getMaxWidth();
		return this;
	};

	return ToolbarLayoutData;

}, /* bExport= */ true);


text:
lima     = Branch.find_or_create_by(name: "Lima", code:"LIM20161")
mexico   = Branch.find_or_create_by(name: "México", code: "MEX20161")
chile    = Branch.find_or_create_by(name: "Chile", code: "CHI20161")
arequipa = Branch.find_or_create_by(name: "Arequipa", code: "AQP20161")

Group.find_or_create_by(name: "LIM20141", description: "Promoción LIM20141", branch: lima)
Group.find_or_create_by(name: "LIM20151", description: "Promoción LIM20151", branch: lima)
Group.find_or_create_by(name: "LIM20152", description: "Promoción LIM20152", branch: lima)
Group.find_or_create_by(name: "LIM20161", description: "Promoción LIM20161", branch: lima)
Group.find_or_create_by(name: "LIM20162", description: "Promoción LIM20162", branch: lima)
Group.find_or_create_by(name: "SCL20151", description: "Promoción SCL20151", branch: chile)
Group.find_or_create_by(name: "SCL20161", description: "Promoción SCL20161", branch: chile)
Group.find_or_create_by(name: "SCL20162", description: "Promoción SCL20162", branch: chile)
Group.find_or_create_by(name: "MEX20151", description: "Promoción MEX20151", branch: mexico)
Group.find_or_create_by(name: "MEX20161", description: "Promoción MEX20161", branch: mexico)
Group.find_or_create_by(name: "MEX20162", description: "Promoción MEX20162", branch: mexico)
Group.find_or_create_by(name: "AQP20151", description: "Promoción AQP20151", branch: arequipa)
Group.find_or_create_by(name: "AQP20161", description: "Promoción AQP20161", branch: arequipa)
Group.find_or_create_by(name: "AQP20162", description: "Promoción AQP20162", branch: arequipa)


text:
#ifndef IO_FIP_H
#define IO_FIP_H

struct io_dev_connector;

int register_io_dev_fip(const struct io_dev_connector **dev_con);
int fip_dev_get_plat_toc_flag(io_dev_info_t *dev_info, uint16_t *plat_toc_flag);

#endif /* IO_FIP_H */