text:
/*!
 * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com)
 * Code licensed under the Apache License v2.0.
 * For details, see http://www.apache.org/licenses/LICENSE-2.0.
 */

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: Merriweather,'Helvetica Neue',Arial,sans-serif;
}

hr {
    max-width: 50px;
    border-color: #d5c5c8;
    border-width: 3px;
}

hr.light {
    border-color: #fff;
}

hr.dark {
    border-color: #000;
}

a {
    color: #d5c5c8;
    -webkit-transition: all .35s;
    -moz-transition: all .35s;
    transition: all .35s;
}

a:hover,
a:focus {
    color: #FFDBDA;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif;
}

p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.bg-primary {
    background-color: #604D53;
}

.bg-dark {
    color: #fff;
    background-color: #222;
}

.text-faded {
    color: rgba(255,255,255,.7);
}

section {
    padding: 100px 0;

}

aside {
    padding: 50px 0;
}

.no-padding {
    padding: 0;
}

.navbar-default {
    border-color: rgba(34,34,34,.05);
    font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif;
    background-color: #fff;
    -webkit-transition: all .35s;
    -moz-transition: all .35s;
    transition: all .35s;
}

.navbar-default .navbar-header .navbar-brand {
    text-transform: uppercase;
    font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif;
    font-weight: 700;
    color: #d5c5c8;
}

.navbar-default .navbar-header .navbar-brand:hover,
.navbar-default .navbar-header .navbar-brand:focus {
    color: #db7f8e;
}

.navbar-default .nav > li>a,
.navbar-default .nav>li>a:focus {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.navbar-default .nav > li>a:hover,
.navbar-default .nav>li>a:focus:hover {
    color: #d5c5c8;
}

.navbar-default .nav > li.active>a,
.navbar-default .nav>li.active>a:focus {
    color: #d5c5c8!important;
    background-color: transparent;
}

.navbar-default .nav > li.active>a:hover,
.navbar-default .nav>li.active>a:focus:hover {
    background-color: transparent;
}

@media(min-width:768px) {
    .navbar-default {
        border-color: rgba(255,255,255,.3);
        background-color: transparent;
    }

    .navbar-default .navbar-header .navbar-brand {
        color: rgba(255,255,255,.7);
    }

    .navbar-default .navbar-header .navbar-brand:hover,
    .navbar-default .navbar-header .navbar-brand:focus {
        color: #fff;
    }

    .navbar-default .nav > li>a,
    .navbar-default .nav>li>a:focus {
        color: rgba(255,255,255,.7);
    }

    .navbar-default .nav > li>a:hover,
    .navbar-default .nav>li>a:focus:hover {
        color: #fff;
    }

    .navbar-default.affix {
        border-color: rgba(34,34,34,.05);
        background-color: #fff;
    }

    .navbar-default.affix .navbar-header .navbar-brand {
        font-size: 14px;
        color: #d5c5c8;
    }

    .navbar-default.affix .navbar-header .navbar-brand:hover,
    .navbar-default.affix .navbar-header .navbar-brand:focus {
        color: DB7F8E;
    }

    .navbar-default.affix .nav > li>a,
    .navbar-default.affix .nav>li>a:focus {
        color: #222;
    }

    .navbar-default.affix .nav > li>a:hover,
    .navbar-default.affix .nav>li>a:focus:hover {
        color: #d5c5c8;
    }
}

header {
    position: relative;
    width: 100%;
    min-height: auto;
    text-align: center;
    color: #fff;
    background-image: url(../img/lbook.jpg);
    opacity: 0.8;
    background-position: center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
}

header .header-content {
    position: relative;
    width: 100%;
    padding: 100px 15px;
    text-align: center;
}

header .header-content .header-content-inner h1 {
    margin-top: 0;
    margin-bottom: 0;
    text-transform: uppercase;
    font-weight: 700;
    color:#604D53;
}

header .header-content .header-content-inner hr {
    margin: 30px auto;

}

header .header-content .header-content-inner p {
    margin-bottom: 50px;
    font-size: 16px;
    font-weight: 300;
    color: rgba(255,255,255,.7);
}

@media(min-width:768px) {
    header {
        min-height: 100%;
    }

    header .header-content {
        position: absolute;
        top: 50%;
        padding: 0 50px;
        -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
        transform: translateY(-50%);
    }

    header .header-content .header-content-inner {
        margin-right: auto;
        margin-left: auto;
        max-width: 1000px;
    }

    header .header-content .header-content-inner p {
        margin-right: auto;
        margin-left: auto;
        max-width: 80%;
        font-size: 18px;
    }
}

.section-heading {
    margin-top: 0;
}

.service-box {
    margin: 50px auto 0;
    max-width: 400px;
}

@media(min-width:992px) {
    .service-box {
        margin: 20px auto 0;
    }
}

.service-box p {
    margin-bottom: 0;
}

.call-to-action h2 {
    margin: 0 auto 20px;
}

.text-primary {
    color: #d5c5c8;
}

.no-gutter > [class*=col-] {
    padding-right: 0;
    padding-left: 0;
}

.btn-default {
    border-color: #fff;
    color: #222;
    background-color: #fff;
    -webkit-transition: all .35s;
    -moz-transition: all .35s;
    transition: all .35s;
}

.btn-default:hover,
.btn-default:focus,
.btn-default.focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
    border-color: #ededed;
    color: #222;
    background-color: #f2f2f2;
}

.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
    background-image: none;
}

.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
    border-color: #fff;
    background-color: #fff;
}

.btn-default .badge {
    color: #fff;
    background-color: #222;
}

.btn-primary {
    border-color: #d5c5c8;
    color: #fff;
    background-color: #d5c5c8;
    -webkit-transition: all .35s;
    -moz-transition: all .35s;
    transition: all .35s;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
    border-color: #ed431f;
    color: #fff;
    background-color: #DB7F8E;
}

.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
    background-image: none;
}

.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
    border-color: #d5c5c8;
    background-color: #d5c5c8;
}

.btn-primary .badge {
    color: #d5c5c8;
    background-color: #fff;
}

.btn {
    border: 0;
    border-radius: 300px;
    text-transform: uppercase;
    font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif;
    font-weight: 700;
}

.btn-xl {
    padding: 15px 30px;
}

::-moz-selection {
    text-shadow: none;
    color: #fff;
    background: #222;
}

::selection {
    text-shadow: none;
    color: #fff;
    background: #222;
}

img::selection {
    color: #fff;
    background: 0 0;
}

img::-moz-selection {
    color: #fff;
    background: 0 0;
}

body {
    webkit-tap-highlight-color: #222;
}

#social-footer{
    padding: 20px;
    background: #fff;
    color: black;
}

