text:
package com.wut.resources.payments;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import com.braintreegateway.BraintreeGateway;
import com.braintreegateway.Customer;
import com.braintreegateway.CustomerRequest;
import com.braintreegateway.Environment;
import com.braintreegateway.ResourceCollection;
import com.braintreegateway.Result;
import com.braintreegateway.Transaction;
import com.braintreegateway.TransactionRequest;
import com.braintreegateway.TransactionSearchRequest;
import com.braintreegateway.ValidationError;
import com.wut.model.list.ListData;
import com.wut.model.map.TransactionData;
import com.wut.model.map.TransactionData.STATUS;
import com.wut.model.message.PaymentResponseData;
import com.wut.model.scalar.DateData;
import com.wut.model.scalar.StringData;
import com.wut.provider.creditcard.PaymentProvider;
import com.wut.support.logging.WutLogger;

// TODO this is actual a DataSource
// TODO call this BrainTreeSource
public class BraintreeProvider implements PaymentProvider {

//	private String privateKey;
//	private String publicKey;
//	private String merchantId;
	private BraintreeGateway gateway;
	private static WutLogger logger = WutLogger.create(BraintreeProvider.class);

	public BraintreeProvider(String merchantId, String publicKey,
			String privateKey) {
		this.gateway = new BraintreeGateway(Environment.PRODUCTION, merchantId,
				publicKey, privateKey);
	}

	public Map<String, String> readFromSource(String transactionId) {
		Transaction transaction = gateway.transaction().find(transactionId);
		Map<String, String> transactionMap = convertTransactionToMap(transaction);
		return transactionMap;
	}

	private static STATUS getStatusFromString(String statusStr) {
		STATUS status;
		if (statusStr.equalsIgnoreCase("AUTHORIZED")) {
			status = TransactionData.STATUS.authorized;
		} else if (statusStr.equalsIgnoreCase("SETTLED")) {
			status = TransactionData.STATUS.settled;
		} else if (statusStr.equalsIgnoreCase("VOIDED")) {
			status = TransactionData.STATUS.voided;
		} else if (statusStr.equalsIgnoreCase("PROCESSOR_DECLINED")) {
			status = TransactionData.STATUS.declined;
		} else if (statusStr.equalsIgnoreCase("AUTHORIZATION_EXPIRED")) {
			status = TransactionData.STATUS.expired;
		} else if (statusStr.equalsIgnoreCase("GATEWAY_REJECTED")) {
			status = TransactionData.STATUS.declined;
		} else {
			status = TransactionData.STATUS.error;
		}
		return status;
	}

	@Override
	public TransactionData read(String id) {
		Map<String, String> transactionMap = readFromSource(id);
		//TransactionData transactionData = TransactionData.convert(transactionMap);

		String transactionId = transactionMap.get("id");
		String created = transactionMap.get("created");
		String firstName = transactionMap.get("firstName");
		String lastName = transactionMap.get("lastName");
		String amount = transactionMap.get("amount");
		String currency = transactionMap.get("currency");
		String statusStr = transactionMap.get("status");
		STATUS status = getStatusFromString(statusStr);
		String order = transactionMap.get("order");

		TransactionData transactionData = new TransactionData(transactionId, created, firstName, lastName, amount, currency, status, order);

		return transactionData;
	}

	private void addToMap(Map<String, String> map, String key, String value) {
		if (value != null) {
			map.put(key, value);
		}
	}

	private Map<String, String> convertTransactionToMap(Transaction transaction) {
		TreeMap<String, String> transactionMap = new TreeMap<String, String>();

		addToMap(transactionMap, "status", transaction.getStatus().name());
		addToMap(transactionMap, "amount", transaction.getAmount().toString());
		addToMap(transactionMap, "order", transaction.getOrderId());
		addToMap(transactionMap, "id", transaction.getId());
//		if (transaction.getBillingAddress() != null) {
//			addToMap(transactionMap, "extendedAddress", transaction.getBillingAddress().getExtendedAddress());
//			addToMap(transactionMap, "city", transaction.getBillingAddress().getLocality());
//			addToMap(transactionMap, "zipCode", transaction.getBillingAddress().getPostalCode());
//			addToMap(transactionMap, "state", transaction.getBillingAddress().getRegion());
//			addToMap(transactionMap, "address", transaction.getBillingAddress().getStreetAddress());
//		}
		if (transaction.getType() != null) {
			addToMap(transactionMap, "type", transaction.getType().name());
		}

		if (transaction.getTaxAmount() != null) {
			addToMap(transactionMap, "tax", transaction.getTaxAmount().toString());
		}

		addToMap(transactionMap, "created", String.valueOf(transaction.getCreatedAt().getTimeInMillis()));

		if (transaction.getCustomer() != null) {
			addToMap(transactionMap, "firstName", transaction.getCustomer().getFirstName());
			addToMap(transactionMap, "lastName", transaction.getCustomer().getLastName());
		}
		return transactionMap;
	}

