text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using RRLab.PhysiologyWorkbench.Data;

namespace RRLab.PhysiologyWorkbench
{
    public partial class CellInfoControl : UserControl
    {
        public event EventHandler PhysiologyDataChanged;
        private PhysiologyData _PhysiologyData;
        [Bindable(true)]
        public PhysiologyData PhysiologyData
        {
            get { return _PhysiologyData; }
            set {
                _PhysiologyData = value;
                if (PhysiologyData != null)
                {
                    GenotypesBindingSource.DataSource = value;
                    UsersBindingSource.DataSource = value;
                }
                else
                {
                    GenotypesBindingSource.DataSource = typeof(PhysiologyData);
                    UsersBindingSource.DataSource = typeof(PhysiologyData);
                }

                if (PhysiologyDataChanged != null) PhysiologyDataChanged(this, EventArgs.Empty);
            }
        }

        public event EventHandler DataManagerChanged;
        private DataManager _DataManager;
        [Bindable(true)]
        public DataManager DataManager
        {
            get { return _DataManager; }
            set {
                _DataManager = value;
                if (DataManager != null)
                {
                    this.DataBindings.Add("PhysiologyData", DataManager, "PhysiologyData", false, DataSourceUpdateMode.OnPropertyChanged);
                    this.DataBindings.Add("Cell", DataManager, "CurrentCell");
                }
                if (DataManagerChanged != null) DataManagerChanged(this, EventArgs.Empty);
            }
        }

        public event EventHandler CellChanged;
        private Cell _Cell;
        [Bindable(true)]
        public Cell Cell
        {
            get { return _Cell; }
            set {
                _Cell = value;

                if (Cell != null) CellBindingSource.DataSource = Cell;
                else CellBindingSource.DataSource = typeof(Cell);

                OnCellChanged(EventArgs.Empty);
            }
        }

        public event EventHandler NormalColorChanged;
        private Color _NormalColor = System.Drawing.SystemColors.Window;
        [SettingsBindable(true)]
        public Color NormalColor
        {
            get { return _NormalColor; }
            set {
                _NormalColor = value;
                if (NormalColorChanged != null) NormalColorChanged(this, EventArgs.Empty);
            }
        }

        public event EventHandler WarningColorChanged;
        private Color _WarningColor = Color.Gold;
        [SettingsBindable(true)]
        public Color WarningColor
        {
            get { return _WarningColor; }
            set {
                _WarningColor = value;
                if (WarningColorChanged != null) WarningColorChanged(this, EventArgs.Empty);
            }
        }

        public event EventHandler UsingElectrophysiologyValidationChanged;

        private bool _UsingElectrophysiologyValidation = false;
        [DefaultValue(false)]
        [SettingsBindable(true)]
        [Bindable(true)]
        public bool UsingElectrophysiologyValidation
        {
            get { return _UsingElectrophysiologyValidation; }
            set {
                _UsingElectrophysiologyValidation = value;
                if (UsingElectrophysiologyValidationChanged != null) UsingElectrophysiologyValidationChanged(this, EventArgs.Empty);
            }
        }

        public CellInfoControl()
        {
            InitializeComponent();
        }

        protected override void OnValidating(CancelEventArgs e)
        {
            e.Cancel = !ValidateChildren(ValidationConstraints.TabStop);
            base.OnValidating(e);
        }

        protected virtual void OnCellChanged(EventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new Action<EventArgs>(OnCellChanged), e);
                return;
            }

            Enabled = (Cell != null);