#social-footer a {
    color: #000;
    font-size: 16px;
    line-height: 1.5;
    text-decoration: underline;
}

#social-footer a:hover {
    color: #FFDBDA;
}

.vertical-align {
    display: flex;
    align-items: center;
}


text:
"""
:Author Patrik Valkovic
:Created 03.09.2017 19:05
:Licence MIT
Part of grammpy

"""
from unittest import TestCase, main
from grammpy import *
from grammpy.parsers import cyk
from grammpy.transforms import ContextFree, InverseContextFree

class S(Nonterminal): pass
class A(Nonterminal): pass
class B(Nonterminal): pass
class C(Nonterminal): pass
class D(Nonterminal): pass
class RuleS1AB(Rule): rule=([S], [1, A, B])
class RuleB0(Rule): rule=([B], [0])
class RuleACD(Rule): rule=([A], [C, D])
class RuleCD(Rule): rule=([C], [D])
class RuleDEps(Rule): rule=([D], [EPS])

class SimpleTestoverUnitRule(TestCase):
    def test_simpleTestOverUnitRule(self):
        g = Grammar(terminals=[0, 1],
                    nonterminals=[S, A, B, C, D],
                    rules=[RuleS1AB, RuleB0, RuleACD, RuleCD, RuleDEps],
                    start_symbol=S)
        gr = ContextFree.transform_to_chomsky_normal_form(ContextFree.remove_unit_rules(ContextFree.remove_rules_with_epsilon(g)))
        pars = cyk(gr, [1, 0])
        s = InverseContextFree.epsilon_rules_restore(InverseContextFree.unit_rules_restore(InverseContextFree.transform_from_chomsky_normal_form(pars)))
        self.assertIsInstance(s, S)
        self.assertIsInstance(s.to_rule, RuleS1AB)
        self.assertIsInstance(s.to_rule.to_symbols[0], Terminal)
        self.assertEqual(s.to_rule.to_symbols[0].s, 1)
        b = s.to_rule.to_symbols[2]
        self.assertIsInstance(b, B)
        self.assertIsInstance(b.to_rule, RuleB0)
        self.assertIsInstance(b.to_rule.to_symbols[0], Terminal)
        self.assertEqual(b.to_rule.to_symbols[0].s, 0)
        a = s.to_rule.to_symbols[1]
        self.assertIsInstance(a, A)
        self.assertIsInstance(a.to_rule, RuleACD)
        d = a.to_rule.to_symbols[1]
        self.assertIsInstance(d, D)
        self.assertIsInstance(d.to_rule, RuleDEps)
        self.assertIs(d.to_rule.to_symbols[0].s, EPS)
        c = a.to_rule.to_symbols[0]
        self.assertIsInstance(c, C)
        self.assertIsInstance(c.to_rule, RuleCD)
        d = c.to_rule.to_symbols[0]
        self.assertIsInstance(d, D)
        self.assertIsInstance(d.to_rule, RuleDEps)
        self.assertIs(d.to_rule.to_symbols[0].s, EPS)

if __name__ == '__main__':
    main()

redpajama_set_name: RedPajamaGithub


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

namespace NDomain.Bus
{
    /// <summary>
    /// Represents an immutable generic message with support for headers, name and a payload
    /// </summary>
    public class Message
    {
        static readonly IReadOnlyDictionary<string, string> EmptyHeaders = new Dictionary<string, string>();

        public Message(object payload, string name, Dictionary<string, string> headers = null)
        {
            this.Payload = payload;
            this.Name = name;
            this.Headers = headers ?? EmptyHeaders;
        }

        public object Payload { get; private set; }
        public string Name { get; private set; }
        public IReadOnlyDictionary<string, string> Headers { get; private set; }
    }
}


text:
exports.createServer = require('./lib');

exports.createClient = require('./lib/client');

exports.dict = require('./dict');


text:
package com.vmware.vim25;

/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/

@SuppressWarnings("all")
public class GuestOperationsFault extends VimFault {
}


text:
using System;
using System.Web.Mvc;
using MagicBus.Example.Web.Domain.Pricing.DataAccess;

namespace MagicBus.Example.Web.Controllers
{
    public class PricingController : Controller
    {
        public ActionResult CustomerStatus(Guid customerId)
        {
            return Content(API.GetCustomerStatus(customerId));
        }
    }
}


text:
execOptions= (
'WorkingDirectory',
'RootDirectory',
'User',
'Group',
'SupplementaryGroups',
'Nice',
'OOMScoreAdjust',
'IOSchedulingClass',
'IOSchedulingPriority',
'CPUSchedulingPolicy',
'CPUSchedulingPriority',
'CPUSchedulingResetOnFork',
'CPUAffinity',
'UMask',
'Environment',
'EnvironmentFile',
'StandardInput',
'StandardOutput',
'StandardError',
'TTYPath',
'TTYReset',
'TTYVHangup',
'TTYVTDisallocate',
'SyslogIdentifier',
'SyslogFacility',
'SyslogLevel',
'SyslogLevelPrefix',
'TimerSlackNSec',
'LimitCPU',
'LimitFSIZE',
'LimitDATA',
'LimitSTACK',
'LimitCORE',
'LimitRSS',
'LimitNOFILE',
'LimitAS',
'LimitNPROC',
'LimitMEMLOCK',
'LimitLOCKS',
'LimitSIGPENDING',
'LimitMSGQUEUE',
'LimitNICE',
'LimitRTPRIO',
'LimitRTTIME',
'PAMName',
'TCPWrapName',
'CapabilityBoundingSet',
'SecureBits',
'Capabilities',
'ReadWriteDirectories',
'ReadOnlyDirectories',
'InaccessibleDirectories',
'PrivateTmp',
'PrivateNetwork',
'MountFlags',
'UtmpIdentifier',
'IgnoreSIGPIPE',
'NoNewPrivileges',
'SystemCallFilter'
)

killOptions = (
'KillMode',
'KillSignal',
'SendSIGHUP',
'SendSIGKILL'
)

mountOptions = (
'What',
'Where',
'Type',
'Options',
'DirectoryMode',
'TimeoutSec'
)

serviceOptions= (
#service section
'Type',
'RemainAfterExit',
'GuessMainPID',
'PIDFile',
'BusName',
'ExecStart',
'ExecStartPre',
'ExecStartPost',
'ExecReload',
'ExecStop',
'ExecStopPost',
'RestartSec',
'TimeoutStartSec',
'TimeoutStopSec',
'TimeoutSec',
'WatchdogSec',
'Restart',
'SuccessExitStatus',
'RestartPreventExitStatus',
'PermissionsStartOnly',
'RootDirectoryStartOnly',
'NonBlocking',
'NotifyAccess',
'Sockets',
'StartLimitInterval',
'StartLimitBurst',
'StartLimitAction',
'SysVStartPriority',
'FsckPassNo'
)

