text:
import * as React from 'react'

import {
    Row,
    Col,
    FormGroup,
    Input,
    Table,
    InputGroup
} from 'reactstrap';

import {
    Item,
    Span,
    A,
    Box
} from 'react-html-email'

import update from 'immutability-helper';

import cloneDeep from "lodash/cloneDeep";
import * as Moment from "moment";
import Currency from "react-currency-formatter";

//this implements Ealing's camp pricing policy.

export const name = "ealing";
export const selection = "Ealing Pricing Policy";

export class Config extends React.Component<any, any>{

    constructor(props) {
        super(props);

        this.updateStandardFee = this.updateStandardFee.bind(this);
        this.updateDiscountFee = this.updateDiscountFee.bind(this);
        this.updateUnaccompaniedFee = this.updateUnaccompaniedFee.bind(this);
        this.updateUnaccompaniedDiscountFee = this.updateUnaccompaniedDiscountFee.bind(this);

        this.updateStandardFeeHalf = this.updateStandardFeeHalf.bind(this);
        this.updateDiscountFeeHalf = this.updateDiscountFeeHalf.bind(this);
        this.updateUnaccompaniedFeeHalf = this.updateUnaccompaniedFeeHalf.bind(this);
        this.updateUnaccompaniedDiscountFeeHalf = this.updateUnaccompaniedDiscountFeeHalf.bind(this);
    }

    updateStandardFee(e) {
        this.props.update(update(this.props.fee, {amount: {$set: parseFloat(e.target.value)}}));
    }

    updateDiscountFee(e) {
        this.props.update(update(this.props.fee, {amountDiscount: {$set: parseFloat(e.target.value)}}));
    }

    updateUnaccompaniedFee(e) {
        this.props.update(update(this.props.fee, {amountUnaccompanied: {$set: parseFloat(e.target.value)}}));
    }

    updateUnaccompaniedDiscountFee(e) {
        this.props.update(update(this.props.fee, {amountUnaccompaniedDiscount: {$set: parseFloat(e.target.value)}}));
    }

    updateStandardFeeHalf(e) {
        this.props.update(update(this.props.fee, {amountHalf: {$set: parseFloat(e.target.value)}}));
    }

    updateDiscountFeeHalf(e) {
        this.props.update(update(this.props.fee, {amountDiscountHalf: {$set: parseFloat(e.target.value)}}));
    }

    updateUnaccompaniedFeeHalf(e) {
        this.props.update(update(this.props.fee, {amountUnaccompaniedHalf: {$set: parseFloat(e.target.value)}}));
    }

    updateUnaccompaniedDiscountFeeHalf(e) {
        this.props.update(update(this.props.fee, {amountUnaccompaniedDiscountHalf: {$set: parseFloat(e.target.value)}}));
    }

    render() {
        //Thou shalt not ever use JS numbers for currency...
        const amount = this.props.fee.amount || 35;
        const unaccompanied = this.props.fee.amountUnaccompanied || 50;
        const unaccompaniedDiscount = this.props.fee.amountUnaccompaniedDiscount || 25;
        const discount = this.props.fee.amountDiscount || 17;

        const amountHalf = this.props.fee.amountHalf || 35;
        const unaccompaniedHalf = this.props.fee.amountUnaccompaniedHalf || 50;
        const unaccompaniedDiscountHalf = this.props.fee.amountUnaccompaniedDiscountHalf || 25;
        const discountHalf = this.props.fee.amountDiscountHalf || 17;

        return (
            <>
                <Row>
                    <Col>

Whole camp

                                Standard Rates
                                Discounted Rates

                                Unaccompanied Elfins, Pioneers & Venturers
                                <FormGroup>
                                    <InputGroup>

                                            £

                                        <Input type="number" className="form-control" placeholder="50"
                                               value={unaccompanied}
                                               onChange={this.updateUnaccompaniedFee}/>
                                    </InputGroup>
                                </FormGroup>
                                <FormGroup>
                                    <InputGroup>

                                            £

                                        <Input type="number" className="form-control" placeholder="25"
                                               value={unaccompaniedDiscount}
                                               onChange={this.updateUnaccompaniedDiscountFee}/>
                                    </InputGroup>
                                </FormGroup>

                                Elfins, Pioneers & Venturers accompanied by a responsible adult, DFs and
                                    Adults

                                    <FormGroup>
                                        <InputGroup>

                                                £

                                            <Input type="number" className="form-control" placeholder="35"
                                                   value={amount}
                                                   onChange={this.updateStandardFee}/>
                                        </InputGroup>
                                    </FormGroup>

                                <FormGroup>
                                    <InputGroup>

                                            £

                                        <Input type="number" className="form-control" placeholder="17" value={discount}
                                               onChange={this.updateDiscountFee}/>
                                    </InputGroup>
                                </FormGroup>

                    </Col>
                </Row>
                <Row>
                    <Col>

Half camp

                                Standard Rates
                                Discounted Rates

                                Unaccompanied Elfins, Pioneers & Venturers
                                <FormGroup>
                                    <InputGroup>

                                            £

                                        <Input type="number" className="form-control" placeholder="50"
                                               value={unaccompaniedHalf}
                                               onChange={this.updateUnaccompaniedFeeHalf}/>
                                    </InputGroup>
                                </FormGroup>
                                <FormGroup>
                                    <InputGroup>

                                            £

                                        <Input type="number" className="form-control" placeholder="25"
                                               value={unaccompaniedDiscountHalf}
                                               onChange={this.updateUnaccompaniedDiscountFeeHalf}/>
                                    </InputGroup>
                                </FormGroup>

                                Elfins, Pioneers & Venturers accompanied by a responsible adult, DFs and
                                    Adults

                                    <FormGroup>
                                        <InputGroup>

                                                £

                                            <Input type="number" className="form-control" placeholder="35"
                                                   value={amountHalf}
                                                   onChange={this.updateStandardFeeHalf}/>
                                        </InputGroup>
                                    </FormGroup>

                                <FormGroup>
                                    <InputGroup>

                                            £

                                        <Input type="number" className="form-control" placeholder="17" value={discountHalf}
                                               onChange={this.updateDiscountFeeHalf}/>
                                    </InputGroup>
                                </FormGroup>

                    </Col>
                </Row>
            </>);
    }
}

export class BookingForm extends React.Component<any, any>{

    render() {

        const accompanied = this.props.participants.find(p => Moment(this.props.event.startDate).diff(Moment(p.age), 'years') > 15) === undefined ? false : true;

        const amount = this.props.feeData.amount || 35;
        const unaccompanied = this.props.feeData.amountUnaccompanied || 50;
        const unaccompaniedDiscount = this.props.feeData.amountUnaccompaniedDiscount || 25;
        const discount = this.props.feeData.amountDiscount || 17;

        const amountHalf = this.props.feeData.amountHalf || 35;
        const unaccompaniedHalf = this.props.feeData.amountUnaccompaniedHalf || 50;
        const unaccompaniedDiscountHalf = this.props.feeData.amountUnaccompaniedDiscountHalf || 25;
        const discountHalf = this.props.feeData.amountDiscountHalf || 17;

        const feesOwed = getFeesOwed(this.props.event, this.props.booking.participants, this.props.booking);
        const tableLines = feesOwed.map(l =>

            {l.line}
            <Currency
                quantity={l.total}
                currency="GBP"
            />

);

        return (
            <Col>

{tableLines}

                        Total:
                        <Currency
                            quantity={feesOwed.reduce((a, c) => {
                                return a + c.total
                            }, 0)}
                            currency="GBP"
                        /> (discount: <Currency
                            quantity={feesOwed.reduce((a, c) => {
                                return a + c.discountTotal
                            }, 0)}
                            currency="GBP"
                        />)

The discounted donation is offered to all
                    families/individuals where there is no wage earner and/or the family/individual is on a low wage. This
                    would include DFs and students as well as adults and families. Cost should never be a reason for people
                    being unable to attend camp so please contact us if you need further discount.

            </Col>)

    /*
        return (

                    Suggested Donation
                    Discounted Donation

                    Unaccompanied Elfins, Pioneers & Venturers
                    £{unaccompanied.toFixed(2)}
                    £{unaccompaniedDiscount.toFixed(2)}

                    Elfins, Pioneers & Venturers accompanied by a responsible adult, DFs and Adults
                    £{amount.toFixed(2)}
                    £{discount.toFixed(2)}

                    My
                        Booking ({this.props.participants.length} {this.props.participants.length < 2 ? "person" : "people"}, {accompanied ? "Accompanied" : "Unaccompanied"})

                    £{total.toFixed(2)}
                    £{totalDiscounted.toFixed(2)}

In order for us to utilise Gift Aid the camp price has been changed to a suggested donation. If you have
                the means to donate more than the donations listed above then please do so as this will allow us to
                further subsidise poorer individuals and families. The discounted donation is offered to all
                families/individuals where there is no wage earner and/or the family/individual is on a low wage. This
                would include DFs and students as well as adults and families. Cost should never be a reason for people
                being unable to attend camp so please contact us if you need further discount. Please make cheques
                payable to Ealing District Woodcraft Folk.

)
     */
            }

}