            if (CellChanged != null) CellChanged(this, EventArgs.Empty);
        }

        protected virtual void OnGenotypeValidating(object sender, CancelEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new CancelEventHandler(OnGenotypeValidating), sender, e);
                return;
            }

            if (GenotypesComboBox.Text == null || GenotypesComboBox.Text == "")
            {
                GenotypesComboBox.BackColor = WarningColor;
                e.Cancel = true;
            }
            else
            {
                GenotypesComboBox.BackColor = NormalColor;
            }
        }

        public event EventHandler MinimumMembranePotentialChanged;
        private float _MinimumMembranePotential = -20;
        [SettingsBindable(true)]
        [Bindable(true)]
        [DefaultValue(-20)]
        public float MinimumMembranePotential
        {
            get { return _MinimumMembranePotential; }
            set {
                _MinimumMembranePotential = value;
                if (MinimumMembranePotentialChanged != null)
                    MinimumMembranePotentialChanged(this, EventArgs.Empty);
            }
        }

        protected virtual void OnVMembraneValidating(object sender, CancelEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new CancelEventHandler(OnVMembraneValidating), sender, e);
                return;
            }

            if (VMembraneTextbox.Text == null || VMembraneTextbox.Text == "")
            {
                if (UsingElectrophysiologyValidation)
                {
                    VMembraneTextbox.BackColor = WarningColor;
                    // Can be null, so don't cancel
                }
            }
            else
            {
                float value;
                if (Single.TryParse(VMembraneTextbox.Text, out value))
                {
                    if (value > MinimumMembranePotential)
                        VMembraneTextbox.BackColor = WarningColor;
                    else VMembraneTextbox.BackColor = NormalColor;
                }
                else VMembraneTextbox.BackColor = WarningColor;
            }
        }

        private void OnRPipetteValidating(object sender, CancelEventArgs e)
        {

        }

        public event EventHandler MinimumSealResistanceChanged;
        private float _MinimumSealResistance = 1;
        [SettingsBindable(true)]
        [Bindable(true)]
        [DefaultValue(1)]
        public float MinimumSealResistance
        {
            get { return _MinimumSealResistance; }
            set {
                _MinimumSealResistance = value;
                if (MinimumSealResistanceChanged != null) MinimumSealResistanceChanged(this, EventArgs.Empty);
            }
        }

        protected virtual void OnRSealValidating(object sender, CancelEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new CancelEventHandler(OnRSealValidating), sender, e);
                return;
            }

            if (RSealTextBox.Text == null || RSealTextBox.Text == "")
            {
                if (UsingElectrophysiologyValidation)
                {
                    RSealTextBox.BackColor = WarningColor;
                    // Can be null, so don't cancel
                }
            }
            else
            {
                float value;
                if (Single.TryParse(RSealTextBox.Text, out value))
                {
                    if (value < MinimumSealResistance)
                        RSealTextBox.BackColor = WarningColor;
                    else RSealTextBox.BackColor = NormalColor;
                }
                else RSealTextBox.BackColor = WarningColor;
            }
        }

        private void OnRMembraneValidating(object sender, CancelEventArgs e)
        {

        }

        public event EventHandler MinimumCellCapacitanceChanged;
        private float _MinimumCellCapacitance = 20;
        [Bindable(true)]
        [SettingsBindable(true)]
        [DefaultValue(20)]
        public float MinimumCellCapacitance
        {
            get { return _MinimumCellCapacitance; }
            set {
                _MinimumCellCapacitance = value;
                if (MinimumCellCapacitanceChanged != null) MinimumCellCapacitanceChanged(this, EventArgs.Empty);
            }
        }

        private void OnCellCapacValidating(object sender, CancelEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new CancelEventHandler(OnCellCapacValidating), sender, e);
                return;
            }

            if (CellCapacitanceTextBox.Text == null
                || CellCapacitanceTextBox.Text == "")
            {
                if (UsingElectrophysiologyValidation)
                {
                    CellCapacitanceTextBox.BackColor = WarningColor;
                    // Can be null, so don't cancel
                }
            }
            else
            {
                float value;
                if (Single.TryParse(CellCapacitanceTextBox.Text, out value))
                {
                    if (value < MinimumCellCapacitance)
                        CellCapacitanceTextBox.BackColor = WarningColor;
                    else CellCapacitanceTextBox.BackColor = NormalColor;
                }
                else CellCapacitanceTextBox.BackColor = WarningColor;
            }
        }

        private void OnRSeriesValidating(object sender, CancelEventArgs e)
        {

        }

        private void useElectrophysiologyValidationToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
        {
            UsingElectrophysiologyValidation = true;
        }

    }
}