socketOptions = (
'ListenStream',
'ListenDatagram',
'ListenSequentialPacket',
'ListenFIFO',
'ListenSpecial',
'ListenNetlink',
'ListenMessageQueue',
'BindIPv6Only',
'Backlog',
'BindToDevice',
'DirectoryMode',
'SocketMode',
'Accept',
'MaxConnections',
'KeepAlive',
'Priority',
'ReceiveBuffer',
'SendBuffer',
'IPTOS',
'IPTTL',
'Mark',
'ReusePort',
'SmackLabel',
'SmackLabelIPIn',
'SmackLabelIPOut',
'PipeSize',
'MessageQueueMaxMessages',
'MessageQueueMessageSize',
'FreeBind',
'Transparent',
'Broadcast',
'PassCredentials',
'PassSecurity',
'TCPCongestion',
'ExecStartPre',
'ExecStartPost',
'ExecStopPre',
'ExecStopPost',
'TimeoutSec',
'Service'
)

unitOptions= (
#unit section
'Description',
'Documentation',
'Requires',
'RequiresOverridable',
'Requisite',
'RequisiteOverridable',
'Wants',
'BindsTo',
'PartOf',
'Conflicts',
'Before',
'After',
'OnFailure',
'PropagatesReloadTo',
'ReloadPropagatedFrom',
'RequiresMountsFor',
'OnFailureIsolate',
'IgnoreOnIsolate',
'IgnoreOnSnapshot',
'StopWhenUnneeded',
'RefuseManualStart',
'RefuseManualStop',
'AllowIsolate',
'DefaultDependencies',
'JobTimeoutSec',
'ConditionPathExists',
'ConditionPathExistsGlob',
'ConditionPathIsDirectory',
'ConditionPathIsSymbolicLink',
'ConditionPathIsMountPoint',
'ConditionPathIsReadWrite',
'ConditionDirectoryNotEmpty',
'ConditionFileNotEmpty',
'ConditionFileIsExecutable',
'ConditionKernelCommandLine',
'ConditionVirtualization',
'ConditionSecurity',
'ConditionCapability',
'ConditionHost',
'ConditionACPower',
'ConditionNull',
'SourcePath'
)

installOptions = (
#install section
'Alias',
'WantedBy',
'RequiredBy',
'Also',
)


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ViewEditorControl.xaml.cs" company="EMC Consulting">
//   EMC Consulting 2009
// </copyright>
// <summary>
//   Interaction logic for ViewEditorControl.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Emcc.TeamSystem.TaskBoard.UIElements
{
    using System;
    using System.Linq;
    using System.Windows;
    using System.Windows.Controls;

    using Core.DataObjects;
    using Core.Helpers;
    using Core.Interfaces;

    /// <summary>
    /// Interaction logic for ViewEditorControl.xaml
    /// </summary>
    public partial class ViewEditorControl : UserControl
    {
        /// <summary>
        /// The View Property development.
        /// </summary>
        private static readonly DependencyProperty viewProperty = DependencyProperty.Register(
            "View",
            typeof(IView),
            typeof(ViewEditorControl),
            new PropertyMetadata(null, OnSourcePropertyChanged));

        /// <summary>
        /// The View Property development.
        /// </summary>
        private static readonly DependencyProperty projectDataProperty = DependencyProperty.Register(
            "ProjectData",
            typeof(IProjectData),
            typeof(ViewEditorControl),
            new PropertyMetadata(null, OnSourcePropertyChanged));

        /// <summary>
        /// The current child type applied to this control.
        /// </summary>
        private string appliedChildType;

        /// <summary>
        /// The current parent type applied to this view
        /// </summary>
        private string appliedparentType;

        /// <summary>
        /// Initializes a new instance of the <see cref="ViewEditorControl"/> class.
        /// </summary>
        public ViewEditorControl()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Gets the view property.
        /// </summary>
        /// <value>The view property.</value>
        public static DependencyProperty ViewProperty
        {
            get { return viewProperty; }
        }

        /// <summary>
        /// Gets the project data property.
        /// </summary>
        /// <value>The project data property.</value>
        public static DependencyProperty ProjectDataProperty
        {
            get { return projectDataProperty; }
        }

        /// <summary>
        /// Gets or sets the project data.
        /// </summary>
        /// <value>The project data.</value>
        public IProjectData ProjectData
        {
            get { return (IProjectData)this.GetValue(ProjectDataProperty); }
            set { this.SetValue(ProjectDataProperty, value); }
        }

        /// <summary>
        /// Gets or sets the view.
        /// </summary>
        /// <value>The view object.</value>
        public IView View
        {
            get { return (IView)this.GetValue(ViewProperty); }
            set { this.SetValue(ViewProperty, value); }
        }

        /// <summary>
        /// Called when [source property changed].
        /// </summary>
        /// <param name="dependencyObject">The dependency object.</param>
        /// <param name="e">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param>
        private static void OnSourcePropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
        {
            var control = dependencyObject as ViewEditorControl;

            if (control == null || control.View == null || control.ProjectData == null)
            {
                return;
            }

            control.SetupChildStates();
        }

        /// <summary>
        /// Moves the items.
        /// </summary>
        /// <param name="from">the source list.</param>
        /// <param name="to">The target list.</param>
        private static void MoveItems(ListBox from, ListBox to)
        {
            var selectedItems = from.SelectedItems.OfType<string>().ToArray();

            foreach (var item in selectedItems)
            {
                if (!to.Items.Contains(item))
                {
                    to.Items.Add(item);
                }

                to.SelectedItem = item;

                from.Items.Remove(item);
            }
        }

        /// <summary>
        /// Setups the child states.
        /// </summary>
        private void SetupChildStates()
        {
            this.appliedChildType = this.View.ViewMap.ChildType;
            this.appliedparentType = this.View.ViewMap.ParentType;

            this.BucketStates.Items.Clear();
            this.SwimLaneStates.Items.Clear();
            this.UnassignedStates.Items.Clear();

            foreach (var state in this.View.ViewMap.BucketStates)
            {
                this.BucketStates.Items.Add(state);
            }

            foreach (var state in this.View.ViewMap.SwimLaneStates)
            {
                this.SwimLaneStates.Items.Add(state);
            }

            foreach (var state in this.ProjectData.ItemTypes[this.View.ViewMap.ChildType].States)
            {
                if (!this.View.ViewMap.BucketStates.Contains(state) && !this.View.ViewMap.SwimLaneStates.Contains(state))
                {
                    this.UnassignedStates.Items.Add(state);
                }
            }
        }

        /// <summary>
        /// Syncs the states.
        /// </summary>
        private void SyncStates()
        {
            this.View.ViewMap.SwimLaneStates.Clear();
            this.View.ViewMap.BucketStates.Clear();

            foreach (var state in this.SwimLaneStates.Items.OfType<string>())
            {
                this.View.ViewMap.SwimLaneStates.Add(state);
            }

            foreach (var state in this.BucketStates.Items.OfType<string>())
            {
                this.View.ViewMap.BucketStates.Add(state);
            }
        }

        /// <summary>
        /// Handles the Click event of the ToSwimLane control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void ToSwimLane_Click(object sender, RoutedEventArgs e)
        {
            MoveItems(this.UnassignedStates, this.SwimLaneStates);
            this.SyncStates();
        }

        /// <summary>
        /// Handles the Click event of the FromSwimLine control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void FromSwimLine_Click(object sender, RoutedEventArgs e)
        {
            MoveItems(this.SwimLaneStates, this.UnassignedStates);
            this.SyncStates();
        }

        /// <summary>
        /// Handles the Click event of the ToBucket control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void ToBucket_Click(object sender, RoutedEventArgs e)
        {
            MoveItems(this.UnassignedStates, this.BucketStates);
            this.SyncStates();
        }

        /// <summary>
        /// Handles the Click event of the FromBucket control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void FromBucket_Click(object sender, RoutedEventArgs e)
        {
            MoveItems(this.BucketStates, this.UnassignedStates);
            this.SyncStates();
        }

        /// <summary>
        /// Handles the Click event of the Close control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void Close_Click(object sender, RoutedEventArgs e)
        {
            this.View.InitialiseLayout(this.View.ViewMap);
            ProjectDataHelper.RefreshView(this.ProjectData, this.View);
            CommandLibrary.CloseDialog.Execute(this, Application.Current.MainWindow);
        }

        /// <summary>
        /// Handles the SelectionChanged event of the ParentType control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Controls.SelectionChangedEventArgs"/> instance containing the event data.</param>
        private void ParentType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var parentTypeName = this.ParentType.SelectedValue as string;
            if (parentTypeName == null || this.appliedparentType.Equals(parentTypeName))
            {
                return;
            }

            this.View.ViewMap.ParentStates.Clear();

            foreach (var state in this.ProjectData.ItemTypes[parentTypeName].States)
            {
                var isSelected = !state.Equals("Deleted");
                this.View.ViewMap.ParentStates.Add(new SelectedValue { IsSelected = isSelected, Value = state });
            }

            this.appliedparentType = parentTypeName;
        }

        /// <summary>
        /// Handles the SelectionChanged event of the ChildType control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Controls.SelectionChangedEventArgs"/> instance containing the event data.</param>
        private void ChildType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var childTypeName = this.ChildType.SelectedValue as string;
            if (childTypeName == null || this.appliedChildType.Equals(childTypeName))
            {
                return;
            }

            this.View.ViewMap.SwimLaneStates.Clear();
            this.View.ViewMap.BucketStates.Clear();

            foreach (var state in this.ProjectData.ItemTypes[childTypeName].States)
            {
                if (state.Equals("Deleted"))
                {
                    this.View.ViewMap.BucketStates.Add(state);
                }
                else
                {
                    this.View.ViewMap.SwimLaneStates.Add(state);
                }
            }

            this.SetupChildStates();
        }

        /// <summary>
        /// Handles the Click event of the Delete control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            CommandLibrary.DeleteView.Execute(this.View, Application.Current.MainWindow);

            if (!this.ProjectData.Views.Contains(this.View))
            {
                CommandLibrary.CloseDialog.Execute(this, Application.Current.MainWindow);
            }
        }
    }
}


