text:
import random
import string

from copy import copy
from datetime import datetime, timedelta
from decimal import Decimal
import unittest

from dateutil.relativedelta import relativedelta
from dateutil.tz import tzutc
from nose.tools import raises
from testconfig import config

from sharpy.product import CheddarProduct
from sharpy.exceptions import NotFound

from testing_tools.decorators import clear_users

class ProductTests(unittest.TestCase):

    client_defaults = {
        'username': config['cheddar']['username'],
        'password': config['cheddar']['password'],
        'product_code': config['cheddar']['product_code'],
        'endpoint': config['cheddar']['endpoint'],
    }

    customer_defaults = {
        'code': 'test',
        'email': 'garbage@saaspire.com',
        'first_name': 'Test',
        'last_name': 'User',
        'plan_code': 'FREE_MONTHLY',
    }

    paypal_defaults = {
        'code': 'test',
        'email': 'garbage@saaspire.com',
        'first_name': 'Test',
        'last_name': 'User',
        'plan_code': 'PAID_MONTHLY',
        'method': 'paypal',
        'cc_first_name': 'Test',
        'cc_last_name': 'User',
        'cc_email': 'garbage@saaspire.com',
        'return_url': 'http://example.com/return',
        'cancel_url': 'http://example.com/cancel',
    }

    exipration = datetime.now() + timedelta(days=180)

    paid_defaults = {
        'cc_number': '4111111111111111',
        'cc_expiration': exipration.strftime('%m/%Y'),
        'cc_card_code': '123',
        'cc_first_name': 'Test',
        'cc_last_name': 'User',
        'cc_company': 'Some Co LLC',
        'cc_country': 'United States',
        'cc_address': '123 Something St',
        'cc_city': 'Someplace',
        'cc_state': 'NY',
        'cc_zip': '12345',
        'plan_code': 'PAID_MONTHLY',
    }

    def get_product(self):
        ''' Helper method for getting product. '''
        product = CheddarProduct(**self.client_defaults)

        return product

    def test_repr(self):
        ''' Test Product __repr__ method. '''
        product = self.get_product()
        expected = u'CheddarProduct: %s' % product.product_code
        result = product.__repr__()

        self.assertEquals(expected, result)

    def test_instantiate_product(self):
        ''' Test product key. '''
        product = self.get_product()

        for key, value in self.client_defaults.items():
            self.assertEquals(value, getattr(product.client, key))

    def test_get_all_plans(self):
        ''' Test product get_all_plans method. '''
        product = self.get_product()

        plans = product.get_all_plans()

        for plan in plans:
            if plan.code == 'FREE_MONTHLY':
                free_plan = plan
            elif plan.code == 'PAID_MONTHLY':
                paid_plan = plan
            elif plan.code == 'TRACKED_MONTHLY':
                tracked_plan = plan

        self.assertEquals('FREE_MONTHLY', free_plan.code)
        self.assertEquals('PAID_MONTHLY', paid_plan.code)
        self.assertEquals('TRACKED_MONTHLY', tracked_plan.code)

    def test_get_plan(self):
        ''' Test product get_plan method with plan code. '''
        product = self.get_product()
        code = 'PAID_MONTHLY'
        plan = product.get_plan(code)

        self.assertEquals(code, plan.code)

    def test_plan_initial_bill_date(self):
        ''' Test plan with initial bill date. '''
        product = self.get_product()
        code = 'PAID_MONTHLY'
        plan = product.get_plan(code)

        expected = datetime.utcnow().date() + relativedelta(months=1)
        result = plan.initial_bill_date

        self.assertEquals(expected, result)

    def get_customer(self, **kwargs):
        ''' Test Product get_customer method with filtering. '''
        customer_data = copy(self.customer_defaults)
        # We need to make unique customers with the same data.
        # Cheddar recomends we pass a garbage field.
        # http://support.cheddargetter.com/discussions/problems/8342-duplicate-post
        # http://support.cheddargetter.com/kb/api-8/error-handling#duplicate
        random_string = ''.join(random.SystemRandom().choice(
            string.ascii_uppercase + string.digits) for _ in range(5))
        customer_data.update({'notes': random_string})
        customer_data.update(kwargs)
        product = self.get_product()

        customer = product.create_customer(**customer_data)

        return customer

    def get_customer_with_items(self, **kwargs):
        ''' Test Product get_customer method with items. '''
        data = copy(self.paid_defaults)
        if 'items' in kwargs.keys():
            items = kwargs['items']
        else:
            items = []
            items.append({'code': 'MONTHLY_ITEM', 'quantity': 3})
            items.append({'code': 'ONCE_ITEM'})

        data['items'] = items
        data['plan_code'] = 'TRACKED_MONTHLY'
        customer = self.get_customer(**data)

        return customer

    @clear_users
    def test_simple_create_customer(self):
        ''' Test Create Customer with only the get_customer helper. '''
        self.get_customer()

    @clear_users
    def test_create_customer_with_company(self):
        ''' Test Create Customer with company name. '''
        self.get_customer(company='Test Co')

    @clear_users
    def test_create_customer_with_meta_data(self):
        ''' Test Create Customer with meta data. '''
        self.get_customer(meta_data={'key_1': 'value_1', 'key2': 'value_2'})

    @clear_users
    def test_create_customer_with_true_vat_exempt(self):
        ''' Test Create Customer with vat exempt true. '''
        self.get_customer(is_vat_exempt=True)

    @clear_users
    def test_create_customer_with_false_vat_exempt(self):
        ''' Test Create Customer with vat exempt false. '''
        self.get_customer(is_vat_exempt=False)

    @clear_users
    def test_create_customer_with_vat_number(self):
        ''' Test Create Customer with vat number. '''
        self.get_customer(vat_number=12345)

    @clear_users
    def test_create_customer_with_notes(self):
        ''' Test Create Customer with notes. '''
        self.get_customer(notes='This is a test note!')

    @clear_users
    def test_create_customer_with_first_contact_datetime(self):
        ''' Test Create Customer with first contact datetime. '''
        self.get_customer(first_contact_datetime=datetime.now())

    @clear_users
    def test_create_customer_with_referer(self):
        ''' Test Create Customer with referer. '''
        self.get_customer(referer='http://saaspire.com/test.html')

    @clear_users
    def test_create_customer_with_campaign_term(self):
        ''' Test Create Customer with campaign term. '''
        self.get_customer(campaign_term='testing')

    @clear_users
    def test_create_customer_with_campaign_name(self):
        ''' Test Create Customer with campaign name. '''
        self.get_customer(campaign_name='testing')

    @clear_users
    def test_create_customer_with_campaign_source(self):
        ''' Test Create Customer with campaign source. '''
        self.get_customer(campaign_source='testing')

    @clear_users
    def test_create_customer_with_campaign_content(self):
        ''' Test Create Customer with campaign content. '''
        self.get_customer(campaign_content='testing')

    @clear_users
    def test_create_customer_with_initial_bill_date(self):
        ''' Test Create Customer with initial bill date. '''
        initial_bill_date = datetime.utcnow() + timedelta(days=60)
        customer = self.get_customer(initial_bill_date=initial_bill_date)
        invoice = customer.subscription.invoices[0]
        real_bill_date = invoice['billing_datetime']

        # Sometimes cheddar getter will push the bill date to the next day
        # if the request is made around UTC midnight
        diff = initial_bill_date.date() - real_bill_date.date()
        self.assertLessEqual(diff.days, 1)

    @clear_users
    def test_create_paid_customer(self):
        ''' Test Create Customer with payment. '''
        self.get_customer(**self.paid_defaults)

    @clear_users
    def test_create_paid_customer_with_charges(self):
        ''' Test Create Customer with payment and additional charges. '''
        data = copy(self.paid_defaults)
        charges = []
        charges.append({'code': 'test_charge_1', 'each_amount': 2})
        charges.append({'code': 'charge2', 'quantity': 3, 'each_amount': 4})
        data['charges'] = charges
        self.get_customer(**data)

    @clear_users
    def test_create_paid_customer_with_coupon_code(self):
        ''' Test Create Customer with payment and coupon codes. '''
        data = copy(self.paid_defaults)
        data.update({'coupon_code': 'COUPON'})
        self.get_customer(**data)

    @clear_users
    def test_create_paid_customer_with_decimal_charges(self):
        '''
        Test Create Customer with payment and additional decimal charges.
        '''
        data = copy(self.paid_defaults)
        charges = []
        charges.append({'code': 'test_charge_1',
                        'each_amount': Decimal('2.30')})
        charges.append({'code': 'charge2', 'each_amount': Decimal('-4.5')})
        data['charges'] = charges
        self.get_customer(**data)

    @clear_users
    def test_create_paid_customer_with_items(self):
        ''' Test Create Customer with payment and additional items. '''
        data = copy(self.paid_defaults)
        items = []
        items.append({'code': 'MONTHLY_ITEM', 'quantity': 3})
        items.append({'code': 'ONCE_ITEM'})
        data['items'] = items
        data['plan_code'] = 'TRACKED_MONTHLY'
        self.get_customer(**data)

    @clear_users
    def test_create_paid_customer_with_decimal_quantity_items(self):
        '''
        Test Create Customer with payment and additional decimal quantity
        items.
        '''
        data = copy(self.paid_defaults)
        items = []
        items.append({'code': 'MONTHLY_ITEM', 'quantity': Decimal('1.23456')})
        items.append({'code': 'ONCE_ITEM'})
        data['items'] = items
        data['plan_code'] = 'TRACKED_MONTHLY'
        self.get_customer(**data)

    #@clear_users
    #def test_create_paypal_customer(self):
    #    ''' Test Create Customer with paypal. '''
    #    data = copy(self.paypal_defaults)
    #    self.get_customer(**data)

    #@clear_users
    #def test_update_paypal_customer(self):
    #    ''' Test Update Customer with paypal. '''
    #    data = copy(self.paypal_defaults)
    #    customer = self.get_customer(**data)
    #    customer.update(
    #        method='paypal',
    #        return_url='http://example.com/update-success/',
    #        cancel_url='http://example.com/update-cancel/',
    #    )

    @clear_users
    def test_customer_repr(self):
        ''' Test Customer __repr__ method. '''
        customer = self.get_customer()

        expected = 'Customer: Test User (test)'
        result = repr(customer)

        self.assertEquals(expected, result)

    @clear_users
    def test_subscription_repr(self):
        ''' Test Subscription __repr__ method. '''
        customer = self.get_customer()
        subscription = customer.subscription

        expected = 'Subscription:'
        result = repr(subscription)

        self.assertIn(expected, result)

    @clear_users
    def test_pricing_plan_repr(self):
        ''' Test PricingPlan __repr__ method. '''
        customer = self.get_customer()
        subscription = customer.subscription
        plan = subscription.plan

        expected = 'PricingPlan: Free Monthly (FREE_MONTHLY)'
        result = repr(plan)

        self.assertEquals(expected, result)

    @clear_users
    def test_item_repr(self):
        ''' Test Item __repr__ method. '''
        customer = self.get_customer_with_items()
        subscription = customer.subscription
        item = subscription.items['MONTHLY_ITEM']

        expected = 'Item: MONTHLY_ITEM for test'
        result = repr(item)

        self.assertEquals(expected, result)

    @clear_users
    def test_get_customers(self):
        ''' Create two customers, verify 2 returned. '''
        self.get_customer()
        customer2_data = copy(self.paid_defaults)
        customer2_data.update({
            'code': 'test2',
            'email': 'garbage+2@saaspire.com',
            'first_name': 'Test2',
            'last_name': 'User2',
        })
        self.get_customer(**customer2_data)
        product = self.get_product()

        # This test fails intermitently. I'm assuming network race condition
        # due to creating customers and fetching all customers so quickly.
        import time
        time.sleep(0.5)
        fetched_customers = product.get_customers()
        self.assertEquals(2, len(fetched_customers))

    @clear_users
    def test_get_customer(self):
        ''' Test getting a customer by code.. '''
        created_customer = self.get_customer()
        product = self.get_product()

        fetched_customer = product.get_customer(code=created_customer.code)

        self.assertEquals(created_customer.code, fetched_customer.code)
        self.assertEquals(created_customer.first_name,
                          fetched_customer.first_name)
        self.assertEquals(created_customer.last_name,
                          fetched_customer.last_name)
        self.assertEquals(created_customer.email, fetched_customer.email)

    @clear_users
    def test_simple_customer_update(self):
        ''' Test Update Customer. '''
        new_name = 'Different'
        customer = self.get_customer()
        product = self.get_product()

        customer.update(first_name=new_name)
        self.assertEquals(new_name, customer.first_name)

        fetched_customer = product.get_customer(code=customer.code)
        self.assertEquals(customer.first_name, fetched_customer.first_name)

    @clear_users
    @raises(NotFound)
    def test_delete_customer(self):
        ''' Create a Customer and delete that customer. '''
        customer = self.get_customer()
        product = self.get_product()

        fetched_customer = product.get_customer(code=customer.code)
        self.assertEquals(customer.first_name, fetched_customer.first_name)

        customer.delete()
        fetched_customer = product.get_customer(code=customer.code)

    @clear_users
    def test_delete_all_customers(self):
        '''
        Create two customers, verify 2 returned,
        delete and verify 0 customers.
        '''
        self.get_customer()
        self.get_customer(code='test2')
        product = self.get_product()

        # This test fails intermitently. I'm assuming network race condition
        # due to creating customers and fetching all customers so quickly.
        import time
        time.sleep(0.5)
        fetched_customers = product.get_customers()
        self.assertEquals(2, len(fetched_customers))

        product.delete_all_customers()

        fetched_customers = product.get_customers()
        self.assertEquals(0, len(fetched_customers))

    @clear_users
    def test_cancel_subscription(self):
        ''' Test cancel subscription. '''
        customer = self.get_customer()
        customer.subscription.cancel()

        now = datetime.now(tzutc())
        canceled_on = customer.subscription.canceled
        diff = now - canceled_on
        limit = timedelta(seconds=10)

        self.assertLess(diff, limit)

    def assert_increment(self, quantity=None):
        ''' Helper method for asserting increment in other tests. '''
        customer = self.get_customer_with_items()
        product = self.get_product()
        item = customer.subscription.items['MONTHLY_ITEM']

        old_quantity = item.quantity_used
        item.increment(quantity)
        new_quantity = item.quantity_used
        diff = new_quantity - old_quantity
        expected = Decimal(quantity or 1)
        self.assertAlmostEqual(expected, diff, places=2)

        fetched_customer = product.get_customer(code=customer.code)
        fetched_item = fetched_customer.subscription.items[item.code]
        self.assertEquals(item.quantity_used, fetched_item.quantity_used)

    @clear_users
    def test_simple_increment(self):
        ''' Test item increment. '''
        self.assert_increment()

    @clear_users
    def test_int_increment(self):
        ''' Test item increment with integer. '''
        self.assert_increment(1)

    @clear_users
    def test_float_increment(self):
        ''' Test item increment with float. '''
        self.assert_increment(1.234)

    @clear_users
    def test_decimal_increment(self):
        ''' Test item increment with decimal. '''
        self.assert_increment(Decimal('1.234'))

    def assert_decrement(self, quantity=None):
        ''' Helper method for asserting decrement in other tests. '''
        customer = self.get_customer_with_items()
        product = self.get_product()
        item = customer.subscription.items['MONTHLY_ITEM']

        old_quantity = item.quantity_used
        item.decrement(quantity)
        new_quantity = item.quantity_used
        diff = old_quantity - new_quantity
        expected = Decimal(quantity or 1)
        self.assertAlmostEqual(expected, diff, places=2)

        fetched_customer = product.get_customer(code=customer.code)
        fetched_item = fetched_customer.subscription.items[item.code]
        self.assertEquals(item.quantity_used, fetched_item.quantity_used)

    @clear_users
    def test_simple_decrement(self):
        ''' Test item decrement. '''
        self.assert_decrement()

    @clear_users
    def test_int_decrement(self):
        ''' Test item decrement with integer. '''
        self.assert_decrement(1)

    @clear_users
    def test_float_decrement(self):
        ''' Test item decrement with float. '''
        self.assert_decrement(1.234)

    @clear_users
    def test_decimal_decrement(self):
        ''' Test item decrement with decimal. '''
        self.assert_decrement(Decimal('1.234'))

    def assert_set(self, quantity):
        '''
        Helper method for asserting item quantity has been set as expected.
        '''
        customer = self.get_customer_with_items()
        product = self.get_product()
        item = customer.subscription.items['MONTHLY_ITEM']

        item.set(quantity)
        new_quantity = item.quantity_used
        expected = Decimal(quantity)
        self.assertAlmostEqual(expected, new_quantity, places=2)

        fetched_customer = product.get_customer(code=customer.code)
        fetched_item = fetched_customer.subscription.items[item.code]
        self.assertEquals(item.quantity_used, fetched_item.quantity_used)

    @clear_users
    def test_int_set(self):
        ''' Test item set with integer. '''
        self.assert_set(1)

    @clear_users
    def test_float_set(self):
        ''' Test item set with float. '''
        self.assert_set(1.234)

    @clear_users
    def test_decimal_set(self):
        ''' Test item set with decimal. '''
        self.assert_set(Decimal('1.234'))

    def assert_charged(self, code, each_amount, quantity=None,
                       description=None):
        ''' Helper method for asserting custom charges as expected. '''
        customer = self.get_customer(**self.paid_defaults)
        product = self.get_product()

        customer.charge(
            code=code,
            each_amount=each_amount,
            quantity=quantity,
            description=description,
        )

        if description is None:
            description = ''

        found_charge = None
        for invoice in customer.subscription.invoices:
            for charge in invoice['charges']:
                if charge['code'] == code:
                    found_charge = charge

        self.assertAlmostEqual(Decimal(each_amount),
                               found_charge['each_amount'], places=2)
        self.assertEqual(quantity, found_charge['quantity'])
        self.assertEqual(description, found_charge['description'])

        fetched_customer = product.get_customer(code=customer.code)
        fetched_charge = None
        for invoice in fetched_customer.subscription.invoices:
            for charge in invoice['charges']:
                if charge['code'] == code:
                    fetched_charge = charge

        self.assertAlmostEqual(Decimal(each_amount),
                               fetched_charge['each_amount'], places=2)
        self.assertEqual(quantity, fetched_charge['quantity'])
        self.assertEqual(description, fetched_charge['description'])

    @clear_users
    def test_add_charge(self):
        ''' Test adding a custom charge to an invoice. '''
        self.assert_charged(code='TEST-CHARGE', each_amount=1, quantity=1)

    @clear_users
    def test_add_float_charge(self):
        ''' Test adding a custom charge to an invoice with float. '''
        self.assert_charged(code='TEST-CHARGE', each_amount=2.3, quantity=2)

    @clear_users
    def test_add_decimal_charge(self):
        ''' Test adding a custom charge to an invoice with decimal. '''
        self.assert_charged(code='TEST-CHARGE', each_amount=Decimal('2.3'),
                            quantity=3)

    @clear_users
    def test_add_charge_with_descriptions(self):
        ''' Test adding a custom charge to an invoice with descriptions. '''
        self.assert_charged(code='TEST-CHARGE', each_amount=1, quantity=1,
                            description="A test charge")

    @clear_users
    def test_add_credit(self):
        ''' Test adding a custom charge to an invoice as credit. '''
        self.assert_charged(code='TEST-CHARGE', each_amount=-1, quantity=1)

    def assertCharge(self, customer, code, each_amount, quantity,
                     description='', invoice_type=None):
        ''' Helper method for asserting custom charge as expected. '''
        found_charge = None
        for invoice in customer.subscription.invoices:
            if invoice_type is None or invoice['type'] == invoice_type:
                for charge in invoice['charges']:
                    if charge['code'] == code:
                        found_charge = charge

        self.assertAlmostEqual(Decimal(each_amount),
                               found_charge['each_amount'], places=2)
        self.assertEqual(quantity, found_charge['quantity'])
        self.assertEqual(description, found_charge['description'])

    def assertOneTimeInvoice(self, charges):
        ''' Helper method for asserting one time invoice as expected. '''
        customer = self.get_customer(**self.paid_defaults)
        product = self.get_product()

        customer.create_one_time_invoice(charges)

        for charge in charges:
            self.assertCharge(
                customer,
                code=charge['code'],
                quantity=charge['quantity'],
                each_amount=charge['each_amount'],
                description=charge.get('description', ''),
                invoice_type='one-time',
            )

        fetched_customer = product.get_customer(code=customer.code)
        for charge in charges:
            self.assertCharge(
                fetched_customer,
                code=charge['code'],
                quantity=charge['quantity'],
                each_amount=charge['each_amount'],
                description=charge.get('description', ''),
                invoice_type='one-time',
            )

    @clear_users
    def test_add_simple_one_time_invoice(self):
        ''' Test adding a one time invoice. '''
        charges = [
            {
                'code': 'immediate-test',
                'quantity': 1,
                'each_amount': Decimal(5.23)
            }]

        self.assertOneTimeInvoice(charges)

    @clear_users
    def test_add_one_time_invoice_with_description(self):
        ''' Test adding a one time invoice with description. '''
        charges = [
            {
                'code': 'immediate-test',
                'quantity': 1,
                'each_amount': Decimal(5.23),
                'description': 'This is a test charge'
            }]

        self.assertOneTimeInvoice(charges)

    @clear_users
    def test_add_one_time_invoice_with_multiple_charges(self):
        ''' Test adding a one time invoice with multiple charges. '''
        charges = [
            {
                'code': 'immediate-test',
                'quantity': 1,
                'each_amount': Decimal(5.23),
                'description': 'This is a test charge'
            },
            {
                'code': 'immediate-test-2',
                'quantity': 3,
                'each_amount': 15,
                'description': 'This is another test charge'
            }]

        self.assertOneTimeInvoice(charges)

    def test_get_all_promotions(self):
        ''' Test get all promotions. '''
        product = self.get_product()
        promotions = product.get_all_promotions()

        self.assertEquals(2, len(promotions))
        for promotion in promotions:
            assert promotion.coupons[0].get('code') in ('COUPON', 'COUPON2')

    def test_get_promotion(self):
        ''' Test get a single promotion. '''
        product = self.get_product()
        promotion = product.get_promotion('COUPON')

        self.assertEqual(unicode(promotion), 'Coupon (COUPON)')
        self.assertEqual(promotion.name, 'Coupon')
        self.assertEqual(promotion.coupons[0].get('code'), 'COUPON')
        self.assertEqual(promotion.incentives[0].get('percentage'), '10')
        self.assertEqual(promotion.incentives[0].get('expiration_datetime'),
                         None)

    def test_promotion_repr(self):
        ''' Test the internal __repr___ method of Promotion. '''
        product = self.get_product()
        promotion = product.get_promotion('COUPON')

        expected = 'Promotion: Coupon (COUPON)'
        result = repr(promotion)

        self.assertEquals(expected, result)

    def test_promotion_unicode(self):
        ''' Test the internal __unicode___ method of Promotion. '''
        product = self.get_product()
        promotion = product.get_promotion('COUPON')

        expected = 'Coupon (COUPON)'
        result = unicode(promotion)

        self.assertEquals(expected, result)