text:
<ion-card>
    <form #f="ngForm" (ngSubmit)="submitForm($event)" role="search" #searchForm>
        <ion-item>
            <ion-input type="search" name="search" [(ngModel)]="searchText" [placeholder]="placeholder" [autocorrect]="autocorrect" [spellcheck]="spellcheck" [core-auto-focus]="autoFocus" [disabled]="disabled" role="searchbox"></ion-input>
            <button item-end ion-button clear icon-only type="submit" class="button-small" [attr.aria-label]="searchLabel" [disabled]="disabled || !searchText || (searchText.length < lengthCheck)">
                <ion-icon name="search"></ion-icon>
            </button>
            <button *ngIf="showClear" item-end ion-button clear icon-only class="button-small" [attr.aria-label]="'core.clearsearch' | translate" [disabled]="searched == '' || disabled" (click)="clearForm()">
                <ion-icon name="close"></ion-icon>
            </button>
        </ion-item>
        <ion-list class="core-search-history with-borders" [hidden]="!historyShown">
            <a ion-item text-wrap *ngFor="let item of history" (click)="historyClicked($event, item.searchedtext)" class="core-clickable" tabindex="1">
                <core-icon name="fa-history" item-start></core-icon>
                {{item.searchedtext}}
            </a>
        </ion-list>
    </form>
</ion-card>

redpajama_set_name: RedPajamaGithub


text:
package com.xtremelabs.robolectric.shadows;

import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.xtremelabs.robolectric.WithTestDefaultsRunner;
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;

@RunWith(WithTestDefaultsRunner.class)
public class LinearLayoutTest {
    @Test
    public void getLayoutParams_shouldReturnLinearLayoutParams() throws Exception {
        ViewGroup.LayoutParams layoutParams = new LinearLayout(null).getLayoutParams();

        assertThat(layoutParams, instanceOf(LinearLayout.LayoutParams.class));
    }
}


text:
package io.picopalette.apps.event_me.Adapters;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.CheckedTextView;

import io.picopalette.apps.event_me.R;

/**
 * Created by ramkumar on 28/06/17.
 */

public class PersonalListViewViewHolder extends RecyclerView.ViewHolder {

    public CheckedTextView listItemCheckedTextView;

    public PersonalListViewViewHolder(View itemView) {
        super(itemView);
        listItemCheckedTextView = (CheckedTextView) itemView.findViewById(R.id.list_item_display_CheckedTextView);
    }
}


text:
const BASEURL = '/templates';
const EXTENSION = 'hbs';

export default class Service {
    get(view) {
        return new Promise(function(resolve, reject) {
            let request = new XMLHttpRequest();
            request.open('GET', `${BASEURL}/${view}.${EXTENSION}`);

            request.onload = function() {
                // success
                if (request.status === 200) {
                    // resolve the promise with the parsed response text (assumes JSON)
                    resolve(request.responseText);
                } else {
                    // error retrieving file
                    reject(Error(request.statusText));
                }
            };

            request.onerror = function() {
                // network errors
                reject(Error('Network Error'));
            };

            request.send();
        });
    };
};


text:
package fii.admission.candidati;

public class Candidat {
	private String nume;
	private String prenume;
	private String CNP;
	private String useremail;
	private String telefon;

	public void setTelefon(String telefon){
		this.telefon=telefon;
	}
	public String getTelefon(){
		return telefon;
	}
	public String getNume() {
		return nume;
	}

	public void setNume(String nume) {
		this.nume = nume;
	}

	public String getPrenume() {
		return prenume;
	}

	public void setPrenume(String prenume) {
		this.prenume = prenume;
	}

	public String getCNP() {
		return CNP;
	}

	public void setCNP(String CNP) {
		this.CNP = CNP;
	}

	public String getUserEmail() {
		return useremail;
	}

	public void setUserEmail(String useremail) {
		this.useremail = useremail;
	}
}


text:
package org.wisdom.cache.ehcache;