	private TransactionData convertTransactionToTransactionData(Transaction transaction) {
		String id = transaction.getId();

		String created = String.valueOf(transaction.getCreatedAt().getTimeInMillis());

		String firstName = null, lastName = null;
		if (transaction.getCustomer() != null) {
			firstName = transaction.getCustomer().getFirstName();
			lastName = transaction.getCustomer().getLastName();
		}

		String amount = transaction.getAmount().toString();

		String currency = "usd";

		String statusStr = transaction.getStatus().name();
		STATUS status = getStatusFromString(statusStr);

		String orderId = transaction.getOrderId();

		TransactionData tansactionData = new TransactionData(id,  created,  firstName,  lastName,  amount, currency,  status,  orderId);

		return tansactionData;
	}

	// TODO this goes inside a *Source (datasource) class
	// TODO a *Provider returns ListData<MappedData>
	public List<Map<String, String>> search(Date start, Date end, String firstName, String lastName, String orderId) {

		TransactionSearchRequest searchRequest = new TransactionSearchRequest();

		if (start != null) {
			//searchRequest = searchRequest.createdAt().greaterThanOrEqual(start);
		}
		if (end != null) {
			//searchRequest = searchRequest.createdAt().lessThanOrEqual(end);
		}
		if (firstName != null) {
			searchRequest = searchRequest.billingFirstName().is(firstName);
		}
		if (lastName != null) {
			searchRequest = searchRequest.billingLastName().is(lastName);
		}
		if (orderId != null) {
			searchRequest = searchRequest.orderId().is(orderId);
		}

		ResourceCollection<Transaction> collection = gateway.transaction().search(searchRequest);
		ArrayList<Map<String,String>> transactions = new ArrayList<Map<String,String>>();

		for (Transaction transaction : collection) {
			Map<String, String> transactionMap = convertTransactionToMap(transaction);
			transactions.add(transactionMap);
		}

		return transactions;

	}

	@Override
	public ListData search(DateData start, DateData end) {
		TransactionSearchRequest searchRequest = new TransactionSearchRequest();

		if (start != null) {
			//searchRequest.addRangeCriteria(arg0, arg1);
			//searchRequest = searchRequest.createdAt().greaterThanOrEqual(start);
		}
		if (end != null) {
			//searchRequest = searchRequest.createdAt().lessThanOrEqual(end);
		}

		ResourceCollection<Transaction> collection = gateway.transaction().search(searchRequest);
		ListData transactions = new ListData();

		for (Transaction transaction : collection) {
			TransactionData transactionData = convertTransactionToTransactionData(transaction);
			transactions.add(transactionData);
		}

		return transactions;
	}

	@Override
	public PaymentResponseData charge(String cardId, CURRENCY currency,
			BigDecimal amount, String orderId) {

		TransactionRequest request = new TransactionRequest()
	    .paymentMethodToken(cardId)
	    .amount(amount)
	    .creditCard()
	      .done();

		Result<Transaction> result = gateway.transaction().sale(request);

		return verifyTransaction(result);
	}