text:
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>hadoop-yarn-server</artifactId>
    <groupId>org.apache.hadoop</groupId>
    <version>2.4.1</version>
  </parent>
  <groupId>org.apache.hadoop</groupId>
  <artifactId>hadoop-yarn-server-tests</artifactId>
  <version>2.4.1</version>
  <name>hadoop-yarn-server-tests</name>

  <properties>
    <!-- Needed for generating FindBugs warnings using parent pom -->
    <yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>
  </properties>

  <dependencies>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-el</groupId>
          <artifactId>commons-el</artifactId>
        </exclusion>
        <exclusion>
          <groupId>tomcat</groupId>
          <artifactId>jasper-runtime</artifactId>
        </exclusion>
        <exclusion>
          <groupId>tomcat</groupId>
          <artifactId>jasper-compiler</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jsp-2.1-jetty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-common</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-server-common</artifactId>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-server-nodemanager</artifactId>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-minikdc</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-common</artifactId>
    </dependency>
    <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-yarn-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <excludes>
                <exclude>**/core-site.xml</exclude>
              </excludes>
            </configuration>
            <phase>test-compile</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
module Hbc::Artifact; end

require 'hbc/artifact/base'
require 'hbc/artifact/uninstall_base'
require 'hbc/artifact/symlinked'
require 'hbc/artifact/hardlinked'
require 'hbc/artifact/moved'

require 'hbc/artifact/app'
require 'hbc/artifact/artifact'        # generic 'artifact' stanza
require 'hbc/artifact/binary'
require 'hbc/artifact/colorpicker'
require 'hbc/artifact/font'
require 'hbc/artifact/input_method'
require 'hbc/artifact/installer'
require 'hbc/artifact/internet_plugin'
require 'hbc/artifact/audio_unit_plugin'
require 'hbc/artifact/vst_plugin'
require 'hbc/artifact/vst3_plugin'
require 'hbc/artifact/nested_container'
require 'hbc/artifact/pkg'
require 'hbc/artifact/postflight_block'
require 'hbc/artifact/preflight_block'
require 'hbc/artifact/prefpane'
require 'hbc/artifact/qlplugin'
require 'hbc/artifact/screen_saver'
require 'hbc/artifact/service'
require 'hbc/artifact/stage_only'
require 'hbc/artifact/suite'
require 'hbc/artifact/uninstall'
require 'hbc/artifact/zap'