import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Instantiate;
import org.apache.felix.ipojo.annotations.Provides;
import org.apache.felix.ipojo.annotations.Requires;
import org.joda.time.Duration;
import org.wisdom.api.Controller;
import org.wisdom.api.DefaultController;
import org.wisdom.api.annotations.Route;
import org.wisdom.api.cache.Cache;
import org.wisdom.api.http.HttpMethod;
import org.wisdom.api.http.Result;

/**
 * A controller using the cache service.
 */
@Component
@Provides(specifications=Controller.class)
@Instantiate
public class MyCachedController extends DefaultController {

    @Requires
    private Cache cache;

    /**
     * @return 100 the first time, 101 the second one.
     */
    @Route(method = HttpMethod.GET, uri = "/cache")
    public Result retrieve() {
        Integer r = cache.get("result");
        if (r == null) {
            r = 100;
            cache.set("result", 101, Duration.standardSeconds(2));
        }
        return ok(Integer.toString(r));
    }
}


text:
using System;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace Brain
{
    public static class AnimationExtensions
    {
        public static Task<bool> Animate(this VisualElement visualElement, AnimationDefinition animationDefinition)
        {
            var tcs = new TaskCompletionSource<bool>();
            var weakReference = new WeakReference<VisualElement>(visualElement);
            var animation = animationDefinition.CreateAnimation(visualElement);

            // Prevent any opacity challenges when element starts hidden
            if (animationDefinition.OpacityFromZero) visualElement.Opacity = 0;

            if ((animationDefinition.PauseBeforeMS > 0) ||
                (animationDefinition.PauseAfterMS > 0) ||
                (animationDefinition.RepeatCount > 1) ||
                (animationDefinition.DelayMS > 0))
            {
                Task.Run(async () =>
                {
                    if (animationDefinition.PauseBeforeMS > 0)
                        await Task.Delay(animationDefinition.PauseBeforeMS);
                    animation.Commit(visualElement, "", 16, animationDefinition.DurationMS, null,
                        async (f, a) => {
                            if (animationDefinition.PauseAfterMS > 0)
                                await Task.Delay(animationDefinition.PauseAfterMS);
                            tcs.SetResult(a);
                        }, null);
                });
            }
            else
                animation.Commit(visualElement, "", 16, animationDefinition.DurationMS, null, (f, a) => tcs.SetResult(a), null);

            return tcs.Task;
        }

        public static void ClearTransforms(this VisualElement visualElement)
        {
            visualElement.AbortAnimation("");

            visualElement.BatchBegin();
            visualElement.Opacity = 1;
            visualElement.TranslationX = 0;
            visualElement.TranslationY = 0;
            visualElement.Rotation = 0;
            visualElement.Scale = 1;
            visualElement.RotationX = 0;
            visualElement.RotationY = 0;
            visualElement.BatchCommit();
        }
    }
}


text:
<!DOCTYPE html>

  <title>Spot-React</title>
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:300,400,700,400italic" type="text/css" />
  <link rel="stylesheet" href="app.css" type="text/css" />
  </script>

        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
          Toggle navigation

        </button>
        Web European Conference - React.js


text:
layout: page
title: Ice Industries Award Ceremony
date: 2016-05-24
author: Andrew Salas
tags: weekly links, java
status: published
summary: Aliquam interdum arcu eget quam.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 04/12/2018
  endDate: 04/15/2018
  ctyhocn: LKCFLHX
  groupCode: IIAC
published: true
---
Proin in facilisis ipsum, sit amet placerat mauris. Suspendisse eu ultrices magna, ut egestas eros. Nam volutpat faucibus viverra. Nunc nunc tellus, semper eget purus sagittis, venenatis pretium erat. Integer molestie hendrerit dolor eu accumsan. Aliquam mollis tempor turpis, et commodo dolor interdum ac. In sit amet interdum nisi. Nullam tincidunt enim quis nibh posuere, at maximus justo condimentum.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam nibh magna, consequat at felis eget, tincidunt pharetra eros. Praesent ac ante vitae magna vehicula ullamcorper at id nisi. Integer quam ante, laoreet nec metus id, auctor sodales purus. Vestibulum molestie nisl sapien, nec eleifend dolor venenatis eu. Suspendisse vitae dictum erat. Phasellus dapibus in mauris vitae pellentesque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce finibus tempus erat vitae tristique. Nulla commodo dui in porttitor facilisis. Fusce efficitur sodales erat, a elementum tellus elementum eu. Proin suscipit sit amet ex eu scelerisque. Aliquam est massa, mollis sit amet nisl vel, eleifend pharetra magna. Cras sed ullamcorper mi, eget posuere metus. In eget condimentum ex, ac maximus nulla.