text:
namespace Aoc
{

    class CppAVFoundationCamera
    {
    public:

        // If the instance is specified as being allocated in a worker thread,
        // then it will have its own Objective-C autorelease pool.

        enum WhichThread { MainThread, WorkerThread };

        CppAVFoundationCamera(WhichThread = MainThread);
        ~CppAVFoundationCamera();

        // Control whether the camera if active or not.

        void            start();
        void            stop();

        // A derived class should redefine this virtual function,
        // which gets called with each captured video frame.

        virtual void    handleCapturedImage (CGImageRef) = 0;

    private:

        // Details of the class' data are hidden in the .cpp file.

        class Imp;
        std::unique_ptr<Imp> _m;
    };

}

#endif

redpajama_set_name: RedPajamaGithub


text:
/* This stylesheet generated by Transfonter (http://transfonter.org) on October 8, 2016 7:56 AM */

@font-face {
	font-family: 'Pobeda';
	src: url('Pobeda-Regular.eot');
	src: url('Pobeda-Regular.eot?#iefix') format('embedded-opentype'),
		url('Pobeda-Regular.woff2') format('woff2'),
		url('Pobeda-Regular.woff') format('woff'),
		url('Pobeda-Regular.ttf') format('truetype'),
		url('Pobeda-Regular.svg#Pobeda-Regular') format('svg');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'Pobeda';
	src: url('Pobeda-Bold.eot');
	src: url('Pobeda-Bold.eot?#iefix') format('embedded-opentype'),
		url('Pobeda-Bold.woff2') format('woff2'),
		url('Pobeda-Bold.woff') format('woff'),
		url('Pobeda-Bold.ttf') format('truetype'),
		url('Pobeda-Bold.svg#Pobeda-Bold') format('svg');
	font-weight: bold;
	font-style: normal;
}