module Hbc::Artifact
  #
  # NOTE: order is important here, since we want to extract nested containers
  #       before we handle any other artifacts
  #
  def self.artifacts
    [
      Hbc::Artifact::PreflightBlock,
      Hbc::Artifact::NestedContainer,
      Hbc::Artifact::Installer,
      Hbc::Artifact::App,
      Hbc::Artifact::Suite,
      Hbc::Artifact::Artifact,         # generic 'artifact' stanza
      Hbc::Artifact::Colorpicker,
      Hbc::Artifact::Pkg,
      Hbc::Artifact::Prefpane,
      Hbc::Artifact::Qlplugin,
      Hbc::Artifact::Font,
      Hbc::Artifact::Service,
      Hbc::Artifact::StageOnly,
      Hbc::Artifact::Binary,
      Hbc::Artifact::InputMethod,
      Hbc::Artifact::InternetPlugin,
      Hbc::Artifact::AudioUnitPlugin,
      Hbc::Artifact::VstPlugin,
      Hbc::Artifact::Vst3Plugin,
      Hbc::Artifact::ScreenSaver,
      Hbc::Artifact::Uninstall,
      Hbc::Artifact::PostflightBlock,
      Hbc::Artifact::Zap,
    ]
  end

  def self.for_cask(cask)
    odebug "Determining which artifacts are present in Cask #{cask}"
    artifacts.select do |artifact|
      odebug "Checking for artifact class #{artifact}"
      artifact.me?(cask)
    end
  end
end


text:
var global = require('../internals/global');
var isCallable = require('../internals/is-callable');

var String = global.String;
var TypeError = global.TypeError;

module.exports = function (argument) {
  if (typeof argument == 'object' || isCallable(argument)) return argument;
  throw TypeError("Can't set " + String(argument) + ' as a prototype');
};


text:
"""
python modules for beamline matching utilities:
    matchwizard: main GUI framework for beamline matching

Author: Tong Zhang
Created: Sep. 23rd, 2015
"""

import wx
import time

from . import funutils
from . import pltutils

import beamline
import os