export class ThanksRow extends React.Component<any, any>{

    render() {

        //this.props.participants
        //this.props.event.startDate

        //this.props.feeData.amount
        //
        const feesOwed = getFeesOwed(this.props.event, this.props.booking.participants, this.props.booking);
        const tableLines = feesOwed.map(l =>

            {l.line}
            <Currency
                quantity={l.total}
                currency="GBP"
            />

);

        return (<Row>
            <Col>

{tableLines}

                        Total:
                        <Currency
                            quantity={feesOwed.reduce((a, c) => {
                                return a + c.total
                            }, 0)}
                            currency="GBP"
                        /> (discount: <Currency
                            quantity={feesOwed.reduce((a, c) => {
                                return a + c.discountTotal
                            }, 0)}
                            currency="GBP"
                        />)

            </Col>
        </Row>)
    }
}

export function emailHTML(event, booking) {

    const rows = getFeesOwed(event, booking.participants, booking).map((r, i) =>

        {r.line}
        £{r.total}

);

    const total = rows.length > 1 ?

        Total
        £{getFeesOwed(event, booking.participants, booking).reduce((a, c) => {
            return a + c.total
        }, 0)} (discount: £{getFeesOwed(event, booking.participants, booking).reduce((a, c) => {
            return a + c.discountTotal
        }, 0)})

 : null;

    return (<Item>

Money:

            {rows}
            {total}

    </Item>)

}

export function getFeesOwed(event, participants, booking) {
    const accompanied = participants.find(p => Moment(event.startDate).diff(Moment(p.age), 'years') > 15) !== undefined;

    const amount = event.feeData.amount || 35;
    const unaccompanied = event.feeData.amountUnaccompanied || 50;
    const unaccompaniedDiscount = event.feeData.amountUnaccompaniedDiscount || 25;
    const discount = event.feeData.amountDiscount || 17;

    const amountHalf = event.feeData.amountHalf || 35;
    const unaccompaniedHalf = event.feeData.amountUnaccompaniedHalf || 50;
    const unaccompaniedDiscountHalf = event.feeData.amountUnaccompaniedDiscountHalf || 25;
    const discountHalf = event.feeData.amountDiscountHalf || 17;

    const filteredParticipants = cloneDeep(participants)
        .filter(p => p.name && p.age)
        .filter(p => !isUnderFive(event, p))
        .map(p => {
            if (!p.updatedAt) p.updatedAt = Moment().format("YYYY-MM-DD");
            p.days = event.partialDatesData.find(d => d.mask === p.days);
            p.days = p.days ? p.days.name : event.partialDatesData[0].name;
            return p;
        });

    const lines = event.partialDatesData.map(d => {
        const people = filteredParticipants.filter(p => p.days === d.name).length
        const isWhole = d.mask === event.partialDatesData[0].mask
        if(isWhole) {
            if(accompanied) {
                const total = people * amount
                const discountTotal = people * discount
                const line = `${people} ${people < 2 ? "person" : "people"}, accompanied for the whole camp (Discount: £${discountTotal})`
                return {line: line, total: total, discountTotal: discountTotal}
            }  else {
                const total = people * unaccompanied
                const discountTotal = people * unaccompaniedDiscount
                const line = `${people} ${people < 2 ? "person" : "people"}, unaccompanied for the whole camp (Discount: £${discountTotal})`
                return {line: line, total: total, discountTotal: discountTotal}
            }
        } else {
            if(accompanied) {
                const total = people * amountHalf
                const discountTotal = people * discountHalf
                const line = `${people} ${people < 2 ? "person" : "people"}, accompanied for half the camp (Discount: £${discountTotal})`
                return {line: line, total: total, discountTotal: discountTotal}
            }  else {
                const total = people * unaccompaniedHalf
                const discountTotal = people * unaccompaniedDiscountHalf
                const line = `${people} ${people < 2 ? "person" : "people"}, unaccompanied for half the camp (Discount: £${discountTotal})`
                return {line: line, total: total, discountTotal: discountTotal}
            }
        }
    }).filter(l => l.total > 0)

    return [...lines, ...underFives(event, participants)]

    /*
    const total = participants.length * (accompanied ? amount : unaccompanied);
    const totalDiscounted = participants.length * (accompanied ? discount : unaccompaniedDiscount);

    const line = `${participants.length} ${participants.length < 2 ? "person" : "people"}, ${accompanied ? "Accompanied" : "Unaccompanied"} (Discount: £${totalDiscounted})`;

    return [{line: line, total: total.toFixed(2)}];

     */
}

const underFives = (event, participants) => {
    const filteredParticipants = cloneDeep(participants)
        .filter(p => p.name && p.age)
        .filter(p => isUnderFive(event, p));
    if (filteredParticipants.length > 0) return [{
        line:  `${filteredParticipants.length} ${filteredParticipants.length > 1 ? 'people' : 'person'} under five for free`,
        total: 0
    }];
    else return [];
};

const isUnderFive = (e, p) => {
    return Date.parse(e.startDate) - Date.parse(p.age) < 157784630000
};


text:
//
//  KeyBoardManager.m
//  BYFCApp
//
//  Created by PengLee on 15/3/30.
//  Copyright (c) 2015年 PengLee. All rights reserved.
//

#import "KeyBoardManager.h"
#import "PL_Header.h"
@interface KeyBoardManager ()

@end