@font-face {
	font-family: 'Furore';
	src: url('Furore.eot');
	src: url('Furore.eot?#iefix') format('embedded-opentype'),
		url('Furore.woff2') format('woff2'),
		url('Furore.woff') format('woff'),
		url('Furore.ttf') format('truetype'),
		url('Furore.svg#Furore') format('svg');
	font-weight: normal;
	font-style: normal;
}


text:
/*-----background-----*/

.charsheet {
    background-image: url("https://i.imgur.com/HnSmiik.jpg");
    background-size: 100%;
    background-attachment: scroll;
    min-height: 100%;
}
.charsheet button[type=roll] { /*Regular roll button*/
    background-color: #1766D3;
	color: yellow;
	font-family: "Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif;
	font-variant: small-caps;
}
.charsheet button[type=roll].sheet-blank-logo-button {
    background-image: url("https://i.imgur.com/572YPfx.jpg");
    background-color: transparent;
    background-repeat: no-repeat;
    width: 25px;
    height: 25px;
}
button,
button:hover,
button:active
{
    background-image: none;
}

{
    color: white;
    font-family: "Optima", Optima, sans-serif;
}
.sheet-attribute {
    background: #1766D3;
    color: white;
    font-family: Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif;
}
.sheet-input-center-aligned {
    max-width: 190px;
    background: #1766D3;
    color: white;
    font-family: Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif;
}