class MatchWizard(wx.Frame):
    def __init__(self, parent, config = 'config.xml', size = (1000, 750), appversion = '1.0', **kwargs):
        super(self.__class__, self).__init__(parent = parent, size = size, id = wx.ID_ANY, **kwargs) #style = wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX)
        self.parent = parent
        self.appversion = appversion

        self.Bind(wx.EVT_CLOSE, self.onExit)

        # initialize UI
        self.initUI()

        # timer
        self.timernow = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.onTickTime, self.timernow)
        self.timernow.Start(1000)

    def onTickTime(self, event):
        fmt='%Y-%m-%d %H:%M:%S %Z'
        self.timenow_st.SetLabel(time.strftime(fmt, time.localtime()))

    def initUI(self):
        self.preInit()
        self.createMenubar()
        self.createStatusbar()
        self.createPanel()
        self.postInit()

    def createMenubar(self):
        self.menubar = wx.MenuBar()

        ## File menu
        fileMenu = wx.Menu()
        openItem = fileMenu.Append(wx.ID_OPEN, '&Open file\tCtrl+O', 'Open file to view')
        saveItem = fileMenu.Append(wx.ID_SAVE, '&Save\tCtrl+S',      'Save')
        fileMenu.AppendSeparator()
        exitItem = fileMenu.Append(wx.ID_EXIT, 'E&xit\tCtrl+W', 'Exit application')
        self.Bind(wx.EVT_MENU, self.onOpen, id = openItem.GetId())
        self.Bind(wx.EVT_MENU, self.onSave, id = saveItem.GetId())
        self.Bind(wx.EVT_MENU, self.onExit, id = exitItem.GetId())

        ## Configurations menu
        configMenu = wx.Menu()
        loadConfigItem = configMenu.Append(wx.ID_ANY, 'Load from file\tCtrl+Shift+L', 'Loading configurations from file')
        saveConfigItem = configMenu.Append(wx.ID_ANY, 'Save to file\tCtrl+Shift+S',   'Saving configurations to file')
        appsConfigItem = configMenu.Append(wx.ID_ANY, 'Preferences\tCtrl+Shift+I',    'Preferences for application')
        self.Bind(wx.EVT_MENU, self.onConfigLoad, id = loadConfigItem.GetId())
        self.Bind(wx.EVT_MENU, self.onConfigSave, id = saveConfigItem.GetId())
        self.Bind(wx.EVT_MENU, self.onConfigApps, id = appsConfigItem.GetId())

        ## Help menu
        helpMenu = wx.Menu()
        aboutItem = helpMenu.Append(wx.ID_ABOUT, '&About\tF1', 'Show about information')
        self.Bind(wx.EVT_MENU, self.onAbout, id = wx.ID_ABOUT)

        ## make menu
        self.menubar.Append(fileMenu,   '&File')
        self.menubar.Append(configMenu, '&Configurations')
        self.menubar.Append(helpMenu,   '&Help')

        ## set menu
        self.SetMenuBar(self.menubar)

        self.Bind(wx.EVT_MENU_HIGHLIGHT, self.onMenuHL)

    def onMenuHL(self, event):
        try:
            hltext = event.GetEventObject().GetHelpString(event.GetMenuId())
            self.statusbar.appinfo.SetLabel(hltext)
        except:
            pass

    def onAbout(self, event):
        try:
            from wx.lib.wordwrap import wordwrap
        except:
            dial = wx.MessageDialog(self, message = u"Cannot show about information, sorry!",
                    caption = u"Unknow Error",
                    style = wx.OK | wx.CANCEL | wx.ICON_ERROR | wx.CENTRE)
            if dial.ShowModal() == wx.ID_OK:
                dial.Destroy()
        info = wx.AboutDialogInfo()
        info.Name = "MatchWizard"
        info.Version = self.appversion
        info.Copyright = "(C) 2014-2015 Tong Zhang, SINAP, CAS"
        info.Description = wordwrap(
            "This application is created for beamline matching.\n"

            "It is designed by Python language, using GUI module of wxPython.",
            350, wx.ClientDC(self))
        info.WebSite = ("", "Cornalyzer home page") # fill it when webpage is ready
        info.Developers = [ "Tong Zhang <zhangtong@sinap.ac.cn>"]
        licenseText = "MatchWizard is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\n" + "\nMatchWizard is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" + "\nYou should have received a copy of the GNU General Public License along with MatchWizard; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))
        wx.AboutBox(info)

    def postInit(self):
        self.matchsec_udn_flag_cb.SetValue(False)
        self.matchsec_udn_tc.Disable()
        self.matchsec_udn_btn.Disable()
        self.matchsec1_rb.Enable()
        self.matchsec2_rb.Enable()
        self.matchsec3_rb.Enable()
        self.matchsec4_rb.Enable()

    def onConfigLoad(self, event):
        pass

    def onConfigSave(self, event):
        pass

    def onConfigApps(self, event):
        pass

    def onOpen(self, event):
        pass

    def onSave(self, event):
        pass

    def onExit(self, event):
        self.exitApp()

    def exitApp(self):
        dial = wx.MessageDialog(self, message = "Are you sure to exit this application?",
                                caption = 'Exit Warning',
                                style = wx.YES_NO | wx.NO_DEFAULT | wx.CENTRE | wx.ICON_QUESTION)
        if dial.ShowModal() == wx.ID_YES:
            self.Destroy()

    def createStatusbar(self):
        self.statusbar = funutils.ESB.EnhancedStatusBar(self)
        self.statusbar.SetFieldsCount(3)
        self.SetStatusBar(self.statusbar)
        self.statusbar.SetStatusWidths([-7,-2,-1])
        self.statusbar.appinfo = wx.StaticText(self.statusbar, id = wx.ID_ANY, label = u"MatchWizard powered by Python")
        self.timenow_st        = wx.StaticText(self.statusbar, id = wx.ID_ANY, label = u"2015-06-05 14:00:00 CST")
        appversion             = wx.StaticText(self.statusbar, id = wx.ID_ANY, label = u" (Version: " + self.appversion + ")")
        self.statusbar.AddWidget(self.statusbar.appinfo, funutils.ESB.ESB_ALIGN_LEFT )
        self.statusbar.AddWidget(self.timenow_st,        funutils.ESB.ESB_ALIGN_RIGHT)
        self.statusbar.AddWidget(appversion,             funutils.ESB.ESB_ALIGN_RIGHT)

    def preInit(self):
        self.fontsize_button     = 12
        self.fontsize_statictext = 12
        self.fontsize_staticbox  = 10
        self.fontsize_textctrl   = 12
        self.backcolor_panel     = '#DDDDDD'
        self.fontcolor_staticbox = '#4B4B4B'
        self.bordersize          = 12

        # beamline filenames
        self.latticefile = './lattice/testbl.list'

    def createPanel(self):
        # make background panel
        self.panel = funutils.createwxPanel(self, funutils.hex2rgb('#B1B1B1'))

        # vertical box sizer for holding panel_u and panel_d
        topbox    = wx.BoxSizer(wx.VERTICAL)
        bottombox = wx.BoxSizer(wx.VERTICAL)

        # top and bottom panels
        self.panel_u = funutils.createwxPanel(self.panel, funutils.hex2rgb(self.backcolor_panel))
        self.panel_d = funutils.createwxPanel(self.panel, funutils.hex2rgb(self.backcolor_panel))

        # hbox in top panel
        latvispanel_sb      = funutils.createwxStaticBox(self.panel_u, label = 'Lattice Visualization', fontcolor=funutils.hex2rgb(self.fontcolor_staticbox), fontsize = self.fontsize_staticbox)
        latvispanel_sbsizer = wx.StaticBoxSizer(latvispanel_sb, wx.HORIZONTAL)

        # up left
        # choose matching section
        self.matchsec1_rb = wx.RadioButton(self.panel_u, label = 'Beamline #1', style = wx.RB_GROUP)
        self.matchsec2_rb = wx.RadioButton(self.panel_u, label = 'Beamline #2')
        self.matchsec3_rb = wx.RadioButton(self.panel_u, label = 'Beamline #3')
        self.matchsec4_rb = wx.RadioButton(self.panel_u, label = 'Beamline #4')
        self.matchsec_udn_flag_cb = wx.CheckBox(self.panel_u, label = 'User defined')
        self.matchsec_udn_tc      = wx.TextCtrl(self.panel_u, value = '', style = wx.TE_READONLY)
        self.matchsec_udn_btn     = wx.Button(self.panel_u, label = 'Browse')

        matchsec_udn_hbox = wx.BoxSizer(wx.HORIZONTAL)
        matchsec_udn_hbox.Add(self.matchsec_udn_tc, 1, wx.ALIGN_CENTER_VERTICAL, 10)
        matchsec_udn_hbox.Add(self.matchsec_udn_btn, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 10)

        matchbl_sb = funutils.createwxStaticBox(self.panel_u, label = 'Choose Beamline', fontcolor=funutils.hex2rgb(self.fontcolor_staticbox), fontsize = self.fontsize_staticbox*0.8)
        matchbl_sbsizer = wx.StaticBoxSizer(matchbl_sb, wx.VERTICAL)
        matchbl_sbsizer.Add(self.matchsec1_rb, proportion = 0, flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.ALIGN_LEFT, border = 10)
        matchbl_sbsizer.Add(self.matchsec2_rb, proportion = 0, flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.ALIGN_LEFT, border = 10)
        matchbl_sbsizer.Add(self.matchsec3_rb, proportion = 0, flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.ALIGN_LEFT, border = 10)
        matchbl_sbsizer.Add(self.matchsec4_rb, proportion = 0, flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.ALIGN_LEFT, border = 10)
        matchbl_sbsizer.Add(self.matchsec_udn_flag_cb, proportion = 0, flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.ALIGN_LEFT, border = 10)
        matchbl_sbsizer.Add(matchsec_udn_hbox, proportion = 0, flag = wx.EXPAND | wx.TOP | wx.LEFT | wx.ALIGN_LEFT, border = 10)

        # up right
        self.blvizpanel = LatVisPanel(self.panel_u, figsize=(5, 3), dpi = 80, bgcolor = funutils.hex2rgb(self.backcolor_panel))

        # set sizer for panel_u
        latvispanel_sbsizer.Add(matchbl_sbsizer, proportion = 1, flag = wx.EXPAND | wx.ALL, border = 10)
        latvispanel_sbsizer.Add(self.blvizpanel, proportion = 3, flag = wx.EXPAND | wx.TOP | wx.BOTTOM | wx.RIGHT, border = 10)

        sizer_u = wx.BoxSizer(wx.VERTICAL)
        sizer_u.Add(latvispanel_sbsizer, proportion = 1, flag = wx.EXPAND | wx.ALL, border = self.bordersize)
        self.panel_u.SetSizerAndFit(sizer_u)
        topbox.Add(self.panel_u, proportion = 1, flag = wx.EXPAND)

        #--------------------------------------------------------------------------------------------#

        # hbox in bottom panel
        matchpanel_sb      = funutils.createwxStaticBox(self.panel_d, label = 'Matching Operation', fontcolor=funutils.hex2rgb(self.fontcolor_staticbox), fontsize = self.fontsize_staticbox)
        matchpanel_sbsizer = wx.StaticBoxSizer(matchpanel_sb, wx.HORIZONTAL)

        # to be implemented
        test_statictext = funutils.MyStaticText(self.panel_d, label = 'TO BE IMPLEMENTED...', fontsize = 30, fontcolor = 'grey')
        matchpanel_sbsizer.Add(test_statictext, flag = wx.ALIGN_CENTER | wx.ALL, border = 30)

        # set sizer for panel_d
        sizer_d = wx.BoxSizer(wx.VERTICAL)
        sizer_d.Add(matchpanel_sbsizer, proportion = 1, flag = wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT, border = self.bordersize)
        self.panel_d.SetSizerAndFit(sizer_d)
        bottombox.Add(self.panel_d, proportion = 1, flag = wx.EXPAND)

        # set sizer
        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(topbox,    proportion = 2, flag = wx.EXPAND | wx.ALL)
        vbox.Add(bottombox, proportion = 3, flag = wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT)
        self.panel.SetSizer(vbox)
        osizer = wx.BoxSizer(wx.HORIZONTAL)
        osizer.SetMinSize((1000, 750))
        osizer.Add(self.panel, proportion = 1, flag = wx.EXPAND)
        self.SetSizerAndFit(osizer)

        # event bindings
        self.Bind(wx.EVT_CHECKBOX,    self.onCheckUserDefinedBL, self.matchsec_udn_flag_cb)
        self.Bind(wx.EVT_BUTTON,      self.onChooseBL,           self.matchsec_udn_btn    )
        self.Bind(wx.EVT_RADIOBUTTON, self.onVisLattice)

    def onVisLattice(self, event):
        rblabel = event.GetEventObject().GetLabel()

        if rblabel == 'Beamline #1':
            bllist = beamline.blparser.madParser(self.latticefile, 'BL1')
            vistitle = 'Lattice #1'
        elif rblabel == 'Beamline #2':
            bllist = beamline.blparser.madParser(self.latticefile, 'BL2')
            vistitle = 'Lattice #2'
        elif rblabel == 'Beamline #3':
            bllist = beamline.blparser.madParser(self.latticefile, 'BL3')
            vistitle = 'Lattice #3'
        elif rblabel == 'Beamline #4':
            bllist = beamline.blparser.madParser(self.latticefile, 'BL4')
            vistitle = 'Lattice #4'

        blpatchlist, xlim, ylim = beamline.makeBeamline(bllist, startpoint = (5, 5))

        self.blvizpanel.blpatchlist = blpatchlist
        self.blvizpanel.xranges = xlim
        self.blvizpanel.yranges = ylim
        self.blvizpanel.clear()
        self.blvizpanel.visBeamline()
        self.blvizpanel.axes.set_title(vistitle)
        self.blvizpanel.refresh()

    def onCheckUserDefinedBL(self, event):
        if event.GetEventObject().IsChecked():
            self.matchsec_udn_btn.Enable()
            self.matchsec_udn_tc.Enable()
            self.matchsec1_rb.Disable()
            self.matchsec2_rb.Disable()
            self.matchsec3_rb.Disable()
            self.matchsec4_rb.Disable()
        else:
            self.matchsec_udn_tc.Disable()
            self.matchsec_udn_btn.Disable()
            self.matchsec1_rb.Enable()
            self.matchsec2_rb.Enable()
            self.matchsec3_rb.Enable()
            self.matchsec4_rb.Enable()

    def onChooseBL(self, event):
        try:
            latfile = funutils.getFileToLoad(self, ext = '*', flag = 'single')
            self.matchsec_udn_tc.SetValue(latfile)

            bllist = beamline.blparser.madParser(latfile, 'BL')
            vistitle = os.path.basename(latfile)

            blpatchlist, xlim, ylim = beamline.makeBeamline(bllist, startpoint = (5, 5))

            self.blvizpanel.blpatchlist = blpatchlist
            self.blvizpanel.xranges = xlim
            self.blvizpanel.yranges = ylim
            self.blvizpanel.clear()
            self.blvizpanel.visBeamline()
            self.blvizpanel.axes.set_title(vistitle)
            self.blvizpanel.refresh()
        except:
            pass