	@Override
	public PaymentResponseData charge(String firstName, String lastName,
			String cardNumber, String expirationMonth, String expirationYear,
			String streetAddress, String extendedAddress, String city,
			String state, String postalCode, COUNTRY country,
			CURRENCY currency, BigDecimal amount, String cvc, String orderId) {

		String expiration = expirationMonth + "/" + expirationYear;

		TransactionRequest request = new TransactionRequest()
				.amount(amount)
				.creditCard()
					.number(cardNumber)
					.expirationDate(expiration)
					.done()
				.options()
			        .submitForSettlement(true)
			        .done();

		// auto-settle
		// done().options().submitForSettlement(true).done();

		Result<Transaction> result = gateway.transaction().sale(request);

		return verifyTransaction(result);

//		TransactionRequest request = new TransactionRequest()
//	    .amount(new BigDecimal("10.00"))
//	    .orderId("order id")
//	    .merchantAccountId("a_merchant_account_id")
//	    .creditCard()
//	        .number("5105105105105100")
//	        .expirationDate("05/2012")
//	        .cardholderName("The Cardholder")
//	        .cvv("cvv")
//	        .done()
//	    .customer()
//	        .firstName("Drew")
//	        .lastName("Smith")
//	        .company("Braintree")
//	        .phone("312-555-1234")
//	        .fax("312-555-1235")
//	        .website("http://www.example.com")
//	        .email("drew@example.com")
//	        .done()
//	    .billingAddress()
//	        .firstName("Paul")
//	        .lastName("Smith")
//	        .company("Braintree")
//	        .streetAddress("1 E Main St")
//	        .extendedAddress("Suite 403")
//	        .locality("Chicago")
//	        .region("Illinois")
//	        .postalCode("60622")
//	        .countryCodeAlpha2("US")
//	        .done()
//	    .shippingAddress()
//	        .firstName("Jen")
//	        .lastName("Smith")
//	        .company("Braintree")
//	        .streetAddress("1 E 1st St")
//	        .extendedAddress("Suite 403")
//	        .locality("Bartlett")
//	        .region("Illinois")
//	        .postalCode("60103")
//	        .countryCodeAlpha2("US")
//	        .done()
//	    .options()
//	        .submitForSettlement(true)
//	        .done();
//
//	Result<Transaction> result = gateway.transaction().sale(request);
	}

	private PaymentResponseData verifyTransaction(Result<Transaction> result) {
		if (result.isSuccess()) {
			Transaction transaction = result.getTarget();
			System.out.println("Success!: " + transaction.getId());
			String transactionId = transaction.getId();
			return PaymentResponseData.success(transactionId);
		} else if (result.getTransaction() != null) {
			System.out.println("Message: " + result.getMessage());
			Transaction transaction = result.getTransaction();
			System.out.println("Error processing transaction:");
			System.out.println("  Status: " + transaction.getStatus());
			System.out.println("  Code: "
					+ transaction.getProcessorResponseCode());
			System.out.println("  Text: "
					+ transaction.getProcessorResponseText());
			return PaymentResponseData.GENERIC_FAILURE;
		} else {
			System.out.println("Message: " + result.getMessage());
			for (ValidationError error : result.getErrors()
					.getAllDeepValidationErrors()) {
				System.out.println("Attribute: " + error.getAttribute());
				System.out.println("  Code: " + error.getCode());
				System.out.println("  Message: " + error.getMessage());
			}
			return PaymentResponseData.CARD_DECLINED;
		}
	}

	@Override
	public boolean refund(String paymentId, BigDecimal amount) {
		Result<Transaction> result = gateway.transaction().refund(
				paymentId,
			    amount
			);
		return result.isSuccess();
	}

	@Override
	public boolean voidify(String paymentId) {
		Result<Transaction> result = gateway.transaction().voidTransaction(paymentId);
		if (result.isSuccess()) {
		    return true;
		} else {
		    for (ValidationError error : result.getErrors().getAllDeepValidationErrors()) {
		    	logger.debug(error.getMessage());
		    }
		    return false;
		}
	}

	@Override
	public boolean settle(String paymentId, BigDecimal amount) {
		Result<Transaction> result = gateway.transaction().submitForSettlement(
				paymentId, amount
			);
		return result.isSuccess();
	}

	@Override
	public boolean verify(String paymentId, BigDecimal amount) {
//		CreditCardRequest request = new CreditCardRequest();
//		request = request.cardholderName("John Doe");
//		request = request.cvv("123");
//		request = request.number("4111111111111111");
//		request = request.expirationDate("05/2012");
//		request = request.options().verifyCard(true).done();
//		//request = request.verificationMerchantAccountId("the_merchant_account_id").done();
//
//		Result<CreditCard> result = gateway.creditCard().create(request);
		return false;
	}

//	@Override
//	public String subscribe(String customerId, String firstName, String lastName,
//			String cardNumber, String expirationMonth, String expirationYear, String cvv,
//			String streetAddress, String extendedAddress, String city,
//			String state, String zipCode, COUNTRY country, BigDecimal amount, int billingDay) {
//
//		String paymentMethodId = store(customerId, firstName, lastName, cardNumber, expirationMonth, expirationYear, cvv, streetAddress, extendedAddress, city, state, zipCode, country);
//
//		SubscriptionRequest request = new SubscriptionRequest();
//		request = request.paymentMethodToken(paymentMethodId);
//		request = request.price(amount);
//		request = request.billingDayOfMonth(billingDay);
//
//		Result<Subscription> result = gateway.subscription().create(request);
//
//		String status = result.getTarget().getStatus().name();
//
//		Subscription subscription = result.getTarget();
//
//		Transaction transaction = subscription.getTransactions().get(0);
//
//		return subscription.getId();
//	}