h1 {
    color: yellow;
    font-weight: normal;
    text-align: center;
    text-shadow: white;
    border: 1px solid #5E9AED;
    border-radius: 5px;
    box-shadow: 0 0 5px 3px #0064EE;
    margin: 5px;
    font-family: "Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif;
}
h2 {
    color: yellow;
    font-weight: normal;
    text-align: center;
    text-shadow: white;
    border: 1px solid #5E9AED;
    border-radius: 5px;
    box-shadow: 0 0 5px 3px #0064EE;
    margin: 5px;
    font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
}
h3 {
    color: white;
    font-weight: normal;
    text-align: center;
    margin: 5px;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
}
h4 {
    color: white;
    font-weight: normal;
    text-align: left;
    text-shadow: white;
    margin: 5px;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
}
h5 {
    color: white;
    font-weight: normal;
    text-align: left;
    text-shadow: white;
    margin: 5px;
    font-family: "Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif;
}

/* Roll Button Configuration */

button[type=roll].sheet-blank-roll-button::before {
  background: transparent;
  display:none;
}

button[type=roll].sheet-blank-roll-button::active {
    background: transparent;
	top:7px;
}
button[type=roll].sheet-blank-roll-button::active::before {
    background-color: transparent;
	top:-2px;
}
button[type=roll].sheet-blank-logo-button::before {
  background: transparent;
  display:none;
}

button[type=roll].sheet-blank-logo-button::active {
    background: transparent;
	top:7px;
}
button[type=roll].sheet-blank-logo-button::active::before {
    background-color: transparent;
	top:-2px;
}
.sheet-select
{
    background: #1766D3;
    border: solid 1px #2F4F4F;
    color: yellow;
    margin-bottom: 0;
    font-family: Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif;
}

.sheet-textarea
{
    width: 700px;
    height:40px;
    background: transparent;
    color: #ffffff;
    font-family: Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif;
}