class LatVisPanel(pltutils.ImagePanelxy):
    def __init__(self, parent, figsize, dpi, bgcolor, **kwargs):
        pltutils.ImagePanelxy.__init__(self, parent, figsize, dpi, bgcolor, **kwargs)

    def clear(self):
        self.figure.clear()

    def refresh(self):
        self.figure.canvas.draw_idle()

    def visBeamline(self, zoomfac = 1.5):
        # define self.blpatchlist first
        # and xranges = (xmin, xmax), yranges = (ymin, ymax) if set x, y ranges
        self.axes = self.figure.add_subplot(111)
        for ins in self.blpatchlist:
            [self.axes.add_patch(inspatch) for inspatch in ins.patch]

        x1, x2 = self.xranges
        y1, y2 = self.yranges
        minx = 0.5 * (x2 + x1) - 0.5 * zoomfac * (x2 - x1)
        maxx = 0.5 * (x2 + x1) + 0.5 * zoomfac * (x2 - x1)
        miny = 0.5 * (y2 + y1) - 0.5 * zoomfac * (y2 - y1)
        maxy = 0.5 * (y2 + y1) + 0.5 * zoomfac * (y2 - y1)
        self.axes.set_xlim([minx, maxx])
        self.axes.set_ylim([miny, maxy])

        self.figure.canvas.draw()


text:
<?php

namespace Ds\Component\Encryption;

use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
 * Class DsEncryptionBundle
 *
 * @package Ds\Component\Encryption
 */
final class DsEncryptionBundle extends Bundle
{
}


text:
import _ from 'lodash';
import { degToRad } from 'utils/math';

class Group {
    constructor(definition) {
        this.definition = definition;
        this.name = this.definition.name;
        this.scene = this.definition.scene;
        this._position = this.definition.position;
        this._layer = this.definition.layer || 'default';
        this._events = this.definition.events || {};
        this.actors = {};
        this.actorList = [];
    }

    get path() {
        return `/${ this.definition.name }`;
    }

    _generateBBoxes() {
        let bboxForType = (bboxType) => {
            let minX = Infinity,
                maxX = -Infinity,
                minY = Infinity,
                maxY = -Infinity,
                bbox = {};

            this.actorList.forEach((actorObject) => {
                let childBBox = actorObject[bboxType];

                if (childBBox.x < minX) {
                    minX = childBBox.x;
                }

                if (childBBox.x2 > maxX) {
                    maxX = childBBox.x2;
                }

                if (childBBox.y < minY) {
                    minY = childBBox.y;
                }

                if (childBBox.y2 > maxY) {
                    maxY = childBBox.y2;
                }
            });

            bbox = {
                x: minX,
                y: minY,
                x2: maxX,
                y2: maxY,
                width: maxX - minX,
                height: maxY - minY
            };

            return bbox;
        }

        this._aaBBox = bboxForType('axisAlignedBBox');
        this._originBBox = bboxForType('originBBox');
        this._bbox = bboxForType('bbox');
    }

    get originBBox() {
        if (!this._originBBox || !this._bbox) {
            this._generateBBoxes()
        }

        return this._originBBox;
    }