@implementation KeyBoardManager

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(ksyWillAnimation:) name:UIKeyboardDidChangeFrameNotification object:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)ksyWillAnimation:(NSNotification *)note
{
    UIView * fview = [self.view firstResponder];

    CGFloat fy = CGRectGetMaxY(fview.frame);
    NSDictionary * dict = note.userInfo;
    CGRect endFrame = [[dict objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];

    CGFloat delta = endFrame.origin.y - fy-40;

    if (delta <0)
    {
        CGAffineTransform pTransform = CGAffineTransformMakeTranslation(0, delta);
        [UIView animateWithDuration:0.25 animations:^{
            //            self.view.center = CGPointMake(self.view.center.x, self.view.center.y+delta);
            self.view.transform = pTransform;

        }];

    }
    else
    {
        CGAffineTransform pTransform = CGAffineTransformMakeTranslation(0, 0);
        [UIView animateWithDuration:0.25 animations:^{
            //            self.view.center = CGPointMake(self.view.center.x, self.view.bounds.size.height/2);
            self.view.transform = pTransform;

        }];

    }

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end

redpajama_set_name: RedPajamaGithub


text:
package com.itdotaer.access.pojo;

import java.util.Date;

/**
 * Created by jt_hu on 2017/1/5.
 */
public class Comment {

    private String email;
    private String content;
    private Integer goodStars;
    private Integer badStars;
    private Date createdAt;
    private Integer postId;

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getGoodStars() {
        return goodStars;
    }

    public void setGoodStars(Integer goodStars) {
        this.goodStars = goodStars;
    }

    public Integer getBadStars() {
        return badStars;
    }

    public void setBadStars(Integer badStars) {
        this.badStars = badStars;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Integer getPostId() {
        return postId;
    }

    public void setPostId(Integer postId) {
        this.postId = postId;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="Jukki-" name="com.example.tests.TestCreateUser" tests="3" failures="0" timestamp="23 Jul 2015 02:26:46 GMT" time="24.249" errors="0">
  <testcase name="testAddUser" time="4.469" classname="com.example.tests.TestCreateUser"/>
  <testcase name="testAddUser" time="15.381" classname="com.example.tests.TestCreateUser"/>
  <testcase name="testAddUser" time="4.399" classname="com.example.tests.TestCreateUser"/>
</testsuite> <!-- com.example.tests.TestCreateUser -->


text:
<?php

namespace Sylius\Component\Taxonomy\Model;

use Doctrine\Common\Collections\Collection;

/**
 * Taxonomy translation model interface.
 *
 * @author Gonzalo Vilaseca <gvilaseca@reiss.co.uk>
 */
interface TaxonomyTranslationInterface
{
    /**
     * Get taxonomy id.
     *
     * @return mixed
     */
    public function getId();

    /**
     * Get name.
     *
     * @return string
     */
    public function getName();

    /**
     * Set taxonomy name.
     *
     * @param string $name
     */
    public function setName($name);
}


text:
<?php
$lang['signup_text'] = "Die Anmeldung ist kostenlos. Bitte wähle ein sicheres Passwort, welches nicht mit dem vom Browserspiel 'Die-Stämme' übereinstimmt";
$lang['signup_repeat'] = "wiederholen";

$lang['signup_ok'] = "Deine Anmeldung war erfolgreich. Du kannst dich nun Einloggen und Die-Stämme Accounts mit deinem DSConnect Account verbinden.";


text:
package com.store.common.utils;

import net.sf.json.JSONObject;

import java.util.Map;

/**
 * TODO:
 *
 * @author kai
 * @create 2017/7/8 0:30
 */
public class ControllerUtil {

    /**
     * TODO:
     *
     * @param json
     *            json格式的请求
     * @param version
     *            版本号
     * @param responseMap
     *            返回的信息
     *
     * @return 返回map格式的请求
     */
    public static Map requestHandle(String json, Map responseMap, String version) {
       // 请求处理
        Map<String, Object> requestMap = JSONObject.fromObject(json);
        responseMap.put("id", requestMap.get("id"));
        responseMap.put("type", requestMap.get("type"));
        responseMap.put("action", "response");
        responseMap.put("version", version);
        Object inVersion = requestMap.get("version");
        AssertUtil.notNull(inVersion, "1", "version不能为空");
        inVersion = inVersion.toString().trim();
        AssertUtil.isTrue(inVersion.equals(version), "1", "接口版本错误");
        return requestMap;
    }

    public static Map responseSuccessHandle(Map responseMap) {
        // 返回处理
        responseMap.put("status", "0");
        responseMap.put("desc", "success");
        return null;
    }

}


text: brew install wget


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycologia 7(4): 176 (1915)

#### Original name
Milesia consimilis Arthur

### Remarks
null


text:
package sqlstore

import (
	"context"
	"database/sql"
	"fmt"
	"io"
	"io/ioutil"
	"math"
	"sort"
	"time"

	"github.com/savaki/eventsource"
)

const (
	sqlInsert        = `INSERT INTO {{ .TableName }} (id, version, data, at) VALUES (?, ?, ?, ?)`
	sqlSelectVersion = `SELECT version, data, at FROM {{ .TableName }} WHERE id = ? and version <= ?`
	sqlSelect        = `SELECT version, data, at FROM {{ .TableName }} WHERE id = ?`
)

type OpenFunc func() (*sql.DB, error)

type Store struct {
	openFunc         OpenFunc
	tableName        string
	insertSQL        string
	selectSQL        string
	selectVersionSQL string
	debug            bool
	writer           io.Writer
}

func (s *Store) Save(ctx context.Context, aggregateID string, records ...eventsource.Record) error {
	db, err := s.openFunc()
	if err != nil {
		return err
	}
	defer db.Close()

	tx, err := db.Begin()
	if err != nil {
		return err
	}

	s.log("Saving", len(records), "events.")

	err = func(tx *sql.Tx) error {
		stmt, err := tx.Prepare(s.insertSQL)
		if err != nil {
			return err
		}
		defer stmt.Close()

		for _, record := range records {
			s.log("Saving version,", record.Version)
			_, err = stmt.Exec(aggregateID, record.Version, record.Data, record.At)
			if err != nil {
				return err
			}
		}

		return nil
	}(tx)

	if err == nil {
		s.log("Ok")
		return tx.Commit()
	} else {
		s.log("Failed.  Rolling back transaction.")
		return tx.Rollback()
	}
}

func (s *Store) Fetch(ctx context.Context, aggregateID string, version int) (eventsource.History, error) {
	if version == 0 {
		version = math.MaxInt32
	}

	db, err := s.openFunc()
	if err != nil {
		return eventsource.History{}, err
	}
	defer db.Close()

	s.log("Reading events with aggregrateID,", aggregateID)
	query := s.selectSQL
	if version > 0 {
		query = s.selectVersionSQL
	}
	rows, err := db.QueryContext(ctx, query, aggregateID, version)
	if err != nil {
		return eventsource.History{}, err
	}
	defer rows.Close()

	s.log("Scanning rows")
	history := make(eventsource.History, 0, version+1)
	for rows.Next() {
		s.log("Scanning row")
		version := 0
		data := []byte{}
		at := eventsource.EpochMillis(0)
		err := rows.Scan(&version, &data, &at)
		if err != nil {
			return eventsource.History{}, err
		}

		s.log("Reading version,", version)
		history = append(history, eventsource.Record{
			Version: version,
			At:      at,
			Data:    data,
		})
	}

	sort.Slice(history, func(i, j int) bool {
		return history[i].Version < history[j].Version
	})

	s.log("Successfully read", len(history), "events")
	return history, nil
}

func (s *Store) log(args ...interface{}) {
	if !s.debug {
		return
	}

	v := append([]interface{}{time.Now().Format(time.StampMilli)}, args...)
	fmt.Fprintln(s.writer, v...)
}

func New(tableName string, openFunc OpenFunc, opts ...Option) *Store {
	insertSQL := reTableName.ReplaceAllString(sqlInsert, tableName)
	selectSQL := reTableName.ReplaceAllString(sqlSelect, tableName)
	selectVersionSQL := reTableName.ReplaceAllString(sqlSelectVersion, tableName)

	s := &Store{
		openFunc:         openFunc,
		tableName:        tableName,
		insertSQL:        insertSQL,
		selectSQL:        selectSQL,
		selectVersionSQL: selectVersionSQL,
		writer:           ioutil.Discard,
	}

	for _, opt := range opts {
		opt(s)
	}

	return s
}


text:
namespace gfx {
class FontList;
}

namespace views {

class View;

// Provides a default provider of fonts to use in toolkit-views UI.
class VIEWS_EXPORT TypographyProvider {
 public:
  TypographyProvider() = default;

  TypographyProvider(const TypographyProvider&) = delete;
  TypographyProvider& operator=(const TypographyProvider&) = delete;

  virtual ~TypographyProvider() = default;

  // Gets the FontDetails for the given |context| and |style|.
  virtual ui::ResourceBundle::FontDetails GetFontDetails(int context,
                                                         int style) const;

  // Convenience wrapper that gets a FontList for |context| and |style|.
  const gfx::FontList& GetFont(int context, int style) const;

  // Gets the color for the given |context| and |style|. |view| is the View
  // requesting the color.
  virtual SkColor GetColor(const views::View& view,
                           int context,
                           int style) const;

  // Gets the line spacing.  By default this is the font height.
  virtual int GetLineHeight(int context, int style) const;

  // Returns whether the given style can be used in the given context.
  virtual bool StyleAllowedForContext(int context, int style) const;

  // Returns the weight that will result in the ResourceBundle returning an
  // appropriate "medium" weight for UI. This caters for systems that are known
  // to be unable to provide a system font with weight other than NORMAL or BOLD
  // and for user configurations where the NORMAL font is already BOLD. In both
  // of these cases, NORMAL is returned instead.
  static gfx::Font::Weight MediumWeightForUI();
};

}  // namespace views

#endif  // UI_VIEWS_STYLE_TYPOGRAPHY_PROVIDER_H_


text:
///////////////////////////////////////////////////////////////
//  Copyright 2013 John Maddock. Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_

#ifndef BOOST_MP_CPP_INT_SERIALIZE_HPP
#define BOOST_MP_CPP_INT_SERIALIZE_HPP

namespace boost {

namespace archive{

class binary_oarchive;
class binary_iarchive;

}

namespace serialization {

namespace mp = boost::multiprecision;

namespace cpp_int_detail{

using namespace boost::multiprecision;
using namespace boost::multiprecision::backends;

template <class T>
struct is_binary_archive : public mpl::false_ {};
template <>
struct is_binary_archive<boost::archive::binary_oarchive> : public mpl::true_ {};
template <>
struct is_binary_archive<boost::archive::binary_iarchive> : public mpl::true_ {};

//
// We have 8 serialization methods to fill out (and test), they are all permutations of:
// Load vs Store.
// Trivial or non-trivial cpp_int type.
// Binary or not archive.
//
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::false_ const&)
{
   // Load.
   // Non-trivial.
   // Non binary.

   bool s;
   ar & s;
   std::size_t limb_count;
   std::size_t byte_count;
   ar & byte_count;
   limb_count = byte_count / sizeof(limb_type) + ((byte_count % sizeof(limb_type)) ? 1 : 0);
   val.resize(limb_count, limb_count);
   limb_type* pl = val.limbs();
   for(std::size_t i = 0; i < limb_count; ++i)
   {
      pl[i] = 0;
      for(std::size_t j = 0; (j < sizeof(limb_type)) && byte_count; ++j)
      {
         unsigned char byte;
         ar & byte;
         pl[i] |= static_cast<limb_type>(byte) << (j * CHAR_BIT);
         --byte_count;
      }
   }
   if(s != val.sign())
      val.negate();
   val.normalize();
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::false_ const&)
{
   // Store.
   // Non-trivial.
   // Non binary.

   bool s = val.sign();
   ar & s;
   limb_type* pl = val.limbs();
   std::size_t limb_count = val.size();
   std::size_t byte_count = limb_count * sizeof(limb_type);
   ar & byte_count;

   for(std::size_t i = 0; i < limb_count; ++i)
   {
      limb_type l = pl[i];
      for(std::size_t j = 0; j < sizeof(limb_type); ++j)
      {
         unsigned char byte = static_cast<unsigned char>((l >> (j * CHAR_BIT)) & ((1u << CHAR_BIT) - 1));
         ar & byte;
      }
   }
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::false_ const&)
{
   // Load.
   // Trivial.
   // Non binary.
   bool s;
   typename Int::local_limb_type l = 0;
   ar & s;
   std::size_t byte_count;
   ar & byte_count;
   for(std::size_t i = 0; i < byte_count; ++i)
   {
      unsigned char b;
      ar & b;
      l |= static_cast<typename Int::local_limb_type>(b) << (i * CHAR_BIT);
   }
   *val.limbs() = l;
   if(s != val.sign())
      val.negate();
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::false_ const&)
{
   // Store.
   // Trivial.
   // Non binary.
   bool s = val.sign();
   typename Int::local_limb_type l = *val.limbs();
   ar & s;
   std::size_t limb_count = sizeof(l);
   ar & limb_count;
   for(std::size_t i = 0; i < limb_count; ++i)
   {
      unsigned char b = static_cast<unsigned char>(static_cast<typename Int::local_limb_type>(l >> (i * CHAR_BIT)) & static_cast<typename Int::local_limb_type>((1u << CHAR_BIT) - 1));
      ar & b;
   }
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::false_ const&, mpl::true_ const&)
{
   // Load.
   // Non-trivial.
   // Binary.
   bool s;
   std::size_t c;
   ar & s;
   ar & c;
   val.resize(c, c);
   ar.load_binary(val.limbs(), c * sizeof(limb_type));
   if(s != val.sign())
      val.negate();
   val.normalize();
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::false_ const&, mpl::true_ const&)
{
   // Store.
   // Non-trivial.
   // Binary.
   bool s = val.sign();
   std::size_t c = val.size();
   ar & s;
   ar & c;
   ar.save_binary(val.limbs(), c * sizeof(limb_type));
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::false_ const&, mpl::true_ const&, mpl::true_ const&)
{
   // Load.
   // Trivial.
   // Binary.
   bool s;
   ar & s;
   ar.load_binary(val.limbs(), sizeof(*val.limbs()));
   if(s != val.sign())
      val.negate();
}
template <class Archive, class Int>
void do_serialize(Archive& ar, Int& val, mpl::true_ const&, mpl::true_ const&, mpl::true_ const&)
{
   // Store.
   // Trivial.
   // Binary.
   bool s = val.sign();
   ar & s;
   ar.save_binary(val.limbs(), sizeof(*val.limbs()));
}

}

template<class Archive, unsigned MinBits, unsigned MaxBits, mp::cpp_integer_type SignType, mp::cpp_int_check_type Checked, class Allocator>
void serialize(Archive & ar, mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& val, const unsigned int /*version*/)
{
   typedef typename Archive::is_saving save_tag;
   typedef mpl::bool_<mp::backends::is_trivial_cpp_int<mp::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> trivial_tag;
   typedef typename cpp_int_detail::is_binary_archive<Archive>::type binary_tag;

   // Just dispatch to the correct method:
   cpp_int_detail::do_serialize(ar, val, save_tag(), trivial_tag(), binary_tag());
}

}} // namespaces

#endif // BOOST_MP_CPP_INT_SERIALIZE_HPP


text:
require "spec_helper"

describe Openlogi::Response do

  describe "#bad_request?" do
    it "returns true if response code is 400" do
      http_response = double("response", response_code: 400)
      response = Openlogi::Response.new(http_response)
      expect(response.bad_request?).to eq(true)
    end

    it "returns false if response code is not 400" do
      http_response = double("response", response_code: 200)
      response = Openlogi::Response.new(http_response)
      expect(response.bad_request?).to eq(false)
    end
  end

  describe "#validate!" do
    context "response is success" do
      it "does nothing" do
        response = Openlogi::Response.new(double("response", response_code: 200))
        expect { response.validate! }.not_to raise_error
      end
    end

    context "response is a bad request" do
      it "raises BadRequestError" do
        response = Openlogi::Response.new(double("response", response_code: 400, response_body: "\{\"error_description\":\"foo\"\}"))
        expect { response.validate! }.to raise_error(Openlogi::BadRequestError, "foo")
      end
    end

    context "response is access denied" do
      it "raises AccessDeniedError" do
        response = Openlogi::Response.new(double("response", response_code: 401, response_body: "\{\"error_description\":\"foo\"\}"))
        expect { response.validate! }.to raise_error(Openlogi::AccessDeniedError, "foo")
      end
    end

    context "response is a server error" do
      it "raises InternalServerError" do
        response = Openlogi::Response.new(double("response", response_code: 500, response_body: "\{\"error_description\":\"foo\"\}"))
        expect { response.validate! }.to raise_error(Openlogi::InternalServerError, "foo")
      end
    end
  end

  describe "#error" do
    it "returns error from json response" do
      http_response = double("response", response_body: "\{\"error\":\"foo error\"\}")
      response = Openlogi::Response.new(http_response)
      expect(response.error).to eq("foo error")
    end
  end

  describe "#error_description" do
    it "returns error_description from json response" do
      http_response = double("response", response_body: "\{\"error_description\":\"foo description\"\}")
      response = Openlogi::Response.new(http_response)
      expect(response.error_description).to eq("foo description")
    end
  end
end


text:
<?xml version="1.0"?>
<nonmodel xmlns="http://www.cellml.org/cellml/2.0#" name="sin_approximations_import">
</nonmodel>


text:
<?php

namespace Coramer\Sigtec\ReportTechnicalBundle\Repository\Master;

use Coramer\Sigtec\CoreBundle\Repository\Model\MasterEntityRepository;

/**
 * SubSegmentRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class SubSegmentRepository extends MasterEntityRepository
{
}


text:
package com.example

import android.app.Activity
import android.os.Bundle

class MainActivity extends Activity with TypedFindView {
    lazy val textview = findView(TR.text)

    /** Called when the activity is first created. */
    override def onCreate(savedInstanceState: Bundle): Unit = {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.main)
        textview.setText("Hello world, from Foo")
    }
}


text:
# FactJ

This API was built to be used in Java applications in order to build objects.
It helps, mainly, developers who create unit tests and need some organized
way of building objects to use while testing. It is similar to the
[FactoryGirl][1] project that is made for Ruby applications.

## Installation

Download the JAR from [here][2] and add it to your classpath.

## Factories

In order to build objects, you will need `factories`. You can create as
many of them as you need and from wherever you want in your code. Although, it's
a good idea to do it in some specific place. I like to put factories under
a `factories` package.

As an example, here is a factory to build objects of the Address class:

```java
package myapp.test.factories;

import static factj.FactJHelper.fabricate;
import static factj.FactJHelper.field;
import myapp.models.Address;

public abstract class AddressFactory {
  static {
    fabricate(Address.class,
        field("address", "Some address"));
  }

  /**
   * This method will be used to force the ClassLoader to load this
   * class and execute the static block above. I'll explain it better
   * later.
   */
  public static void load() { }
}
```

The method `fabricate` will create and register a new factory
of Address.class. This factory will create objects of type Address, setting
the field `address` with the value "Some address". There are
a few other ways to define the value a field must receive, but let's stay
simple for now in order to understand what's happening.

To use the factory, do:

```java
  // ...
    AddressFactory.load();
    Address address1 = (Address) FactJ.build(Address.class));
    System.out.println(address1.getAddress()); // Will print "Some address".
  // ...
```

In the first line, we called the method `load()` that does nothing.
Unfortunately this is necessary to force the ClassLoader to execute the
static block in the AddressFactory to create and register our factory in
FactJ. If you do not do this, the `FactJ.build()` will return
`null`, since it will not have the factory created. If you can think of
a better way of doing this, please let me know.

## Persisting Objects

If you are using FactJ to build objects to test your app, probably you'll want
to save the generated objects in a test database. To do so, you must set a
`Persistence` implementation in the FactJ class to manage it.

```java
package myapp.test;

import factj.Persistence;

public class MyPersistence implements Persistence {
  @Override
  public void save(Object o) {
    // Do your job and save the object.
    new GenericDao().persist(o);
  }
}
```

And, before you create objects:

```java
    FactJ.setPersistence(new MyPersistence());
    FactJ.create(Address.class);
```

Note that instead of `FactJ.build` we call `FactJ.create`
that does the same thing as the first one, but **saves** the
object after it's built. The method `MyPersistence.save` will be
called every time the `FactJ.create` method is invoked.

## Factory Overloading

If you, for some reason, need to create more than one factory for the same
Class, you can do this by naming them:

```java
package myapp.test.factories;

import static factj.FactJHelper.fabricate;
import static factj.FactJHelper.field;
import myapp.models.Person;

public abstract class PersonFactory {
  static {
    fabricate(Person.class,
        field("name", "Diego"),
        field("client", false));

    fabricate(Person.class, "clients",
        field("name", "Diego"),
        field("client", true));
  }

  // ...
}
```

Here we created two factories for Person.class. The first one doesn't have
a name and will be de default factory. However, the second one
**does** have a name, it's "clients".
Notice that the second one sets the field `client` to `true`. To use them:

```java
    PersonFactory.load();
    FactJ.build(Person.class); // will use the first one
    FactJ.build(Person.class, "clients"); // will use the second one
```

Using the name of the factory, FactJ will select the correct one to call.

## Customizing Fields

A Factory receives a bunch of `Decorator` objects in its constructor.
They are used to modify something in the object when it's built. For each object
built, all of the decorators will be invoked to customize it.

There are a few built-in helper methods that helps out defining decorators.
You already saw one of them: `field("address", "Some address")`.

### FieldDecorator

This decorator just assigns the given value to the given field, like you
saw on the first example.

```java
package myapp.test.factories;

import static factj.FactJHelper.fabricate;
import static factj.FactJHelper.field;
import myapp.models.Address;

public abstract class AddressFactory {
  static {
    fabricate(Address.class,
        field("address", "Some address"));
  }

  // ...
}
```

### SequenceDecorator

This decorator gives the field a unique value based on a sequence, similarly
to a database sequence:

```java
package myapp.test.factories;

import static factj.FactJHelper.fabricate;
import static factj.FactJHelper.field;
import static factj.FactJHelper.sequence;
import myapp.models.Person;

public abstract class PersonFactory {
  static {
    fabricate(Person.class,
        sequence("id"), // You may not want to set this field when persisting object to a database.
        field("name", "Diego"),
        field("email", "mymail@gmail.com"));
  }

  // ...
}
```

Each time you call `FactJ.build` or `FactJ.create`, the
new object's id field will receive, first, 1, then 2, then 3 and so on.

Now, let's suppose you validates the uniqueness of e-mails. We don't want to
create an invalid Person when creating the second one with the same e-mail as
the first one. Then:

```java
package myapp.test.factories;

import static factj.FactJHelper.fabricate;
import static factj.FactJHelper.field;
import static factj.FactJHelper.sequence;
import factj.decorators.SequenceDecorator.Sequence;
import myapp.models.Person;

public abstract class PersonFactory {
  static {
    fabricate(Person.class,
        sequence("id"), // You may not want to set this field when persisting object to a database.
        field("name", "Diego"),
        sequence("email", new Sequence() {
          @Override
          public Object generate(int count) {
            return "person" + count + "@gmail.com";
          }
        });
  }

  // ...
}
```

This way, the first person built will have the email person1@gmail.com, and
the second one will have person2@gmail.com and so on.

### AssociationDecorator

Very often, we have attributes that references other classes of ours. If you
need to populate attributes like this with objects built by FactJ,
AssociationDecorator is the way to go.

```java
package myapp.test.factories;

import static factj.FactJHelper.fabricate;
import static factj.FactJHelper.field;
import static factj.FactJHelper.association;
import myapp.models.Person;

public abstract class PersonFactory {
  static {
    fabricate(Person.class,
        field("name", "Diego"),
        association("address"));
  }

  // ...
}
```

That's it. The decorator that `association` returns will lookup for
the Class of the given field and invoke `FactJ.create` passing
the field's Class to it. The object returned by FactJ will be set on the field.

It is **important** to notice that every association will be
persisted in the database if you set the Persistence object.

Now, let's say you want to populate an association with an object of another
Class, different from that your attribute is declared with. You need to do this:

```java
    fabricate(Person.class,
        field("name", "Diego"),
        association("address", AnotherClass.class));
```

The FactJ will lookup for a factory for AnotherClass in order to build the
object. Be aware that you *need* to have a registered factory for AnotherClass.
Otherwise, the field will get null.

Also, it is possible to customize the name of the factory that you want to use:

```java
    fabricate(Person.class,
        field("name", "Diego"),
        association("address", "nameOfTheFactory"));
```

In this case, you *need* to have a registered factory for Address with the
name set to "nameOfTheFactory". Alternatively, you can customize both the
Class and the factory name:

```java
    fabricate(Person.class,
        field("name", "Diego"),
        association("address", AnotherClass.class, "nameOfTheFactory"));
```

### Custom Decorator

If the built-in decorators doesn't fit your needs, you can create your own:

```java
    fabricate(Person.class,
        field("name", "Diego"),
        new Decorator<Person>() {
          @Override
          public void decorate(Person p) {
            // Customize your object
            p.setCreatedAt(MyUtils.getCurrentTime());
          }
        });
```

You may need to do something like that, but, specifically in this example,
it's better to create a new `FieldDecorator` and just override its
method `getValue()`, like this:

```java
    fabricate(Person.class,
        field("name", "Diego"),
        new FieldDecorator("createdAt") {
          @Override
          public Object getValue() {
            return MyUtils.getCurrentTime();
          }
        });
```

## Customizing Objects "On The Fly"

Since version 1.1, it's possible to customize an object as you build it.
If, for example, you want to customize an object before it gets saved
and you don't want to modify your factory because it's a special case,
you can do this:

```java
    Address a = (Address) FactJ.create(Address.class, new Decorator<Address>() {
      @Override
      public void decorate(Address a) {
        a.setAddress("another");
      }
    });
```

This way, only the object built in this call will be customized by that
decorator. You can pass as many decorators as you want to the `create`
and `build` methods.

## Testing

There is a source folder named `test`. Just run the app as JUnit Test.

## See Also

* [Changelog](CHANGELOG.md)

[1]:https://github.com/thoughtbot/factory_girl
[2]:https://sourceforge.net/projects/factj/files/

[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/ba8147ab9e41653f76515c8487b67ad7 "githalytics.com")](http://githalytics.com/nerde/FactJ)


text:
/**
 *
 */
package br.com.swconsultoria.efd.contribuicoes.registros.blocoA;

/**
 * @author Yuri Lemes
 *
 */
public class RegistroA110 {

	private final String reg = "A110";
	private String cod_inf;
	private String txt_compl;

	/**
	 * @return the cod_inf
	 */
	public String getCod_inf() {
		return cod_inf;
	}

	/**
	 * @param cod_inf
	 *            the cod_inf to set
	 */
	public void setCod_inf(String cod_inf) {
		this.cod_inf = cod_inf;
	}

	/**
	 * @return the txt_compl
	 */
	public String getTxt_compl() {
		return txt_compl;
	}

	/**
	 * @param txt_compl
	 *            the txt_compl to set
	 */
	public void setTxt_compl(String txt_compl) {
		this.txt_compl = txt_compl;
	}

	/**
	 * @return the reg
	 */
	public String getReg() {
		return reg;
	}

}


text:
package cloudprovider

import (
	// Cloud providers
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/aws"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/azure"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/gce"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/openstack"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/ovirt"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/photon"
	_ "k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere"
)


text:
<?php

/*
 * This file is part of Sulu.
 *
 * (c) MASSIVE ART WebServices GmbH
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Sulu\Bundle\ContactBundle\Entity;

use JMS\Serializer\Annotation\Exclude;
use JMS\Serializer\Annotation\Groups;

/**
 * AddressType.
 */
class AddressType implements \JsonSerializable
{
    /**
     * @var string
     * @Groups({"fullAccount","fullContact"})
     */
    private $name;

    /**
     * @var int
     * @Groups({"fullAccount","fullContact"})
     */
    private $id;

    /**
     * @var \Doctrine\Common\Collections\Collection
     * @Exclude
     */
    private $addresses;

    /**
     * Constructor.
     */
    public function __construct()
    {
        $this->addresses = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * To force id = 1 in load fixtures.
     *
     * @param int $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * Set name.
     *
     * @param string $name
     *
     * @return AddressType
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Get id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Add addresses.
     *
     * @param \Sulu\Bundle\ContactBundle\Entity\Address $addresses
     *
     * @return AddressType
     */
    public function addAddresse(\Sulu\Bundle\ContactBundle\Entity\Address $addresses)
    {
        $this->addresses[] = $addresses;

        return $this;
    }

    /**
     * Remove addresses.
     *
     * @param \Sulu\Bundle\ContactBundle\Entity\Address $addresses
     */
    public function removeAddresse(\Sulu\Bundle\ContactBundle\Entity\Address $addresses)
    {
        $this->addresses->removeElement($addresses);
    }

    /**
     * Get addresses.
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAddresses()
    {
        return $this->addresses;
    }

    /**
     * (PHP 5 >= 5.4.0)

     * Specify data which should be serialized to JSON.
     *
     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed data which can be serialized by json_encode,
     *               which is a value of any type other than a resource.
     */
    public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'name' => $this->getName(),
        ];
    }

    /**
     * Add addresses.
     *
     * @param \Sulu\Bundle\ContactBundle\Entity\Address $addresses
     *
     * @return AddressType
     */
    public function addAddress(\Sulu\Bundle\ContactBundle\Entity\Address $addresses)
    {
        $this->addresses[] = $addresses;

        return $this;
    }

    /**
     * Remove addresses.
     *
     * @param \Sulu\Bundle\ContactBundle\Entity\Address $addresses
     */
    public function removeAddress(\Sulu\Bundle\ContactBundle\Entity\Address $addresses)
    {
        $this->addresses->removeElement($addresses);
    }
}


text:
/*
 * snap_pg.c: packet generator snap interface
 *
 * Copyright (c) 2008 Eliot Dresselhaus
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#include <vlib/vlib.h>
#include <vnet/pg/pg.h>
#include <vnet/snap/snap.h>

typedef struct {
  pg_edit_t oui;
  pg_edit_t protocol;
} pg_snap_header_t;

static inline void
pg_snap_header_init (pg_snap_header_t * e)
{
  pg_edit_init (&e->oui, snap_header_t, oui);
  pg_edit_init (&e->protocol, snap_header_t, protocol);
}

uword
unformat_pg_snap_header (unformat_input_t * input, va_list * args)
{
  pg_stream_t * s = va_arg (*args, pg_stream_t *);
  pg_snap_header_t * h;
  u32 group_index, error;

  h = pg_create_edit_group (s, sizeof (h[0]), sizeof (snap_header_t),
			    &group_index);
  pg_snap_header_init (h);

  error = 1;
  if (! unformat (input, "%U -> %U",
		  unformat_pg_edit,
		    unformat_snap_protocol, &h->oui, &h->protocol))
    goto done;

  {
    snap_main_t * pm = &snap_main;
    snap_protocol_info_t * pi = 0;
    pg_node_t * pg_node = 0;

    if (h->oui.type == PG_EDIT_FIXED
	&& h->protocol.type == PG_EDIT_FIXED)
      {
	u8 * o = h->oui.values[PG_EDIT_LO];
	u8 * p = h->protocol.values[PG_EDIT_LO];
	snap_header_t h;

	h.oui[0] = o[0];
	h.oui[1] = o[1];
	h.oui[2] = o[2];
	h.protocol = *(u16 *) p;
	pi = snap_get_protocol_info (pm, &h);
	if (pi && pi->node_index != ~0)
	  pg_node = pg_get_node (pi->node_index);
      }

    if (pg_node && pg_node->unformat_edit
	&& unformat_user (input, pg_node->unformat_edit, s))
      ;

    else if (! unformat_user (input, unformat_pg_payload, s))
      goto done;
  }

  error = 0;
 done:
  if (error)
    pg_free_edit_group (s);
  return error == 0;
}


text:
try:
    from types import ClassType
except ImportError:
    # Python 3
    CHECK_TYPES = (type,)
else:
    # Python 2: new and old-style classes
    CHECK_TYPES = (type, ClassType)
import warnings

from oscar.utils.deprecation import RemovedInOscar16Warning

def deprecated(obj):
    if isinstance(obj, CHECK_TYPES):
        return _deprecated_cls(cls=obj)
    else:
        return _deprecated_func(f=obj)

def _deprecated_func(f, warn_cls=RemovedInOscar16Warning):
    def _deprecated(*args, **kwargs):
        message = "Method '%s' is deprecated and will be " \
            "removed in the next version of django-oscar" \
            % f.__name__
        warnings.warn(message, warn_cls, stacklevel=2)
        return f(*args, **kwargs)
    return _deprecated

def _deprecated_cls(cls, warn_cls=RemovedInOscar16Warning):
    class Deprecated(cls):
        def __init__(self, *args, **kwargs):
            message = "Class '%s' is deprecated and will be " \
                "removed in the next version of django-oscar" \
                % cls.__name__
            warnings.warn(message, warn_cls, stacklevel=2)
            super(Deprecated, self).__init__(*args, **kwargs)
    return Deprecated


text:
*This is a fork of [autofill-event](https://github.com/tbosch/autofill-event) by TBosch. That shim depends on jQuery on the page this fork does not*

This is a polyfill that fires change events when browsers autofill form fields without firing a change event.

## Install

* `npm install vanilla-autofill-event`

## Usage

Add the script `autofill-event.js`,

This will do the following:

- after DOMContentLoaded: check all input fields
- a field is left: check all other fields in the same form

```js
document.querySelector('input').addEventListener('change', function(event) {
  console.log('Got a CHANGE');
});
```

## How it works

1. Remember all changes to input elements by the user (listening for change events)
and also by JavaScript.
That changed value is stored on the element in a private property.

2. Checking an element for auto fill:
Compare the current `value` of the element with the remembered value. If it's different,
trigger a change event.

## Tests

Unit tests

  1. `npm install`
  1. `npm test`

Manual Tests

  1. `npm install`
  1. `scripts/webserver.js`
  1. open the [manual runner](http://localhost:8000/index.html) and follow instructions

Notes:

  * They need to be run with a webserver and without iframes, otherwise Chrome would not autofill username/password


text:
namespace Json {
  class Value;
} // namespace Json

namespace webdriver {

// Forward declaration of classes.
class Browser;

class Element {
 public:
  Element(IHTMLElement* element, HWND containing_window_handle);
  Element(IHTMLElement* element,
          HWND containing_window_handle,
          const std::string& element_id);
  virtual ~Element(void);
  Json::Value ConvertToJson(void);
  std::string GetTagName(void);
  int GetLocationOnceScrolledIntoView(const ElementScrollBehavior scroll,
                                      LocationInfo* location,
                                      std::vector<LocationInfo>* frame_locations);
  int GetStaticClickLocation(LocationInfo* click_location);
  int GetClickLocation(const ElementScrollBehavior scroll_behavior,
                       LocationInfo* element_location,
                       LocationInfo* click_location);
  int GetAttributeValue(const std::string& attribute_name,
                        VARIANT* attribute_value);
  int GetPropertyValue(const std::string& property_name,
                       VARIANT* property_value);
  int GetCssPropertyValue(const std::string& property_name,
                          std::string* property_value);

  int IsDisplayed(bool ignore_opacity, bool* result);
  bool IsEnabled(void);
  bool IsXmlDocument(IHTMLDocument2* doc);
  bool IsSelected(void);
  bool IsInteractable(void);
  bool IsEditable(void);
  bool IsFocusable(void);
  bool IsAttachedToDom(void);
  bool IsDocumentFocused(IHTMLDocument2* focused_doc);
  bool IsObscured(LocationInfo* click_location,
                  std::string* obscuring_element_description);

  std::string element_id(void) const { return this->element_id_; }
  IHTMLElement* element(void) { return this->element_; }

 private:
  int GetLocation(LocationInfo* location,
                  std::vector<LocationInfo>* frame_locations);
  LocationInfo CalculateClickPoint(const LocationInfo location,
                                   const bool document_contains_frames);
  bool GetClickableViewPortLocation(const bool document_contains_frames,
                                    LocationInfo* location);
  bool IsLocationInViewPort(const LocationInfo location,
                            const bool document_contains_frames);
  bool IsLocationVisibleInFrames(const LocationInfo location,
                                 const std::vector<LocationInfo> frame_locations);
  bool IsHiddenByOverflow();
  bool AppendFrameDetails(std::vector<LocationInfo>* frame_locations);
  int GetContainingDocument(const bool use_dom_node, IHTMLDocument2** doc);
  int GetDocumentFromWindow(IHTMLWindow2* parent_window,
                            IHTMLDocument2** parent_doc);
  bool IsInline(void);
  static bool RectHasNonZeroDimensions(IHTMLRect* rect);

  bool HasFirstChildTextNodeOfMultipleChildren(void);
  bool GetTextBoundaries(LocationInfo* text_info);

  bool GetComputedStyle(IHTMLCSSStyleDeclaration** computed_style);

  std::string element_id_;
  CComPtr<IHTMLElement> element_;
  HWND containing_window_handle_;
};

} // namespace webdriver

#endif // WEBDRIVER_IE_ELEMENT_H_


text:
module Padrino
  module Generators
    class SunspotGenerator < Thor::Group

      Padrino::Generators.add_generator(:sunspot, self)

      def self.source_root; File.expand_path(File.dirname(__FILE__)); end
      def self.banner; "padrino-gen sunspot"; end

      include Thor::Actions
      include Padrino::Generators::Actions

      desc "Description:\n\n\tpadrino-gen sunspot generates a default configuration for Sunspot"

      class_option :root, :desc => 'The root destination', :aliases => '-r', :default => '.', :type => :string

      ##
      # Execute Sunspot config generation
      #
      def create_sunspot
        return unless valid_config_for?

        template 'templates/sunspot.yml', destination_root('config/sunspot.yml')
      end

      private

      ##
      # Validate model characteristics
      # Alert if the configuration file already exists
      #
      def valid_config_for?
        self.destination_root = options[:root]
        return false unless correct_path?

        return false if config_file_exists?

        true
      end

      ##
      # Check app path
      #
      def correct_path?
        return true if in_app_root?
        say 'You are not at the root of a Padrino application! (config/boot.rb not found)'
        false
      end

      def config_file_exists?
        return true unless File.exists? destination_root('config/sunspot.yml')
        say 'An existing Sunspot configuration file was found!'
        false
      end
    end
  end
end


text:
package com.example.danieltilley.volleyapp;

//This is a singleton class that is used in conjunction with Volley
//Must be specified in manifest file using - android:name="ClassName" -

import android.app.Application;
import android.text.TextUtils;

import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.Volley;

/**
 * Created by danieltilley on 18/01/2017.
 */

public class AppController extends Application {

    public static final String TAG = AppController.class
            .getSimpleName();

    private RequestQueue mRequestQueue;
    private ImageLoader mImageLoader;

    private static AppController mInstance;

    @Override
    public void onCreate() {

        super.onCreate();

        mInstance = this;
    }

    public static synchronized AppController getInstance() {
        return mInstance;
    }

    public RequestQueue getRequestQueue() {
        if (mRequestQueue == null) {
            mRequestQueue = Volley.newRequestQueue(getApplicationContext());
        }

        return mRequestQueue;
    }

    public ImageLoader getImageLoader() {
        getRequestQueue();
        if (mImageLoader == null) {
            mImageLoader = new ImageLoader(this.mRequestQueue,
                    new LruBitmapCache());
        }
        return this.mImageLoader;
    }

    public <T> void addToRequestQueue(Request<T> req, String tag) {
        // set the default tag if tag is empty
        req.setTag(TextUtils.isEmpty(tag) ? TAG : tag);
        getRequestQueue().add(req);
    }

    public <T> void addToRequestQueue(Request<T> req) {
        req.setTag(TAG);
        getRequestQueue().add(req);
    }

    public void cancelPendingRequests(Object tag) {
        if (mRequestQueue != null) {
            mRequestQueue.cancelAll(tag);
        }
    }
}


text:
Entertainment

News

Sports

Movies

Cooking

Kids

Music

Religous

Information


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title><?php echo $title_bar ?></title>

    <link href="<?php echo base_url(''); ?>public/css_js/css/bootstrap.min.css" rel="stylesheet">

    <link href="<?php echo base_url(''); ?>public/css_js/css/dashboard.css" rel="stylesheet">

    <?php $this->load->view('Viewsanpham/menusp'); ?>

Tin Tức
(current)

          <?php $this->load->view('Viewtintuc/menuLeft_tt'); ?>

           <?php
            if(isset($path)){
                foreach($path as $path_view){
                    $this->load->view($path_view);
                }
            }
        ?>


text:
class AddBodyToTasks < ActiveRecord::Migration
  def change
    add_column :tasks, :body, :text
  end
end


text:
class AddParentIdToTasks < ActiveRecord::Migration
  def change
    add_column :tasks, :parent_id, :integer
  end
end


text:
import { Component, OnInit } from '@angular/core';

@Component({
    moduleId: module.id,
    selector: 'navbar',
    templateUrl: 'navbar.component.html'
})
export class NavBarComponent implements OnInit {
    constructor() { }

    ngOnInit() { }

}


text:
{{
graphs = request.vars.graph
if not graphs:
    graphs = "%s_%s_%s" % (request.vars.counterID, request.vars.subjectID, request.vars.keyID)
pass
if graphs and type(graphs) != type([]): graphs = [graphs]
for g in (graphs or []):}}
    <input type=hidden name=counter value="{{=g}}">
{{pass}}
<input type=hidden name=name id=collectionName value="">

<select name=collectionID id=collectionID>
<option value="">Select collection...</option>
<option value=0>Create a new collection</option>
{{for collectionID, c in collections.iteritems():}}
<option value={{=collectionID}}>{{=c.groupName or "Ungrouped"}} - {{=c.collectionName}}</option>
{{pass}}
</select>

<input type=button name=add value="Add to collection" OnClick="AddToCollection();">


text:
Discovery
=========

Discovery object is used to discover remote service exchange to send messages to.

Discovery types
---------------

It holds 3 types of pairs *service_name:service_exchange*:

1. For remote service. Is used to send requests, responses, errors to remote service.
2. For remote service publisher. Is used to subscribe for notifications from remote service.
3. For local service publisher. Is used to publish notifications by local service.

Discovery service (.ds) config file
+++++++++++++++++++++++++++++++++++

To use .ds file you need to describe services in .ds file in format

.. code-block:: aconf

    [service1]
    exchange=service1_exchange
    notifications=service1_notifications

    [service2]
    exchange=service2_exchange
    notifications=service2_notifications

    [service3]
    exchange=service3_exchange
    notifications=service3_notifications

    [service4]
    exchange=service4_exchange

And then to load .ds file to :class:`tavrida.discovery.FileBasedDiscoveryService`

.. code-block:: python
    :linenos:

    from tavrida import discovery

    srv1_disc = discovery.FileBasedDiscoveryService("services.ds", "service1")

Discovery without .ds file
++++++++++++++++++++++++++

To register all types of services use :class:`tavrida.discovery.LocalDiscovery`:

.. code-block:: python
    :linenos:

    from tavrida import discovery

    disc = discovery.LocalDiscovery()

    # register remote service's exchange to send equests,
    # responses, errors
    disc.register_remote_service("remote_service", "remote_service_exchange")

    # register service notification exchange to publish notifications
    # Service 'local_service' publishes notifications to its exchange
    # 'local_service_exchange'
    disc.register_local_publisher("local_service", "local_service_exchange")

    # register remote notification exchange to bind to and get notifications
    # In this example service 'local_service' gets notifications to it's queue
    # from 'remote_notifications_exchange' which is the publication exchange of
    # service 'remote_Service'
    disc.register_remote_publisher("remote_service", "remote_notifications_exchange")

Discovery binding
-----------------

Before server starts each service that needs to interact with other service should be binded to one discovery object.

Therefore if you have multiple services and subsequently multiple discovery objects you should register each required remote or local service in corresponding discovery service.

.. code-block:: python
    :linenos:

    from tavrida import discovery

    disc = discovery.LocalDiscovery()
    disc.register_remote_service("remote_service", "remote_service_exchange")
    MyServiceController.set_discovery(disc)

Discovery for proxy
-------------------

Besides that you should provide discovery object while creation :class:`tavrida.client.RPCClient` object.

.. code-block:: python
    :linenos:

    from tavrida import client
    from tavrida import discovery

    disc = discovery.LocalDiscovery()
    disc.register_remote_service(service_name="remote_service",
                                 exchange_name="remote_exchange")
    cli = client.RPCClient(config=conf, service="test_hello", discovery=disc,
                           source=source)

Soon the discovery that uses central settings storage will be implemented.
But you can implement your own discovery class. The only demand is to inherit it from :class:`tavrida.discovery.AbstractDiscovery`


text:
using System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Algorithm.Framework.Portfolio;
using QuantConnect.Data;
using QuantConnect.Data.Consolidators;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Indicators;
using QuantConnect.Securities;
using QuantConnect.Orders;

namespace QuantConnect.Algorithm.Framework.Execution
{
    /// <summary>
    /// Execution model that submits orders while the current market price is more favorable that the current volume weighted average price.
    /// </summary>
    public class VolumeWeightedAveragePriceExecutionModel : ExecutionModel
    {
        private readonly PortfolioTargetCollection _targetsCollection = new PortfolioTargetCollection();
        private readonly Dictionary<Symbol, SymbolData> _symbolData = new Dictionary<Symbol, SymbolData>();

        /// <summary>
        /// Gets or sets the maximum order quantity as a percentage of the current bar's volume.
        /// This defaults to 0.01m = 1%. For example, if the current bar's volume is 100, then
        /// the maximum order size would equal 1 share.
        /// </summary>
        public decimal MaximumOrderQuantityPercentVolume { get; set; } = 0.01m;

        /// <summary>
        /// Submit orders for the specified portolio targets.
        /// This model is free to delay or spread out these orders as it sees fit
        /// </summary>
        /// <param name="algorithm">The algorithm instance</param>
        /// <param name="targets">The portfolio targets to be ordered</param>
        public override void Execute(QCAlgorithmFramework algorithm, IPortfolioTarget[] targets)
        {
            // update the complete set of portfolio targets with the new targets
            _targetsCollection.AddRange(targets);

            foreach (var target in _targetsCollection.OrderByMarginImpact(algorithm))
            {
                var symbol = target.Symbol;

                // calculate remaining quantity to be ordered
                var unorderedQuantity = OrderSizing.GetUnorderedQuantity(algorithm, target);

                // fetch our symbol data containing our VWAP indicator
                SymbolData data;
                if (!_symbolData.TryGetValue(symbol, out data))
                {
                    continue;
                }

                // check order entry conditions
                if (PriceIsFavorable(data, unorderedQuantity))
                {
                    // get the maximum order size based on a percentage of current volume
                    var maxOrderSize = OrderSizing.PercentVolume(data.Security, MaximumOrderQuantityPercentVolume);
                    var orderSize = Math.Min(maxOrderSize, Math.Abs(unorderedQuantity));

                    // round down to even lot size
                    orderSize -= orderSize % data.Security.SymbolProperties.LotSize;
                    if (orderSize != 0)
                    {
                        algorithm.MarketOrder(data.Security.Symbol, Math.Sign(unorderedQuantity) * orderSize);
                    }
                }
            }

            _targetsCollection.ClearFulfilled(algorithm);
        }

        /// <summary>
        /// Event fired each time the we add/remove securities from the data feed
        /// </summary>
        /// <param name="algorithm">The algorithm instance that experienced the change in securities</param>
        /// <param name="changes">The security additions and removals from the algorithm</param>
        public override void OnSecuritiesChanged(QCAlgorithmFramework algorithm, SecurityChanges changes)
        {
            foreach (var added in changes.AddedSecurities)
            {
                if (!_symbolData.ContainsKey(added.Symbol))
                {
                    _symbolData[added.Symbol] = new SymbolData(algorithm, added);
                }
            }

            foreach (var removed in changes.RemovedSecurities)
            {
                // clean up removed security data
                SymbolData data;
                if (_symbolData.TryGetValue(removed.Symbol, out data))
                {
                    if (IsSafeToRemove(algorithm, removed.Symbol))
                    {
                        _symbolData.Remove(removed.Symbol);
                        algorithm.SubscriptionManager.RemoveConsolidator(removed.Symbol, data.Consolidator);
                    }
                }
            }
        }

        /// <summary>
        /// Determines if it's safe to remove the associated symbol data
        /// </summary>
        protected virtual bool IsSafeToRemove(QCAlgorithmFramework algorithm, Symbol symbol)
        {
            // confirm the security isn't currently a member of any universe
            return !algorithm.UniverseManager.Any(kvp => kvp.Value.ContainsMember(symbol));
        }

        /// <summary>
        /// Determines if the current price is better than VWAP
        /// </summary>
        protected virtual bool PriceIsFavorable(SymbolData data, decimal unorderedQuantity)
        {
            if (unorderedQuantity > 0)
            {
                if (data.Security.BidPrice < data.VWAP)
                {
                    return true;
                }
            }
            else
            {
                if (data.Security.AskPrice > data.VWAP)
                {
                    return true;
                }
            }

            return false;
        }

        protected class SymbolData
        {
            public Security Security { get; }
            public IntradayVwap VWAP { get; }
            public IDataConsolidator Consolidator { get; }

            public SymbolData(QCAlgorithmFramework algorithm, Security security)
            {
                Security = security;
                Consolidator = algorithm.ResolveConsolidator(security.Symbol, security.Resolution);
                var name = algorithm.CreateIndicatorName(security.Symbol, "VWAP", security.Resolution);
                VWAP = new IntradayVwap(name);

                algorithm.RegisterIndicator(security.Symbol, VWAP, Consolidator, bd => (BaseData) bd);
            }
        }
    }
}


text:
module Spider
    class Controller

        class NotFound < RuntimeError
            attr_reader :path

            def initialize(path)
                @path = path
            end

            def to_s
                "NotFound: #{@path}"
            end
        end

        class BadRequest < RuntimeError
        end

        class Forbidden < RuntimeError
        end

        class ControllerError < RuntimeError
        end

        class Maintenance < RuntimeError
        end

    end

end


text:
package org.eknet.spray.openid.model

import org.eknet.spray.openid.model.AssociationRequest.{SessionType, AssocType}
import scala.concurrent.duration.FiniteDuration
import javax.crypto.spec.SecretKeySpec

case class Association(atype: AssocType,
                       stype: SessionType,
                       expires: FiniteDuration,
                       macKey: Vector[Byte],
                       keypair: Option[Crypt.DH.DHKeyPair]) {

  private val validUntil = System.currentTimeMillis() + expires.toMillis
  def isValid = System.currentTimeMillis() < validUntil

  lazy val cryptedMac = keypair.map { kp =>
    require(stype != SessionType.none, "Session type does not support encryption")
    val (ya, p, g) = (BigInt(stype.pubkey.decodeBase64), BigInt(stype.modulus.decodeBase64), BigInt(stype.gen.decodeBase64))
    val pubkey = Crypt.DH.publicKey(ya, p, g)
    val zz = Crypt.DH.sharedSecret(pubkey, kp.getPrivate, p)
    val hzz = stype.hash(zz.toByteArray)
    if (hzz.length != macKey.length) sys.error("Invalid length of macKey or hzz")
    hzz.zip(macKey).map { case (h, k) => (h ^ k).toByte }
  }

  lazy val cryptedMacKey = cryptedMac.map(cm => new SecretKeySpec(cm, atype.hmac.name))
  lazy val plainMacKey = new SecretKeySpec(macKey.toArray, atype.hmac.name)
}


text:
/*
	This is the CSS file for styling of the basemap used in the visualisation of bird migration flows
*/
svg {
    background: lightgray;
}

.place {
    fill: yellow;
}

path {
    fill: #0B61A4;
    stroke: black;
}


text:
{% if page.url == '/' %}
{% assign partial = 'welcome/' %}
{% else %}
{% assign partial = '' %}
{% endif %}

{% include_relative {{ partial }}_welcome.md %}

{% include_relative {{ partial }}_feature.md %}


text:
@implementation StyleKitName

#pragma mark Cache

static UIImage* _homeIcon = nil;

static UIImage* _imageOfTagNumberButton = nil;

#pragma mark Initialization

+ (void)initialize
{
}

#pragma mark Images

+ (UIImage*)homeIcon { return _homeIcon ?: (_homeIcon = [UIImage imageNamed: @"homeIcon"]); }

#pragma mark Drawing Methods

+ (void)drawTagNumberButton
{
    //// General Declarations
    CGContextRef context = UIGraphicsGetCurrentContext();

    //// Variable Declarations
    NSString* tagNumber = @"122222";

    //// Rectangle Drawing
    CGRect rectangleRect = CGRectMake(15, 7, 50, 30);
    UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRoundedRect: rectangleRect cornerRadius: 15];
    [UIColor.grayColor setFill];
    [rectanglePath fill];
    UIFont* rectangleFont = [UIFont systemFontOfSize: UIFont.systemFontSize];
    [UIColor.whiteColor setFill];
    CGFloat rectangleTextHeight = [tagNumber sizeWithFont: rectangleFont constrainedToSize: CGSizeMake(CGRectGetWidth(rectangleRect), INFINITY) lineBreakMode: UILineBreakModeWordWrap].height;
    CGContextSaveGState(context);
    CGContextClipToRect(context, rectangleRect);
    [tagNumber drawInRect: CGRectMake(CGRectGetMinX(rectangleRect), CGRectGetMinY(rectangleRect) + (CGRectGetHeight(rectangleRect) - rectangleTextHeight) / 2, CGRectGetWidth(rectangleRect), rectangleTextHeight) withFont: rectangleFont lineBreakMode: NSLineBreakByWordWrapping alignment: NSTextAlignmentCenter];
    CGContextRestoreGState(context);
}

#pragma mark Generated Images

+ (UIImage*)imageOfTagNumberButton
{
    if (_imageOfTagNumberButton)
        return _imageOfTagNumberButton;

    UIGraphicsBeginImageContextWithOptions(CGSizeMake(80, 44), NO, 0.0f);
    [StyleKitName drawTagNumberButton];

    _imageOfTagNumberButton = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return _imageOfTagNumberButton;
}

#pragma mark Customization Infrastructure

- (void)setTagNumberButtonTargets: (NSArray*)tagNumberButtonTargets
{
    _tagNumberButtonTargets = tagNumberButtonTargets;

    for (id target in self.tagNumberButtonTargets)
        [target setImage: StyleKitName.imageOfTagNumberButton];
}

@end