	@Override
	public String store(String customerId, String firstName, String lastName, String cardNumber,
			String expirationMonth, String expirationYear, String cvv,
			String streetAddress, String extendedAddress, String city,
			String state, String zipCode, COUNTRY country
			) {

		CustomerRequest request = new CustomerRequest()
		.id(customerId)
	    .firstName(firstName)
	    .lastName(lastName)
	    .creditCard()
	        .cardholderName(firstName + " " + lastName)
	        .number(cardNumber)
	        .expirationDate(expirationMonth + "/" + expirationYear)
	        .cvv(cvv)
	        .billingAddress()
	            .streetAddress(streetAddress)
	            .extendedAddress(extendedAddress)
	            .locality(city)
	            .region(state)
	            .postalCode(zipCode)
	            .countryCodeAlpha2(country.name())
	            .done()
	        .done();

		Result<Customer> result = gateway.customer().create(request);

		if (!result.isSuccess()) {
			return null;
		}

		Customer customer = result.getTarget();

		if (!customer.getId().equals(customerId)) {
			return null;
		}

		String paymentMethodId = customer.getCreditCards().get(0).getToken();
		return paymentMethodId;

	}

	@Override
	public String store(StringData username, StringData firstName,
			StringData lastName, StringData cardNumber,
			StringData expirationMonth, StringData expirationYear,
			StringData cvv, StringData streetAddress,
			StringData extendedAddress, StringData city, StringData state,
			StringData zipCode, CURRENCY currency) {

		return store(String.valueOf(username), String.valueOf(firstName),
				String.valueOf(lastName), String.valueOf(cardNumber),
				String.valueOf(expirationMonth), String.valueOf(expirationYear),
				String.valueOf(cvv), String.valueOf(streetAddress),
				String.valueOf(extendedAddress), String.valueOf(city),
				String.valueOf(state), String.valueOf(zipCode),
				COUNTRY.US
				);

	}

}


text:
<?php $this->render("templates/header", array("title" => "goto:Admin")); ?>
<link rel="stylesheet" href="/assets/css/page_admin.css">

goto

redpajama_set_name: RedPajamaGithub


text:
/*
 * This is a wrapper class for the ControlsFX confirmation dialog
 * See the ControlsFX license file that is included in this project
 *
 */

package dialogs;

import javafx.concurrent.Task;
import org.controlsfx.dialog.Dialogs;

/**
 * Wrapper class for the JavaFX ShowProgressBar dialog by ControlsFX.
 *
 * This wrapper class makes it very easy to show one of the JavaFX
 * dialogs in only one line of code. This class depends on the presence
 * of JDK8 or higher and the ControlsFX library. The ControlsFX Library
 * is under licence so please check the license that is included in the
 * project or check the website at www.controlsfx.org
 *
 * @author Omar van Galen
 * @version 1.0
 */
public class ShowProgressBar {

    /**
     * Shows a ProgressBar dialog
     * @param worker The Task to perform should be passed in through a Task Object
     */
    public static void ShowProgressBar(Task<Object> worker) {
        Dialogs.create()
            .title("Progress")
            .masthead("Please wait whilst the install completes...")
            .message("Now Loading...")
            .showWorkerProgress(worker);
    }

}


text:
<?php

declare(strict_types=1);

namespace DiContainerBenchmarks\Fixture\C;

class FixtureC287
{
    public function __construct(FixtureC286 $dependency)
    {
    }
}


text:
from . import support

from selene.core.configuration import (
    Config as _CustomConfigForCustomBrowser,
)

Config = _CustomConfigForCustomBrowser

from selene.core.entity import (
    Browser as _CustomBrowser,
)

Browser = _CustomBrowser

"""
Given::

    from selenium.webdriver import Chrome

AND chromedriver executable available in $PATH

WHEN::

    from selene import Browser, Config

    browser = Browser(Config(
        driver=Chrome(),
        base_url='https://google.com',
        timeout=2))

AND (uncomment if needed)::

    # import atexit
    # atexit.register(browser.quit)

AND::

    browser.open('/ncr')

"""