    get axisAlignedBBox() {
        if (!this._aaBBox || !this._bbox) {
            this._generateBBoxes();
        }

        return this._aaBBox;
    }

    get bbox() {
        if (!this._aaBBox || !this._bbox || !this._originBBox) {
            this._generateBBoxes();
        }

        return this._bbox;
    }

    get position() {
        return {
            x: this.definition.position.x,
            y: this.definition.position.y,
            z: this.scene.getLayerValue(this.definition.layer)
        };
    }

    get angle() {
        return this.definition.angle;
    }

    get layer() {
        return this.definition.layer || 'default';
    }

    get interactive() {
        return this.definition.interactive == undefined ? true : this.definition.interactive;
    }

    addActor(actor) {
        actor = _.cloneDeep(actor);

        this.definition.actors.push(actor);
        actor.group = this.definition;
        actor.scene = this.scene;

        this.scene.pushChange({
            type: 'group',
            action: 'insertActor',
            group: this,
            actor,
        });
    }

    removeActor(actorName) {
        let actor = _.find(this.definition.actors, { name: actorName });
        this.definition.actors = _.without(this.definition.actors, actor);

        this.scene.pushChange({
            type: 'group',
            action: 'removeActor',
            group: this,
            actor,
        });
    }

    addActorObject(actor) {
        this.actors[actor.name] = actor;
        this.actorList.push(actor);
        this._bbox = undefined;
    }

    removeActorObject(actor) {
        delete this.actors[actor.name];
        this.actorList = _.without(this.actorList, actor);
        this._bbox = undefined;
    }

    updateShapes(shapeName, properties) {
        this.actorList.forEach((actor) => {
            actor.set(shapeName, properties);
        });
    }

    updateShapeProps(props) {
        this.actorList.forEach((actor) => {
            actor.setShapeProps(props);
        });
    }

    translate(position) {
        this._bbox = undefined;

        console.log({
            x: position.x + this.position.x,
            y: position.y + this.position.y,
        })

        this.scene.pushChange({
            type: 'group',
            group: this,
            data: {
                position: {
                    x: position.x + this.position.x,
                    y: position.y + this.position.y,
                }
            }
        });
    }

    moveTo(position) {
        this._bbox = undefined;

        this.scene.pushChange({
            type: 'group',
            group: this,
            action: 'update',
            data: {
                position: {
                    x: position.x,
                    y: position.y,
                }
            }
        });
    }

    rotate(angle) {
        angle *= -1;
        let angleRad = degToRad(angle);

        this._bbox = undefined;

        this.scene.pushChange({
            type: 'group',
            group: this,
            action: 'update',
            data: {
                angle,
                angleRad,
                angleCos: Math.cos(angleRad),
                angleSin: Math.sin(angleRad)
            }
        });
    }

    changeLayer(layer) {
        if (layer === this.layer) {
            return;
        }

        this.scene.pushChange({
            type: 'group',
            group: this,
            action: 'changeLayer',
            data: {
                layer
            }
        });
    }

    toTop() {
        this.scene.pushChange({
            type: 'group',
            group: this,
            action: 'toTop',
            data: {}
        });
    }

    destroy() {
        this.scene.pushChange({
            type: 'group',
            group: this,
            action: 'destroy'
        });
    }

    trigger(e, data, triggerActors=false) {
        if (e in this._events) {
            this._events[e](this, data);
        }

        if (triggerActors) {
            this.actorList.forEach((actorObject) => {
                actorObject.trigger(e, data);
            });
        }
    }
}

export default Group;


text:
require 'spec_helper'

# Problem is that the orders list format has changed. Now shows both "civil opinions" and "civil orders",
# as well as "criminal opinions" and "criminal orders".  Change was noted on 6-8-2013.

describe "Tames format has evolved by June 2013" do

  describe "New example of a Third Court page" do

		before(:all) do
			@coa = "03"
			@date = "2013-06-07".to_date
			VCR.use_cassette "tames/#{@coa}-#{@date.to_s}" do
				@doc = CoaOpScraper.retrieve_list_for_coa_for_date(@coa,@date)
			end
			@data_array = CoaOpScraper::Tames.parse_opinion_list(@doc,@coa)
		end

		it "should retrieve something" do
			@doc.should_not be_nil
		end

		it "should retrieve right number of items" do
			@data_array.count.should eq(12)
		end

		it "should see entry for dno" do
		dno = "03-12-00504-CV"
			@data_array.select { |x| x[:docket_no] == dno }.count.should_not eq(0)
		end

    # problem: this is an order, not an opinion -> Q/ fit into project
		it "should see entry for dno" do
			dno = "03-13-00290-CV"
			@data_array.select { |x| x[:docket_no] == dno }.count.should_not eq(0)
      @data_array.select { |x| x[:docket_no] == dno }.first[:disposition].should eq("ordered")
		end

    # this is a criminal case, down an extra set of boxes now because of civil orders
		it "should see entry for dno" do
			dno = "03-13-00353-CR"
			@data_array.select { |x| x[:docket_no] == dno }.count.should_not eq(0)
		end

    # missing PDF here for the opinion, as of the next day
    # this is a problem at the court level, which should be flagged
		it "should see entry for dno - which has now does have a published PDF" do
			dno = "03-12-00546-CV"
			@data_array.select { |x| x[:docket_no] == dno }.count.should_not eq(0)
			@data_array.select { |x| x[:docket_no] == dno }.first[:opinion_urls].should_not be_empty
		end

		it "should see full data for 03-12-00843-CV" do
			dno = "03-12-00843-CV"
			targets = @data_array.select { |x| x[:docket_no] == dno }
			targets.count.should eq(1)
			target = targets.first
			target[:author_string].should match(/Justice Jones/)
			target[:panel_string].should match(/Justice Jones/)
			target[:panel_string].should match(/Justice Goodwin/)
			target[:panel_string].should match(/Justice Field/)
			target[:origin].should eq("Appeal from County Court at Law No. 1 of Travis County")
			target[:case_style].should eq("AZ & Associates, L.P. d/b/a Red Robin v. Amstar Engineering, Inc.")
			target[:disposition].downcase.should eq("dismissed on appellant's motion")
			target[:docket_page_url].should eq("Case.aspx?cn=#{dno}")
			target[:opinion_urls].should_not be_empty
			target[:opinion_urls].count.should eq(1)
			target[:opinion_urls]["pdf"].should eq("SearchMedia.aspx?MediaVersionID=0c05922e-d8ec-4483-a616-bf9a3f5c2cfb&MediaID=90bceb92-7e39-4425-a4fa-04f9a8ab0cf5&coa=coa03&DT=Opinion")
		end

	end

end