.sheet-rolltemplate-roll table {
    width: 150px;
    padding: 2px;
	background:url (http://i.imgur.com/omzQPo1.jpg);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 150px;
}
.sheet-rolltemplate-roll th {
    color: #00c767;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 13px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-roll td {
    text-align: center;
	color: #00c767;
	line-height: 2em;
	font-size: 1.2em;
	padding-left: 5px;
	padding-bottom: 35px;
}

.sheet-rolltemplate-roll .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-roll .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-roll .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-roll .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
div.sheet-tab-content { display: none; }

input.sheet-tab1:checked ~ div.sheet-tab1,
input.sheet-tab2:checked ~ div.sheet-tab2,
{
    display: block;
}

input.sheet-tab {
    width: calc(20% - 4px);
    max-width: 110px;
    height: 20px;

    outline: none !important;
    position: relative;
    cursor: pointer;
    z-index: 1;
}

input.sheet-tab1 {
    margin-left: 1px;
}

input.sheet-tab::before {
    content: attr(title);
    display: inline-block;
    color: #000000;

    background: #808080;
    border: solid 1px #2F4F4F;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;

    font-family: Copperplate, "Copperplate Gothic Light", fantasy;
    font-size: 14px;
    font-weight: normal;
    text-align: center;

    width: 100%;
    height: 20px;
}

input.sheet-tab:checked::before {
    color: #ffffff;
    background: #000000;
}

.sheet-tab-br {
    border-bottom: 1px solid #778899;
    margin-bottom: 5px;
    margin-top: 1px;
}
input.sheet-arrow {
    float: left;
}

div.sheet-body {
    display: none;
    background: transparent;
}

input.sheet-arrow:checked ~ div.sheet-body {
    display: block;
}
.sheet-rolltemplate-def table {
    width: 150px;
    padding: 2px;
	background:url (http://i.imgur.com/j7EeOtc.jpg);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 150px;
}
.sheet-rolltemplate-def th {
    color: #0072bc;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 13px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-def td {
    text-align: center;
	color: #0072bc;
    line-height: 2em;
	font-size: 1.2em;
	padding-bottom: 40px;
}

.sheet-rolltemplate-def .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-def .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-def .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-def .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-off table {
    width: 150px;
    padding: 2px;
	background:url (http://i.imgur.com/qGxHRWS.jpg);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 150px;
}
.sheet-rolltemplate-off th {
    color: #9e0b0f;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 13px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-off td {
    text-align: center;
	color: #9e0b0f;
	line-height: 2em;
	font-size: 1.2em;
	padding-left: 5px;
	padding-bottom: 35px;
}

.sheet-rolltemplate-off .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-off .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-off .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-off .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sbmain table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/jQNHRSb.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 200px;
}
.sheet-rolltemplate-sbmain th {
    color: white;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-sbmain td {
    text-align: center;
	color: white;
	line-height: 1.2em;
	font-size: 1.2em;
	padding-left: 5px;
	padding-bottom: 15px;
}

.sheet-rolltemplate-sbmain .inlinerollresult  {
	display: inline-block;
	min-width: 1.7em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sbmain .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sbmain .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sbmain .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/08gzfaM.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb th {
    color: white;
    padding-left: 1px;
    padding-top: 15px;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-sb td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
	padding-left: 5px;
}

.sheet-rolltemplate-sb .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb2 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/MzyeBG6.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb2 th {
    color: white;
    padding-top: 5px;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-sb2 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
	padding-left: 5px;
	padding-bottom: 20px;
}

.sheet-rolltemplate-sb2 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb2 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb2 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb2 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb3 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/y3HUFyB.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb3 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb3 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb3 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb3 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb3 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb3 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb4 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/LSbQ9VH.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb4 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb4 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb4 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb4 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb4 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb4 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb5 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/RBLu7rh.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb5 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb5 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb5 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb5 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb5 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb5 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb6 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/sdK8aMB.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb6 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb6 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb6 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb6 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb6 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb6 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb7 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/ktIie2I.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb7 th {
    color: white;
    padding-left: 1px;
    padding-top: 15px;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-sb7 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
	padding-left: 5px;
}

.sheet-rolltemplate-sb7 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb7 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb7 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb7 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb8 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/nuhbFt4.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb8 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb8 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb8 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb8 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb8 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb8 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb9 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/5dO3bgk.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb9 th {
    color: white;
    padding-top: 5px;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-sb9 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
	padding-left: 5px;
	padding-bottom: 20px;
}

.sheet-rolltemplate-sb9 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb9 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb9 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb9 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb10 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/BAJvh0D.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb10 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb10 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb10 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb10 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb10 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb10 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb11 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/RmUnwzQ.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb11 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb11 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb11 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb11 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb11 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb11 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb12 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/gDYr0it.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb12 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb12 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb12 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb12 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb12 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb12 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb13 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/z6AtBtR.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb13 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb13 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb13 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb13 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb13 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb13 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb14 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/9d0YtlX.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb14 th {
    color: white;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
    padding-bottom: 50px;
}

.sheet-rolltemplate-sb14 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
}

.sheet-rolltemplate-sb14 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb14 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb14 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb14 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-sb15 table {
    width: 200px;
    padding: 2px;
	background:url (https://i.imgur.com/OBEL54Q.jpg);
	background-size: 200px;
    background-repeat: no-repeat;
	font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
	min-height: 200px;
}
.sheet-rolltemplate-sb15 th {
    color: white;
    padding-top: 5px;
    line-height: 1.3em;
    font-size: 1.3em;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-sb15 td {
    text-align: center;
	color: white;
	line-height: 1.3em;
	font-size: 1.3em;
	padding-left: 5px;
	padding-bottom: 20px;
}

.sheet-rolltemplate-sb15 .inlinerollresult  {
	display: inline-block;
	min-width: 1.3em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-sb15 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb15 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb15 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}

.sheet-rolltemplate-sb15 .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-sb15 .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-sb15 .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-pow table {
    width: 150px;
    padding: 2px;
	background:url (http://i.imgur.com/5HaIu8Q.jpg);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 150px;
}
.sheet-rolltemplate-pow th {
    color: #959595;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 13px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-pow td {
    text-align: center;
	color: #9e0b0f;
	line-height: 2em;
	font-size: 1.2em;
	padding-left: 5px;
	padding-bottom: 35px;
}

.sheet-rolltemplate-pow .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-pow .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-pow .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-pow .inlinerollresult.importantroll {
	border: 2px solid yellow;
}
.sheet-rolltemplate-pre table {
    width: 150px;
    padding: 2px;
	background:url (https://i.imgur.com/5Q2q6Lp.jpg);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 150px;
}
.sheet-rolltemplate-pre th {
    color: #c2c200;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 15px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-pre td {
    text-align: center;
	color: #9e0b0f;
	line-height: 2em;
	font-size: 1.2em;
	padding-bottom: 35px;
}

.sheet-rolltemplate-pre .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(200, 218, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-pre .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-pre .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-pre .inlinerollresult.importantroll {
	border: 2px solid yellow;
}
.sheet-rolltemplate-score table {
    width: 150px;
    padding: 2px;
	background:url (https://i.imgur.com/Ll18XuB.gif);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Andale Mono", AndaleMono, monospace;
	min-height: 150px;
}
.sheet-rolltemplate-score th {
    color: #c2c200;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 13px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-score td {
    text-align: center;
	color: #9e0b0f;
	line-height: 2em;
	font-size: 1.2em;
	padding-left: 5px;
	padding-bottom: 35px;
}

.sheet-rolltemplate-score .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-score .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-score .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-score .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-item table {
    width: 150px;
	background:url (https://i.imgur.com/Ll18XuB.gif);
	background-size: 150px;
    background-repeat: no-repeat;
	font-family: "Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif;
	min-height: 150px;
}
.sheet-rolltemplate-item th {
    color: white;
    padding-left: 1px;
    line-height: 1.2em;
    font-size: 1.2em;
    padding-bottom: 13px;
    text-align: center;
    font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", "sans serif";
    width: 150px;
}

.sheet-rolltemplate-item td {
    text-align: center;
	color: #9e0b0f;
	line-height: 1.2em;
	font-size: 1.2em;
	padding-top:70px;
}

.sheet-rolltemplate-item .inlinerollresult  {
	display: inline-block;
	min-width: 1.5em;
	text-align: center;
	color: black;
	border: 2px solid rgba(0, 0, 0,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-item .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-item .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-item .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}
.sheet-rolltemplate-powerup table {
    width: 240px;
    padding: 2px;
	background:url (https://i.imgur.com/l0hGDg1.jpg);
	background-size: 100%;
    background-repeat: no-repeat;
	min-height: 240px;
}
.sheet-rolltemplate-powerup th {
    color: #F6C100;
    padding-left: 5px;
    border-style: none;
    line-height: 1.2em;
    font-size: 1em;
    text-align: left;
    font-family: "Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif;
    font-variant: small-caps;
    width: 180px;
}

.sheet-rolltemplate-powerup td {
	color: white;
    padding-left: 5px;
    border-collapse:collapse;
    font-family: Futura, "Trebuchet MS", Arial, sans-serif;
}

.sheet-rolltemplate-powerup .inlinerollresult  {
	display: inline-block;
	color: black;
	min-width: 1.5em;
	text-align: center;
	border: 2px solid rgba(100, 69, 70,100); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-powerup .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-powerup .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-powerup .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}


text:
import asynctest
from asynctest.mock import patch
from charlesbot.slack.slack_message import SlackMessage

class TestParseWallMessage(asynctest.TestCase):

    def setUp(self):
        patcher1 = patch('charlesbot_broadcast_message.broadcast_message.BroadcastMessage.seed_initial_data')  # NOQA
        self.addCleanup(patcher1.stop)
        self.mock_seed_initial_data = patcher1.start()

        patcher4 = patch('charlesbot_broadcast_message.broadcast_message.BroadcastMessage.send_broadcast_message')  # NOQA
        self.addCleanup(patcher4.stop)
        self.mock_send_broadcast_message = patcher4.start()

        patcher5 = patch('charlesbot_broadcast_message.broadcast_message.SlackUser')  # NOQA
        self.addCleanup(patcher5.stop)
        self.mock_slack_user = patcher5.start()

        from charlesbot_broadcast_message.broadcast_message import BroadcastMessage  # NOQA
        self.bm = BroadcastMessage()

    def test_type_is_not_slack_message(self):
        msg = ""
        yield from self.bm.process_message(msg)
        self.assertEqual(self.mock_slack_user.mock_calls, [])
        self.assertEqual(self.mock_send_broadcast_message.mock_calls, [])

    def test_prefix_is_not_wall(self):
        msg = SlackMessage(type="message",
                           channel="chan1",
                           user="marvin",
                           text="Not a wall message")
        yield from self.bm.process_message(msg)
        self.assertEqual(self.mock_slack_user.mock_calls, [])
        self.assertEqual(self.mock_send_broadcast_message.mock_calls, [])

    def test_ok_single(self):
        msg = SlackMessage(type="message",
                           channel="C1",
                           user="marvin",
                           text="!wall This is totes a wall message")
        yield from self.bm.process_message(msg)
        print(self.mock_slack_user.mock_calls)
        self.assertEqual(len(self.mock_send_broadcast_message.mock_calls), 1)


text:
namespace paddle {
namespace framework {
namespace ir {

class Graph;

class AddSupportInt8Pass : public FusePassBase {
 public:
  AddSupportInt8Pass() {}
  virtual ~AddSupportInt8Pass() {}

 protected:
  void ApplyImpl(ir::Graph* graph) const override;
};

}  // namespace ir
}  // namespace framework
}  // namespace paddle


text:
  <mat-form-field dense appearance="outline">
    <mat-label>{{label}}</mat-label>
    <input matInput class="swatch-input" type="text" value=" " readonly="true">
  </mat-form-field>

    <color-checkboard></color-checkboard>

<mat-card *ngIf="showColorPicker">

      <color-saturation [hsl]="hsl" [hsv]="hsv" (onChange)="handleValueChange($event)"></color-saturation>

          <color-hue direction="horizontal" [radius]="2" [hsl]="hsl" (onChange)="handleValueChange($event)"></color-hue>

          <color-alpha [radius]="2" [rgb]="rgb" [hsl]="hsl" (onChange)="handleValueChange($event)"></color-alpha>

        <color-checkboard></color-checkboard>

    <button mat-button (click)="cancel()">CANCEL</button>
    <button mat-button (click)="ok()">OK</button>

</mat-card>


text:
.calendar, .calendar * {
    box-sizing: border-box;
}

.calendar {
    border-radius: 3px;
    max-width: 100%;
    margin: 10px auto;
    text-align: center;
    background-color: #fff;
}

.calendar .heading {
    height: 35px;
    font-weight: bold;
}

.calendar .heading > span {
    line-height: 35px;
}

.calendar .heading .prev-month {
    float: left;
}

.calendar .heading .next-month {
    float: right;
}

.calendar .heading > button {
    border-radius: 3px;
    background: none;
    margin: 5px;
    border: none;
    width: 40px;
    height: 32px;
    outline: none;
}

.calendar .heading > button:hover {
    background-color: #f2f2f2;
}

.calendar .calendar-container {
    clear: both;
}

.calendar .calendar-container .day-wrapper {
    padding: 5px;
    float: right;
    width: 14.28571429%;
}

.calendar .calendar-container .day-wrapper .day {
    width: 100%;
}

.calendar .calendar-container .day-wrapper .day:not(.current-month) {
    opacity: .5;
}

.calendar .calendar-container button {
    border: none;
    background: none;
    outline: none;
    height: 32px;
    border-radius: 3px;
    cursor: pointer;
}

.calendar .calendar-container button:hover {
    background-color: #eeeeff;
}

.calendar .calendar-container button[disabled] {
    color: #aaa;
    cursor: not-allowed;
    background-color: #ebebeb;
}

.calendar .calendar-container button.selected {
    background-color: #337ab7;
    color: #ffffff;
}

.calendar .days-of-week {
    font-weight: bold;
    display: table;
    width: 100%;
    border-bottom: 1px solid #fafafa;
}

.calendar .days-of-week > div {
    display: table-cell;
    width: 14.28571429%;
    float: right;
}

.calendar .days-of-week:after {
    content: '';
    display: block;
    clear: both;
}

.calendar:after {
    content: '';
    display: block;
    clear: both;
}


text:
import { HongKong } from "../../";

export = HongKong;


text:
package se.cs.eventsourcing.domain.aggregate.events;

import com.google.common.base.Preconditions;
import se.cs.eventsourcing.domain.event.DomainEvent;
import se.cs.eventsourcing.domain.store.event.EventHasUpgrade;

@EventHasUpgrade(NewPersonCreatedWithBirthdate.class)
public class NewPersonCreated implements DomainEvent {

    private final String firstName;
    private final String lastName;

    public NewPersonCreated(String firstName, String lastName) {
        this.firstName = Preconditions.checkNotNull(firstName);
        this.lastName = Preconditions.checkNotNull(lastName);
    }

    public String getLastName() {
        return lastName;
    }

    public String getFirstName() {
        return firstName;
    }
}


text:
![Microsoft patterns & practices](http://pnp.azurewebsites.net/images/pnp-logo.png)

# Steps

> Note: These steps are a brief overview. For detailed instructions on building and provisioning the sample solution, see ![Building and Running the IoT Sample Solution](/docs/building-and-deploying-the-sample-solution.md)

1. Build the solution to download the Nuget packages (the build process will report that the file mysettings.config is missing).

1. Run `Provision-All` using Azure PowerShell.

1. Verify that `fabrikam/buildingdevice.json` is uploaded to  `blobs-asa-refdata` of the storage account.

1. In the Azure portal, open the Stream Analytics job `[YourApplicationName]ToBlob`, and test the connections for `input01` and `output01`.

1. In the Azure portal, open the Stream Analytics job `[YourApplicationName]ToSql`, and test the connections for `input01`, `input02`, and `output01`.

1. Start the Stream Analytics jobs.

1. Start running the simulator.

Notes:

- All passwords require an uppercase letter, lowercase letter, a number and a special character. The password for the HDInsight cluster must be at least 10 characters long.

- Check to make sure you have sufficient resources to create the Hadoop cluster.

- Set all blob containers to be publicly accessible by the Hadoop cluster.


text:
package org.swingeasy.list.exporter;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;

import org.swingeasy.EList;
import org.swingeasy.EListExporterImpl;
import org.swingeasy.EListRecord;
import org.swingeasy.system.SystemSettings;

/**
 * @author Jurgen
 * @see http://tools.ietf.org/html/rfc4180
 */
public class EListCsvExporter<T> extends EListExporterImpl<T> {
    private String seperator = ",";

    private String escape = "\"";

    private String text = "\"";

    /**
     * @see org.swingeasy.EListExporterImpl#exportStream(org.swingeasy.EList, java.io.OutputStream)
     */
    @Override
    public void exportStream(EList<T> list, OutputStream out) throws IOException {
        try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out))) {
            for (EListRecord<T> record : list) {
                String stringValue = record.getStringValue();
                if (stringValue != null) {
                    if (Number.class.isAssignableFrom(record.get().getClass())) {
                        writer.write(stringValue);
                    } else {
                        stringValue = stringValue.replace(this.text, this.text + this.text).replace(this.seperator, this.escape + this.seperator);
                        writer.write(this.text);
                        writer.write(stringValue);
                        writer.write(this.text);
                    }
                }
                writer.write(SystemSettings.getNewline());
            }
            writer.close();
        }
    }

    /**
     * @see org.swingeasy.EListExporter#getAction()
     */
    @Override
    public String getAction() {
        return "csv-export";
    }

    /**
     * @see org.swingeasy.EListExporter#getFileExtension()
     */
    @Override
    public String getFileExtension() {
        return "csv";
    }

    public void setEscape(String escape) {
        this.escape = escape;
    }

    public void setSeperator(String seperator) {
        this.seperator = seperator;
    }

    public void setText(String text) {
        this.text = text;
    }
}


text:
package com.athena;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.athena.library.data.SearchDataCenter;
import com.athena.library.data.SearchableEntity;
import com.athena.library.data.SortWeight;
import com.athena.library.view.T9KeyBoard;

import java.util.List;

public class MainActivity extends Activity {

    private TextView inputView;
    private RecyclerView recyclerView;
    private T9KeyBoard keyBoard;

    private ContactsAdapter adapter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        initData();
    }

    private void initView() {
        inputView = (TextView) findViewById(R.id.tv_input);
        recyclerView = (RecyclerView) findViewById(R.id.recycle_view);
        keyBoard = (T9KeyBoard) findViewById(R.id.t9_keyboard);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        keyBoard.setOnKeyClickListener(new T9KeyBoard.onKeyClickListener() {
            @Override
            public void onResult(String str) {
                inputView.setText(str);
                SearchDataCenter.getInstance().doSearch(str);
            }

            @Override
            public void onResultLastChar(char c) {

            }
        });
    }

    private void initData() {
        ContactsManager.getInstance().initData(getContentResolver());
        List<ContactsEntity> contactsEntityList =  ContactsManager.getInstance().getContactsList();
        adapter = new ContactsAdapter(this);
        recyclerView.setAdapter(adapter);
        SearchDataCenter.getInstance().init(this, new SearchDataCenter.OnSearchCompleteListener() {
            @Override
            public void onComplete(List<SearchableEntity> list) {
                adapter.update(list);
            }
        });
        SearchDataCenter.getInstance().initSearchData(contactsEntityList);
        SearchDataCenter.getInstance().initSortWeight(SortWeight.RANK5, SortWeight.RANK4, SortWeight.RANK3, SortWeight.RANK2, SortWeight.RANK1, 1, 2);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        SearchDataCenter.getInstance().destroy();
    }
}


text:
using System;

using DotNetNuke.Entities.Modules;
using Dnn.Modules.Dashboard.Components.Host;

#endregion

namespace Dnn.Modules.Dashboard.Controls
{
    public partial class Host : PortalModuleBase
    {
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            var hostInfo = new HostInfo();
            ctlHost.DataSource = hostInfo;
            ctlHost.DataBind();
        }
    }
}


text:
<package>
  <description brief="rflex">
    ROS adaptations of the RFLEX driver.
  </description>
  <author>David V. Lu, Mikhail Medvedev</author>
  <license>GPL</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/rflex</url>
  <depend package="roscpp"/>
  <depend package="std_msgs"/>
  <depend package="sensor_msgs"/>
  <depend package="geometry_msgs"/>
  <depend package="nav_msgs" />
  <depend package="tf" />
  <depend package="angles" />

</package>


text:
This repository contains examples and SDKs for [Aspose.Tasks for Cloud](http://www.aspose.com/cloud/project-management-api.aspx).

## Why SDKs?
Aspose.Tasks for Cloud is implemented as a REST API. If you use SDK, it hides the REST API calls and lets you use Aspose.Tasks features in a native way for your preferred language.

Directory | Description
--------- | -----------
[Java SDK](https://github.com/asposetasks/Aspose_Tasks_Cloud/tree/master/SDKs/Aspose.Tasks_Cloud_SDK_for_Java)  |  Aspose.Tasks for Cloud Java SDK.

## Resources

+ **Website:** [www.aspose.com](http://www.aspose.com)
+ **Product Home:** [Aspose.Tasks for Cloud](http://www.aspose.com/cloud/project-management-api.aspx)
+ **Documentation:** [Aspose.Tasks for Cloud Documentation](http://www.aspose.com/docs/display/taskscloud/Home)
+ **Forum:** [Aspose.Tasks for Cloud Forum](http://www.aspose.com/community/forums/aspose.tasks-product-family/75/showforum.aspx)
+ **Blog:** [Aspose.Tasks for Cloud Blog](http://www.aspose.com/blogs/aspose-products/aspose-tasks-product-family.html)


text:
import os
import sys
import logging
import datetime
import time
import subprocess

from cm_environment import check_security
from hue_shared import which

LOG = logging.getLogger(__name__)

class Curl(object):

  def __init__(self, verbose=False):
    self.curl = which('curl')
    if self.curl is None:
      LOG.exception("curl is required, please install and rerun")
      sys.exit(1)

    # We will change to handle certs later
    self.basecmd = self.curl + ' -k'
    LOG.info("Checking security status")
    self.security_enabled = check_security()
    self.verbose = verbose

    if self.security_enabled:
      self.basecmd = self.basecmd + ' --negotiate -u :'

    if self.verbose:
      self.basecmd = self.basecmd + ' -v'
    else:
      self.basecmd = self.basecmd + ' -s'

  def do_curl(self, url, method='GET', follow=False, args=None):

    cmd = self.basecmd + ' -X ' + method
    if follow:
      cmd = cmd + ' -L'

    if args is not None:
      cmd = cmd + ' ' + args

    cmd = cmd + ' \'' + url + '\''
    LOG.info("OSRUN: %s" % cmd)
    curl_process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
    curl_response = curl_process.communicate()[0]
    curl_ret = curl_process.returncode
    if curl_ret > 0:
      LOG.exception("Curl failed to run succesfully: %s" % curl_response)
    return curl_response

  def do_curl_available_services(self, service_test):
    url = service_test['url']
    method = service_test['method']
    response = self.do_curl(url, method=method)
    return response


text:
<!DOCTYPE html>

    {% include head.html %}

      {% include header.html %}
      {% include drawer.html %}

          {{ content }}

      {% include footer.html %}


text:
using System;

namespace Azure.Search.Documents.Indexes.Models
{
    /// <summary> Defines a function that boosts scores based on the magnitude of a numeric field. </summary>
    public partial class MagnitudeScoringFunction : ScoringFunction
    {

        /// <summary> Initializes a new instance of MagnitudeScoringFunction. </summary>
        /// <param name="type"> Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case. </param>
        /// <param name="fieldName"> The name of the field used as input to the scoring function. </param>
        /// <param name="boost"> A multiplier for the raw score. Must be a positive number not equal to 1.0. </param>
        /// <param name="interpolation"> A value indicating how boosting will be interpolated across document scores; defaults to "Linear". </param>
        /// <param name="parameters"> Parameter values for the magnitude scoring function. </param>
        internal MagnitudeScoringFunction(string type, string fieldName, double boost, ScoringFunctionInterpolation? interpolation, MagnitudeScoringParameters parameters) : base(type, fieldName, boost, interpolation)
        {
            Parameters = parameters;
            Type = type ?? "magnitude";
        }

        /// <summary> Parameter values for the magnitude scoring function. </summary>
        public MagnitudeScoringParameters Parameters { get; set; }
    }
}


text:
from django.contrib import admin
from .models import Suggestion

class SuggestionAdmin(admin.ModelAdmin):
    pass

admin.site.register(Suggestion, SuggestionAdmin)


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
    <definition extends="default" name="visits/list">
        <put-attribute name="body" value="/WEB-INF/views/visits/list.jspx"/>
    </definition>
<definition extends="default" name="visits/show">
        <put-attribute name="body" value="/WEB-INF/views/visits/show.jspx"/>
    </definition>
<definition extends="default" name="visits/create">
        <put-attribute name="body" value="/WEB-INF/views/visits/create.jspx"/>
    </definition>
<definition extends="default" name="visits/update">
        <put-attribute name="body" value="/WEB-INF/views/visits/update.jspx"/>
    </definition>
<definition extends="default" name="visits/findVisitsByDescriptionAndVisitDate">
        <put-attribute name="body" value="/WEB-INF/views/visits/findVisitsByDescriptionAndVisitDate.jspx"/>
    </definition>
<definition extends="default" name="visits/findVisitsByDescriptionLike">
        <put-attribute name="body" value="/WEB-INF/views/visits/findVisitsByDescriptionLike.jspx"/>
    </definition>
<definition extends="default" name="visits/findVisitsByVisitDateBetween">
        <put-attribute name="body" value="/WEB-INF/views/visits/findVisitsByVisitDateBetween.jspx"/>
    </definition>
</tiles-definitions>


text:
<?php

require_once dirname(__FILE__).'/include/config.inc.php';

$page['title'] = _('Configuration of trigger displaying options');
$page['file'] = 'adm.triggerdisplayoptions.php';

require_once dirname(__FILE__).'/include/page_header.php';

$fields = [
	'problem_unack_color' =>	[T_ZBX_CLR, O_OPT, null, null, 'isset({update})',
		_('Unacknowledged PROBLEM events')
	],
	'problem_ack_color' =>		[T_ZBX_CLR, O_OPT, null, null, 'isset({update})',
		_('Acknowledged PROBLEM events')
	],
	'ok_unack_color' =>			[T_ZBX_CLR, O_OPT, null, null, 'isset({update})', _('Unacknowledged OK events')],
	'ok_ack_color' =>			[T_ZBX_CLR, O_OPT, null, null, 'isset({update})', _('Acknowledged OK events')],
	'problem_unack_style' =>	[T_ZBX_INT, O_OPT, null, IN('1'), null, _('Blinking')],
	'problem_ack_style' =>		[T_ZBX_INT, O_OPT, null, IN('1'), null, _('Blinking')],
	'ok_unack_style' =>			[T_ZBX_INT, O_OPT, null, IN('1'), null, _('Blinking')],
	'ok_ack_style' =>			[T_ZBX_INT, O_OPT, null, IN('1'), null, _('Blinking')],
	'ok_period' =>				[T_ZBX_INT, O_OPT, null, BETWEEN(0, SEC_PER_DAY), 'isset({update})',
		_('Display OK triggers for')
	],
	'blink_period' =>			[T_ZBX_INT, O_OPT, null, BETWEEN(0, SEC_PER_DAY), 'isset({update})',
		_('On status change triggers blink for')
	],
	// actions
	'update'=>					[T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null],
	'form_refresh' =>			[T_ZBX_INT, O_OPT, null, null, null]
];
check_fields($fields);

/*
 * Actions
 */
if (hasRequest('update')) {
	DBstart();
	$result = update_config([
		'problem_unack_color' => getRequest('problem_unack_color'),
		'problem_ack_color' => getRequest('problem_ack_color'),
		'ok_unack_color' => getRequest('ok_unack_color'),
		'ok_ack_color' => getRequest('ok_ack_color'),
		'problem_unack_style' => getRequest('problem_unack_style', 0),
		'problem_ack_style' => getRequest('problem_ack_style', 0),
		'ok_unack_style' => getRequest('ok_unack_style', 0),
		'ok_ack_style' => getRequest('ok_ack_style', 0),
		'ok_period' => getRequest('ok_period'),
		'blink_period' => getRequest('blink_period')
	]);
	$result = DBend($result);

	show_messages($result, _('Configuration updated'), _('Cannot update configuration'));
}

/*
 * Display
 */
$config = select_config();

// form has been submitted
if (hasRequest('form_refresh')) {
	$data = [
		'problem_unack_color' => getRequest('problem_unack_color', $config['problem_unack_color']),
		'problem_ack_color' => getRequest('problem_ack_color', $config['problem_ack_color']),
		'ok_unack_color' => getRequest('ok_unack_color', $config['ok_unack_color']),
		'ok_ack_color' => getRequest('ok_ack_color', $config['ok_ack_color']),
		'problem_unack_style' => getRequest('problem_unack_style', 0),
		'problem_ack_style' => getRequest('problem_ack_style', 0),
		'ok_unack_style' => getRequest('ok_unack_style', 0),
		'ok_ack_style' => getRequest('ok_ack_style', 0),
		'ok_period' => getRequest('ok_period', $config['ok_period']),
		'blink_period' => getRequest('blink_period', $config['blink_period'])
	];
}
else {
	$data = [
		'problem_unack_color' => $config['problem_unack_color'],
		'problem_ack_color' => $config['problem_ack_color'],
		'ok_unack_color' => $config['ok_unack_color'],
		'ok_ack_color' => $config['ok_ack_color'],
		'problem_unack_style' => $config['problem_unack_style'],
		'problem_ack_style' => $config['problem_ack_style'],
		'ok_unack_style' => $config['ok_unack_style'],
		'ok_ack_style' => $config['ok_ack_style'],
		'ok_period' => $config['ok_period'],
		'blink_period' => $config['blink_period']
	];
}

$view = new CView('administration.general.trigger.options.edit', $data);
$view->render();
$view->show();

require_once dirname(__FILE__).'/include/page_footer.php';