1 Nulla in quam ac mauris rhoncus dapibus
1 Aenean luctus mauris a pulvinar rhoncus.

Curabitur nec sodales quam, vitae dignissim leo. Vivamus et ipsum nulla. Suspendisse potenti. Praesent vitae libero et ligula efficitur condimentum et vitae neque. Integer nec tristique nulla, vitae ultrices magna. Maecenas varius bibendum lacus, eget auctor mi rhoncus sed. Praesent ornare neque pharetra, feugiat massa nec, hendrerit odio.


text:
import EventEmitter, { ListenerFn } from 'eventemitter3';

/**
 * Extend from this class to equip your class with events
 */
export default class Evented {
    hasEvents = true;

    private events = new EventEmitter();

    /**
     * Add listener to a given event
     * @param event event name
     * @param fn Listener function
     */
    on = (event: string | symbol, fn: ListenerFn, context?: any) => {
        return this.events.on(event, fn, context);
    }

    /**
     * Add one time listener to a given event
     * @param event event name
     * @param fn Listener function
     */
    once = (event: string | symbol, fn: ListenerFn, context?: any) => {
        return this.events.once(event, fn, context);
    }

    /**
     * Calls each of the listeners registered for a given event.
     * @param event event name
     */
    emit = (event: string | symbol, ...args: any[]): boolean => {
        return this.events.emit(event, ...args);
    }

    /**
     * Remove the listeners of a given event.
     * @param event event name
     */
    off = (event: string | symbol, fn?: ListenerFn, context?: any, once?: boolean) => {
        return this.events.removeListener(event, fn, context, once);
    }

    /**
     * Remove all listeners, or those of the specified event.
     * @param event event name
     */
    clear = (event?: string) => {
        return this.events.removeAllListeners(event);
    }

    /**
     * List listeners of the given event
     * @param event event name
     */
    listeners = (event: string | symbol) => {
        return this.events.listeners(event);
    }
}