from selene import managed

browser = managed.browser

from selene.support import by as _by_style_selectors  # noqa

by = _by_style_selectors
"""
AND::

    # browser.element('//*[@name="q"]')).type('selenium').press_enter()
    # OR...

    # browser.element('[name=q]')).type('selenium').press_enter()
    # OR...

    from selene import by

    # browser.element(by.name('q')).type('selenium').press_enter()
    # OR...for total readability

    query = browser.element(by.name('q'))  # actual search doesn't start here, the element is "lazy"
         # here the actual webelement is found
    query.type('selenium').press_enter()
                          # and here it's located again, i.e. the element is "dynamic"

"""

from selene.support.conditions import be as _be_style_conditions  # noqa

be = _be_style_conditions
"""
AND (in case we need to filter collection of items by some condition like visibility)::

    from selene import be

    results = browser.all('.srg .g').filtered_by(be.visible)
"""

from selene.support.conditions import have as _have_style_conditions  # noqa

have = _have_style_conditions
"""
THEN::
    from selene import have

    # results.should(have.size(10))
    # results.first.should(have.text('Selenium automates browsers'))
    # OR...

    results.should(have.size(10))\
        .first.should(have.text('Selenium automates browsers'))

FINALLY (if not registered "atexit" before)::

    browser.quit()
"""

####################
# Advanced Helpers #
####################

from selene.core import command as _advanced_commands  # noqa

command = _advanced_commands
"""
Sometimes you might need some extra actions on elements,
e.g. for workaround something through js::

    from selene import command

    browser.element('#not-in-view').perform(command.js.scroll_into_view)
"""

from selene.core import query as _advanced_queries  # noqa

query = _advanced_queries
# its = _advanced_queries  # todo: do we really need it too? for better readability: .get(its.text)
"""
Probably you think that will need something like::

    from selene import query

    product_text = browser.element('#to-assert-something-non-standard').get(query.text)
    price = my_int_from(product_text)
    assert price > 100

But usually it's either better to implement your custom condition::

    browser.element('#to-assert-something-non-standard').should(have_in_text_the_int_number_more_than(100))

Where the ``have_in_text_the_int_number_more_than`` is your defined custom condition.
Such condition-based alternative will be less fragile,
because python's assert does not have "implicit waiting",
like selene's should ;)

Furthermore, the good test is when you totally control your test data, and instead::

    product = browser.element('#to-remember-for-future')

    product_text_before = product.get(query.text)
    price_before = my_int_from(product_text_before)

    # ... do something

    product_text_after = product.get(query.text)
    price_after = my_int_from(product_text_after)

    assert price_after > price_before

Normally, better would be to refactor to something like::

    product = browser.element('#to-remember-for-future')

    product.should(have.text('100$'))

    # ... do something

    product.should(have.text('125$'))

You might think you need something like::

    from selene import query

    if browser.element('#i-might-say-yes-or-no').get(query.text) == 'yes':
        # do something...

Or::

    from selene import query

    if browser.all('.option').get(query.size) >= 2:
        # do something...

Maybe one day, you really find a use case:) But for above cases, probably easier would be::

    if browser.element('#i-might-say-yes-or-no').wait_until(have.text('yes'):
        # do something

    # ...

    if browser.all('.i-will-appear').wait_until(have.size_greater_than_or_equal(2)):
        # do something

Or, by using non-waiting versions, if "you are in a rush:)"::

    if browser.element('#i-might-say-yes-or-no').matching(have.text('yes'):
        # do something

    # ...

    if browser.all('.i-will-appear').matching(have.size_greater_than_or_equal(2)):
        # do something

"""

# """
# Just types...
# """
from selene.core.entity import Element, Collection  # noqa

__version__ = '2.0.0b14'


text:
import VTimePicker from './VTimePicker'
import VTimePickerClock from './VTimePickerClock'
import VTimePickerTitle from './VTimePickerTitle'

export { VTimePicker, VTimePickerClock, VTimePickerTitle }

export default {
  $_vuetify_subcomponents: {
    VTimePicker,
    VTimePickerClock,
    VTimePickerTitle
  }
}


text:
using Client.Commands.Contracts;
using Client.Core.Contracts;
using Client.Core.Factories;
using System.Collections.Generic;
using System.Linq;

namespace Client.Core.Providers
{
    public class CommandParser : ICommandParser
    {
        private ICommandFactory commandFactory;

        public CommandParser(ICommandFactory commandFactory)
        {
            this.commandFactory = commandFactory;
        }

        public ICommand ParseCommand(string fullCommand)
        {
            string commandName = fullCommand.Split(' ')[0];

            ICommand command = this.commandFactory.GetCommand(commandName);

            return command;
        }

        public IList<string> ParseParameters(string fullCommand)
        {
            var commandParts = fullCommand.Split(' ').ToList();
            commandParts.RemoveAt(0);

            if (commandParts.Count() == 0)
            {
                return new List<string>();
            }

            return commandParts;
        }
    }
}


text:
package io.github.jeddict.jpa.modeler.properties.order.column;

import javax.swing.JOptionPane;
import io.github.jeddict.jpa.spec.OrderColumn;
import org.netbeans.modeler.properties.embedded.GenericEmbeddedEditor;

public class OrderColumnPanel extends GenericEmbeddedEditor<OrderColumn> {

    private OrderColumn orderColumn;

    public OrderColumnPanel() {
    }

    @Override
    public void init() {
        initComponents();
        setLoaded();
    }

    @Override
    public void setValue(OrderColumn orderColumn) {
        this.orderColumn = orderColumn;
        name_TextField.setText(orderColumn.getName());
        columnDefinition_TextArea.setText(orderColumn.getColumnDefinition());
        nullable_CheckBox.setSelected(orderColumn.isNullable());
        insertable_CheckBox.setSelected(orderColumn.isInsertable());
        updatable_CheckBox.setSelected(orderColumn.isUpdatable());
    }

    @Override
    public OrderColumn getValue() {
        if (!validateField()) {
            throw new IllegalStateException();
        }
        orderColumn.setName(name_TextField.getText());
        orderColumn.setColumnDefinition(columnDefinition_TextArea.getText());
        orderColumn.setNullable(nullable_CheckBox.isSelected());
        orderColumn.setInsertable(insertable_CheckBox.isSelected());
        orderColumn.setUpdatable(updatable_CheckBox.isSelected());
        return orderColumn;
    }