text:
declare namespace GroupHoldr {
    /**
     * A general storage abstraction for keyed containers of items.
     */
    class GroupHoldr implements IGroupHoldr {
        /**
         * Stored object groups, keyed by name.
         */
        private groups;
        /**
         * Mapping of "add", "delete", "get", and "set" keys to a listing of the
         * appropriate Functions for each group.
         */
        private functions;
        /**
         * Names of the stored object groups.
         */
        private groupNames;
        /**
         * Types for each stored object group, as Array or Object.
         */
        private groupTypes;
        /**
         * The names of each group's type, as "Array" or "Object".
         */
        private groupTypeNames;
        /**
         * Initializes a new instance of the GroupHoldr class.
         *
         * @param settings   Settings to be used for initialization.
         */
        constructor(settings: IGroupHoldrSettings);
        /**
         * @returns The mapping of operation types to each group's Functions.
         */
        getFunctions(): IFunctionGroups;
        /**
         * @returns The stored object groups, keyed by name.
         */
        getGroups(): IGroups<any>;
        /**
         * @param name   The name of the group to retrieve.
         * @returns The group stored under the given name.
         */
        getGroup(name: string): {
            [i: string]: any;
        } | any[];
        /**
         * @returns Names of the stored object groups.
         */
        getGroupNames(): string[];
        /**
         * Switches an object from one group to another.
         *
         * @param value   The value being moved from one group to another.
         * @param groupNameOld   The name of the group to move out of.
         * @param groupNameNew   The name of the group to move into.
         * @param [keyOld]   What key the value used to be under (required if
         *                   the old group is an Object).
         * @param [keyNew]   Optionally, what key the value will now be under
         *                   (required if the new group is an Object).
         */
        switchMemberGroup(value: any, groupNameOld: string, groupNameNew: string, keyOld?: string | number, keyNew?: string | number): void;
        /**
         * Calls a Function for each group, with that group as the first argument.
         * Extra arguments may be passed in an array after scope and func, as in
         * Function.apply's standard.
         *
         * @param scope   An optional scope to call this from (if falsy, defaults
         *                to the calling GroupHoldr).
         * @param func   A Function to apply to each group.
         * @param [args]   Optionally, arguments to pass in after each group.
         */
        applyAll(scope: any, func: (...args: any[]) => any, args?: any[]): void;
        /**
         * Calls a function for each member of each group. Extra arguments may be
         * passed in an array after scope and func, as in Function.apply's standard.
         *
         * @param scope   An optional scope to call this from (if falsy, defaults
         *                to the calling GroupHoldr).
         * @param func   A Function to apply to each group.
         * @param [args]   Optionally, arguments to pass in after each group.
         */
        applyOnAll(scope: any, func: (...args: any[]) => any, args?: any[]): void;
        /**
         * Calls a Function for each group, with that group as the first argument.
         * Extra arguments may be passed after scope and func natively, as in
         * Function.call's standard.
         *
         * @param scope   An optional scope to call this from (if falsy,
         *                defaults to this).
         * @param func   A Function to apply to each group.
         */
        callAll(scope: any, func: (...args: any[]) => any): void;
        /**
         * Calls a function for each member of each group. Extra arguments may be
         * passed after scope and func natively, as in Function.call's standard.
         *
         * @param scope   An optional scope to call this from (if falsy,
         *                defaults to this).
         * @param func   A Function to apply to each group member.
         */
        callOnAll(scope: any, func: (...args: any[]) => any): void;
        /**
         * Clears each Array by setting its length to 0.
         */
        clearArrays(): void;
        /**
         * Meaty function to reset, given an Array of names and an object of
         * types. Any pre-existing Functions are cleared, and new ones are added
         * as member objects and to this.functions.
         *
         * @param names   An array of names of groupings to be made
         * @param types   An mapping of the function types of
         *                the names given in names. This may also be taken
         *                in as a String, to be converted to an Object.
         */
        private setGroupNames(names, types);
        /**
         * Removes any pre-existing "set", "get", etc. functions.
         */
        private clearFunctions();
        /**
         * Resets groups to an empty Object, and fills it with a new groupType for
         * each name in groupNames.
         */
        private setGroups();
        /**
         * Calls the Function creators for each name in groupNames.
         */
        private createFunctions();
        /**
         * Creates a setGroup Function under this and functions.setGroup.
         *
         * @param name   The name of the group, from groupNames.
         */
        private createFunctionSetGroup(name);
        /**
         * Creates a getGroup Function under this and functions.getGroup.
         *
         * @param name   The name of the group, from groupNames.
         */
        private createFunctionGetGroup(name);
        /**
         * Creates a set Function under this and functions.set.
         *
         * @param name   The name of the group, from groupNames.
         */
        private createFunctionSet(name);
        /**
         * Creates a get<type> function under this and functions.get
         *
         * @param name   The name of the group, from groupNames.
         */
        private createFunctionGet(name);
        /**
         * Creates an add function under this and functions.add.
         *
         * @param name   The name of the group, from groupNames.
         */
        private createFunctionAdd(name);
        /**
         * Creates a delete function under this and functions.delete.
         *
         * @param name   The name of the group, from groupNames.
         */
        private createFunctionDelete(name);
        /**
         * Returns the name of a type specified by a string ("Array" or "Object").
         *
         * @param str   The name of the type. If falsy, defaults to Array
         * @returns The proper name of the type.
         */
        private getTypeName(str);
        /**
         * Returns function specified by a string (Array or Object).
         *
         * @param str   The name of the type. If falsy, defaults to Array
         * @returns The class Function of the type.
         */
        private getTypeFunction(str);
    }
    /**
     * An Object group containing objects of type T.
     *
     * @param T   The type of values contained within the group.
     */
    interface IDictionary<T> {
        [i: string]: T;
    }
    /**
     * Stored object groups, keyed by name.
     */
    interface IGroups<T> {
        [i: string]: IDictionary<T> | T[];
    }
    /**
     * Types for stored object groups, as Array or Object.
     */
    interface ITypesListing {
        [i: string]: {
            new (): any[] | Object;
        };
    }
    /**
     * Abstract parent interface of all group Functions.
     */
    interface IGroupHoldrFunction extends Function {
    }
    /**
     * Stores the given group internally.
     *
     * @param value   The new group to store.
     */
    interface IGroupHoldrSetGroupFunction<T> extends IGroupHoldrFunction {
        (value: IDictionary<T> | T[]): void;
    }
    /**
     * @returns One of the stored groups.
     */
    interface IGroupHoldrGetGroupFunction<T> extends IGroupHoldrFunction {
        (): IDictionary<T> | T[];
    }
    /**
     * Sets a value in a group.
     *
     * @param key   The key to store the value under.
     * @param [value]   The value to store in the group.
     */
    interface IGroupHoldrSetFunction extends IGroupHoldrFunction {
        (key: string | number, value?: any): void;
    }
    /**
     * Retrieves a value from a group.
     *
     * @param key   The key the value is stored under.
     */
    interface IGroupHoldrGetFunction extends IGroupHoldrFunction {
        (key: string | number): void;
    }
    /**
     * Adds a value to a group.
     *
     * @param value   The value to store in the group.
     * @param [key]   The key to store the value under.
     * @remarks If the group is an Array, not providing a key will use Array::push.
     */
    interface IGroupHoldrAddFunction extends IGroupHoldrFunction {
        (value: any, key?: string | number): void;
    }
    /**
     * Adds a value to an Array group.
     *
     * @param value   The value to store in the group.
     * @param [key]   The index to store the value under.
     */
    interface IGroupHoldrArrayAddFunction extends IGroupHoldrAddFunction {
        (value: any, key?: number): void;
    }
    /**
     * Adds a value to an Object group.
     *
     * @param value   The value to store in the group.
     * @param key   The key to store the value under.
     */
    interface IGroupHoldrObjectAddFunction extends IGroupHoldrAddFunction {
        (value: any, key: string): void;
    }
    /**
     * Deletes a value from a group.
     *
     * @param [arg1]   Either the value (Arrays) or the key (Objects).
     * @param [arg2]   Optionally, for Array groups, the value's index.
     */
    interface IGroupHoldrDeleteFunction extends IGroupHoldrFunction {
        (arg1?: any, arg2?: any): void;
    }
    /**
     * Deletes a value from an Array group.
     *
     * @param [value]   The value to delete, if index is not provided.
     * @param [index]   The index of the value, to bypass Array::indexOf.
     */
    interface IGroupHoldrArrayDeleteFunction extends IGroupHoldrDeleteFunction {
        (value?: any, index?: number): void;
    }
    /**
     * Deletes a value from an Object group.
     *
     * @param key   The key of the value to delete.
     */
    interface IGroupHoldrObjectDeleteFunction extends IGroupHoldrDeleteFunction {
        (key: string): void;
    }
    /**
     * Storage for Function groups of a single group, keyed by their operation.
     */
    interface IGroupHoldrFunctionGroup<T extends IGroupHoldrFunction> {
        [i: string]: T;
    }
    /**
     * Storage for Function groups, keyed by their operation.
     */
    interface IFunctionGroups {
        /**
         * Setter Functions for each group, keyed by their group name.
         */
        setGroup: IGroupHoldrFunctionGroup<IGroupHoldrSetGroupFunction<any>>;
        /**
         * Getter Functions for each group, keyed by their group name.
         */
        getGroup: IGroupHoldrFunctionGroup<IGroupHoldrGetGroupFunction<any>>;
        /**
         * Value setter Functions for each group, keyed by their group name.
         */
        set: IGroupHoldrFunctionGroup<IGroupHoldrSetFunction>;
        /**
         * Value getter Functions for each group, keyed by their group name.
         */
        get: IGroupHoldrFunctionGroup<IGroupHoldrGetFunction>;
        /**
         * Value adder Functions for each group, keyed by their group name.
         */
        add: IGroupHoldrFunctionGroup<IGroupHoldrAddFunction>;
        /**
         * Valuer deleter Functions for each group, keyed by their group name.
         */
        delete: IGroupHoldrFunctionGroup<IGroupHoldrDeleteFunction>;
    }
    /**
     * Settings to initialize a new IGroupHoldr.
     */
    interface IGroupHoldrSettings {
        /**
         * The names of groups to be creaed.
         */
        groupNames: string[];
        /**
         * The mapping of group types. This can be a single String ("Array" or
         * "Object") to set each one, or an Object mapping each groupName to
         * a different String (type).
         */
        groupTypes: string | {
            [i: string]: string;
        };
    }
    /**
     * A general storage abstraction for keyed containers of items.
     */
    interface IGroupHoldr {
        /**
         * @returns The mapping of operation types to each group's Functions.
         */
        getFunctions(): IFunctionGroups;
        /**
         * @returns The stored object groups, keyed by name.
         */
        getGroups(): IGroups<any>;
        /**
         * @param name   The name of the group to retrieve.
         * @returns The group stored under the given name.
         */
        getGroup(name: string): {
            [i: string]: any;
        } | any[];
        /**
         * @returns Names of the stored object groups.
         */
        getGroupNames(): string[];
        /**
         * Switches an object from one group to another.
         *
         * @param value   The value being moved from one group to another.
         * @param groupNameOld   The name of the group to move out of.
         * @param groupNameNew   The name of the group to move into.
         * @param [keyOld]   What key the value used to be under (required if
         *                   the old group is an Object).
         * @param [keyNew]   Optionally, what key the value will now be under
         *                   (required if the new group is an Object).
         */
        switchMemberGroup(value: any, groupNameOld: string, groupNameNew: string, keyOld?: string | number, keyNew?: string | number): void;
        /**
         * Calls a Function for each group, with that group as the first argument.
         * Extra arguments may be passed in an array after scope and func, as in
         * Function.apply's standard.
         *
         * @param scope   An optional scope to call this from (if falsy, defaults
         *                to the calling GroupHoldr).
         * @param func   A Function to apply to each group.
         * @param [args]   Optionally, arguments to pass in after each group.
         */
        applyAll(scope: any, func: (...args: any[]) => any, args?: any[]): void;
        /**
         * Calls a function for each member of each group. Extra arguments may be
         * passed in an array after scope and func, as in Function.apply's standard.
         *
         * @param scope   An optional scope to call this from (if falsy, defaults
         *                to the calling GroupHoldr).
         * @param func   A Function to apply to each group.
         * @param [args]   Optionally, arguments to pass in after each group.
         */
        applyOnAll(scope: any, func: (...args: any[]) => any, args?: any[]): void;
        /**
         * Calls a Function for each group, with that group as the first argument.
         * Extra arguments may be passed after scope and func natively, as in
         * Function.call's standard.
         *
         * @param scope   An optional scope to call this from (if falsy,
         *                defaults to this).
         * @param func   A Function to apply to each group.
         */
        callAll(scope: any, func: (...args: any[]) => any, ...args: any[]): void;
        /**
         * Calls a function for each member of each group. Extra arguments may be
         * passed after scope and func natively, as in Function.call's standard.
         *
         * @param scope   An optional scope to call this from (if falsy,
         *                defaults to this).
         * @param func   A Function to apply to each group member.
         */
        callOnAll(scope: any, func: (...args: any[]) => any, ...args: any[]): void;
        /**
         * Clears each Array by setting its length to 0.
         */
        clearArrays(): void;
    }
}
declare var module: any;


text:
"""
Test loading cifar100.
"""

import os
from dbcollection.utils.test import TestBaseDB

# setup
name = 'cifar100'
task = 'classification'
data_dir = os.path.join(os.path.expanduser("~"), 'tmp', 'download_data')
verbose = True

# Run tester
tester = TestBaseDB(name, task, data_dir, verbose)
tester.run('download')