      private boolean validateField() {
        if (this.name_TextField.getText().trim().length() <= 0 /*|| Pattern.compile("[^\\w-]").matcher(this.id_TextField.getText().trim()).find()*/) {
            JOptionPane.showMessageDialog(this, "Parameter column name can't be empty", "Invalid Value", javax.swing.JOptionPane.WARNING_MESSAGE);
            return false;
        }
        return true;
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        orderColumnPanel = new javax.swing.JLayeredPane();
        name_LayeredPane = new javax.swing.JLayeredPane();
        name_Label = new javax.swing.JLabel();
        name_TextField = new javax.swing.JTextField();
        columnDefinition_LayeredPane = new javax.swing.JLayeredPane();
        columnDefinition_Label = new javax.swing.JLabel();
        columnDefinition_ScrollPane = new javax.swing.JScrollPane();
        columnDefinition_TextArea = new javax.swing.JTextArea();
        layeredPane = new javax.swing.JLayeredPane();
        padding = new javax.swing.JLabel();
        nullable_CheckBox = new javax.swing.JCheckBox();
        updatable_CheckBox = new javax.swing.JCheckBox();
        insertable_CheckBox = new javax.swing.JCheckBox();

        orderColumnPanel.setPreferredSize(new java.awt.Dimension(570, 137));

        name_LayeredPane.setToolTipText(org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.name_LayeredPane.toolTipText")); // NOI18N
        name_LayeredPane.setPreferredSize(new java.awt.Dimension(170, 27));
        name_LayeredPane.setLayout(new java.awt.BorderLayout());

        org.openide.awt.Mnemonics.setLocalizedText(name_Label, org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.name_Label.text")); // NOI18N
        name_Label.setPreferredSize(new java.awt.Dimension(90, 14));
        name_LayeredPane.add(name_Label, java.awt.BorderLayout.WEST);

        name_TextField.setText(org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.name_TextField.text")); // NOI18N
        name_TextField.setToolTipText(org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.name_TextField.toolTipText")); // NOI18N
        name_LayeredPane.add(name_TextField, java.awt.BorderLayout.CENTER);

        columnDefinition_LayeredPane.setLayout(new java.awt.BorderLayout());

        org.openide.awt.Mnemonics.setLocalizedText(columnDefinition_Label, org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.columnDefinition_Label.text")); // NOI18N
        columnDefinition_Label.setPreferredSize(new java.awt.Dimension(90, 14));
        columnDefinition_LayeredPane.add(columnDefinition_Label, java.awt.BorderLayout.WEST);

        columnDefinition_TextArea.setColumns(20);
        columnDefinition_TextArea.setRows(5);
        columnDefinition_ScrollPane.setViewportView(columnDefinition_TextArea);

        columnDefinition_LayeredPane.add(columnDefinition_ScrollPane, java.awt.BorderLayout.CENTER);

        layeredPane.setLayout(new java.awt.GridLayout(1, 4));

        org.openide.awt.Mnemonics.setLocalizedText(padding, org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.padding.text")); // NOI18N
        layeredPane.add(padding);

        nullable_CheckBox.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(nullable_CheckBox, org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.nullable_CheckBox.text")); // NOI18N
        layeredPane.add(nullable_CheckBox);

        updatable_CheckBox.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(updatable_CheckBox, org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.updatable_CheckBox.text")); // NOI18N
        layeredPane.add(updatable_CheckBox);

        insertable_CheckBox.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(insertable_CheckBox, org.openide.util.NbBundle.getMessage(OrderColumnPanel.class, "OrderColumnPanel.insertable_CheckBox.text")); // NOI18N
        layeredPane.add(insertable_CheckBox);

        orderColumnPanel.setLayer(name_LayeredPane, javax.swing.JLayeredPane.DEFAULT_LAYER);
        orderColumnPanel.setLayer(columnDefinition_LayeredPane, javax.swing.JLayeredPane.DEFAULT_LAYER);
        orderColumnPanel.setLayer(layeredPane, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout orderColumnPanelLayout = new javax.swing.GroupLayout(orderColumnPanel);
        orderColumnPanel.setLayout(orderColumnPanelLayout);
        orderColumnPanelLayout.setHorizontalGroup(
            orderColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(orderColumnPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(orderColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(name_LayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(columnDefinition_LayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 570, Short.MAX_VALUE)
                    .addComponent(layeredPane, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        orderColumnPanelLayout.setVerticalGroup(
            orderColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(orderColumnPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(name_LayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(columnDefinition_LayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(layeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 590, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(orderColumnPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 590, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 192, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(orderColumnPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel columnDefinition_Label;
    private javax.swing.JLayeredPane columnDefinition_LayeredPane;
    private javax.swing.JScrollPane columnDefinition_ScrollPane;
    private javax.swing.JTextArea columnDefinition_TextArea;
    private javax.swing.JCheckBox insertable_CheckBox;
    private javax.swing.JLayeredPane layeredPane;
    private javax.swing.JLabel name_Label;
    private javax.swing.JLayeredPane name_LayeredPane;
    private javax.swing.JTextField name_TextField;
    private javax.swing.JCheckBox nullable_CheckBox;
    private javax.swing.JLayeredPane orderColumnPanel;
    private javax.swing.JLabel padding;
    private javax.swing.JCheckBox updatable_CheckBox;
    // End of variables declaration//GEN-END:variables

}


text:
import sys
from EPPs.common import StepEPP

class ApplyFreezerLocation(StepEPP):
    """
    Updates submitted sample UDFs for Freezer and Shelf location based on the values provided in step UDFs Freezer and
    Shelf. System exit occurs if step UDF container does not match a sample artifact container name
    """

    def _run(self):
        samples_to_update = set()
        for sample in self.samples:
            if sample.artifact.container.name == self.process.udf['Container Name']:
                sample.udf['Freezer'] = self.process.udf['Freezer']
                sample.udf['Shelf'] = self.process.udf['Shelf']
                samples_to_update.add(sample)
            else:
                print("Container '%s' not present in step" % self.process.udf['Container Name'])
                sys.exit(1)
        self.lims.put_batch(list(samples_to_update))

if __name__ == '__main__':
    ApplyFreezerLocation().run()


text:
class FormatPauper < FormatVintage
  def format_pretty_name
    "Pauper"
  end

  def in_format?(card)
    card.printings.each do |printing|
      next if @time and printing.release_date > @time
      next if @excluded_sets.include?(printing.set_code)
      next if printing.set.custom?
      return true if printing.rarity == "common" or printing.rarity == "basic"
    end
    false
  end
end